Last active
August 29, 2015 13:56
-
-
Save alibitek/9299376 to your computer and use it in GitHub Desktop.
Copy all system or non-system APKs from an Android device
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copy all non-system apks | |
| i=0; APK_DIR=$HOME/Downloads/Android_APKs; [ ! -f "$APK_DIR" ] && mkdir -p "$APK_DIR"; for package in $(adb shell pm list packages -f -3 | cut -d'=' -f1 | cut -d ':' -f2); do let i++; echo "$i ~> $package"; adb pull "$package" "$APK_DIR"; done | |
| # List all non system apks | |
| i=0; for package in $(adb shell pm list packages -f -3 | cut -d'=' -f1 | cut -d ':' -f2); do let i++; echo "$i ~> $package"; done | |
| # Copy all system apks | |
| i=0; APK_DIR=$HOME/Downloads/Android_APKs; [ ! -f "$APK_DIR" ] && mkdir -p "$APK_DIR"; for package in $(adb shell pm list packages -f | grep -P "(system/app|system/priv-app)" | cut -d':' -f2 | cut -d'=' -f1); do let i++; echo "$i ~> $package"; adb pull "$package" "$APK_DIR"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment