fix: add support for overlay spec skipping

This commit is contained in:
Connor Tumbleson 2022-03-21 07:03:14 -04:00
parent 26f39ee736
commit c300184780
No known key found for this signature in database
GPG Key ID: C3CC0A201EC7DA75

View File

@ -128,11 +128,14 @@ public class ARSCDecoder {
boolean flag = true;
while (flag) {
switch (mHeader.type) {
case Header.XML_TYPE_SPEC_TYPE:
readTableTypeSpec();
break;
case Header.XML_TYPE_LIBRARY:
readLibraryType();
break;
case Header.XML_TYPE_SPEC_TYPE:
readTableTypeSpec();
case Header.XML_TYPE_OVERLAY:
readOverlaySpec();
break;
case Header.XML_TYPE_STAGED_ALIAS:
readStagedAliasSpec();
@ -168,8 +171,18 @@ public class ARSCDecoder {
int count = mIn.readInt();
for (int i = 0; i < count; i++) {
/* stagedResId */mIn.skipInt();
/* finalizedResId */mIn.skipInt();
LOGGER.info(String.format("Skipping staged alias stagedId (%h) finalId: %h", mIn.readInt(), mIn.readInt()));
}
nextChunk();
}
private void readOverlaySpec() throws IOException {
/* policyFlags */mIn.skipInt();
int count = mIn.readInt();
for (int i = 0; i < count; i++) {
LOGGER.info(String.format("Skipping overlay (%h)", mIn.readInt()));
}
nextChunk();