Skip to content

Conversation

@MarcaDian
Copy link
Contributor

@MarcaDian MarcaDian commented Oct 4, 2025

For YouTube and YT Music.

Adds in app settings to pick the custom branding icon and the custom name to use.

Found in:

  • ReVanced Settings > General > App icon
  • ReVanced Settings > General > App name

Additionally, custom icons now use SVG icons instead of PNG for a crisper look.

Icon styles

ReVanced

Adaptive icon

Screenshot_2025-10-06-09-32-33-515_com miui home-edit

Monochrome icon

Screenshot_2025-10-06-09-41-43-508_app lawnchair-edit

ReVanced minimal

Adaptive icon

Screenshot_2025-10-06-09-33-08-339_com miui home-edit

Monochrome icon

Screenshot_2025-10-06-19-06-40-651_app.lawnchair-edit.jpg

ReVanced scaled

Adaptive icon

Screenshot_2025-10-06-09-33-36-848_com miui home-edit

Monochrome icon

Screenshot_2025-10-06-09-37-38-234_app lawnchair-edit

Custom

You can provide your own icon during patching. An example using an 'expanded' gradient:

revanced_gradient.zip

Adaptive icon square

Screenshot_2025-10-07-00-19-02-579_app lawnchair-edit

Adaptive icon circle

Screenshot_2025-10-06-18-14-06-770_app.lawnchair-edit.jpg

Adaptive teardrop

Screenshot_2025-10-06-18-14-38-190_app.lawnchair-edit.jpg

Monochrome icon

Screenshot_2025-10-07-00-18-35-288_app lawnchair-edit

 

Root installations

This feature does not work with mount (rooted) installation, because root ignores manifest changes. If you are rooted and want the ReVanced icon, then download it from here and use it as a custom icon in your launcher.

@MarcaDian
Copy link
Contributor Author

Maybe this can still be optimized (file names) to avoid duplication.

@LisoUseInAIKyrios
Copy link
Contributor

Can the bundled ReVanced mipmap png's be deleted? No point adding them if the svg is used.

@MarcaDian
Copy link
Contributor Author

That's what I meant, how to remove them without disrupting the work with custom icons?

@LisoUseInAIKyrios
Copy link
Contributor

Maybe don't allow custom SVG resources if the user specifies a folder?

It would make the patch and patch option a lot simpler. SVG has limited use cases, while png works for any kind of icon and it's the most likely file a user will pick.

@LisoUseInAIKyrios
Copy link
Contributor

I tried removing the mipmap icons, but then the svg isn't used and the app has the original unmodified icon/launch graphics as unpatched. This is the same issue I ran into before when I tried using svg's.

Are we sure the SVG's are being used?

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Oct 4, 2025

The SVG icon is not being used for the launcher icon. At least it's not on my launcher (Lawnchair 15).

I modified the bundled png a little (did not modify the svg), and the modified png is what shows in the launcher.

@MarcaDian
Copy link
Contributor Author

I need to double check, I just modified the code to remove the png and I don't have xml copied to mipmap-anydpi

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Oct 4, 2025

Just checked again, everything is fine.

Screenshot_2025-10-04-16-09-16-982_ru.maximoff.apktool.jpg

Screenshot_2025-10-04-16-09-07-043_ru.maximoff.apktool.jpg

Screenshot_2025-10-04-16-09-48-470_com.miui.home-edit.jpg

@LisoUseInAIKyrios
Copy link
Contributor

Checking what you have and I'll try

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Oct 4, 2025

Oh, I tested Music, and now I tried YouTube and it doesn't work for me either, need to take a closer look.

Edit: I must have mistyped the file names from the unpatched app.

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Oct 4, 2025

I don't know if it's normal for many XML files in custom branding resources to have the same content but differ only by name.

Is it possible, for example, to use one file as a template and just copy it with a different name?

@MarcaDian
Copy link
Contributor Author

MarcaDian commented Oct 4, 2025

Surely this code can already be deleted?
Edit: Probably not, because it is still used for custom icons.

private val youtubeIconResourceFileNames_19_34 = mapOf(
    "adaptiveproduct_youtube_foreground_color_108" to "adaptiveproduct_youtube_2024_q4_foreground_color_108",
    "adaptiveproduct_youtube_background_color_108" to "adaptiveproduct_youtube_2024_q4_background_color_108",
)

@oSumAtrIX
Copy link
Member

Was the scaling of the shape fixed in the other PR? If not please fix this in the SVG files before merging this PR

@LisoUseInAIKyrios
Copy link
Contributor

I believe the scaling here is correct for Android guidelines.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title feat(Custom branding): Use SVG for adaptive ReVanced icon feat(Custom branding): Use SVG adaptive ReVanced icons Oct 4, 2025
@MarcaDian
Copy link
Contributor Author

I also do this optimization every time, I wonder why yours is better.
Maybe you set a larger iteration step.
-m --iterations=50 --filters=0meb

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Oct 7, 2025

I use an open source tool that runs the images thru multiple re-compressors and picks the most efficient compressor. Zopfli usually wins but sometimes PNGOUT is better.

https://imageoptim.com

Closes windows tool is https://css-ig.net/pinga but I don't think it's free.

@kitadai31
Copy link
Contributor

If template png's are not bundled, then the user must provide png's for all dpis. That's less convenient than providing a single pair of background/foreground icons for just their device.

Regarding this, I gave it a try.

To cut to the chase, this was my mistake, and ChatGPT was not lying.
Only one dpi is required at least.
The template PNGs are not necessary.

I once said "If the only available resources are larger than the current screen, the system doesn't use them and your app crashes." above.
However, this explanation was about the Screen size qualifier (small, normal, ...), not the Screen pixel density (dpi) qualifier (ldpi, mdpi, hdpi, ...).

For the density qualifiers, the crash doesn't occur.
https://developer.android.com/guide/topics/resources/providing-resources#DensityQualifier
This says that the system scales drawable resources as needed, based on the current screen density.

I had actually given it a try.
Using an Android 8.0 xhdpi (320 DPI) AVD.
I created two test apps, one has only mdpi foreground and background PNGs, the other has only xxxhdpi fg and bg PNGs.
Both of these were displayed correctly in the launcher.
I also checked to see if the app would crash if the resource is a drawable instead of a mipmap and displayed in the app, and there were no problems.

After this test, I wondered why the documentation said it would crash, and then I realized it was referring to the screen size qualifier, not the dpi qualifier.

Therefore, the template PNG was unnecessary after all.
By removing it, a lazy user can provide only one dpi, and it will be displayed for devices have other densities.

@LisoUseInAIKyrios LisoUseInAIKyrios merged commit a50f3b5 into ReVanced:dev Oct 7, 2025
1 check passed
github-actions bot pushed a commit that referenced this pull request Oct 7, 2025
# [5.42.0-dev.18](v5.42.0-dev.17...v5.42.0-dev.18) (2025-10-07)

### Features

