ReVanced / revanced-manager

💊 Application to use ReVanced on Android
https://revanced.app
GNU General Public License v3.0
18.21k stars 748 forks source link

bug: Unable to patch YouTube "Permission denied" #1076

Closed Kydaix closed 1 year ago

Kydaix commented 1 year ago

Type

Error while running the manager

Bug description

I tried to patch Youtube using ReVanced Manager, with default settings & root access (Magisk).

Steps to reproduce

  1. Install YouTube v18.23.35.
  2. Install ReVanced Manager 1.5.0
  3. Patch the app with default settings or not (it doesn't change anything)

Android version

13 (MIUI 14.0.13)

Manager version

1.5.0

Target package name

com.google.android.youtube

Target package version.

18.23.35

Installation type

Root

Patches selected.

Applied Always autorepeat Applied Client spoof Applied Comments Applied Copy video url Applied Custom branding Applied Disable Shorts on startup Applied Disable auto captions Applied Disable fullscreen panels Applied Disable player popup panels Applied Disable zoom haptics Applied Enable debugging Applied External downloads Applied HDR auto brightness Applied Hide Shorts components Applied Hide ads Applied Hide album cards Applied Hide autoplay button Applied Hide breaking news shelf Applied Hide captions button Applied Hide cast button Applied Hide crowdfunding box Applied Hide email address Applied Hide endscreen cards Applied Hide filter bar Applied Hide floating microphone button Applied Hide info cards Applied Hide layout components Applied Hide load more button Applied Hide player buttons Applied Hide player overlay Applied Hide seekbar Applied Hide timestamp Applied Hide video action buttons Applied Hide watermark Applied Minimized playback Applied Navigation buttons Applied Old video quality menu Applied Open links externally Applied Playback speed Applied Player flyout menu Applied Premium heading Applied Remember video quality Applied Return YouTube Dislike Applied Seekbar tapping Applied SponsorBlock Applied Spoof app version Applied Swipe controls Applied Tablet mini player Applied Theme Applied Vanced MicroG support Applied Video ads Applied Wide searchbar

Device logs (exported using Manager settings).

Initializing installer
Creating working directory
Copying original apk
Unpacking input apk
Reading dex files
Decoding AndroidManifest.xml only, because resources are not needed
Merging integrations
Deleting existing resource cache directory
Decoding resources
Executing patches
Applied Always autorepeat
Applied Client spoof
Applied Comments
Applied Copy video url
Applied Custom branding
Applied Disable Shorts on startup
Applied Disable auto captions
Applied Disable fullscreen panels
Applied Disable player popup panels
Applied Disable zoom haptics
Applied Enable debugging
Applied External downloads
Applied HDR auto brightness
Applied Hide Shorts components
Applied Hide ads
Applied Hide album cards
Applied Hide autoplay button
Applied Hide breaking news shelf
Applied Hide captions button
Applied Hide cast button
Applied Hide crowdfunding box
Applied Hide email address
Applied Hide endscreen cards
Applied Hide filter bar
Applied Hide floating microphone button
Applied Hide info cards
Applied Hide layout components
Applied Hide load more button
Applied Hide player buttons
Applied Hide player overlay
Applied Hide seekbar
Applied Hide timestamp
Applied Hide video action buttons
Applied Hide watermark
Applied Minimized playback
Applied Navigation buttons
Applied Old video quality menu
Applied Open links externally
Applied Playback speed
Applied Player flyout menu
Applied Premium heading
Applied Remember video quality
Applied Return YouTube Dislike
Applied Seekbar tapping
Applied SponsorBlock
Applied Spoof app version
Applied Swipe controls
Applied Tablet mini player
Applied Theme
Applied Vanced MicroG support
Applied Video ads
Applied Wide searchbar
Repacking patched apk
Compiling resources
An error occurred! Aborted
Error:
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec: [aapt2, compile, --dir, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-IBGPZB/cache/res, --legacy, -o, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-IBGPZB/cache/build/resources.zip]
    at brut.androlib.AaptInvoker.invokeAapt2(AaptInvoker.java:126)
    at brut.androlib.AaptInvoker.invokeAapt(AaptInvoker.java:382)
    at app.revanced.patcher.Patcher.save(Patcher.kt:100)
    at app.revanced.manager.flutter.MainActivity.runPatcher$lambda-20(MainActivity.kt:217)
    at app.revanced.manager.flutter.MainActivity.$r8$lambda$Rd-IpIH_jmxD15EWmBEFM-jtGsk(Unknown Source:0)
    at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda13.run(Unknown Source:24)
    at java.lang.Thread.run(Thread.java:1012)
Caused by: brut.common.BrutException: could not exec: [aapt2, compile, --dir, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-IBGPZB/cache/res, --legacy, -o, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-IBGPZB/cache/build/resources.zip]
    at brut.util.OS.exec(OS.java:107)
    at brut.androlib.AaptInvoker.invokeAapt2(AaptInvoker.java:122)
    ... 6 more
Caused by: java.io.IOException: Cannot run program "aapt2": error=13, Permission denied
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050)
    at brut.util.OS.exec(OS.java:97)
    ... 7 more
Caused by: java.io.IOException: error=13, Permission denied
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:133)
    at java.lang.ProcessImpl.start(ProcessImpl.java:141)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    ... 8 more

Installer logs (exported using Installer menu option) [unneeded if the issue is not during patching].

No response

Screenshots or video

No response

Solution

No response

Additional context

No response

Acknowledgments

Ushie commented 1 year ago

Dupe of #1075