anddea / revanced-patches

🧩 Patches for ReVanced
https://revanced.app
GNU General Public License v3.0
623 stars 43 forks source link

bug(YouTube Music - Visual preferences icons): Patch fails when `Extended icon` is `Stock` icon #773

Closed ghost closed 4 months ago

ghost commented 4 months ago

Type

Error while patching

Tools used

RVX Manager

Application

YouTube Music v7.12.51

Bug description

When Custom branding icon is selected and is YouTube Music and Extended icon is Custom branding icon, Patch fails

inotia00's patch hasn't even merged the Visual preferences icons in yet, so maybe the bug below still persists in anddea patch's YouTube Music. https://github.com/inotia00/ReVanced_Extended/issues/2181

Error logs

- Device Info
RVX Manager: 1.21.1
Model: SM-S928N
Android version: 14
Supported architectures: arm64-v8a
Root permissions: No

- Patch Info
App: com.google.android.apps.youtube.music v7.12.51 (Suggested: 7.12.51)
Patches version: v2.228.0-dev.3
Patches added: Custom branding icon for YouTube Music [App icon: youtube_music, Change header: false, Change splash icons: false], Custom branding name for YouTube Music [App name in notification panel: YT Music, App name in launcher: YT Music]
Patches removed: Enable Cairo splash animation, Amoled, Restore old style library shelf, Enable debug logging, Bypass image region restrictions, Translations
Default patch options changed: Settings for YouTube Music [RVX settings menu name: RVX Settings], Visual preferences icons [Extended icon: custom_branding_icon]

- Settings
Allow changing patch selection: true
Version compatibility check: false
Show universal patches: false
Remove unused library: true
Use pre-release: true
Patches source: anddea/revanced-patches
Integration source: anddea/revanced-integrations

- Logs
Reading APK
Decoding app manifest
Loading patches
Merging integrations
Deleting existing temporary files directory
Decoding resources
Executing patches
Applied 26 patches
Compiling patched dex files
Compiled 8 dex files
Compiling modified resources
An error occurred:
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/data/app/~~lrh4me7YzdLOply_GOvGfw==/app.rvx.manager.flutter-RrE8UGZoEsp_3ormH5RuwA==/lib/arm64/libaapt2.so, link, -o, /data/user/0/app.rvx.manager.flutter/cache/patcher/tmp-YAZQBU/revanced-temporary-files/patched/resources/resources.apk, --package-id, 127, --min-sdk-version, 26, --target-sdk-version, 34, --version-code, 71251240, --version-name, 7.12.51, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, --warn-manifest-validation, -e, /data/user/0/app.rvx.manager.flutter/cache/APKTOOL3401689597175864797.tmp, -0, arsc, -I, /data/user/0/app.rvx.manager.flutter/cache/patcher/tmp-YAZQBU/revanced-temporary-files/1.apk, --manifest, /data/user/0/app.rvx.manager.flutter/cache/patcher/tmp-YAZQBU/revanced-temporary-files/apk/AndroidManifest.xml, /data/user/0/app.rvx.manager.flutter/cache/patcher/tmp-YAZQBU/revanced-temporary-files/apk/build/resources.zip]
    at brut.androlib.AaptInvoker.invokeAapt2(Unknown Source:563)
    at brut.androlib.AaptInvoker.invokeAapt(Unknown Source:106)
    at app.revanced.patcher.data.ResourceContext.get(SourceFile:0)
    at app.revanced.patcher.Patcher.get(SourceFile:0)
    at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$35(Unknown Source:486)
    at app.revanced.manager.flutter.MainActivity.$r8$lambda$7KobHryxqqdI5JS3uiaGATjlYU8(SourceFile:0)
    at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda2.run(SourceFile:0)
    at java.lang.Thread.run(Thread.java:1012)
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/data/app/~~lrh4me7YzdLOply_GOvGfw==/app.rvx.manager.flutter-RrE8UGZoEsp_3ormH5RuwA==/lib/arm64/libaapt2.so, link, -o, /data/user/0/app.rvx.manager.flutter/cache/patcher/tmp-YAZQBU/revanced-temporary-files/patched/resources/resources.apk, --package-id, 127, --min-sdk-version, 26, --target-sdk-version, 34, --version-code, 71251240, --version-name, 7.12.51, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, --warn-manifest-validation, -e, /data/user/0/app.rvx.manager.flutter/cache/APKTOOL3401689597175864797.tmp, -0, arsc, -I, /data/user/0/app.rvx.manager.flutter/cache/patcher/tmp-YAZQBU/revanced-temporary-files/1.apk, --manifest, /data/user/0/app.rvx.manager.flutter/cache/patcher/tmp-YAZQBU/revanced-temporary-files/apk/AndroidManifest.xml, /data/user/0/app.rvx.manager.flutter/cache/patcher/tmp-YAZQBU/revanced-temporary-files/apk/build/resources.zip]
    at brut.util.OS.exec(Unknown Source:75)
    at brut.androlib.AaptInvoker.invokeAapt2(Unknown Source:542)
    ... 7 more
Something went wrong:
PathNotFoundException: Cannot copy file to '/data/user/0/app.rvx.manager.flutter/files/lastPatchedApp.apk', path = '/data/user/0/app.rvx.manager.flutter/cache/patcher/tmp-YAZQBU/out.apk' (OS Error: No such file or directory, errno = 2)

