Skip to content

Instantly share code, notes, and snippets.

@robsouth84
Created October 23, 2019 02:42
Show Gist options
  • Save robsouth84/489378f5a8a620c07cc7e616870a89ec to your computer and use it in GitHub Desktop.
Save robsouth84/489378f5a8a620c07cc7e616870a89ec to your computer and use it in GitHub Desktop.
//find all apps NOT in /data and pull to current dir
$ adb shell "pm list packages -f | cut -d':' -F2 | cut -d'=' -F1 | grep apk$ " | while read line; do adb pull $line; done
//find all apps NOT in /data && NOT in /vendor (likely no access) and pull to current dir
$ adb shell "pm list packages -f | cut -d':' -F2 | cut -d'=' -F1 | grep apk$ | grep -v ^\/vendor" | while read line; do adb pull $line; done
//find all apps in /data and pull to current dir
//this will pull entire package folder not just apk. first this was out of convienience when parsing the strings, but turns out you get some intersting binaries along the way. see facebook for example
$ adb shell "pm list packages -f | cut -d':' -F2 | grep ^\/data | cut -sd 'base.apk' -F1 " | while read line; do adb pull $line; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment