Skip to main content

How to decompile Android apk to Java source code




How 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

🙂

Comments

Popular posts from this blog

Samsung Galaxy S6 Edge Power On Off Key Button Switch Jumper Ways Smartphone Repairing

Samsung Galaxy S6 Edge Power On Off Key Button Switch Jumper Ways Smartphone Repairing Samsung Galaxy S6 Edge charging ok, flash ok, but not powering phone, this mean power button cut/line problem.So now follow simple power button jumper ways. Smartphone Repairing If you are facing an energy problem in Samsung Galaxy S6 Edge diagrams in this article can help. Continue with the following troubleshooting solutions and establish bridges necessary for the points that have been damaged. Samsung Galaxy S6 Edge Dead does not start Solution Samsung Galaxy S6 Edge keys Power Jumper Samsung Galaxy S6 Edge On Off Button Ways Samsung Galaxy S6 Edge power button point Trick damaged bridge. Trace point of damage to the meter or check off switch with a new one. We can check problem button to connect the phone to the charger with mobile entertainment indicator appears on the screen and pressing the power button, then this is a power button problem. See diagram and apply jumpers as diagram. Smar...

Samsung Galaxy Grand Neo I9060 Cell Phone Screen Repair Light Problem Solution Jumper Ways Smartphone Repairing

Samsung Galaxy Grand Neo I9060 Cell Phone Screen Repair Light Problem Solution Jumper Ways Smartphone Repairing This post is all about Samsung Galaxy Grand Neo I9060 fix phone screen problem solution. If mobile phone scree display is not working good or the screen light is not working. Samsung Galaxy Grand Neo I9060 cracked screen repair is only possible with phone screen replacement. But if the screen is not broken then replace phone screen is not required. Smartphone Repairing If Samsung Galaxy Grand Neo I9060 screen is blinking or dim light having blank scree. In all these case we have to disassemble the smart phone and check screen jack if there is any rust carbon or damages of screen jack pins.Samsung Galaxy Grand Neo I9060 phone repair tutorials are given in a few more posts so you can search other repairing problem solutions here. If screen jack have no any fault then the above mobile screen repair diagram will help you to find out tracks that are used in screen functi...

Samsung Galaxy J7 Prime Usb Charging Problem Solution Jumper Ways

Samsung Galaxy J7 Prime Usb Charging Problem Solution Jumper Ways Problem:- Samsung Galaxy J7 Prime usb charge solution, Samsung Galaxy J7 Prime usb not recognized not detected Diagnostic: – Plug the USB cable into the PC and phone jack, read the notifications on the screen phone recognized or not. Make sure you can save data to the memory card or not. Replace the USB data cable and try again. Replace the usb charger and try it again can charge it or not. Solution:- If you are facing a load problem in Samsung Galaxy J7 Prime and have tested all the above steps to solve this problem in it. Dismantle the phone and look at the phone for water and carbon damage. Clean it with an electronic cleaner and apply heat with a heat gun to dry it. Keep in mind the heat should not be over and much because it can harm your skin and damage the motherboard. So keep it in the normal stream and look at the parts carefully. Follow all these paths and components as shown in the diagram abov...