revanced-manager
revanced-manager copied to clipboard
bug: Can't select file paths
Bug description
On a Samsung phone:
- Launch Revanced Manager
- Patcher
- Select an application
- Storage
- Recommended version of youtube apk
- Selected Patches
- Custom Branding
- Add options
- App icon
- Custom value
- 3 dots next to ReVanced*logo
- Select folder
- Go to the folder that contain required folders with files
- Tap on "use this folder"
- Tap on authorize
- Start patching
- There's an error which says "No such file or directory" when revanced tries to eccess the given folder
Error logs
- Device Info
ReVanced Manager: 1.18.0
Model: SM-G991B
Android version: 14
Supported architectures: arm64-v8a, armeabi-v7a, armeabi
Root permissions: No
- Patch Info
App: com.google.android.youtube v19.04.37 (Suggested: v19.04.37)
Patches version: v4.2.0
Patches added: Change header, Custom branding [App name: YT Revanced, App icon: content://com.android.externalstorage.documents/tree/primary%3ARevanced%2FRevanced%20Icon%20Pack]
Patches removed: None
Default patch options changed: None
- Settings
Allow changing patch selection: true
Version compatibility check: true
Show universal patches: false
Patches source: revanced/revanced-patches
Integration source: revanced/revanced-integrations
- Logs
Copying APK
Reading APK
Decoding app manifest
Loading patches
Merging integrations
Deleting existing resource cache directory
Decoding resources
Executing patches
Applied 62 patches
Custom branding failed: app.revanced.patcher.patch.PatchException: content:/com.android.externalstorage.documents/tree/primary%3ARevanced%2FRevanced%20Icon%20Pack/mipmap-xxxhdpi/adaptiveproduct_youtube_background_color_108.png: open failed: ENOENT (No such file or directory)
at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Patcher.kt:185)
at app.revanced.patcher.Patcher$apply$1.invokeSuspend(Patcher.kt:203)
at app.revanced.patcher.Patcher$apply$1.invoke(Unknown Source:8)
at app.revanced.patcher.Patcher$apply$1.invoke(Unknown Source:4)
at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)
at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:230)
at app.revanced.manager.flutter.MainActivity$runPatcher$1$2$1.invokeSuspend(MainActivity.kt:341)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$36(MainActivity.kt:340)
at app.revanced.manager.flutter.MainActivity.$r8$lambda$wwTqh4bVDMuwAT_qXBREk8gLHGU(Unknown Source:0)
at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda5.run(Unknown Source:24)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.io.FileNotFoundException: content:/com.android.externalstorage.documents/tree/primary%3ARevanced%2FRevanced%20Icon%20Pack/mipmap-xxxhdpi/adaptiveproduct_youtube_background_color_108.png: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:574)
at java.io.FileInputStream.<init>(FileInputStream.java:160)
at kotlin.io.FilesKt__FileReadWriteKt.readBytes(FileReadWrite.kt:63)
at app.revanced.patches.youtube.layout.branding.CustomBrandingPatch.execute(CustomBrandingPatch.kt:90)
at app.revanced.patches.youtube.layout.branding.CustomBrandingPatch.execute(CustomBrandingPatch.kt:14)
at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Patcher.kt:177)
... 18 more
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:563)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:274)
at libcore.io.ForwardingOs.open(ForwardingOs.java:563)
at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:8756)
at libcore.io.IoBridge.open(IoBridge.java:560)
... 23 more
Compiling patched dex files
Compiled 8 dex files
Compiling modified resources
Signing APK
Patched APK
Solution
Maybe the authorize button doesn't work ? Revanced doesn't let me chose an other file explorer...
Additional context
No response
Acknowledgements
- [X] This issue is not a duplicate of an existing bug report.
- [X] I have chosen an appropriate title.
- [X] All requested information has been provided properly.
The provided path is not a regular file path.
So how am i supposed to give a regular path ? I just followed what the ui said
By entering the path manually for example, this is not a support channel.
This "isn't a support channel", but it's a very relevant question that poses a real issue, what's the point of the "Select folder" entry if it doesn't provide what's being requested correctly?
Im not sure but iirc there was an issue regarding that open. But since I am not sure I left this issue open
Im not sure but iirc there was an issue regarding that open. But since I am not sure I left this issue open
I am only able to find https://github.com/ReVanced/revanced-patches/issues/25 regarding this issue.
This is android shenanigan that i am not familiar with. @Axelen123 do you know how to allow permission to a specific folder without requesting all files access?
This is android shenanigan that i am not familiar with. @Axelen123 do you know how to allow permission to a specific folder without requesting all files access?
To access a specific folder, you have to use the android documents API (file picker).
https://developer.android.com/training/data-storage/shared/documents-files#grant-access-directory
These files cannot be accessed using the Unix filesystem APIs (which patch options uses) unless you have the all files permission. You have to copy them if that is required. This is why compose manager requests the all files permission if you use patch options.
any update on this? this used to work a few versions back, all one had to do was select the patch and select the revanced logo from the dropdown, no custom folder or anything (why even have a dropdown with 4 preselected values if it doesn't work?)
My goal was to patch YT Revanced with my own logo that's why I needed the custom folder, the others ones doesn't have any problem iirc.
My goal was to patch YT Revanced with my own logo that's why I needed the custom folder, the others ones doesn't have any problem iirc.
the 4 preselected ones throw exception on patching, if this issue is only for custom value i will open a new one in patches repo
I confirm that the issue concerns custom value only
consider closing this
consider closing this
👋 The issue will be closed when the changes are merged to main branch.