- Download the
apk.shscript. - Download the
bit.shscript (found here). - Run the
bit.shfile usingbit apk.sh apk.
The following steps are if you want to decode the app and look at the underlying code. If you just want the APK, the above scripts are enough.
- Download APKTool from here.
- Run
chmod u+x apktool.sh. - Open
apktool.sh.- Remove the line that says
libdir='$progdir'. - In the following line, remove the usage of libdir (i.e.
"$libdir/$jarfile"becomes just$jarfile).
- Remove the line that says
- Save and close
apktool.sh. - Move
apktool.shandapktool.jarinto/usr/local/bin/.- To do this, run the command
sudo cp apktool.sh /usr/local/bin, and enter your password. - Do the same for
apktool.jar
- To do this, run the command
- Open your
~/.bashrcfile, and just below the linealias apk='bash apk.sh, add the following linesalias list_apk='adb shell pm list packagesalias decode_apk='sudo bash apktool.sh d'
- Connect your phone to your computer, and make sure ADB debugging is enabled on your phone.
- List all apps installed on your phone.
- In the terminal, run the command
list_apk | grep <keyword>, where<keyword>is some word that is contained in the app's name. - Make sure you make the keyword clear enough to only get one result.
- For example, "key" may work, but several apps could use the word "key," so narrow it down by using a keyword like "monkey," where it would only pertain to one app.
- In the terminal, run the command
- Run
apk <keyword>to download the APK to your desktop.- You may stop here and distribute the APK as is, or you may continue on.
- Use the command
decode_apk <filename>.apk, where<filename>.apkis the name of the file generated by the previous step. - This will generate code that you can examine to find what you want.
- NOTE: it will not be in human-readable Java.