Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[core] Bad second byte #1495

Closed
ghost opened this issue May 28, 2022 · 2 comments
Closed

[core] Bad second byte #1495

ghost opened this issue May 28, 2022 · 2 comments
Labels
bug Core Issues in jadx-core module

Comments

@ghost
Copy link

ghost commented May 28, 2022

When dropping an APK, I got dex error even though checksum is already disabled in settings. Apktool can still decompile APK perfectly

APK link: https://apkcombo.com/apk-downloader/#package=com.joycity.cryptoball&arches=armeabi-v7a

ERROR: Jadx init error
jadx.plugins.input.dex.DexException: Bad second byte
	at jadx.plugins.input.dex.utils.MUtf8.decode(MUtf8.java:23)
	at jadx.plugins.input.dex.sections.SectionReader.getString(SectionReader.java:178)
	at jadx.plugins.input.dex.sections.SectionReader.getType(SectionReader.java:165)
	at jadx.plugins.input.dex.sections.DexClassData.getType(DexClassData.java:44)
	at jadx.core.dex.nodes.RootNode.addDummyClass(RootNode.java:118)
	at jadx.core.dex.nodes.RootNode.lambda$loadClasses$0(RootNode.java:95)
	at jadx.plugins.input.dex.DexReader.visitClasses(DexReader.java:35)
	at jadx.plugins.input.dex.DexLoadResult.visitClasses(DexLoadResult.java:27)
	at jadx.core.dex.nodes.RootNode.loadClasses(RootNode.java:91)
	at jadx.api.JadxDecompiler.load(JadxDecompiler.java:122)
	at jadx.gui.JadxWrapper.open(JadxWrapper.java:55)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

@ghost ghost added bug Core Issues in jadx-core module labels May 28, 2022
@skylot
Copy link
Owner

skylot commented May 28, 2022

@VanHoevenTR thanks for report!
Here jadx was trying to load assets/.zuzewwy.dex file, looks like that file was modified to prevent loading.
I commit a fix to skip/ignore such files, so now jadx can load apk just fine 👍

Not sure if this was a good idea to load all dex files in apk, but sometimes it is helpful and show classes which loads at runtime.

@skylot skylot closed this as completed May 28, 2022
@ghost
Copy link
Author

ghost commented May 28, 2022

Ok. Well, I actually used --only-main-classes for apktool, hence I didn't got the error. I really doubt decompiling dex from assets is needed

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Core Issues in jadx-core module
Projects
None yet
Development

No branches or pull requests

1 participant