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: Can't select file paths #1703

Open
3 tasks done
szbinks opened this issue Feb 25, 2024 · 12 comments · May be fixed by #1941
Open
3 tasks done

bug: Can't select file paths #1703

szbinks opened this issue Feb 25, 2024 · 12 comments · May be fixed by #1941
Assignees
Labels
Bug report Something isn't working

Comments

@szbinks
Copy link

szbinks commented Feb 25, 2024

Bug description

On a Samsung phone:

  1. Launch Revanced Manager
  2. Patcher
  3. Select an application
  4. Storage
  5. Recommended version of youtube apk
  6. Selected Patches
  7. Custom Branding
  8. Add options
  9. App icon
  10. Custom value
  11. 3 dots next to ReVanced*logo
  12. Select folder
  13. Go to the folder that contain required folders with files
  14. Tap on "use this folder"
  15. Tap on authorize
  16. Start patching
  17. 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

  • This issue is not a duplicate of an existing bug report.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
@oSumAtrIX
Copy link
Member

The provided path is not a regular file path.

@oSumAtrIX oSumAtrIX transferred this issue from ReVanced/revanced-patches Feb 25, 2024
@szbinks
Copy link
Author

szbinks commented Feb 25, 2024

So how am i supposed to give a regular path ? I just followed what the ui said

@oSumAtrIX
Copy link
Member

By entering the path manually for example, this is not a support channel.

@Ushie
Copy link
Member

Ushie commented Feb 25, 2024

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?

@oSumAtrIX
Copy link
Member

Im not sure but iirc there was an issue regarding that open. But since I am not sure I left this issue open

@KobeW50
Copy link
Contributor

KobeW50 commented Feb 25, 2024

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 ReVanced/revanced-patches#25 regarding this issue.

@oSumAtrIX oSumAtrIX added the Bug report Something isn't working label Mar 5, 2024
@Aunali321
Copy link
Member

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?

@Axelen123
Copy link
Member

Axelen123 commented Mar 7, 2024

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.

@masterflitzer

This comment was marked as off-topic.

@szbinks

This comment was marked as resolved.

@masterflitzer

This comment was marked as off-topic.

@szbinks

This comment was marked as resolved.

@oSumAtrIX oSumAtrIX changed the title bug(YouTube - Custom branding): Revanced cannot access to the selected folder bug: Can't select file paths Mar 24, 2024
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.

7 participants