Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Decompiler issue "Could not find or load main class classes.dex"

Attempting to recover an app I wrote not long ago (do not store in DropBox), I unzipped my .apk and tried to use

d2j-dex2jar classes.dex 

to get my source, but got this message instead:

Error: Could not find or load main class classes.dex

Like all rookies, my main activity (only one, actually) was named MainActivity.java, not Main.java. Is this the source of this error and if so, how can I fix it? If not, what else can I try?

NOTE: this is being done in the DOS cmd window.

EDIT: wow, nobody has ever seen this?

EDIT: I did not use ProGuard (I checked).

like image 613
Peltier Cooler Avatar asked Nov 29 '25 10:11

Peltier Cooler


2 Answers

Ok , so from my work with dex2jar I'd recomment running it directly on the apk file not on the classes.dex . So in your terminal ( using Windows in the exmple )

C:\dex2jar.bat Lost_apk.apk

It will spit out a jar file which you can look into with jd-gui.

like image 107
Daniel M. Avatar answered Dec 01 '25 01:12

Daniel M.


Got same issue in windows, solved - path must not contain special symbols, like '!', otherwise utility can't find libraries

like image 34
Maxim Akristiniy Avatar answered Dec 01 '25 01:12

Maxim Akristiniy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!