Thursday, November 7, 2013

Easy steps to Decompile Android APK file into Java code

Now i am going to tell you, how to decompile APK file

we need following
Tools :
Download the followings first.

Using ApkTool
- to extract AndroidManifest.xml and everything in res folder(layout xml files, images, htmls used on webview etc..)
Run the following command :
1          

 apktool.bat d sampleApp.apk

 
It also extracts the .smali file of all .class files, but which is difficult to read.

You can achieve this by using zip utility like 7-zip.

Using dex2jar

- to generate .jar file from .apk file, we need JD-GUI to view the source code from this .jar.
Run the following command :
 

dex2jar sampleApp.apk

 
 
 
Decompiling .jar JD-GUI
- it decompiles the .class files (obsfucated- in case of android app, but readable original code is obtained in case of other .jar file). i.e., we get .java back from the application.
Just Run the
 
 

jd-gui.exe and File->Open to view java code from .jar or .class file.


Now enjoy like Developer.

try it,

No comments:

Post a Comment