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: Patching YouTube fails #1109

Closed skifli closed 1 year ago

skifli commented 1 year ago

Type

Error while running the manager

Bug description

My phone is not rooted. Due to this I tried to patch a YouTube apk I downloaded. The patching fails with an error I believe is unrelated to the origin of the APK.

Steps to reproduce

1

Android version

11

Manager version

1.7.0

Target package name

com.google.android.youtube

Target package version.

18.31.36

Installation type

Non-root

Patches selected.

The default except hide cast, however it happened previously with all the default patches.

Device logs (exported using Manager settings).

None

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

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 Disable zoom haptics
Applied Enable debugging
Failed to apply Hide player overlay: Failed to resolve CreatePlayerOverviewFingerprint
Applied Premium heading
Applied Theme
Repacking patched apk
Compiling resources
An error occurred! Aborted
Error:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/data/app/~~X2H04YauNka76oWL-Z7YGQ==/app.revanced.manager.flutter-VNQSr1ffVg69Oz8E6Bti8w==/lib/arm64/libaapt2.so, link, -o, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-WGMLKC/cache/aapt_temp_file, --min-sdk-version, 26, --target-sdk-version, 33, --version-code, 1539302848, --version-name, 18.31.36, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, -e, /data/user/0/app.revanced.manager.flutter/cache/APKTOOL5223466190871212229.tmp, -0, arsc, -I, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-WGMLKC/cache/1.apk, --manifest, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-WGMLKC/cache/AndroidManifest.xml, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-WGMLKC/cache/build/resources.zip]
    at brut.androlib.res.AndrolibResources.aapt2Package(AndrolibResources.java:484)
    at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:619)
    at app.revanced.patcher.Patcher.save(Patcher.kt:128)
    at app.revanced.manager.flutter.MainActivity.runPatcher$lambda-32(MainActivity.kt:276)
    at app.revanced.manager.flutter.MainActivity.$r8$lambda$efRWk2Z7aIFbIqnpE9hv8LpAiuk(Unknown Source:0)
    at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda13.run(Unknown Source:24)
    at java.lang.Thread.run(Thread.java:923)
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/data/app/~~X2H04YauNka76oWL-Z7YGQ==/app.revanced.manager.flutter-VNQSr1ffVg69Oz8E6Bti8w==/lib/arm64/libaapt2.so, link, -o, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-WGMLKC/cache/aapt_temp_file, --min-sdk-version, 26, --target-sdk-version, 33, --version-code, 1539302848, --version-name, 18.31.36, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, -e, /data/user/0/app.revanced.manager.flutter/cache/APKTOOL5223466190871212229.tmp, -0, arsc, -I, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-WGMLKC/cache/1.apk, --manifest, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-WGMLKC/cache/AndroidManifest.xml, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-WGMLKC/cache/build/resources.zip]
    at brut.util.OS.exec(OS.java:99)
    at brut.androlib.res.AndrolibResources.aapt2Package(AndrolibResources.java:480)
    ... 6 more

Screenshots or video

No response

Solution

No response

Additional context

This is the link to where I downloaded the APK from: https://m.apkpure.com/youtube/com.google.android.youtube

Acknowledgments

Ushie commented 1 year ago

SmartSelect_20230808_194745

skifli commented 1 year ago

SmartSelect_20230808_194745

Thank you, it works now. However I am unable to use my main account on YouTube. Only my alt is working. Should I create a separate issue, as it may be related to microG?

image

xDARKxDEVILx commented 1 year ago

SmartSelect_20230808_194745

Thank you, it works now. However I am unable to use my main account on YouTube. Only my alt is working. Should I create a separate issue, as it may be related to microG?

image

Remove that account in device settings then accounts then login with it again

LiphiTC commented 1 year ago

I have the same error with suggested version downloaded from official play store on a rooted device

Logs ``` 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 Client spoof Applied Copy video url Applied Disable Shorts on startup Applied Disable fullscreen panels Applied Enable debugging Applied External downloads Applied Hide Shorts components Applied Hide ads Applied Hide breaking news shelf Applied Hide crowdfunding box Applied Hide floating microphone button Applied Hide info cards Applied Hide layout components Applied Hide watermark Applied Minimized playback Applied Open links externally Applied Playback speed Applied Remember video quality Applied Return YouTube Dislike Applied SponsorBlock Applied Spoof app version Applied Theme Applied Vanced MicroG support Applied Video ads Repacking patched apk Compiling resources An error occurred! Aborted Error: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/data/app/~~w-1N4DljmGfQf2CxrvQUCA==/app.revanced.manager.flutter-8a6V1fhTN1Uvm1xOFDSO9A==/lib/arm64/libaapt2.so, link, -o, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-XHDXNH/cache/aapt_temp_file, --min-sdk-version, 26, --target-sdk-version, 33, --version-code, 1538252224, --version-name, 18.23.35, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, -e, /data/user/0/app.revanced.manager.flutter/cache/APKTOOL7896539266142545784.tmp, -0, arsc, -I, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-XHDXNH/cache/1.apk, --manifest, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-XHDXNH/cache/AndroidManifest.xml, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-XHDXNH/cache/build/resources.zip] at brut.androlib.res.AndrolibResources.aapt2Package(AndrolibResources.java:484) at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:619) at app.revanced.patcher.Patcher.save(Patcher.kt:128) at app.revanced.manager.flutter.MainActivity.runPatcher$lambda-32(MainActivity.kt:276) at app.revanced.manager.flutter.MainActivity.$r8$lambda$efRWk2Z7aIFbIqnpE9hv8LpAiuk(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 (exit code = 1): [/data/app/~~w-1N4DljmGfQf2CxrvQUCA==/app.revanced.manager.flutter-8a6V1fhTN1Uvm1xOFDSO9A==/lib/arm64/libaapt2.so, link, -o, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-XHDXNH/cache/aapt_temp_file, --min-sdk-version, 26, --target-sdk-version, 33, --version-code, 1538252224, --version-name, 18.23.35, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, -e, /data/user/0/app.revanced.manager.flutter/cache/APKTOOL7896539266142545784.tmp, -0, arsc, -I, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-XHDXNH/cache/1.apk, --manifest, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-XHDXNH/cache/AndroidManifest.xml, /data/user/0/app.revanced.manager.flutter/cache/patcher/tmp-XHDXNH/cache/build/resources.zip] at brut.util.OS.exec(OS.java:99) at brut.androlib.res.AndrolibResources.aapt2Package(AndrolibResources.java:480) ... 6 more ```
skifli commented 1 year ago

Try making another issue since it worked fine when I did it on the suggested version.