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

fix(core): fix AndResGuard error when containing multiple Dynamic Feature modules, support AAB package format #462 #463

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TYZRPVX
Copy link

@TYZRPVX TYZRPVX commented Apr 16, 2021

PROBLEM DESCRIPTION: In an Android application that contains multiple Dynamic Feature modules, AndResGuard will report an error, corresponding to the error stack:

PROBLEM ANALYSIS: By analyzing the resources.arsc binary file, it is found that in the binary block
of the chunk type of RES_TABLE_TYPE of the ordinary application, the data distribution first exists
in TYPE_LIBRARY, and then there is the data block of TYPE_SPEC_TYPE.
In applications that include Dynamic Feature, TYPE_LIBRARY data blocks and TYPE_SPEC_TYPE data blocks
will alternate, and the existing chunk parsing logic will throw an exception.

FIX PLAN: rewrite the parsing logic of TYPE_LIBRARY, TYPE_SPEC_TYPE data blocks into the form of
a while loop to support the scene where two types of data blocks are mixed

VERIFICATION SITUATION: The resource confusion is normal, and it has been running normally on
the mobile QQ pipeline for a long time, and the release version is also running stable

close #462

…ature modules, support AAB package format shwenzhang#462

PROBLEM DESCRIPTION: In an Android application that contains multiple Dynamic Feature modules, AndResGuard will report an error, corresponding to the error stack:

PROBLEM ANALYSIS: By analyzing the resources.arsc binary file, it is found that in the binary block
of the chunk type of RES_TABLE_TYPE of the ordinary application, the data distribution first exists
in TYPE_LIBRARY, and then there is the data block of TYPE_SPEC_TYPE.
In applications that include Dynamic Feature, TYPE_LIBRARY data blocks and TYPE_SPEC_TYPE data blocks
will alternate, and the existing chunk parsing logic will throw an exception.

FIX PLAN: rewrite the parsing logic of TYPE_LIBRARY, TYPE_SPEC_TYPE data blocks into the form of
a while loop to support the scene where two types of data blocks are mixed

VERIFICATION SITUATION: The resource confusion is normal, and it has been running normally on
the mobile QQ pipeline for a long time, and the release version is also running stable

close shwenzhang#462
@TYZRPVX
Copy link
Author

TYZRPVX commented Jun 6, 2021

@shwenzhang please take a look at this PR

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.

In an Android application that contains multiple Dynamic Feature modules, AndResGuard will report an error
1 participant