How to decompile Android apk to Java source code
Decompiling Instructions:
Linux:
1.Open Eclipse IDE and create a new Java project named Android2Java.
2.Create a new folder “libs” in the root of your Android2Java project.
3.Paste the jar files in the lib folder of extracted dex2jar to the newly created libs folder of Android2Java project.
dex2jar-0.0.9.15/lib/(All jar files) –(Copy)-> Android2Java/libs/
4.Right click on the Android2Java project and select Properties. In the Java Build Path select the Libraries Tab. Add all the jar files to the library and then OK.
5.Now paste a apk file in your project which is to be decompiled. Here I am using Facebook.apk
6.Now Right click on Android2Java project and select Run As->Run Configurations.
7.Enter the Main class as com.googlecode.dex2jar.v3.Main
and the arugment as Facebook.apk
6.Now Right click on Android2Java project and select Run As->Run Configurations.
7.Enter the Main class as com.googlecode.dex2jar.v3.Main
and the arugment as Facebook.apk
Note:
You should enter the name of the apk pasted in your project as argument.
8.Then run the project, you will find a converted jar file in the project folder. Here the jar file is Facebook_dex2jar.jar
You should enter the name of the apk pasted in your project as argument.
8.Then run the project, you will find a converted jar file in the project folder. Here the jar file is Facebook_dex2jar.jar
9.Now open the jar file with JD-GUI. You will see all the java class source files.
10.To decompile the xml layout files use Apktool. You can download apktool from the link.
https://code.google.com/p/android-apktool/downloads/list
https://code.google.com/p/android-apktool/downloads/list
U can follow this same steps in Windows also;
Step to convert .jar file to ordinary class file
It will show like
Now you got ordinary java file from .dex file...
















