Skip to content

Instantly share code, notes, and snippets.

Last active March 23, 2024 15:54
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save anonymous/9109984 to your computer and use it in GitHub Desktop.
Save anonymous/9109984 to your computer and use it in GitHub Desktop.
Bash script for pulling APK's from Non-rooted android devices
#!/bin/sh
if test $# -lt 1 ; then
echo "Usage: download_apk.sh <GooglePlayPackageName>"
exit 1
fi
PACKAGE=$1
APK_PATH=`adb shell pm list packages -f -3 | grep $PACKAGE | cut -d'=' -f 1 | cut -c9-`
echo "Pulling $APK_PATH from device"
echo `adb pull ${APK_PATH} ./${PACKAGE}.apk`
@ohadcn
Copy link

ohadcn commented Sep 16, 2014

checkout my fork, it can download all your apps at once
https://gist.github.com/ohadcn/f2e5c2436c67cd8180e2

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