Skip to content

Commit

Permalink
fix: do not flag resource table as sparse when main package is not lo…
Browse files Browse the repository at this point in the history
…aded
  • Loading branch information
oSumAtrIX committed Aug 27, 2023
1 parent c44558c commit b832812
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/kotlin/app/revanced/patcher/data/ResourceContext.kt
Expand Up @@ -83,6 +83,16 @@ class ResourceContext internal constructor(
versionInfo.let {
metadata.packageVersion = it.versionName ?: it.versionCode
}

/*
The ResTable if flagged as sparse if the main package is not loaded, which is the case here,
because ResourcesDecoder.decodeResources loads the main package
and not XmlPullStreamDecoder.decodeManifest.
See ARSCDecoder.readTableType for more info.
Set this to false again to prevent the ResTable from being flagged as sparse falsely.
*/
metadata.apkInfo.sparseResources = false
}
}
}
Expand Down

0 comments on commit b832812

Please sign in to comment.