Decompile Android APK

It is very easy to install the APK decompiler in Mac. Just type the following command.

brew install apktool

The “brew” command is Homebrew and it doesn’t come with Mac by default. You will have to install it by copy pasting the command from their official site.

Once done, you can decompile an APK with the following command

apktool d filename.apk

If you do not have the APK file and need to extract from your phone, you can read the how to extract APK article. Once decompiled, you can search keyword within the folder with grep.

grep -rnw 'path' -e 'keyword'

I usually like to start with constants. If the developer leave their API URL as constants you can read it easily like plain text. To make matter worse, some API does not require bearer token or the token are appended as querystring. Example below I search in current folder.

grep -rnw . -e 'const'|grep https

< Back to all the stories I had written

A software engineer, a rock climbing, diving & inline skating enthusiast, a husband, a father.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store