0% found this document useful (0 votes)
137 views

Learn To Decompile Android Apk To Java Source Code

This document provides instructions for decompiling an Android APK file into its original Java source code in 10 steps: 1) Create a Java project in Eclipse, 2) Add a libs folder and copy dex2jar JAR files, 3) Add JAR files to the Java build path, 4) Copy the APK to the project, 5) Configure a run configuration to run dex2jar on the APK, 6) Run the project to generate a converted JAR file, 7) Open the JAR in JD-GUI to view source files, and 8) Use Apktool to decompile XML layout files. Following these steps allows reverse engineering an APK into its original Java code.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views

Learn To Decompile Android Apk To Java Source Code

This document provides instructions for decompiling an Android APK file into its original Java source code in 10 steps: 1) Create a Java project in Eclipse, 2) Add a libs folder and copy dex2jar JAR files, 3) Add JAR files to the Java build path, 4) Copy the APK to the project, 5) Configure a run configuration to run dex2jar on the APK, 6) Run the project to generate a converted JAR file, 7) Open the JAR in JD-GUI to view source files, and 8) Use Apktool to decompile XML layout files. Following these steps allows reverse engineering an APK into its original Java code.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Learn to decompile Android apk to Java source

code
Finally we found a way to easily decompile Android apk to original java source code.Here are the
instructions to decompile android apk to java source code. This method is also called as Reverse
Engineering.

Requirements:
Eclipse IDE:
Download and install eclipse IDE from the link.
http://www.eclipse.org/downloads/
Dex2jar:
Dex2jar converts the DEX (Dalvik Executable) files to the Java source. Download and extract dex2jar
from the link.
https://dex2jar.googlecode.com/files/dex2jar-0.0.9.15.zip
JD-GUI:
JD-GUI is used to see the soure Java Class files from the converted jar files.
Download and extract JD-GUI from the link.
https://innlab.googlecode.com/files/jd-gui-0.3.3.windows.zip

Decompiling Instructions:
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

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

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
Thanks, Enjoy
For any suggestions contact us.

You might also like