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: Patching failure with Remove screenshot restriction, Remove screen capture restriction, Spoof wi-fi connection, Export internal data documents provider #4058

Closed
3 tasks done
nightznero opened this issue Dec 7, 2024 · 16 comments · Fixed by #4405 or #4388
Labels
Bug report Something isn't working

Comments

@nightznero
Copy link

Bug description

Tested on 3 diff apps,on all the same issue with same patches. SS Restrictions & WiFi spoof,others patches works fine

Error logs

- Device Info
ReVanced Manager: 1.23.2
Android version: 13
Supported architectures: arm64-v8a, armeabi-v7a, armeabi
Root permissions: No

- Patch Info
Patches version: v5.2.3
Patches added: Hide mock location, Override certificate pinning, Remove screen capture restriction, Remove screenshot restriction, Spoof SIM country [Network ISO Country Code: US, Sim ISO Country Code: US], Spoof Wi-Fi connection, Spoof build info
Patches removed: None
Default patch options changed: None

- Settings
Allow changing patch selection: true
Version compatibility check: true
Show universal patches: true
Patches source: revanced/revanced-patches

- Logs
Reading APK
Decoding app manifest
Loading patches
Deleting existing temporary files directory
Decoding resources
Initializing lookup maps
Executing patches
Applied 4 patches
Remove screen capture restriction failed: app.revanced.patcher.patch.PatchException: Extension "extensions/all/misc/screencapture/remove-screen-capture-restriction.rve" not found
	at app.revanced.patches.all.misc.screencapture.RemoveScreenCaptureRestrictionPatchKt$removeScreenCaptureRestrictionPatch$lambda$5$$inlined$extendWith$2.get(Patch.kt:404)
	at app.revanced.patches.all.misc.screencapture.RemoveScreenCaptureRestrictionPatchKt$removeScreenCaptureRestrictionPatch$lambda$5$$inlined$extendWith$2.get(Patch.kt:403)
	at app.revanced.patcher.patch.BytecodePatchContext.mergeExtension$revanced_patcher(SourceFile:69)
	at app.revanced.patcher.patch.BytecodePatch.execute$revanced_patcher(SourceFile:158)
	at app.revanced.patcher.Patcher$invoke$1.invokeSuspend$execute(SourceFile:84)
	at app.revanced.patcher.Patcher$invoke$1.invokeSuspend(SourceFile:109)
	at app.revanced.patcher.Patcher$invoke$1.invoke(SourceFile:0)
	at app.revanced.patcher.Patcher$invoke$1.invoke(SourceFile:0)
	at kotlinx.coroutines.flow.SafeFlow.collectSafely(SourceFile:57)
	at kotlinx.coroutines.flow.AbstractFlow.collect(SourceFile:226)
	at app.revanced.manager.flutter.MainActivity$runPatcher$1$patcherResult$1$1.invokeSuspend(SourceFile:319)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:33)
	at kotlinx.coroutines.DispatchedTask.run(SourceFile:104)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(SourceFile:277)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(SourceFile:95)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(SourceFile:69)
	at kotlinx.coroutines.BuildersKt.runBlocking(SourceFile:1)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(SourceFile:48)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(SourceFile:1)
	at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$34(SourceFile:313)
	at app.revanced.manager.flutter.MainActivity.$r8$lambda$_NYn7P0Ss3RCL0-SqEFL-opMsQw(SourceFile:0)
	at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda6.run(SourceFile:0)
	at java.lang.Thread.run(Thread.java:1012)
