Skip to content

Instantly share code, notes, and snippets.

@gonza7aav
Created August 23, 2021 22:46
Show Gist options
  • Save gonza7aav/4ff73e6486d072f73fc56588fad05b3d to your computer and use it in GitHub Desktop.
Save gonza7aav/4ff73e6486d072f73fc56588fad05b3d to your computer and use it in GitHub Desktop.
Exports the apk of the app entered
#!/usr/bin/bash
# USAGE: ./exportAPK appname
# get the list of packages | filter by the appname
APK_PATH=$(adb shell pm list packages -f | grep -o /data/app/.*$1.*base\.apk)
# transfer the apk file to the running folder
adb pull '.'$APK_PATH $1'.apk'
# kill the adb server
adb kill-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment