apk-parser
apk-parser copied to clipboard
Bug: "ParserException: Unexpected chunk Type: 0x206"
I got this on the sample on Pixel 6 with Android 12.1 beta 3 :
can't parse apk for "android" in: "/system/framework/framework-res.apk" - exception:net.dongliu.apk.parser.exception.ParserException: Unexpected chunk Type: 0x206 isSystemApp?true
There are some similar issues on the original repository that were fixed: https://github.com/hsiafan/apk-parser/issues?q=Unexpected+chunk+Type
Meaning:
https://github.com/hsiafan/apk-parser/issues/52 https://github.com/hsiafan/apk-parser/issues/54 https://github.com/hsiafan/apk-parser/issues/40 https://github.com/hsiafan/apk-parser/issues/49 https://github.com/hsiafan/apk-parser/issues/66 https://github.com/hsiafan/apk-parser/issues/89 https://github.com/hsiafan/apk-parser/issues/111
It seems the original author told me to ignore some chunk types, such as 0x0204 : https://github.com/hsiafan/apk-parser/issues/96#issuecomment-500275300 And that it was ignored by treating it in ChunkType class, treating it as NullHeader in ResourceTableParser class.
The proper solution might be related to looking here: https://android.googlesource.com/platform/frameworks/base/+/master/libs/androidfw/include/androidfw/ResourceTypes.h
Of course, we could ignore this too. I just hope it won't cause an issue.
Attached the sample APK that is problematic, giving this error: