Created
January 19, 2026 10:12
-
-
Save 0xDE57/399d84dc66d43f0a8cb89d5b8900693e to your computer and use it in GitHub Desktop.
adb - dump all apks
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
| #!/bin/bash | |
| packages=$(adb shell pm list packages) | |
| APK_DIR="apks" | |
| mkdir -p "$APK_DIR" | |
| for pkg in $packages; do | |
| package_name=${pkg:8} | |
| apk_path=$(adb shell pm path "$package_name" | cut -d':' -f2) | |
| if [ -z "$apk_path" ]; then | |
| echo "Failed to get APK path for $package_name." | |
| continue | |
| fi | |
| adb pull "$apk_path" "$APK_DIR/$package_name.apk" | |
| done | |
| echo "APK's extracted to: '$APK_DIR'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment