Skip to content

Instantly share code, notes, and snippets.

@0xDE57
Created January 19, 2026 10:12
Show Gist options
  • Select an option

  • Save 0xDE57/399d84dc66d43f0a8cb89d5b8900693e to your computer and use it in GitHub Desktop.

Select an option

Save 0xDE57/399d84dc66d43f0a8cb89d5b8900693e to your computer and use it in GitHub Desktop.
adb - dump all apks
#!/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