Remove screenshot restriction failed: app.revanced.patcher.patch.PatchException: Extension "extensions/all/misc/screenshot/remove-screenshot-restriction.rve" not found
	at app.revanced.patches.all.misc.screenshot.RemoveScreenshotRestrictionPatchKt$removeScreenshotRestrictionPatch$lambda$4$$inlined$extendWith$2.get(Patch.kt:404)
	at app.revanced.patches.all.misc.screenshot.RemoveScreenshotRestrictionPatchKt$removeScreenshotRestrictionPatch$lambda$4$$inlined$extendWith$2.get(Patch.kt:403)
	at app.revanced.patcher.patch.BytecodePatchContext.mergeExtension$revanced_patcher(SourceFile:69)
	at app.revanced.patcher.patch.BytecodePatch.execute$revanced_patcher(SourceFile:158)
	at app.revanced.patcher.Patcher$invoke$1.invokeSuspend$execute(SourceFile:84)
	at app.revanced.patcher.Patcher$invoke$1.invokeSuspend(SourceFile:109)
	at app.revanced.patcher.Patcher$invoke$1.invoke(SourceFile:0)
	at app.revanced.patcher.Patcher$invoke$1.invoke(SourceFile:0)
	at kotlinx.coroutines.flow.SafeFlow.collectSafely(SourceFile:57)
	at kotlinx.coroutines.flow.AbstractFlow.collect(SourceFile:226)
	at app.revanced.manager.flutter.MainActivity$runPatcher$1$patcherResult$1$1.invokeSuspend(SourceFile:319)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:33)
	at kotlinx.coroutines.DispatchedTask.run(SourceFile:104)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(SourceFile:277)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(SourceFile:95)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(SourceFile:69)
	at kotlinx.coroutines.BuildersKt.runBlocking(SourceFile:1)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(SourceFile:48)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(SourceFile:1)
	at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$34(SourceFile:313)
	at app.revanced.manager.flutter.MainActivity.$r8$lambda$_NYn7P0Ss3RCL0-SqEFL-opMsQw(SourceFile:0)
	at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda6.run(SourceFile:0)
	at java.lang.Thread.run(Thread.java:1012)
Spoof Wi-Fi connection failed: app.revanced.patcher.patch.PatchException: Extension "extensions/all/misc/connectivity/wifi/spoof/spoof-wifi.rve" not found
	at app.revanced.patches.all.misc.connectivity.wifi.spoof.SpoofWifiPatchKt$spoofWifiPatch$lambda$2$$inlined$extendWith$2.get(Patch.kt:404)
	at app.revanced.patches.all.misc.connectivity.wifi.spoof.SpoofWifiPatchKt$spoofWifiPatch$lambda$2$$inlined$extendWith$2.get(Patch.kt:403)
	at app.revanced.patcher.patch.BytecodePatchContext.mergeExtension$revanced_patcher(SourceFile:69)
	at app.revanced.patcher.patch.BytecodePatch.execute$revanced_patcher(SourceFile:158)
	at app.revanced.patcher.Patcher$invoke$1.invokeSuspend$execute(SourceFile:84)
	at app.revanced.patcher.Patcher$invoke$1.invokeSuspend(SourceFile:109)
	at app.revanced.patcher.Patcher$invoke$1.invoke(SourceFile:0)
	at app.revanced.patcher.Patcher$invoke$1.invoke(SourceFile:0)
	at kotlinx.coroutines.flow.SafeFlow.collectSafely(SourceFile:57)
	at kotlinx.coroutines.flow.AbstractFlow.collect(SourceFile:226)
	at app.revanced.manager.flutter.MainActivity$runPatcher$1$patcherResult$1$1.invokeSuspend(SourceFile:319)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:33)
	at kotlinx.coroutines.DispatchedTask.run(SourceFile:104)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(SourceFile:277)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(SourceFile:95)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(SourceFile:69)
	at kotlinx.coroutines.BuildersKt.runBlocking(SourceFile:1)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(SourceFile:48)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(SourceFile:1)
	at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$34(SourceFile:313)
	at app.revanced.manager.flutter.MainActivity.$r8$lambda$_NYn7P0Ss3RCL0-SqEFL-opMsQw(SourceFile:0)
	at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda6.run(SourceFile:0)
	at java.lang.Thread.run(Thread.java:1012)
Canceling patching process
Press back to exit

Solution

No response

Additional context

No response

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.
@nightznero nightznero added the Bug report Something isn't working label Dec 7, 2024
@oSumAtrIX
Copy link
Member

Seems to be a bug in the patches gradle plugin

@oSumAtrIX
Copy link
Member

This path seems missing for extension projects when they are nested in sub projects:

https://github.com/revanced/revanced-patches-gradle-plugin/blob/9f18768042d7b85fa3bb93246571bdff8a5f9615/src/main/kotlin/app/revanced/patches/gradle/ExtensionPlugin.kt#L52

@nightznero
Copy link
Author

Seems to be a bug in the patches gradle plugin

May know when it's gonna be fixed oSum?🤔

@oSumAtrIX

This comment has been minimized.

@naturale0
Copy link

It seems to be an issue for quite a while. I had to revert all the way back to patch v4.0.0 and manager v1.18.0 to make the patch work.

@nightznero
Copy link
Author

