Bug description
Patching the Discord android app with any patch that modifies resources (i.e "Enable Android debugging" or "Export all activities") fails compiling patched resources.
Using this version + combining the apkm with AntiSplit
Error logs
java -jar revanced-cli-6.0.0-dev.2-all.jar patch -e "Enable Android debugging" -b -o patched.apk -p "patches-6.0.0-dev.24.rvp" discord.apk
INFO: Loading patches
INFO: Decoding manifest
INFO: "Export all activities" disabled
INFO: "Hide ADB status" disabled
INFO: "Hide app icon" disabled
INFO: "Spoof build info" disabled
INFO: "Hide mock location" disabled
INFO: "Spoof SIM provider" disabled
INFO: "Spoof Wi-Fi connection" disabled
INFO: "Custom network security" disabled
INFO: "Export internal data documents provider" disabled
INFO: "Hex" disabled
INFO: "Predictive back gesture" disabled
INFO: "Override certificate pinning" disabled
INFO: "Change package name" disabled
INFO: "Disable Play Integrity" disabled
INFO: "Remove screen capture restriction" disabled
INFO: "Prevent screenshot detection" disabled
INFO: "Remove screenshot restriction" disabled
INFO: "Remove share targets" disabled
INFO: "Enable ROM signature spoofing" disabled
INFO: "Set target SDK version 34" disabled
INFO: "Change version code" disabled
INFO: "Disable Pairip license check" disabled
INFO: "Disable Sentry telemetry" disabled
INFO: Setting patch options
INFO: Decoding resources
INFO: "Enable Android debugging" succeeded
INFO: Compiling patched dex files
INFO: Compiled classes.dex
INFO: Compiled classes2.dex
INFO: Compiled classes3.dex
INFO: Compiled classes4.dex
INFO: Compiled classes5.dex
INFO: Compiled classes6.dex
INFO: Compiling patched resources
WARNING: H:\revanced\patched-temporary-files\patcher\apk\res\layout\number_picker_material.xml:2: error: resource android:style/TextAppearance.Material.TimePicker.PromptLabel is private.
WARNING: error: failed linking file resources.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Me\AppData\Local\Temp\brut_util_Jar_11338891750835413890282267580022210917.tmp, link, -o, H:\revanced\patched-temporary-files\patcher\patched\resources\resources.apk, --allow-reserved-package-id, --package-id, 127, --min-sdk-version, 24, --target-sdk-version, 35, --version-code, 319014, --version-name, 319.14 - Stable, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --warn-manifest-validation, --enable-compact-entries, -I, H:\revanced\patched-temporary-files\patcher\1.apk, --manifest, H:\revanced\patched-temporary-files\patcher\apk\AndroidManifest.xml, H:\revanced\patched-temporary-files\patcher\apk\build\resources.zip]
at brut.androlib.AaptInvoker.invokeAapt2(AaptInvoker.java:237)
at brut.androlib.AaptInvoker.invoke(AaptInvoker.java:66)
at app.revanced.patcher.patch.ResourcePatchContext.get(ResourcePatchContext.kt:154)
at app.revanced.patcher.PatchingKt$apply$5.invoke(Patching.kt:124)
at app.revanced.patcher.PatchingKt$apply$5.invoke(Patching.kt:124)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:86)
at app.revanced.patcher.PatchesResult.getResources(Patching.kt:142)
at app.revanced.library.ApkUtils.applyTo(ApkUtils.kt:60)
at app.revanced.cli.command.PatchCommand.call(PatchCommand.kt:357)
at app.revanced.cli.command.PatchCommand.call(PatchCommand.kt:22)
at picocli.CommandLine.executeUserObject(CommandLine.java:2031)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2423)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2425)
at picocli.CommandLine.execute(CommandLine.java:2174)
at app.revanced.cli.command.MainCommandKt.main(MainCommand.kt:12)
Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Me\AppData\Local\Temp\brut_util_Jar_11338891750835413890282267580022210917.tmp, link, -o, H:\revanced\patched-temporary-files\patcher\patched\resources\resources.apk, --allow-reserved-package-id, --package-id, 127, --min-sdk-version, 24, --target-sdk-version, 35, --version-code, 319014, --version-name, 319.14 - Stable, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --warn-manifest-validation, --enable-compact-entries, -I, H:\revanced\patched-temporary-files\patcher\1.apk, --manifest, H:\revanced\patched-temporary-files\patcher\apk\AndroidManifest.xml, H:\revanced\patched-temporary-files\patcher\apk\build\resources.zip]
at brut.util.OS.exec(OS.java:103)
at brut.androlib.AaptInvoker.invokeAapt2(AaptInvoker.java:233)
... 18 more
Solution
No response
Additional context
I have only tested this using ReVanced CLI but I think Vanced Manager uses the same version of revanced-patcher so the issue might be present there too
Acknowledgements
Bug description
Patching the Discord android app with any patch that modifies resources (i.e "Enable Android debugging" or "Export all activities") fails compiling patched resources.
Using this version + combining the apkm with AntiSplit
Error logs
Solution
No response
Additional context
I have only tested this using ReVanced CLI but I think Vanced Manager uses the same version of revanced-patcher so the issue might be present there too
Acknowledgements