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

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