4

我想从 apk 文件中提取源代码。出于这个目的,我参考了网上给出的链接。但是当我在命令提示符下运行 dex2jar classes.dex 时,我收到“在 VM 初始化期间发生错误无法为对象堆保留足够的空间无法创建 JVM”请指导我如何克服这个错误。

4

2 回答 2

3

编辑文件夹中的文件dex2jar.bat。改变这个:

java -Xms512m -Xmx1024m -cp %CLASSPATH% "com.googlecode.dex2jar.v3.Main" %*

内存设置应该更小。

于 2015-12-12T13:20:49.630 回答
-2

对于源代码,您需要 2 个工具

 i) dex2jar 
ii) jd-gui

要使用此工具,您需要一个 .apk 文件

 step 1 : Right click on that .apk file and convert it into .zip 
 step 2: unZip that file then take classes.dex from this unzip folder 
 step 3: Go to cmd then go to the path of dex2jar folder like D:\dex2jar tools\dex2jar-0.0.9.8\dex2jar-0.0.9.8 
 step 4: write dex2jar classes.dex
 step 5: press Enter 
 step 6: then see in path   D:\dex2jar tools\dex2jar-0.0.9.8\dex2jar-0.0.9.8  you can see a .zip file of classes then unzip and
 step 7 : import that files in jd-gui software
于 2012-05-14T10:06:57.130 回答