Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Patcher temporary path argument causes resource path error #3900

Closed
3 tasks done
decipher3114 opened this issue Nov 12, 2024 · 8 comments · Fixed by #4330
Closed
3 tasks done

bug: Patcher temporary path argument causes resource path error #3900

decipher3114 opened this issue Nov 12, 2024 · 8 comments · Fixed by #4330
Labels
Bug report Something isn't working

Comments

@decipher3114
Copy link

Bug description

Resource Patch which is probably a dependency fails for YouTube and YouTube Music. Not Tested for other apps.

Error logs

INFO: Loading patches 
INFO: Decoding app manifest 
INFO: "Export all activities" disabled 
INFO: "Spoof build info" disabled 
INFO: "Hide mock location" disabled 
INFO: "Spoof SIM country" disabled 
INFO: "Spoof Wi-Fi connection" disabled 
INFO: "Enable Android debugging" disabled 
INFO: "Change data directory location" disabled 
INFO: "Hex" disabled 
INFO: "Predictive back gesture" disabled 
INFO: "Override certificate pinning" disabled 
INFO: "Remove screen capture restriction" disabled 
INFO: "Remove screenshot restriction" disabled 
INFO: "Remove share targets" disabled 
INFO: "Change version code" disabled 
INFO: "Hide music video ads" disabled 
INFO: "Enable exclusive audio playback" disabled 
INFO: "Permanent repeat" disabled 
INFO: "Hide category bar" disabled 
INFO: Setting patch options 
INFO: Deleting existing temporary files directory 
INFO: Decoding resources 
INFO: Initializing lookup maps 
INFO: Executing patches 
INFO: "Bypass certificate checks" succeeded 
INFO: "GmsCore support" succeeded 
INFO: "Hide 'Get Music Premium' label" succeeded 
INFO: "Permanent shuffle" succeeded 
INFO: "Remove background playback restrictions" succeeded 
INFO: "Remove upgrade button" succeeded 
SEVERE: "ResourcePatch" failed:
app.revanced.patcher.patch.PatchException: The patch "ResourcePatch" raised an exception: app.revanced.patcher.patch.PatchException: TEMP/patcher/apk/TEMP/patcher/apk/res/values-ar/strings.xml (No such file or directory)
	at app.revanced.patcher.Patcher$invoke$1.invokeSuspend(Patcher.kt:132)
	at app.revanced.patcher.Patcher$invoke$1.invoke(Patcher.kt)
	at app.revanced.patcher.Patcher$invoke$1.invoke(Patcher.kt)
	at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:57)
	at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:226)
	at app.revanced.cli.command.PatchCommand$run$1$4.invokeSuspend(PatchCommand.kt:315)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at app.revanced.cli.command.PatchCommand.run(PatchCommand.kt:314)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2030)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
	at picocli.CommandLine.execute(CommandLine.java:2174)
	at app.revanced.cli.command.MainCommandKt.main(MainCommand.kt:12)
Caused by: java.io.FileNotFoundException: TEMP/patcher/apk/TEMP/patcher/apk/res/values-ar/strings.xml (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:213)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:152)
	at app.revanced.patcher.util.Document.<init>(Document.kt:21)
	at app.revanced.patcher.patch.ResourcePatchContext.document(ResourcePatchContext.kt:42)
	at app.revanced.patches.all.misc.resources.AddResourcesPatchKt.addResourcesPatch$lambda$35$lambda$34$invoke(AddResourcesPatch.kt:370)
	at app.revanced.patches.all.misc.resources.AddResourcesPatchKt.addResourcesPatch$lambda$35$lambda$34(AddResourcesPatch.kt:391)
	at app.revanced.patcher.patch.Patch.finalize(Patch.kt:87)
	at app.revanced.patcher.patch.ResourcePatch.finalize$revanced_patcher(Patch.kt:248)
	at app.revanced.patcher.Patcher$invoke$1.invokeSuspend(Patcher.kt:126)
	... 23 more

	at app.revanced.patcher.Patcher$invoke$1.invokeSuspend(Patcher.kt:139)
	at app.revanced.patcher.Patcher$invoke$1.invoke(Patcher.kt)
	at app.revanced.patcher.Patcher$invoke$1.invoke(Patcher.kt)
	at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:57)
	at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:226)
	at app.revanced.cli.command.PatchCommand$run$1$4.invokeSuspend(PatchCommand.kt:315)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at app.revanced.cli.command.PatchCommand.run(PatchCommand.kt:314)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2030)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
	at picocli.CommandLine.execute(CommandLine.java:2174)
	at app.revanced.cli.command.MainCommandKt.main(MainCommand.kt:12)
