Apktool
Apktool copied to clipboard
[BUG] Qualifier omittion causes conflict (Android 15 AOSP)
Conflict happens because Apktool currently doesn't preserve qualifiers as stored in resources.arsc.
While I get that omitting the API version qualifier makes sense in certain instances, apparently AAPT2 wasn't designed that way.
In this example values-en-rXA-neuter clashes with values-en-rXA-neuter-v33 because the -v33 is being omitted, the only way to decompile this APK is to not manipulate the output qualifiers with sdkVersion >= getNaturalSdkVersionRequirement().
Source: https://github.com/iBotPeaches/Apktool/blob/2461481dede3567c9d2be0d7ede6b8dc8da6bf1a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResConfigFlags.java#L559-L561
APK: https://drive.google.com/file/d/1FVp1ZPv858hpzCuKx2o5BnA3uVtwNxmK/view
Log:
I: Using Apktool 2.10.1-SNAPSHOT on PermissionController.apk with 24 threads
I: Baksmaling classes.dex...
I: Loading resource table...
I: Baksmaling classes2.dex...
Exception in thread "main" brut.androlib.exceptions.AndrolibException: Multiple resources: spec=0x7f1302a5 string/permission_description_summary_storage, config=-en-rXA-neuter
at brut.androlib.res.data.ResType.addResource(SourceFile:0)
at brut.androlib.res.decoder.ARSCDecoder.readResourceTable(SourceFile:0)
at brut.androlib.res.decoder.ARSCDecoder.decode(SourceFile)
at brut.androlib.res.data.ResTable.loadResPackagesFromApk(SourceFile)
at brut.androlib.ApkDecoder.decodeResources(SourceFile:0)
at brut.androlib.ApkDecoder.decode(SourceFile:0)
at brut.apktool.Main.main(SourceFile:0)