Get these tools:
The source code is quite readable as dex2jar makes some optimizations.
And here's the procedure on how to decompile:
Convert classes.dex in test_apk-debug.apk to test_apk-debug_dex2jar.jar
d2j-dex2jar.sh -f -o output_jar.jar apk_to_decompile.apk
d2j-dex2jar.sh -f -o output_jar.jar dex_to_decompile.dex
Note 1: In the Windows machines all the
.sh
scripts are replaced by.bat
scripts
Note 2: On linux/mac don't forget about
sh
orbash
. The full command should be:
sh d2j-dex2jar.sh -f -o output_jar.jar apk_to_decompile.apk
Note 3: Also, remember to add execute permission to
dex2jar-X.X
directory e.g.sudo chmod -R +x dex2jar-2.0
Open the jar in JD-GUI