Skip to content

Instantly share code, notes, and snippets.

@cmelchior
Created February 20, 2014 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmelchior/9110093 to your computer and use it in GitHub Desktop.
Save cmelchior/9110093 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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment