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:
|
if (mSdkVersion > 0 && mSdkVersion >= getNaturalSdkVersionRequirement()) { |
|
sb.append("-v").append(mSdkVersion); |
|
} |
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)
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-neuterclashes withvalues-en-rXA-neuter-v33because the-v33is being omitted, the only way to decompile this APK is to not manipulate the output qualifiers withsdkVersion >= getNaturalSdkVersionRequirement().Source:
Apktool/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResConfigFlags.java
Lines 559 to 561 in 2461481
APK: https://drive.google.com/file/d/1FVp1ZPv858hpzCuKx2o5BnA3uVtwNxmK/view
Log: