Using a bash script to automatically pull and install an android app via ADB. However, I get an error ' does not existte object [apk path]`. Here is the script:
#! /bin/bash
APK_PATH="$(adb shell pm path $1)"
echo "${APK_PATH#*:}"
APK_PATH=${APK_PATH#*:}
adb pull $APK_PATH
mv base.apk $1.apk
if [ "$2" == "--jadx" ] || [ "$2" == "-j" ]
then jadx $1
fi
How do I solve this.
NOTE: I used an alias to the script location so I just need to run autoapk.
For the specific error, I ran autoapk b3nac.injuredandroid
and got the error message
/data/app/b3nac.injuredandroid-1/base.apk
' does not existte object '/data/app/b3nac.injuredandroid-1/base.apk
mv: cannot stat 'base.apk': No such file or directory