Skip to content

Instantly share code, notes, and snippets.

@attacker-codeninja
Forked from lauritzh/download_apks.sh
Created November 20, 2024 03:56
Show Gist options
  • Save attacker-codeninja/6ad2e5c1ff28b0feff958791377daf82 to your computer and use it in GitHub Desktop.
Save attacker-codeninja/6ad2e5c1ff28b0feff958791377daf82 to your computer and use it in GitHub Desktop.
Ever wanted to obtain an APK from an Android device? You do not need to install fancy Apps for this, ADB and the following minimal Bash script is sufficient to do so. Use the App's bundle identifier as first argument.
#!/bin/bash
# Usage: ./download_apks.sh com.example.app
BUNDLE_FILES=$(adb shell pm path "$1")
for file in $BUNDLE_FILES; do
CLEAN=$(echo "$file"|sed 's/[^:]*://')
adb pull "$CLEAN" .
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment