decompiling DEX into Java sourcecode

后端 未结 17 1450
情歌与酒
情歌与酒 2020-11-22 12:41

How can one decompile Android DEX (VM bytecode) files into corresponding Java sourcecode?

17条回答
  •  时光说笑
    2020-11-22 13:17

    Once you downloaded your APK file , You need to do the following steps to get a editable java code/document.

    1. Convert your apk file to zip (while start your download don't go with "save" option , just go with "save as" and mention your extension as .zip) by doing like this you may avoid APKTOOL...
    2. Extract the zip file , there you can find somefilename.dex. so now we need to convert dex -> .class
    3. To do that, you need "dex2jar"(you can download it from http://code.google.com/p/dex2jar/ , after extracted, in command prompt you have to mention like, [D:\dex2jar-0.09>dex2jar somefilename.dex] (Keep in mind that your somefilename.dex must be inside the same folder where you have keep your dex2jar.)
    4. Download jad from http://www.viralpatel.net/blogs/download/jad/jad.zip and extract it. Once extracted you can see two files like "jad.exe" and "Readme.txt" (sometimes "jad.txt" may there instead of "jad.exe", so just rename its extension as.exe to run)
    5. Finally, in command prompt you have to mention like [D:\jad>jad -sjava yourfilename.class] it will parse your class file into editable java document.

提交回复
热议问题