Now i am going to tell you, how to decompile APK file
we need following
Tools :
Download the followings first.
Using ApkTool
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.
we need following
Tools :
Download the followings first.
- Dex2jar from http://code.google.com/p/dex2jar/
- JD-GUI from http://java.decompiler.free.fr/?q=jdgui
- ApkTool from http://code.google.com/p/android-apktool/
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