The hard drive on my laptop just crashed and I lost all the source code for an app that I have been working on for the past two months. All I have is the APK file that is st
This is an alternative description - just in case someone got stuck with the description above. Follow the steps:
apktool.jar
and put both files in the same foldercmd.exe
) and change into that folder; verify that a Java Environment is installed (for Linux check the notes regarding required libraries as well)apktool decode [apk file]
Intermediate result: resource files, AndroidManifest.xml
Intermediate result: classes.dex
dex2jar-0.0.9.15.zip
from http://code.google.com/p/dex2jar/downloads/detail?name=dex2jar-0.0.9.15.zip&can=2&q=classes.dex
onto dex2jar.bat
(or enter \dex2jar.bat classes.dex
in a DOS box; for Linux use dex2jar.sh
)
Intermediate result: classes_dex2jar.jar
classes_dex2jar.jar
(might be optional depending on used decompiler)Result: source code
Note: it is not allowed to decompile third party packages; this guide is intended to recover personal source code from an APK file only; finally, the resulting code will most likely be obfuscated