Most of the developers sometimes want to see the source codes of some applications for reverse engineering, so do I.  To do that, I learned how to get source codes of an apk and last week when I wanted to see source codes of an apk again I realized that I forgot how to do that so I learned again and I decided to write this entry to remember quickly how to look at source code of an apk and I think this entry may be useful for some beginner guys in doing reverse engineering stuff.

Now, we can start this short tutorial. Btw, before start please download dex2jar and jd-gui.

  • Open the apk file with winrar or winzip and extract the classes.dex file as shown below.

  • dex2jar downloaded from http://code.google.com/p/dex2jar and extract its content the same folder you extracted classes.dex file in previous step.
  • Open the command line, go the directory you extracted files and issue this command.

dex2jar-0.0.9.8/dex2jar classes.dex

dex2jar-0.0.9.8 is the folder created when we extracted dex2jar. (Forward slash(/) or backslash(/) shoud be used according to OS(Linux or Windows))

  •  After previous step, we should have a file with name classes_dex2jar.jar file in the same directory. Extract classes_dex2jar.jar by winrar.

  • Run jd-gui executable file. Lastly open(File > Open File) any file you extracted in previous step and tadaammmm you see the source code of this file.

PS: Also there is folder with name “ee”. It does not exist in sipdroid source code but some source codes in sipdroid are under this folder.

Thanks for this info by Ahmet Oguz Mermerkaya

Related Posts