* **Custom branding:** Add in-app settings to change icon and name ([#6059](#6059)) ([a50f3b5](a50f3b5))
@LisoUseInAIKyrios
Copy link
Contributor

Using a single dpi file does seem to work and whatever dpi is used is scaled up/down to the actual device dpi.

So if no template is included and the user provides xxxhdpi, then it will be scaled down to whatever dpi they actually have.

But, from my experience Android does a poor job scaling down these resources at runtime. I think these days it's bi-cubic which is good, but it's still worse quality than if the original svg or higher resolution image is scaled down to the exact dpi of the users device.

Before this PR the user had to provide icons for every dpi, and with this change the user only needs to provide one dpi if they want. So it's still an improvement.

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Oct 7, 2025

A white logo looks great.

Since there's now an in-app setting we could add all kinds of logo variations, if the branding permits them.

White album vibes

For now if you want this icon, don't include a custom icon during patching then edit your settings data to include:
"custom_branding_icon": "custom",

@MarcaDian MarcaDian deleted the adaptive-icons branch October 7, 2025 19:59
@kitadai31
Copy link
Contributor

kitadai31 commented Oct 7, 2025

Oops, I posted a comment just before this was merged
My bad
I always have bad timing :(

Before this PR the user had to provide icons for every dpi, and with this change the user only needs to provide one dpi if they want. So it's still an improvement.

That's true. This PR made it really convenient.

By the way, can't we use vector drawables also for Change header patch?
If it will be just converting this to a vector XML, it will easy.
https://github.com/ReVanced/revanced-branding/blob/main/assets/revanced-headline/revanced-headline-horizontal-light.svg

(I was about to ask this before merged because this PR also fixes the V shape scale of the minimal header. But since this PR has been merged, this refactoring isprobably not needed right now.)

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Oct 7, 2025

Yes it's easy to add support for user provided vector drawables.

The only issue is the added complexity of explaining the patch option.

But maybe it's not that complicated because it's:

Provide a path to both files of:

  • mipmap-anydpi/revanced_background_custom.xml
  • mipmap-anydpi/revanced_foreground_custom.xml

Or provide png files of your dpi:

  • dpi/revanced_background_custom.png
  • dpi/revanced_foreground_custom.png

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Oct 7, 2025

I just re-read what you said.

Change header can use vector drawables. Both for the built-in options (revanced, minimal), and for user provided drawables (but I'm not sure how useful vector drawables would be for custom user input).

github-actions bot pushed a commit that referenced this pull request Oct 8, 2025
# [5.42.0](v5.41.0...v5.42.0) (2025-10-08)

### Bug Fixes

* **Custom branding:** Update ReVanced logo ([#6049](#6049)) ([9441e7a](9441e7a))
* **Custom branding:** Update ReVanced logo sizing ([#6029](#6029)) ([ae4b947](ae4b947))
* **Instagram - Hide navigation buttons:** Resolve app startup crash ([080a226](080a226))
* **Spotify:** Change `Hide Create button` patch to default off ([#6067](#6067)) ([19949e1](19949e1))
* **X / Twitter:** Remove non functional and obsolete patch `Open links with app chooser` ([#6033](#6033)) ([673609c](673609c))
* **YouTube - Force original audio:** Change patch to default on ([#6070](#6070)) ([bd4ba2d](bd4ba2d))
* **YouTube - Force original language:** Resolve some videos using Swedish audio track ([9d67316](9d67316))
* **YouTube - Hide end screen cards:** Hide new type of end screen card ([#6027](#6027)) ([76b0364](76b0364))
* **YouTube - Spoof video streams:** Add "Allow Android VR AV1" setting ([#6071](#6071)) ([f03256c](f03256c))
* **YouTube - Spoof video streams:** Do not allow VR AV1 if "Force AVC" is enabled ([7afeaeb](7afeaeb))
* **YouTube - Spoof video streams:** Resolve playback dropping frames ([#6051](#6051)) ([a62ee43](a62ee43))
* **YouTube Music - GmsCore support:** Handle sharing links to certain apps such as Instagram ([#6026](#6026)) ([328234f](328234f))
* **YouTube Music - Hide cast button:** Fix patching error ([28799a5](28799a5))
* **YouTube Music - Hide cast button:** Resolve button not hiding ([7817885](7817885))
* **YouTube:** Resolve UI components not hiding for some users ([#6054](#6054)) ([6b26346](6b26346))

### Features

* **Custom branding:** Add in-app settings to change icon and name ([#6059](#6059)) ([a50f3b5](a50f3b5))
* **Instagram:** Add `Custom share domain` patch ([#5998](#5998)) ([20c4131](20c4131))
* **Instagram:** Add `Enable developer menu` patch ([#6043](#6043)) ([2154d89](2154d89))
* **Instagram:** Add `Open links externally` patch ([#6012](#6012)) ([08e8ead](08e8ead))
* **Instagram:** Add `Sanitize sharing links` patch ([#5986](#5986)) ([963a4ef](963a4ef))
* **Viber:** Add `Hide navigation buttons` patch ([#5991](#5991)) ([5cb46c4](5cb46c4))
* **YouTube Music:** Add `Custom branding` patch ([#6007](#6007)) ([4c8b56f](4c8b56f))
* **YouTube Music:** Add `Force original audio` patch ([#6036](#6036)) ([d0d53d1](d0d53d1))
github-actions bot pushed a commit that referenced this pull request Oct 8, 2025
# [5.42.0](v5.41.0...v5.42.0) (2025-10-08)

### Bug Fixes

* **Custom branding:** Update ReVanced logo ([#6049](#6049)) ([9441e7a](9441e7a))
* **Custom branding:** Update ReVanced logo sizing ([#6029](#6029)) ([ae4b947](ae4b947))
* **Instagram - Hide navigation buttons:** Resolve app startup crash ([080a226](080a226))
* **Spotify:** Change `Hide Create button` patch to default off ([#6067](#6067)) ([19949e1](19949e1))
* **X / Twitter:** Remove non functional and obsolete patch `Open links with app chooser` ([#6033](#6033)) ([673609c](673609c))
* **YouTube - Force original audio:** Change patch to default on ([#6070](#6070)) ([bd4ba2d](bd4ba2d))
* **YouTube - Force original language:** Resolve some videos using Swedish audio track ([9d67316](9d67316))
* **YouTube - Hide end screen cards:** Hide new type of end screen card ([#6027](#6027)) ([76b0364](76b0364))
* **YouTube - Spoof video streams:** Add "Allow Android VR AV1" setting ([#6071](#6071)) ([f03256c](f03256c))
* **YouTube - Spoof video streams:** Do not allow VR AV1 if "Force AVC" is enabled ([7afeaeb](7afeaeb))
* **YouTube - Spoof video streams:** Resolve playback dropping frames ([#6051](#6051)) ([a62ee43](a62ee43))
* **YouTube Music - GmsCore support:** Handle sharing links to certain apps such as Instagram ([#6026](#6026)) ([328234f](328234f))
* **YouTube Music - Hide cast button:** Fix patching error ([28799a5](28799a5))
* **YouTube Music - Hide cast button:** Resolve button not hiding ([7817885](7817885))
* **YouTube:** Resolve UI components not hiding for some users ([#6054](#6054)) ([6b26346](6b26346))

### Features

* **Custom branding:** Add in-app settings to change icon and name ([#6059](#6059)) ([a50f3b5](a50f3b5))
* **Instagram:** Add `Custom share domain` patch ([#5998](#5998)) ([20c4131](20c4131))
* **Instagram:** Add `Enable developer menu` patch ([#6043](#6043)) ([2154d89](2154d89))
* **Instagram:** Add `Open links externally` patch ([#6012](#6012)) ([08e8ead](08e8ead))
* **Instagram:** Add `Sanitize sharing links` patch ([#5986](#5986)) ([963a4ef](963a4ef))
* **Viber:** Add `Hide navigation buttons` patch ([#5991](#5991)) ([5cb46c4](5cb46c4))
* **YouTube Music:** Add `Custom branding` patch ([#6007](#6007)) ([4c8b56f](4c8b56f))
* **YouTube Music:** Add `Force original audio` patch ([#6036](#6036)) ([d0d53d1](d0d53d1))
@lowendgamer
Copy link

How to enable now the the custom icon on rooted? It was working on the previous patch.

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Oct 8, 2025

Changing the icon for root does not work well and for many devices it doesn't work or the icon glitches out and it's sometimes the stock icon and other times it's the ReVanced icon.

#6059 (comment)

It's best to change the icon in your launcher. The old icon can be downloaded here to use with your launcher.

github-actions bot pushed a commit to Viole403/revanced-patches-old that referenced this pull request Oct 9, 2025
# [5.42.0](Viole403/revanced-patches@v5.41.0...v5.42.0) (2025-10-09)

### Bug Fixes

* **Custom branding:** Update ReVanced logo ([ReVanced#6049](https://github.com/Viole403/revanced-patches/issues/6049)) ([9441e7a](Viole403/revanced-patches@9441e7a))
* **Custom branding:** Update ReVanced logo sizing ([ReVanced#6029](https://github.com/Viole403/revanced-patches/issues/6029)) ([ae4b947](Viole403/revanced-patches@ae4b947))
* **Instagram - Hide navigation buttons:** Resolve app startup crash ([080a226](Viole403/revanced-patches@080a226))
* **Spotify:** Change `Hide Create button` patch to default off ([ReVanced#6067](https://github.com/Viole403/revanced-patches/issues/6067)) ([19949e1](Viole403/revanced-patches@19949e1))
* **X / Twitter:** Remove non functional and obsolete patch `Open links with app chooser` ([ReVanced#6033](https://github.com/Viole403/revanced-patches/issues/6033)) ([673609c](Viole403/revanced-patches@673609c))
* **YouTube - Custom Branding:** Resolve startup crash with root installation ([fd4b2e1](Viole403/revanced-patches@fd4b2e1))
* **YouTube - Force original audio:** Change patch to default on ([ReVanced#6070](https://github.com/Viole403/revanced-patches/issues/6070)) ([bd4ba2d](Viole403/revanced-patches@bd4ba2d))
* **YouTube - Force original language:** Resolve some videos using Swedish audio track ([9d67316](Viole403/revanced-patches@9d67316))
* **YouTube - Hide end screen cards:** Hide new type of end screen card ([ReVanced#6027](https://github.com/Viole403/revanced-patches/issues/6027)) ([76b0364](Viole403/revanced-patches@76b0364))
* **YouTube - Spoof video streams:** Add "Allow Android VR AV1" setting ([ReVanced#6071](https://github.com/Viole403/revanced-patches/issues/6071)) ([f03256c](Viole403/revanced-patches@f03256c))
* **YouTube - Spoof video streams:** Do not allow VR AV1 if "Force AVC" is enabled ([7afeaeb](Viole403/revanced-patches@7afeaeb))
* **YouTube - Spoof video streams:** Resolve playback dropping frames ([ReVanced#6051](https://github.com/Viole403/revanced-patches/issues/6051)) ([a62ee43](Viole403/revanced-patches@a62ee43))
* **YouTube Music - GmsCore support:** Handle sharing links to certain apps such as Instagram ([ReVanced#6026](https://github.com/Viole403/revanced-patches/issues/6026)) ([328234f](Viole403/revanced-patches@328234f))
* **YouTube Music - Hide cast button:** Fix patching error ([28799a5](Viole403/revanced-patches@28799a5))
* **YouTube Music - Hide cast button:** Resolve button not hiding ([7817885](Viole403/revanced-patches@7817885))
* **YouTube:** Resolve UI components not hiding for some users ([ReVanced#6054](https://github.com/Viole403/revanced-patches/issues/6054)) ([6b26346](Viole403/revanced-patches@6b26346))

### Features

* **crunchyroll/premium:** Add EnablePremiumPatch and related fingerprint ([688fa01](Viole403/revanced-patches@688fa01))
* **Custom branding:** Add in-app settings to change icon and name ([ReVanced#6059](https://github.com/Viole403/revanced-patches/issues/6059)) ([a50f3b5](Viole403/revanced-patches@a50f3b5))
* **DisableAdsPatch:** Update patch details and compatibility ([c9ea6bd](Viole403/revanced-patches@c9ea6bd))
* **duolingo/music:** Add FullSongsPatch and DisableNagsPatch ([5c31d2b](Viole403/revanced-patches@5c31d2b))
* **duolingo/music:** Refactor FullSongsPatch for constructor retrieval ([96e73ea](Viole403/revanced-patches@96e73ea))
* **duolingo/premium:** Refactor EnablePremiumPatch field handling ([9df0a7d](Viole403/revanced-patches@9df0a7d))
* **duolingo/unlocksuper:** Refactor user serialization fingerprints ([a5ce75a](Viole403/revanced-patches@a5ce75a))
* **duolingo:** Add UnlockDuolingoSuperPatch for feature unlocking ([ea76edf](Viole403/revanced-patches@ea76edf))
* **EnableDebugMenuPatch:** Update compatibility and description ([a5872b2](Viole403/revanced-patches@a5872b2))
* **FullSongsPatch:** Specify compatibility version for licensed songs ([aa89a94](Viole403/revanced-patches@aa89a94))
* **Instagram:** Add `Custom share domain` patch ([ReVanced#5998](https://github.com/Viole403/revanced-patches/issues/5998)) ([20c4131](Viole403/revanced-patches@20c4131))
* **Instagram:** Add `Enable developer menu` patch ([ReVanced#6043](https://github.com/Viole403/revanced-patches/issues/6043)) ([2154d89](Viole403/revanced-patches@2154d89))
* **Instagram:** Add `Open links externally` patch ([ReVanced#6012](https://github.com/Viole403/revanced-patches/issues/6012)) ([08e8ead](Viole403/revanced-patches@08e8ead))
* **Instagram:** Add `Sanitize sharing links` patch ([ReVanced#5986](https://github.com/Viole403/revanced-patches/issues/5986)) ([963a4ef](Viole403/revanced-patches@963a4ef))
* **music:** Add fingerprint and patch for unlocking licensed songs ([661655d](Viole403/revanced-patches@661655d))
* **nags:** Add DisableNagsPatch and related fingerprints ([417bef9](Viole403/revanced-patches@417bef9))
* **premium:** Add EnablePremiumPatch and related fingerprints ([651c372](Viole403/revanced-patches@651c372))
* **UnlockDuolingoSuperPatch:** Implement patch to unlock Duolingo Super features ([83a3391](Viole403/revanced-patches@83a3391))
* **Utils:** Add utility functions for ClassDef handling ([588d225](Viole403/revanced-patches@588d225))
* **Utils:** Refactor toString method retrieval in ClassDef ([36cb62b](Viole403/revanced-patches@36cb62b))
* **Viber:** Add `Hide navigation buttons` patch ([ReVanced#5991](https://github.com/Viole403/revanced-patches/issues/5991)) ([5cb46c4](Viole403/revanced-patches@5cb46c4))
* **YouTube Music:** Add `Custom branding` patch ([ReVanced#6007](https://github.com/Viole403/revanced-patches/issues/6007)) ([4c8b56f](Viole403/revanced-patches@4c8b56f))
* **YouTube Music:** Add `Force original audio` patch ([ReVanced#6036](https://github.com/Viole403/revanced-patches/issues/6036)) ([d0d53d1](Viole403/revanced-patches@d0d53d1))
@PBhadoo

This comment was marked as spam.

@sm455
Copy link
Contributor

sm455 commented Oct 13, 2025

@LisoUseInAIKyrios hii.sorry to disturb.whats the command to use custom icon.its not showing in settings in default .i patched through cli

@LisoUseInAIKyrios
Copy link
Contributor

Use the with-options argument for it to print instructions. See https://github.com/ReVanced/revanced-cli/blob/main/docs/1_usage.md#-list-patches

But if all you want is the ReVanced logo, you don't use any patch options and the logo is now selectable in YouTube Settings > ReVanced > General > App icon

@MarcaDian
Copy link
Contributor Author

@oSumAtrIX Can we create a thread somewhere, maybe in the branding repo, so that users can post their custom icons for the branding patch? I think this would help the ReVanced repository gain some popularity. Or is that a bad idea?

For example, I adapted these icons from Reddit and would like to share them.

IMG-20251024-172420

@LisoUseInAIKyrios
Copy link
Contributor

Could make a thread on Reddit, where users can post links to icon zips they made and post screenshots. If someone keeps up with the thread they can edit the first post to show popular icons (or don't curate, and let reddit voting push the popular comments with icons up higher).

I think posting icons to a repo isn't a great idea since it can include questionable icons ("heres my custom icon of the copyrighted YouTube logo but with a poop emoji added").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.