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

Not a valid dex magic value #512

Open
Syed-Bipul-Rahman opened this issue Sep 15, 2024 · 2 comments
Open

Not a valid dex magic value #512

Syed-Bipul-Rahman opened this issue Sep 15, 2024 · 2 comments

Comments

@Syed-Bipul-Rahman
Copy link

Hi,
I have got this issue when I try to decompile apk using MacOs

com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile$NotADexFile: Not a valid dex magic value: cf 77 4c c7 9b 21 01 cd
	at com.android.tools.smali.dexlib2.util.DexUtil.verifyDexHeader(DexUtil.java:92)
	at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile.getVersion(DexBackedDexFile.java:172)
	at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile.<init>(DexBackedDexFile.java:96)
	at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile.<init>(DexBackedDexFile.java:199)
	at com.android.tools.smali.dexlib2.dexbacked.ZipDexContainer$1.getDexFile(ZipDexContainer.java:180)
	at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:88)
	at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:36)
	at brut.androlib.ApkDecoder.decodeSourcesSmali(ApkDecoder.java:220)
	at brut.androlib.ApkDecoder.decode(ApkDecoder.java:143)
	at brut.apktool.Main.cmdDecode(Main.java:217)
	at brut.apktool.Main.main(Main.java:92)
	at the.bytecode.club.bytecodeviewer.util.APKTool.decodeResources(APKTool.java:41)
	at the.bytecode.club.bytecodeviewer.resources.importing.impl.APKResourceImporter.open(APKResourceImporter.java:55)
	at the.bytecode.club.bytecodeviewer.resources.importing.ImportResource.importKnownFile(ImportResource.java:87)
	at the.bytecode.club.bytecodeviewer.resources.importing.ImportResource.run(ImportResource.java:59)
	at java.base/java.lang.Thread.run(Thread.java:1570)
@Konloch
Copy link
Owner

Konloch commented Sep 16, 2024

Hi, if you hold appropriate legal rights to the file that causes this exception, could you please send it to [email protected] so I can investigate this?

@ThexXTURBOXx
Copy link
Contributor

This is only a guess, but I just think, the APK might be broken or is in some unknown format: https://source.android.com/docs/core/runtime/dex-format#dex-file-magic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants