-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[BUG] Invalid CEN header when unzipping apk #3198
Comments
I guess your system may be rejecting system property sets? What happens when you manually set |
I got the same issue with the Apktool v2.8.1 InformationApktool Version (apktool -version) - 2.8.1 Stacktrace/LogcatI: Using Apktool 2.8.1 on base.apk
Exception in thread "main" brut.androlib.exceptions.AndrolibException: brut.directory.DirectoryException: java.util.zip.ZipException: Invalid CEN header (invalid zip64 extra data field size)
at brut.androlib.res.ResourcesDecoder.hasManifest(ResourcesDecoder.java:70)
at brut.androlib.res.ResourcesDecoder.decodeManifest(ResourcesDecoder.java:102)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:95)
at brut.apktool.Main.cmdDecode(Main.java:190)
at brut.apktool.Main.main(Main.java:93)
Caused by: brut.directory.DirectoryException: java.util.zip.ZipException: Invalid CEN header (invalid zip64 extra data field size)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:55)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:38)
at brut.directory.ExtFile.getDirectory(ExtFile.java:49)
at brut.androlib.res.ResourcesDecoder.hasManifest(ResourcesDecoder.java:68)
... 4 more
Caused by: java.util.zip.ZipException: Invalid CEN header (invalid zip64 extra data field size)
at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1750)
at java.base/java.util.zip.ZipFile$Source.checkExtraFields(ZipFile.java:1276)
at java.base/java.util.zip.ZipFile$Source.checkAndAddEntry(ZipFile.java:1219)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1689)
at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1464)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1427)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:723)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:250)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:179)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:193)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)
... 7 more |
May one of you try the upgraded helper scripts I've attached in this pr? #3215 To be honest - this doesn't make sense. The Security Manager reads as the only reason you wouldn't be allowed to set this at runtime, which has been deprecated for years. |
Tested. This pr #3215 worked for me on both Windows and macOS platforms. |
Thanks. Since you can use the existing Apktool version you have w/ that patch. I'll do a bit more search why the |
For the reason why |
Information
apktool -version
) - 2.8.1java --version
) - openjdk 20.0.2 2023-07-18Stacktrace/Logcat
Steps to Reproduce
java -jar ~/.apklab/apktool_2.8.1.jar d ~/Downloads/HomeHawk_3.8_apkcombo.com.apk -o ~/Downloads/HomeHawk_3.8_apkcombo.com --only-main-classes
Frameworks
If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files
(
.apks
that live in/system/framework
or/system/priv-app
)APK
HomeHawk app from the Play Store, downloaded with Apkcombo
Link: https://files.catbox.moe/m2uns4.apk
Questions to ask before submission
apktool d
,apktool b
without changing anything? YesFinal Note: I was able to workaround this problem by manually unzipping the apk and rezipping it.
I noticed there was #3178, but it looks like it's still broken.
The text was updated successfully, but these errors were encountered: