Skip to content

Instantly share code, notes, and snippets.

@gottsman
Forked from ohadcn/download_apk.sh
Created August 18, 2017 16:04
Show Gist options
  • Save gottsman/ae89731b15fba90128cb76f7a895f9d3 to your computer and use it in GitHub Desktop.
Save gottsman/ae89731b15fba90128cb76f7a895f9d3 to your computer and use it in GitHub Desktop.
#!/bin/sh
if test $# -lt 1 ; then
echo "Usage: download_apk.sh <target-dir>"
exit 1
fi
for APK_PATH in $(adb shell pm list packages -f -3|sed 's/package://g'|sed s/=.*$//g) ; do
echo -n "Pulling $APK_PATH from device... "
adb pull $APK_PATH $1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment