How to decompile android apk to java source code?

I wrote another post with the same title here and it got a lot of comments and people wanted to know more, and some point some visitors was confused. so here is the easiest copy-paste solution.

  1. Download dex2jar from http://code.google.com/p/dex2jar/downloads/list
  2. Extract dex2jar-version.zip to a folder. for example /home/codexplo/( for linux), or  C:\ (for windows)

unzip -x dex2jar-version.zip -d /home/codexplo

  1. use dex2jar to generate .jar file. dex2jar will generate a file named someApk-dex2jar.jar in the working folder.
   linux sh /home/codexplo/dex2jar-version/d2j-dex2jar.sh /home/codexplo/someApk.apk
   windows C:\dex2jar-version\d2j-dex2jar.bat someApk.apk
  1. use a decompiler to view the source.

that’s it

Reference : http://code.google.com/p/dex2jar/wiki/UserGuide

One thought on “How to decompile android apk to java source code?

Leave a comment