Apktool: Invalid chunk type
Information Apktool Version (apktool -version) - v2.4.0 Operating System (Mac, Linux, Windows) - Windows and Linux APK From? (Playstore, ROM, Other) - Google Play store https://play.google.com/store/apps/details?id=com.bukalapak.android&hl=in
root@jeruk:/home/sihar# apktool d bukalapak.apk
I: Using Apktool 2.4.0 on bukalapak.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Invalid chunk type: expected=0x00000200, got=0x00000203
at brut.androlib.res.decoder.ARSCDecoder.checkChunkType(ARSCDecoder.java:542)
at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:88)
at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:748)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:67)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:59)
at brut.androlib.Androlib.getResTable(Androlib.java:68)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:228)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:118)
at brut.apktool.Main.cmdDecode(Main.java:167)
at brut.apktool.Main.main(Main.java:76)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 11
- Comments: 22 (8 by maintainers)
Commits related to this issue
- update changelog #2099 — committed to iBotPeaches/Apktool by iBotPeaches 3 years ago
Damn this apk is weird. It has like 60+ dynamic references.
Confirmed.
Sorry man, but this just seems odd. Did you read this bug report you responded to?
I responded earlier with all the details here (https://github.com/iBotPeaches/Apktool/issues/2099#issuecomment-791965193) and that link included the PR (https://github.com/iBotPeaches/Apktool/pull/2527) that I marked as fixing a good portion of this ticket.
However, why just pluck a singular commit? I’m sure you’ll want the other fixes and enhancements in the master branch vs 1 commit for 1 issue. I can’t predict what 1 commit applied on top of 2.5.0 will even do.
Then finally, we’ve been building builds for each commit to master under the “Build” job. You can see the last commit to master job trigged a binary and archived it here - https://github.com/iBotPeaches/Apktool/actions/runs/1002640994 so you don’t really need to build them locally. You can test bleeding edge builds for every master commit.
Is this an issue with Android App Bundle APKs particularly? I keep running into APKs that cause apktool to throw this error more often, and App Bundle is going to be made mandatory sometime in 2021. @iBotPeaches what kind of support do you need for this fix?
This is in 2.5.1 - not released yet.
This is partially fixed so I’m closing this ticket. It now decodes without issue after the merge of https://github.com/iBotPeaches/Apktool/pull/2527
However, it as shown below has multiple packages per resources.arsc which is an ongoing issue being tracked here - https://github.com/iBotPeaches/Apktool/issues/2514