Skip to content

Instantly share code, notes, and snippets.

@Spy0x7
Forked from lauritzh/download_apks.sh
Created January 8, 2023 20:46
Show Gist options
  • Save Spy0x7/0c19957a241c39ff36e20009225709f2 to your computer and use it in GitHub Desktop.
Save Spy0x7/0c19957a241c39ff36e20009225709f2 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