anddea / revanced-patches

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

question: custom branding icon #59

Closed AliBASE closed 6 months ago

AliBASE commented 6 months ago

Application

YouTube

Question description

In the youtube patches there is a patch "Custom branding icon Youtube" and it says in the description to specify the icon path in the options.json file, but there is nothing in the options.json file related to the custom icon. And this is the options.json what have: `` [ { "patchName" : "Custom package name", "options" : [ { "key" : "PackageNameYouTube", "value" : "anddea.youtube" }, { "key" : "PackageNameYouTubeMusic", "value" : "anddea.youtube.music" } ] }, {

"patchName" : "Custom double tap length", "options" : [ { "key" : "DoubleTapLengthArrays", "value" : "3, 5, 10, 15, 20, 30, 60, 120, 180" } ] }, { "patchName" : "Theme", "options" : [ { "key" : "DarkThemeBackgroundColor", "value" : "#FF010101" }, { "key" : "AdvancedDarkThemeBackgroundColor", "value" : "#FF252A3A" }, { "key" : "LightThemeBackgroundColor", "value" : "#FFFFFFFF" }, { "key" : "AdvancedLightThemeBackgroundColor", "value" : "#FFF2F8FF" }, { "key" : "SeekbarBackgroundColor", "value" : "#FFFF0000" } ] }, { "patchName" : "Overlay buttons", "options" : [ { "key" : "OutlineIcon", "value" : true }, { "key" : "BottomMargin", "value" : "0.0dip" } ] }, { "patchName" : "Shorts overlay buttons", "options" : [ { "key" : "IconType", "value" : "TikTok" } ] }, { "patchName" : "SponsorBlock", "options" : [ { "key" : "OutlineIcon", "value" : true } ] } ] ``

Acknowledgements

anddea commented 6 months ago

Delete the old options.json file, enable/include this patch and then specify the path in the value. The easiest way to specify custom icon is to use the Manager.

AliBASE commented 6 months ago

I deleted the options.json file and enabled the "Custom branding icon Youtube", and the created options.json file after patching finished doesn't have anything related to icon. this is the cli code: java -jar cli.jar patch youtube_19.05.36.apk -b patches.jar -m integrations.apk -o "youtube-revanced-extended.apk" --rip-lib=armeabi-v7a --rip-lib=x86_64 --rip-lib=x86 -i "Custom branding YouTube name" -i "Custom package name" -i "Custom branding icon Youtube" -e "Enable debug logging" -e "Force hide player button background" -i "Hide previous next button" -e "Add splash animation" -i "Disable landscape mode" -i "Hide double tap overlay filter" -i "MicroG support" -i Theme -i Settings -i "Settings icons"

anddea commented 6 months ago

You don't have this in your options.json?

{
  "patchName" : "Custom branding icon YouTube",
  "options" : [ {
    "key" : "AppIcon",
    "value" : "Revancify Blue"
  } ]
}
AliBASE commented 6 months ago

No, i don't have it, just the same as the previous options.json above ^. I tried before this to add it manually in the options.json but i got error in the cli

anddea commented 6 months ago

Maybe something's wrong with cli. Get the latest one from here.

AliBASE commented 6 months ago

Thxxxx! i tried add it manually again to the options.json, run the code and works without any errors, but the icon didn't changed, first time i provide the folder path that have [mdpi,hdpi,xhdpi,xxhdpi,xxxhdpi] icons, not working, tried again to provide only the icon file path icon.png and didn't changed although the code runs without any errors. In inotia00 patches i had to exclude the icons from the cli code and create the branding folder that have the previous densities in the same path then the icon changed without modifying the options.json file. In Rex patches the "Custom branding icon Youtube" is already in the options.json file only i have to provide the branding path folder.

anddea commented 6 months ago

It should be the same as ReX repo.

AliBASE commented 6 months ago

ok. i checked the patching process and i found that the patches i enabled got excluded!!!, why??? here is the log: java -jar cli.jar patch youtube_19.05.36.apk -b patches.jar -m integrations.apk -o "youtube-revanced-extended.apk" --rip-lib=armeabi-v7a --rip-lib=x86_64 --rip-lib=x86 -i "Custom branding YouTube name" -i "Custom package name" -i "Custom branding icon Youtube" -e "Enable debug logging" -e "Force hide player button background" -i "Hide previous next button" -e "Add splash animation" -i "Disable landscape mode" -i "Hide double tap overlay filter" -i "MicroG support" -i Theme -i Settings -i "Settings icons" INFO: Loading patches INFO: Decoding app manifest INFO: Excluding Enable debug logging INFO: Change player flyout panel toggles excluded INFO: Hide animated button background excluded INFO: Hide double tap to like animations excluded INFO: Custom branding icon YouTube excluded INFO: Custom branding name YouTube excluded INFO: Custom branding heading excluded INFO: MaterialYou excluded INFO: Excluding Add splash animation INFO: Hide voice search button excluded INFO: Excluding Enable debug logging INFO: Hide player chapters excluded INFO: Hide fullscreen button excluded INFO: Setting patch options INFO: Merging integrations INFO: Deleting existing resource cache directory INFO: Decoding resources INFO: Executing patches INFO: Alternative thumbnails succeeded INFO: Ambient mode switch succeeded INFO: Append time stamps information succeeded INFO: Change start page succeeded INFO: Custom double tap length succeeded INFO: Custom package name succeeded INFO: Custom playback speed succeeded INFO: Custom player overlay opacity succeeded INFO: Custom seekbar color succeeded INFO: Default playback speed succeeded INFO: Default video quality succeeded INFO: Disable HDR video succeeded INFO: Disable QUIC protocol succeeded INFO: Disable auto captions succeeded INFO: Disable haptic feedback succeeded INFO: Disable landscape mode succeeded INFO: Disable pip notification succeeded INFO: Disable rolling number animations succeeded INFO: Disable shorts on startup succeeded INFO: Disable speed overlay succeeded INFO: Disable update screen succeeded INFO: Enable bottom player gestures succeeded INFO: Enable compact controls overlay succeeded INFO: Enable external browser succeeded INFO: Enable gradient loading screen succeeded INFO: Enable language switch succeeded INFO: Enable minimized playback succeeded INFO: Enable new splash animation succeeded INFO: Enable new thumbnail preview succeeded INFO: Enable old quality layout succeeded INFO: Enable open links directly succeeded INFO: Enable seekbar tapping succeeded INFO: Enable song search succeeded INFO: Enable tablet mini player succeeded INFO: Enable tablet navigation bar succeeded INFO: Enable wide search bar succeeded INFO: Force fullscreen succeeded INFO: Force opus codec succeeded INFO: Force video codec succeeded INFO: Header switch succeeded INFO: Hide account menu succeeded INFO: Hide auto player popup panels succeeded INFO: Hide autoplay button succeeded INFO: Hide autoplay preview succeeded INFO: Hide button container succeeded INFO: Hide captions button succeeded INFO: Hide cast button succeeded INFO: Hide category bar succeeded INFO: Hide channel avatar section succeeded INFO: Hide channel profile components succeeded INFO: Hide channel watermark succeeded INFO: Hide collapse button succeeded INFO: Hide comment component succeeded INFO: Hide crowdfunding box succeeded INFO: Hide description components succeeded INFO: Hide double tap overlay filter succeeded INFO: Hide end screen cards succeeded INFO: Hide end screen overlay succeeded INFO: Hide feed flyout panel succeeded INFO: Hide filmstrip overlay succeeded INFO: Hide floating microphone succeeded INFO: Hide fullscreen panels succeeded INFO: Hide general ads succeeded INFO: Hide handle succeeded INFO: Hide info cards succeeded INFO: Hide latest videos button succeeded INFO: Hide layout components succeeded INFO: Hide load more button succeeded INFO: Hide mix playlists succeeded INFO: Hide music button succeeded INFO: Hide navigation buttons succeeded INFO: Hide navigation label succeeded INFO: Hide player buttons background succeeded INFO: Hide player flyout panel succeeded INFO: Hide previous next button succeeded INFO: Hide search term thumbnail succeeded INFO: Hide seek message succeeded INFO: Hide seekbar succeeded INFO: Hide shorts components succeeded INFO: Hide snack bar succeeded INFO: Hide suggested actions succeeded INFO: Hide suggested video overlay succeeded INFO: Hide suggestions shelf succeeded INFO: Hide time stamp succeeded INFO: Hide toolbar button succeeded INFO: Hide tooltip content succeeded INFO: Hide trending searches succeeded INFO: Hide video ads succeeded INFO: Keep landscape mode succeeded INFO: Layout switch succeeded INFO: MicroG support succeeded INFO: Overlay buttons succeeded INFO: Quick actions components succeeded INFO: Remove viewer discretion dialog succeeded INFO: Return YouTube Dislike succeeded INFO: Sanitize sharing links succeeded INFO: Settings icons succeeded INFO: Shorts overlay buttons succeeded INFO: SponsorBlock succeeded INFO: Spoof app version succeeded INFO: Spoof device dimensions succeeded INFO: Spoof player parameters succeeded INFO: Swipe controls succeeded INFO: Theme succeeded INFO: Translations succeeded INFO: Settings succeeded INFO: Compiling patched dex files INFO: Compiled classes.dex INFO: Compiled classes2.dex INFO: Compiled classes3.dex INFO: Compiled classes4.dex INFO: Compiled classes5.dex INFO: Compiled classes6.dex INFO: Compiled classes7.dex INFO: Compiling modified resources INFO: Aligning youtube_19.05.36.apk INFO: Signing youtube_19.05.36.apk

anddea commented 6 months ago

Just be careful with the patch names, one example, you include Custom branding YouTube name, but the patch is Custom branding name YouTube.

AliBASE commented 6 months ago

Thxxxx!. Problem solved. Instead of "YouTube" i had "Youtube", that's why, but it should give an error if it's not right.