Caused by: app.revanced.patcher.patch.PatchException: TEMP/patcher/apk/TEMP/patcher/apk/res/values-ar/strings.xml (No such file or directory)
	at app.revanced.patcher.Patcher$invoke$1.invokeSuspend(Patcher.kt:132)
	... 23 more
Caused by: java.io.FileNotFoundException: TEMP/patcher/apk/TEMP/patcher/apk/res/values-ar/strings.xml (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:213)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:152)
	at app.revanced.patcher.util.Document.<init>(Document.kt:21)
	at app.revanced.patcher.patch.ResourcePatchContext.document(ResourcePatchContext.kt:42)
	at app.revanced.patches.all.misc.resources.AddResourcesPatchKt.addResourcesPatch$lambda$35$lambda$34$invoke(AddResourcesPatch.kt:370)
	at app.revanced.patches.all.misc.resources.AddResourcesPatchKt.addResourcesPatch$lambda$35$lambda$34(AddResourcesPatch.kt:391)
	at app.revanced.patcher.patch.Patch.finalize(Patch.kt:87)
	at app.revanced.patcher.patch.ResourcePatch.finalize$revanced_patcher(Patch.kt:248)
	at app.revanced.patcher.Patcher$invoke$1.invokeSuspend(Patcher.kt:126)
	... 23 more
 
INFO: "Change package name" succeeded 
INFO: Compiling modified resources 
INFO: Aligning APK 
INFO: Signing APK 
INFO: Saved to /data/data/com.termux/files/home/revancify-data/apps/YouTube-Music/7.03.52-revanced.apk 
INFO: Purging temporary files 
INFO: Purged resource cache directory

Solution

No response

Additional context

Root Access: false
Architecture: arm64-v8a
App: YouTube-Music v7.03.52
CLI: revanced-cli-v5.0.0.jar
Patches: revanced-patches-v5.0.0.rvp
Arguments: --enable Change package name --enable Permanent shuffle --enable Hide 'Get Music Premium' label --enable Remove upgrade button --enable Bypass certificate checks --enable Remove background playback restrictions --enable GmsCore support --options=packageName=app.rvx.yt.m --options=gmsCoreVendorGroupId=app.revanced

Acknowledgements

  • I have checked all open and closed bug reports and this is not a duplicate.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
@decipher3114 decipher3114 added the Bug report Something isn't working label Nov 12, 2024
@decipher3114
Copy link
Author

Update: Need fix for --temporary-files-path argument.

@cyberboh
Copy link

No issue here on cli for windows. You're using termux, maybe it needs some more treatment.

@cyberboh
Copy link

--options=packageName=app.rvx.yt.m is not default revanced options, that's why it breaks compilation. So, it's issue on your end.

@oSumAtrIX
Copy link
Member

Neither should cause this issue. It has something to do with the paths.

@cyberboh
Copy link

But it works on windows. No resource issue here. The path from android and windows could be not same.

@decipher3114
Copy link
Author

decipher3114 commented Nov 13, 2024

@oSumAtrIX This only happens when a custom temp-path is chosen for patching. Probably it generates an incorrect path for decompiled resoures.

@LisoUseInAIKyrios
Copy link
Contributor

If this is an issue with the custom path parameter then this issue could be moved to patched or CLI repo.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title bug: Resource Patch fails on YouTube and YouTube Music bug: Patcher temporary path argument causes resource path error Nov 16, 2024
@oSumAtrIX
Copy link
Member

Somehow the path is duplicated: TEMP\patcher\apk\TEMP\patcher\. Not sure how this happens.

@oSumAtrIX oSumAtrIX linked a pull request Jan 30, 2025 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants