Skip to content
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

Skip additional payload data of TYPE chunk #1324

Merged
merged 1 commit into from
Sep 18, 2016

Conversation

jamestut
Copy link
Contributor

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

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
Copy link
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.

@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
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

Successfully merging this pull request may close these issues.

2 participants