Skip additional payload data of TYPE chunk #1324

Merged
merged 1 commit into from Sep 18, 2016

Conversation

Projects
None yet
2 participants
@jamestut
Contributor

jamestut commented Sep 17, 2016

Some APKs' arsc has additional payload data (like TYPE 8 chunks and/or padding) in the TYPE chunk. After the ARSCDecoder read such kind of chunk, it acts erratically. Most of the time, it just stops parsing the ARSC, therefore, some resources are not decoded because they are not in the apktool's resources' spec table.

The example APKs, attached below, is from Huawei P9 Plus ROM (VIEL29C636B170). Both APK's resource are successfully decoded by aapt included in build tools v24.

Gallery2.apk.zip
HwCamera2.apk.zip

Skip additional payload data of TYPE chunk
Some APKs' arsc has additional payload data (like TYPE 8 chunks and/or padding) in the TYPE chunk. After the ARSCDecoder read such kind of chunk, it acts erratically. Most of the time, it just stops parsing the ARSC, therefore, some resources are not decoded because they are not in the apktool's resources' spec table.
@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Sep 18, 2016

Owner

Thanks for the research. I've found this additional data additional in the ConfigFlags and wrote a similar check. I'll review the apk links you posted and get this merged.

Thanks again.

Owner

iBotPeaches commented Sep 18, 2016

Thanks for the research. I've found this additional data additional in the ConfigFlags and wrote a similar check. I'll review the apk links you posted and get this merged.

Thanks again.

@iBotPeaches iBotPeaches added this to the 2.2.1 - Android Nougat milestone Sep 18, 2016

@iBotPeaches iBotPeaches self-assigned this Sep 18, 2016

@iBotPeaches iBotPeaches merged commit 81b22df into iBotPeaches:master Sep 18, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment