Using editor VSCode to open exported source code, look like this:Ĭonversion correctness : Jadx > Procyon > CRF > JD-GUI Java -jar /Users/crifan/dev/dev_tool/android/reverse_engineering/Procyon/procyon-decompiler-0.5.34.jar -jar -o 8825612 Java -jar /path/to/procyon-decompiler-0.5.34.jar -jar your_to_decompile.jar -o outputFolderName Here demo Procyon convert jar to java source code: Procyon: popular, no code decompile error.CRF: popular, minor code will decompile error.jd-gui: most popular, but many code will decompile error.dex to jar: sh d2j-dex2jar.sh -f ~/path/to/dex_to_xĮxample: ➜ v3.4.8 /Users/crifan/dev/dev_tool/android/reverse_engineering/dex-tools/dex-tools-2.1-SNAPSHOT/d2j-dex2jar.sh -f ĭex2jar ->.apk to jar: sh d2j-dex2jar.sh -f ~/path/to/apk_to_decompile.apk.Two Step solution Step1: dex to jar Toolsĭownload dex2jar zip, unzip got d2j-dex2jar.sh, then: download jadx-0.9.0.zip, unzip it, in bin folder can see command line jadx or GUI version jadx-gui, double click to run GUI version: jadx-gui.One step solution: dex directly to java sourcecode Tools Two Step: first convert dex to jar, second convert jar to java sourcecode.One Step: directly convert dex to java sourcecode.Here is my latest (2019 year) answer: Main Logicįrom dex to java sourcecode, currently has two kind of solution: Since Dheeraj Bhaskar's answer is relatively old as many years past. class files, so that they can be analyzed using typical java static analysis tools. Lastly, the suggestion of dare is also of note. Which approach you choose would depend on what you're looking to achieve. In short, your choices are pretty much either to decompile into Java, which is more readable but likely irreversible, or to disassemble to smali, which is harder to read but much more flexible to make changes and repackage a modified app. If you go the smali route, you might want to try APK Studio, an IDE that automates some of the above steps to assist you with decompiling and recompiling an apk and installing it on a device. Note that apktool does not sign the resulting apk, so you'll need to take care of that just like any other Android application. Once you're done, you can easily package the apk back up with apktool again. smali files, as described in this question. dex files with Android's dx compiler, and then use baksmali (smali disassembler) to convert the. class files with javac, then convert your. You can read and modify the smali or even replace classes entirely by generating smali from new Java source (to do this, you could compile your. Once you've got apktool installed, you can just point it at an apk file, and you'll get back a smali file for each class contained in the application. I've found that the easiest way to do this is with apktool. The other major alternative is to disassemble the bytecode to smali, an assembly language designed for precisely this purpose. Note that if the source has been obfuscated with proguard, the resulting source code will be substantially more difficult to untangle. In other words, you can read the source, but you can't really modify and repackage it. The resulting source is useful to read and understand the functionality of an app, but will likely not produce 100% usable code. You can do this easily with dex2jar and jd-gui, as fred mentions. To clarify somewhat, there are two major paths you might take here depending on what you want to accomplish:ĭecompile the Dalvik bytecode (dex) into readable Java source.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |