RE env for inspecting APKs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
440 B

  1. #!/bin/bash
  2. #
  3. # adb shell pm list packages
  4. #BUNDLE_ID="com.duckduckgo.mobile.android"
  5. BUNDLE_ID=$1
  6. mkdir -p ./apks
  7. printf "Downloading bundle id: $BUNDLE_ID\n\n"
  8. APK=$(adb shell pm path $BUNDLE_ID)
  9. printf "\nAPK path on device: $APK\n"
  10. APK=`echo $APK | awk '{print $NF}' FS=':' | tr -d '\r\n'`
  11. printf "\napk file: $APK\n"
  12. NEW_APK_FP="./apks/$BUNDLE_ID.apk"
  13. adb pull $APK $NEW_APK_FP
  14. printf "\nDownloaded apk file: $NEW_APK_FP\n"