Solution

I would appreciate it if you could implement the Stock icon for Extended icon just like YouTube on YouTube Music to fix the above bug.

Additional context

No response

Device Environment

Android 14

Acknowledgements

Francesco146 commented 4 months ago

i can't reproduce this on my end, make sure you clear your patch options since Stock one has been removed some weeks ago. if you still have this error, reopen this issue

ghost commented 3 months ago

Stock one has been removed some weeks ago.

No, It's been almost two months since inotia00 added the Stock icon to the Custom branding icon options for YouTube and YT Music. From then until now, the anddea patch also has had a Stock icon in the Custom branding icon option. It's the same even if i clear my patch option.

So, anddea applied my opinion that newly create Stock icon preset for Extended icon of YouTube (#764), and the point of this article is that to apply this to YouTube Music as well. The bug in this article will be resolved if anddea creates a Stock icon preset for Extended icon same as YouTube.

Of course, I could be wrong. I hope @anddea give me the answer.

anddea commented 3 months ago

I'll check and update the icon for Music too. I just don't know when I'll be able to do that.

Francesco146 commented 3 months ago

there's no Stock icon, there was some time ago, now it's called YouTube Music.

ghost commented 3 months ago

there's no Stock icon, there was some time ago, now it's called YouTube Music.

It's the same on YouTube. However, anddea already applied my opinion in #764. It's nonsense. Many people are already using the expression Stock icon to conveniently refer to it (in Custom Shorts action buttons option too). Even i clearly wrote so that it can be sufficiently understood in the Bug description and Solution at the very beginning of the article. I had no idea that this would take this long.

I'll check and update the icon for Music too. I just don't know when I'll be able to do that.

Thanks for @anddea. It doesn't matter how long it takes. I think it's okay to leave this issue closed. You can do whatever you want.

ghost commented 3 months ago

Now that I think about it, the background is squircle shape only when the extended icon is the YouTube icon. The background of all other custom branding icons are circle shape. When I first made the request, I said I wanted unity with other selectable icons, but I think this part was missing. Are you willing to change YouTube also to circle shape while working on YouTube Music? I think it would be best if both YouTube and YouTube Music were either circle shape or squircle shape.

anddea commented 3 months ago

Not a problem I guess. If you have icons, you can share them with the original link of their author, so we can speed it up. Even better if it's SVG, from websites where authors share them publicly like https://www.svgrepo.com/

ghost commented 3 months ago

Thank you for letting me know about this great site. I don't know if I can use it, but these are the icons I can find..

  1. Inverted circle icon youtube-svgrepo-com This is the icon you uploaded last time. I think it would be good to change the colors of the red background and white icon. But it's difficult for me to do it and this icon doesn't exist on that site's YouTube Music..

  2. Circle icon com google android youtube_19 16 39_1545731520_icon com google android apps youtube music_7 13 52_71352240_icon

  3. Squircle icon com google android youtube_19 16 39_1545731520_icon (1) com google android apps youtube music_7 13 52_71352240_icon (1)

I hope this helps even a little bit. Creating a Stock icon is more complicated than i think. It doesn't matter if you make it any shape or icon you look good and how long it takes. However, I would like you to let me know when it is implemented. Thank you.

anddea commented 3 months ago

This white background will be invisible in light theme, so maybe it's better without it, just like the first icon. Share original links also, so we can add authors in a commit.

ghost commented 3 months ago

This white background will be invisible in light theme, so maybe it's better without it, just like the first icon.

This is the concern you concluded in this comment.

Share original links also, so we can add authors in a commit.

Thank you, but I decline. I'm satisfied as long as the bugs are fixed.

anddea commented 3 months ago

Yes, I remember that I mentioned this before but still that white background is not visible.

I mean direct links where you got those icons from. Or I'll have to make those icons myself and it will take longer time.

ghost commented 3 months ago

Well, It doesn't seem like white background has to be visible in light theme and i didn't intend to bother you by not providing a direct link..

1. SVGREPO YouTube icon SVGREPO YouTube Music icon

I'll leave a link to YouTube Music, but I'm not sure if I can use it.

2,3. Apk Analyzer

I simply saved the Original App's icon through this app's icon saving function. If you change the icon shape of your device's launcher theme, the appearance of the app icon within this app will also change the same.

Theme Park

I used this app to change the shape of the icon. Only available on Galaxy devices.

  1. Play Store Website YouTube YouTube Music

Or, it may be better to use images from the Play Store Website. You have to change the shape of the background yourself, and the size of the inside red icon is an issue. It seems important to match the internal icon size with Custom Branding Icons.

anddea commented 2 months ago

Updated icons in the latest release.

ghost commented 2 months ago

Thanks! At last was it impossible to have icons with a white background? I guess icons with a white background look better when it's not a white theme, but if it was impossible or difficult, I'm satisfied with the current icon too. Thank you for your hard work.

anddea commented 2 months ago

The rounded icon does not look good even with a white background. Previously, the squircle icon looked okay, but we made them all circle-shaped for consistency.

ghost commented 2 months ago

The rounded icon does not look good even with a white background.

I didn't think it would be like this. If you think the round icon looks better on a red background, the squircle icon on a white background looks better than the round icon. But I think it's better to go with your opinion. I don't mean to bother you. I'm satisfied just with what's been fixed.