如何将Android DEX(VM字节码)文件反编译成对应的Java源代码?
最佳答案
很简单
获取这些工具:
由于dex2jar做了一些优化,源代码可读性很强。
程序:
下面是如何反编译的过程:
第 1 步:
将test_apk-debug.apk中的classes.dex转换为test_apk-debug_dex2jar.jar
d2j-dex2jar.sh -f -o output_jar.jar apk_to_decompile.apk
d2j-dex2jar.sh -f -o output_jar.jar dex_to_decompile.dex
Note 1: In the Windows machines all the
.sh
scripts are replaced by.bat
scripts
Note 2: On linux/mac don't forget about
sh
orbash
. The full command should be:
sh d2j-dex2jar.sh -f -o output_jar.jar apk_to_decompile.apk
Note 3: Also, remember to add execute permission to
dex2jar-X.X
directory e.g.sudo chmod -R +x dex2jar-2.0
第 2 步:
在JD-GUI中打开jar
关于java - 如何将DEX反编译成Java源代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1249973/