i had use it all my previous mods app and i just got for a first time error on v5 2 3 patches

@wrongway213
Copy link

wrongway213 commented Dec 15, 2024

This path seems missing for extension projects when they are nested in sub projects:

https://github.com/revanced/revanced-patches-gradle-plugin/blob/9f18768042d7b85fa3bb93246571bdff8a5f9615/src/main/kotlin/app/revanced/patches/gradle/ExtensionPlugin.kt#L52

Am I totally off the mark, or isn't this issue already fixed in the last two feats in the dev branch here?
https://github.com/ReVanced/revanced-patches-gradle-plugin/commits/dev/

If it indeed has been fixed, wouldn't merging said changes from dev to main branch mitigate this issue in future Manager releases?

@oSumAtrIX
Copy link
Member

No, dev 7 is used right now

@StalOlympus

This comment has been minimized.

@CompeyDev

This comment has been minimized.

@oSumAtrIX

This comment has been minimized.

@oSumAtrIX oSumAtrIX marked this as a duplicate of #4181 Dec 21, 2024
@LisoUseInAIKyrios LisoUseInAIKyrios changed the title bug: Screenshot / Screen Capture / Spoof WiFi bug: Patching failure with Remove screenshot restriction / Remove screen capture / Spoof wifi Dec 22, 2024
@LisoUseInAIKyrios LisoUseInAIKyrios changed the title bug: Patching failure with Remove screenshot restriction / Remove screen capture / Spoof wifi bug: Patching failure with Remove screenshot restriction, Remove screen capture restriction, Spoof wi-fi connection Dec 22, 2024
@LisoUseInAIKyrios LisoUseInAIKyrios marked this as a duplicate of #4189 Dec 22, 2024
@LisoUseInAIKyrios LisoUseInAIKyrios marked this as a duplicate of #4211 Dec 24, 2024
@pflanzenandi
Copy link

It seems to be an issue for quite a while. I had to revert all the way back to patch v4.0.0 and manager v1.18.0 to make the patch work.

I tried this workaround but couldn't get the imported patches to show up.

Is there anything else I can try until an official fix comes out?

@kwstasch

This comment has been minimized.

@inotia00
Copy link

inotia00 commented Jan 31, 2025

These logs were printed when I built the patch locally:

...
> Task :extensions:all:misc:screenshot:remove-screenshot-restriction:minifyReleaseWithR8
Supplied proguard configuration does not exist: C:\revanced-patches\extensions\all\misc\screenshot\proguard-rules.pro
...
> Task :extensions:all:misc:connectivity:wifi:spoof:spoof-wifi:minifyReleaseWithR8
Supplied proguard configuration does not exist: C:\revanced-patches\extensions\all\misc\connectivity\wifi\spoof\proguard-rules.pro
...
> Task :extensions:all:misc:screencapture:remove-screen-capture-restriction:minifyReleaseWithR8
Supplied proguard configuration does not exist: C:\revanced-patches\extensions\all\misc\screencapture\proguard-rules.pro
...
> Task :extensions:all:misc:directory:documentsprovider:export-internal-data-documents-provider:minifyReleaseWithR8
Supplied proguard configuration does not exist: C:\revanced-patches\extensions\all\misc\directory\documentsprovider\proguard-rules.pro
...

If I add proguard-rules.pro file to each of the paths that the log points to, the issue is resolved.

Additional context

According to the gradle-plugin, if the file 'build.gradle.kts' exists, it is recognized as a project.

The global setting specifies the path of the proguardFiles as '../proguard-rules.pro' for the project.

Therefore, the file proguard-rules.pro must exist in the parent directory of each project.

@inotia00
Copy link

inotia00 commented Jan 31, 2025

When I made the log output at that point, only the values ​​specified in the global settings have always been printed.

The name space of the project is always app.revanced.extension, and proguard file is always ../proguard-rules.pro.

(Proguard file is always ../proguard-rules.pro, so the universal patches are built in the release environment despite proguard file does not exist)

Maybe it's a bug of gradle-plugin.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title bug: Patching failure with Remove screenshot restriction, Remove screen capture restriction, Spoof wi-fi connection bug: Patching failure with Remove screenshot restriction, Remove screen capture restriction, Spoof wi-fi connection, Export internal data documents provider Feb 3, 2025
@LisoUseInAIKyrios LisoUseInAIKyrios linked a pull request Feb 6, 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