Skip to content

[BUG] Apk decompile Error #3189

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

Closed
jamiekarvans opened this issue Jul 21, 2023 · 1 comment
Closed

[BUG] Apk decompile Error #3189

jamiekarvans opened this issue Jul 21, 2023 · 1 comment

Comments

@jamiekarvans
Copy link

jamiekarvans commented Jul 21, 2023

Hi trying to decompile APK using latest version and it works well except for this one gives me this error:

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: java.util.zip.ZipException: invalid CEN header (bad compression method)
	at brut.androlib.ApkDecoder.hasResources(ApkDecoder.java:307)
	at brut.androlib.ApkDecoder.decode(ApkDecoder.java:103)
	at brut.apktool.Main.cmdDecode(Main.java:164)
	at brut.apktool.Main.main(Main.java:73)
Caused by: brut.directory.DirectoryException: java.util.zip.ZipException: invalid CEN header (bad compression method)
	at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:55)
	at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:38)
	at brut.directory.ExtFile.getDirectory(ExtFile.java:52)
	at brut.androlib.ApkDecoder.hasResources(ApkDecoder.java:305)
	... 3 more
Caused by: java.util.zip.ZipException: invalid CEN header (bad compression method)
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:226)
	at java.util.zip.ZipFile.<init>(ZipFile.java:155)
	at java.util.zip.ZipFile.<init>(ZipFile.java:169)
	at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)
	... 6 more

Can someone help with the issue or decompile the file?
here is the apk file https://s13.uupload.ir/files/matiex/test66.apk

@iBotPeaches
Copy link
Owner

This is actually caused by a recent Java update that made things quite strict. It was reported here and slated for a hotfix this weekend - #3170

Fixed in this commit: #3178

If you want to workaround it. Set these system properties for your java:

  • jdk.util.zip.disableZip64ExtraFieldValidation - true
  • jdk.nio.zipfs.allowDotZipEntry - true

@iBotPeaches iBotPeaches closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants