ReVanced / revanced-patches

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

bug(YouTube): 'Custom branding' and 'Change header' does not fully applied #3865

Closed cyberboh closed 2 days ago

cyberboh commented 1 week ago

Bug description

So, i built the patches myself, using dev branch as source and from the commit https://github.com/ReVanced/revanced-patches/commit/d36ede0330b2dd446a9db5da494d8b3f3ab34848 then updated to the commit https://github.com/ReVanced/revanced-patches/commit/7ccfa57a6f2cde2b606b1228d6b9c06899c144ca Built successfull and i patched YT 19.43.41 using this command:

java -jar revanced-cli-5.0.0-dev.8-all.jar patch -p patches-5.0.0-dev.1.rvp --keystore-entry-alias=alias --keystore-password=password --keystore-entry-password=password --keystore=revanced.keystore -e "Custom branding" -OappName=YouTube -e "Change header" -Oheader=premium*header Apps\com.google.android.youtube-19.43.41-all.apk -o Install\YouTube_19.43.41-all_ReVanced.apk

All patches applied, no errors occured. App name also changed to YouTube, but it is still using default YouTube logo. Also, it still using default YouTube header.

Error logs

No response

Solution

No response

Additional context

No response

Acknowledgements

LisoUseInAIKyrios commented 1 week ago

Add quotes to the options:

-OappName="YouTube" -Oheader="premium*header"

oSumAtrIX commented 1 week ago

The quotes are not necessary as the CLI parser parses the value entirely as a string since there's no space or quotation. The CLI parser does parse the options also correctly, so this may be an issue with the patches.

oSumAtrIX commented 1 week ago

Though, the patch seems to work as expected:

Image

LisoUseInAIKyrios commented 1 week ago

I get an error if using -Oheader=premium*header, but that's only because of the * wildcard causes the shell to think it's an expansion operator.

LisoUseInAIKyrios commented 1 week ago

Hmmm. It seems the custom branding patch applies the app name, but the icon is not applied.

oSumAtrIX commented 1 week ago

The patch changed the assets for me just fine.

LisoUseInAIKyrios commented 1 week ago

With custom branding did the app icon change to the ReVanced icon? I am still seeing the original app icon.

LisoUseInAIKyrios commented 1 week ago

@oSumAtrIX try patching 19.43.41 with custom branding. It looks like the launcher icon file name was changed with 19.43.41

oSumAtrIX commented 1 week ago

The logo was changed by the patch:

Image

I have not tested if it appears though when installed. Perhaps this is a new change by YouTube and there are new paths that need to be patched as well.

oSumAtrIX commented 1 week ago

@oSumAtrIX try patching 19.43.41 with custom branding. It looks like the launcher icon file name was changed with 19.43.41

You are right. There are new file names

LisoUseInAIKyrios commented 1 week ago

19.43.41 uses launcher file ringo2_ic_launcher.xml, and the icon files are:

@mipmap/adaptiveproduct_youtube_2024_q4_foreground_color_108 @mipmap/adaptiveproduct_youtube_2024_q4_background_color_108

oSumAtrIX commented 1 week ago

The patch does need adjustment to support these. They also seem to have a specific scaling which is annoying as I am not sure what factor for the scale is used.

LisoUseInAIKyrios commented 1 week ago

I think the simplest fix is if a custom icon is used, then change the manifest entry for the icon back to the old 19.34 value.

Edit: the old ic_launcher_round file is gone, so using the old icon xml file won't work.

oSumAtrIX commented 1 week ago

Actually, I think this file can be copied to the new path:

Image

cyberboh commented 6 days ago

Confirmed solved in https://github.com/ReVanced/revanced-patches/releases/tag/v5.0.0-dev.1

MarcaDian commented 17 hours ago

Some users write that there are problems with Change header, at first launch it displays the Revanced header, and when a new layout is loaded from the server, the header changes to the standard one. If update the installed patched app, everything displays as it should.

v5.0.1, 19.43.41

LisoUseInAIKyrios commented 16 hours ago

It's probably an a/b test for a different header layout.

If anyone can reproduce the issue, then they can turn on debugging and filter the adb logs for debuggingpatch, and that'll show what a/b flags are on and the correct flag can be identified and patched.

cyberboh commented 16 hours ago

It's probably an a/b test for a different header layout.

If anyone can reproduce the issue, then they can turn on debugging and filter the adb logs for debuggingpatch, and that'll show what a/b flags are on and the correct flag can be identified and patched.

Can you specify full commmand for debugging? I think i have the issue. 'Premium' logo becomes original one.

MarcaDian commented 16 hours ago

Screenshot_2024-11-12-11-32-45-659-edit_com.github.android.jpg

Or simply adb logcat > log.txt

LisoUseInAIKyrios commented 15 hours ago

Doing a full log dump will include logs for all apps (and may include private information).

Windows: adb logcat | findstr "DebuggingPatch" > log.txt

Unix / MacOS: adb logcat | grep "DebuggingPatch" > log.txt