Skip to content

Instantly share code, notes, and snippets.

@ohadcn
Forked from anonymous/download_apk.sh
Last active September 28, 2018 10:20
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ohadcn/f2e5c2436c67cd8180e2 to your computer and use it in GitHub Desktop.
Save ohadcn/f2e5c2436c67cd8180e2 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
@raghavsatyadev
Copy link

Does this work on windows? I tried but it always takes the wrong path

ex.
Rather then taking this path
'/data/app/com.google.android.apps.adm-1MUcxp3ZhONWViGvS9YUHQ==/base.apk'

it takes this one
'C:/Program Files/Git/data/app/com.google.android.apps.adm-1MUcxp3ZhONWViGvS9YUHQ==/base.apk'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment