-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] (1.5.0) APK fails to decompile with "Unsigned short value out of range: 71344" #2158
Comments
Hm, unfortunately smali doesn't support mutidex output, so it is hard to limit methods on input files. The only way is to do one to one compilation, and this will be very inefficient. Anyway, I will try to check smali sources for possible workaround. @bluemods aside from smali error your claim that it works fine before looks doubful, because jadx doesn't support smali multidex in any version. Maybe you just load a whole folder containing apk or dex files and this folder also contains smali files now, so jadx fails to compile whese smali files. This is an only way I can think of to justify your claim 🙂 |
May be a dumb question: Why should jadx trying to write a dex file when opening an APK file which already contains DEX files? As far as I know SmaliConvert plugin is supposed to convert smali files to dex code. But the linked APK file does not contain smali files. So where do the smali files come from? |
@jpstotz it is funny, but a lot of people confusing Correct statement is: Another similar confusion I often saw, it is suggestion to convert dex to jar before using jadx, because people assume that jadx is a "java" decompiler 🤣 |
I implemented compilation of one smali file at a time. I managed to avoid creation of temp files by using in memory store, also I used multithreaded compilation. As a result, new implementation can be faster than previous one 🙂 |
I built the master source myself with the latest commit and it decompiles fine now. Thank you |
Issue details
The new release (1.5.0) fails to decompile APKs that previously decompiled many times without issue. Attached stack trace is below.
This error is caused by the smali tool attempting to repack a folder into a DEX file that has too many classes / methods in it (limit is 65536).
This is probably caused by methods being inserted by JADX somehow into the smali then recompiling it, which then causes the per-dex limit to be exceeded. To get around this, you would split it into multiple dex files to make sure each one is under the limit.
Not sure where I would look in the source to fix that though.
APK can be downloaded at: https://www.apkmirror.com/wp-content/themes/APKMirror/download.php?id=1237973&key=b005627028a9b01020c015bd1d083505135f1d1e
Relevant log output or stacktrace
Provide sample and class/method full name
No response
Jadx version
1.5.0
The text was updated successfully, but these errors were encountered: