fix: get framework ids to compile resources

This commit is contained in:
oSumAtrIX 2023-08-12 02:18:29 +02:00
parent a2ac44dcc1
commit f2cb7ee7df
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4

View file

@ -11,6 +11,7 @@ import brut.androlib.AaptInvoker
import brut.androlib.ApkDecoder
import brut.androlib.Config
import brut.androlib.apk.ApkInfo
import brut.androlib.apk.UsesFramework
import brut.androlib.res.Framework
import brut.androlib.res.ResourcesDecoder
import brut.androlib.res.decoder.AndroidManifestResourceParser
@ -195,14 +196,18 @@ class Patcher(private val options: PatcherOptions) {
try {
when (mode) {
ResourceDecodingMode.FULL -> {
val outDir = options.recreateResourceCacheDirectory()
logger.info("Decoding resources")
val outDir = options.recreateResourceCacheDirectory()
resourcesDecoder.decodeManifest(outDir)
resourcesDecoder.decodeResources(outDir)
apkDecoder.recordUncompressedFiles(resourcesDecoder.resFileMapping)
apkInfo.usesFramework = UsesFramework().apply {
ids = resourcesDecoder.resTable.listFramePackages().map { it.id }
}
}
ResourceDecodingMode.MANIFEST_ONLY -> {
logger.info("Decoding app manifest")