pxb1988 / dex2jar

Tools to work with android .dex and java .class files
Apache License 2.0
12.05k stars 2.09k forks source link

So... this thing doesn't work on Windows at all? #616

Closed MrAroGH closed 2 months ago

MrAroGH commented 2 months ago

I have downloaded dex-tools v2.4 zip file, unpacked dex2jar, put my apk file in this folder and tried to run d2j-dex2jar.bat from separate CMD with following commands: cd C:\Users\Admin\Desktop\dex2jar d2j-dex2jar.bat unpack.apk But this doesn't work and throws me an error saying "Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap"

ThexXTURBOXx commented 2 months ago

Either your computer does not have enough RAM for the predefined JVM parameters or the predefined JVM parameters are not enough for your apk/dex file. You need to adjust the -Xmx parameter inside the d2j-invoke.bat file. However, please note that having <= 2GB RAM available is very close to the limit of dex2jar's usual needs. Sometimes it even needs 8GB RAM on my machine

Entretoize commented 1 month ago

I have 32GB of RAM and have the same error !

ThexXTURBOXx commented 1 month ago

@Entretoize Please follow what I suggested in the comment above

Entretoize commented 1 month ago

That's not clear, the parameter is -Xmx2048m and you say dex2jar needs at least 2GB, so should I increase the number ?

ThexXTURBOXx commented 1 month ago

<= 2GB RAM available is very close to the limit of dex2jar's usual needs

I think, the usual should be pretty clear. On a 32 GB machine, try setting it to -Xmx16G for example. That should be plenty enough. And if it is still not enough, try increasing it even more. But if it still does not work at around 24G, you might be out of luck for your use case