Skip to content
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] Bad second byte #1495

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

[core] Bad second byte #1495

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

Comments

@AndroidMaster24
Copy link

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)

@AndroidMaster24 AndroidMaster24 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
@AndroidMaster24
Copy link
Author

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

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

No branches or pull requests

2 participants