bug: Resource compilation fails when patching X / Twitter
Bug description
Patch X / Twitter version 10.86.0-release.0 with patches 5.43.1 (must patch with this version, because the patch was reworked to not use resource decoding just to avoid this problem).
Include Change link sharing domain patch.
Patching fails during resource compilation.
Patching succeeds when patching with CLI
Version of ReVanced Manager and version & name of app you are patching
1.26.0-dev.9
Issue is also present with legacy Flutter
ReVanced Manager logs
[INFO]: Merging integrations
[INFO]: Applying patches...
[INFO]: Deleting existing temporary files directory
[INFO]: Decoding resources
[INFO]: Loading resource table...
[INFO]: Decoding file-resources...
[INFO]: Loading resource table from file: /data/user/0/app.revanced.manager/cache/framework/1.apk
[INFO]: Decoding values */* XMLs...
[INFO]: Decoding AndroidManifest.xml with resources...
[INFO]: Regular manifest package...
[INFO]: Initializing lookup maps
[INFO]: Executing patches
[INFO]: Change link sharing domain succeeded
[INFO]: Dynamic color succeeded
[INFO]: Hide ads succeeded
[INFO]: Hide recommended users succeeded
[INFO]: Sanitize sharing links succeeded
[INFO]: Unlock downloads succeeded
[INFO]: Writing patched files...
[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]: Compiled classes7.dex
[INFO]: Compiled classes8.dex
[INFO]: Compiled classes9.dex
[INFO]: Compiled classes10.dex
[INFO]: Compiled classes11.dex
[INFO]: Compiled classes12.dex
[INFO]: Compiled classes13.dex
[INFO]: Compiling modified resources
[WARN]: /data/user/0/app.revanced.manager/app_ephemeral/patcher/apk/res/values/strings.xml:0: error: xml parser error: reference to invalid character number.
[WARN]: /data/user/0/app.revanced.manager/app_ephemeral/patcher/apk/res/values/strings.xml: error: file failed to compile.
Patch logs
Acknowledgements
- [x] I have checked all open and closed bug reports and this is not a duplicate.
- [x] I have chosen an appropriate title.
- [x] All requested information has been provided properly.
- [x] The bug is only related to ReVanced Manager.
This issue is probably identical to past resource compilation issues, such as emoji characters breaking compilation in Manager that worked just fine with CLI.
Does this occur on the main branch as well?
Same issue with both Flutter Manager and Compose. CLI works without issues.
That would have to be investigated, which resource file, and what is the differencs. Like you said, probably emoji encoding. Is the PR that was supposed to fix it used in current manager
The patcher emoji fix is still dev (v21.1.0)
Compose still uses the pre-fixed patcher release https://github.com/ReVanced/revanced-manager/blob/b43ac8a1af920487db130be840313b5ef4412c31/gradle/libs.versions.toml#L20
We should merge patcher dev to main and updating the Compose dependency to v21.1.0
Any news on this? I'm having the same issue but with other apps/apks