diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/ChangeHeaderPatch.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/ChangeHeaderPatch.java new file mode 100644 index 000000000..982d438e2 --- /dev/null +++ b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/ChangeHeaderPatch.java @@ -0,0 +1,50 @@ +package app.revanced.extension.youtube.patches; + +import androidx.annotation.Nullable; + +import java.util.Objects; + +import app.revanced.extension.shared.Utils; +import app.revanced.extension.youtube.settings.Settings; + +@SuppressWarnings("unused") +public class ChangeHeaderPatch { + + public enum HeaderLogo { + DEFAULT(null), + REGULAR("ytWordmarkHeader"), + PREMIUM("ytPremiumWordmarkHeader"), + REVANCED("revanced_header_logo"), + REVANCED_MINIMAL("revanced_header_logo_minimal"), + CUSTOM("custom_header"); + + @Nullable + private final String resourceName; + + HeaderLogo(@Nullable String resourceName) { + this.resourceName = resourceName; + } + + /** + * @return The attribute id of this header logo, or NULL if the logo should not be replaced. + */ + @Nullable + private Integer getAttributeId() { + if (resourceName == null) { + return null; + } + + return Utils.getResourceIdentifier(resourceName, "attr"); + } + } + + @Nullable + private static final Integer headerLogoResource = Settings.HEADER_LOGO.get().getAttributeId(); + + /** + * Injection point. + */ + public static int getHeaderAttributeId(int original) { + return Objects.requireNonNullElse(headerLogoResource, original); + } +} diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java index 4feb5d6bf..ce4982f3e 100644 --- a/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java +++ b/extensions/youtube/src/main/java/app/revanced/extension/youtube/settings/Settings.java @@ -8,6 +8,7 @@ import static app.revanced.extension.shared.settings.Setting.parent; import static app.revanced.extension.shared.settings.Setting.parentsAll; import static app.revanced.extension.shared.settings.Setting.parentsAny; import static app.revanced.extension.youtube.patches.ChangeFormFactorPatch.FormFactor; +import static app.revanced.extension.youtube.patches.ChangeHeaderPatch.HeaderLogo; import static app.revanced.extension.youtube.patches.ChangeStartPagePatch.ChangeStartPageTypeAvailability; import static app.revanced.extension.youtube.patches.ChangeStartPagePatch.StartPage; import static app.revanced.extension.youtube.patches.ExitFullscreenPatch.FullscreenMode; @@ -238,7 +239,8 @@ public class Settings extends BaseSettings { public static final EnumSetting CHANGE_FORM_FACTOR = new EnumSetting<>("revanced_change_form_factor", FormFactor.DEFAULT, true, "revanced_change_form_factor_user_dialog_message"); public static final BooleanSetting BYPASS_IMAGE_REGION_RESTRICTIONS = new BooleanSetting("revanced_bypass_image_region_restrictions", FALSE, true); public static final BooleanSetting GRADIENT_LOADING_SCREEN = new BooleanSetting("revanced_gradient_loading_screen", FALSE, true); - public static final EnumSetting SPLASH_SCREEN_ANIMATION_STYLE = new EnumSetting<>("splash_screen_animation_style", SplashScreenAnimationStyle.FPS_60_ONE_SECOND, true); + public static final EnumSetting SPLASH_SCREEN_ANIMATION_STYLE = new EnumSetting<>("revanced_splash_screen_animation_style", SplashScreenAnimationStyle.FPS_60_ONE_SECOND, true); + public static final EnumSetting HEADER_LOGO = new EnumSetting<>("revanced_header_logo", HeaderLogo.DEFAULT, true); public static final BooleanSetting REMOVE_VIEWER_DISCRETION_DIALOG = new BooleanSetting("revanced_remove_viewer_discretion_dialog", FALSE, "revanced_remove_viewer_discretion_dialog_user_dialog_message"); diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/branding/header/ChangeHeaderPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/branding/header/ChangeHeaderPatch.kt index 136051902..c910d136b 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/branding/header/ChangeHeaderPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/branding/header/ChangeHeaderPatch.kt @@ -1,43 +1,83 @@ package app.revanced.patches.youtube.layout.branding.header +import app.revanced.patcher.extensions.InstructionExtensions.addInstructions +import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.patch.PatchException +import app.revanced.patcher.patch.bytecodePatch import app.revanced.patcher.patch.resourcePatch import app.revanced.patcher.patch.stringOption -import app.revanced.patches.youtube.misc.playservice.is_19_25_or_greater -import app.revanced.patches.youtube.misc.playservice.versionCheckPatch +import app.revanced.patcher.util.Document +import app.revanced.patches.all.misc.resources.addResources +import app.revanced.patches.all.misc.resources.addResourcesPatch +import app.revanced.patches.shared.misc.mapping.get +import app.revanced.patches.shared.misc.mapping.resourceMappingPatch +import app.revanced.patches.shared.misc.mapping.resourceMappings +import app.revanced.patches.shared.misc.settings.preference.ListPreference +import app.revanced.patches.youtube.misc.settings.PreferenceScreen import app.revanced.util.ResourceGroup import app.revanced.util.Utils.trimIndentMultiline import app.revanced.util.copyResources import app.revanced.util.findElementByAttributeValueOrThrow +import app.revanced.util.forEachLiteralValueInstruction +import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import java.io.File -private const val HEADER_FILE_NAME = "yt_wordmark_header" -private const val PREMIUM_HEADER_FILE_NAME = "yt_premium_wordmark_header" +private const val EXTENSION_CLASS_DESCRIPTOR = + "Lapp/revanced/extension/youtube/patches/ChangeHeaderPatch;" -private const val HEADER_OPTION = "header*" -private const val PREMIUM_HEADER_OPTION = "premium*header" -private const val REVANCED_HEADER_OPTION = "revanced*" -private const val REVANCED_BORDERLESS_HEADER_OPTION = "revanced*borderless" +private val changeHeaderBytecodePatch = bytecodePatch { + dependsOn(resourceMappingPatch) + + execute { + arrayOf( + "ytWordmarkHeader", + "ytPremiumWordmarkHeader" + ).forEach { resourceName -> + val resourceId = resourceMappings["attr", resourceName] + + forEachLiteralValueInstruction(resourceId) { literalIndex -> + val register = getInstruction(literalIndex).registerA + addInstructions( + literalIndex + 1, + """ + invoke-static { v$register }, $EXTENSION_CLASS_DESCRIPTOR->getHeaderAttributeId(I)I + move-result v$register + """ + ) + } + } + } +} private val targetResourceDirectoryNames = mapOf( "xxxhdpi" to "512px x 192px", "xxhdpi" to "387px x 144px", "xhdpi" to "258px x 96px", "hdpi" to "194px x 72px", - "mdpi" to "129px x 48px", -).map { (dpi, dim) -> - "drawable-$dpi" to dim -}.toMap() + "mdpi" to "129px x 48px" +).mapKeys { (dpi, _) -> "drawable-$dpi" } private val variants = arrayOf("light", "dark") +/** + * Header logos built into this patch. + */ +private val logoResourceNames = arrayOf( + "revanced_header_logo_minimal", + "revanced_header_logo", +) + +/** + * Custom header resource/file name. + */ +private const val CUSTOM_HEADER_RESOURCE_NAME = "custom_header" + @Suppress("unused") val changeHeaderPatch = resourcePatch( name = "Change header", - description = "Applies a custom header in the top left corner within the app. Defaults to the ReVanced header.", - use = false, + description = "Adds an option to change the header logo in the top left corner of the app.", ) { - dependsOn(versionCheckPatch) + dependsOn(addResourcesPatch, changeHeaderBytecodePatch) compatibleWith( "com.google.android.youtube"( @@ -50,85 +90,46 @@ val changeHeaderPatch = resourcePatch( ) ) - val header by stringOption( - key = "header", - default = REVANCED_BORDERLESS_HEADER_OPTION, - values = mapOf( - "YouTube" to HEADER_OPTION, - "YouTube Premium" to PREMIUM_HEADER_OPTION, - "ReVanced" to REVANCED_HEADER_OPTION, - "ReVanced (borderless logo)" to REVANCED_BORDERLESS_HEADER_OPTION, - ), - title = "Header", + val custom by stringOption( + key = "custom", + title = "Custom header logo", description = """ - The header to apply to the app. - - If a path to a folder is provided, the folder must contain one or more of the following folders, depending on the DPI of the device: + Folder with images to use as a custom header logo. + The folder must contain one or more of the following folders, depending on the DPI of the device: ${targetResourceDirectoryNames.keys.joinToString("\n") { "- $it" }} Each of the folders must contain all of the following files: - - ${variants.joinToString("\n") { variant -> "- ${HEADER_FILE_NAME}_$variant.png" }} + ${variants.joinToString("\n") { variant -> "- ${CUSTOM_HEADER_RESOURCE_NAME}_$variant.png" }} The image dimensions must be as follows: ${targetResourceDirectoryNames.map { (dpi, dim) -> "- $dpi: $dim" }.joinToString("\n")} - """.trimIndentMultiline(), - required = true, + """.trimIndentMultiline() ) execute { - // The directories to copy the header to. - val targetResourceDirectories = targetResourceDirectoryNames.keys.mapNotNull { - get("res").resolve(it).takeIf(File::exists) - } - // The files to replace in the target directories. - val targetResourceFiles = targetResourceDirectoryNames.keys.map { directoryName -> - ResourceGroup( - directoryName, - *variants.map { variant -> "${HEADER_FILE_NAME}_$variant.png" }.toTypedArray(), - ) - } + addResources("youtube", "layout.branding.changeHeaderPatch") - /** - * A function that overwrites both header variants in the target resource directories. - */ - fun overwriteFromTo(from: String, to: String) { - targetResourceDirectories.forEach { directory -> - variants.forEach { variant -> - val fromPath = directory.resolve("${from}_$variant.png") - val toPath = directory.resolve("${to}_$variant.png") + fun getLightDarkFileNames(vararg resourceNames: String): Array = + variants.flatMap { variant -> + resourceNames.map { resource -> "${resource}_$variant.png" } + }.toTypedArray() - fromPath.copyTo(toPath, true) - } - } - } + val logoResourceFileNames = getLightDarkFileNames(*logoResourceNames) + copyResources( + "change-header", + ResourceGroup("drawable-hdpi", *logoResourceFileNames), + ResourceGroup("drawable-mdpi", *logoResourceFileNames), + ResourceGroup("drawable-xhdpi", *logoResourceFileNames), + ResourceGroup("drawable-xxhdpi", *logoResourceFileNames), + ResourceGroup("drawable-xxxhdpi", *logoResourceFileNames), + ) - // Functions to overwrite the header to the different variants. - fun toPremium() { overwriteFromTo(PREMIUM_HEADER_FILE_NAME, HEADER_FILE_NAME) } - fun toHeader() { overwriteFromTo(HEADER_FILE_NAME, PREMIUM_HEADER_FILE_NAME) } - fun toReVanced() { - // Copy the ReVanced header to the resource directories. - targetResourceFiles.forEach { copyResources("change-header/revanced", it) } + if (custom != null) { + val sourceFolders = File(custom!!).listFiles { file -> file.isDirectory } + ?: throw PatchException("The provided path is not a directory: $custom") - // Overwrite the premium with the custom header as well. - toHeader() - } - fun toReVancedBorderless() { - // Copy the ReVanced borderless header to the resource directories. - targetResourceFiles.forEach { - copyResources( - "change-header/revanced-borderless", - it - ) - } - - // Overwrite the premium with the custom header as well. - toHeader() - } - fun toCustom() { - val sourceFolders = File(header!!).listFiles { file -> file.isDirectory } - ?: throw PatchException("The provided path is not a directory: $header") + val customResourceFileNames = getLightDarkFileNames(CUSTOM_HEADER_RESOURCE_NAME) var copiedFiles = false @@ -137,62 +138,87 @@ val changeHeaderPatch = resourcePatch( val targetDpiFolder = get("res").resolve(dpiSourceFolder.name) if (!targetDpiFolder.exists()) return@forEach - val imgSourceFiles = dpiSourceFolder.listFiles { file -> file.isFile }!! - imgSourceFiles.forEach { imgSourceFile -> + val customFiles = dpiSourceFolder.listFiles { file -> + file.isFile && file.name in customResourceFileNames + }!! + + if (customFiles.size > 0 && customFiles.size != variants.size) { + throw PatchException("Both light/dark mode images " + + "must be specified but only found: " + customFiles.map { it.name }) + } + + customFiles.forEach { imgSourceFile -> val imgTargetFile = targetDpiFolder.resolve(imgSourceFile.name) - imgSourceFile.copyTo(imgTargetFile, true) + imgSourceFile.copyTo(imgTargetFile) copiedFiles = true } } if (!copiedFiles) { - throw PatchException("No header files were copied from the provided path: $header.") + throw PatchException("No custom header images found in the provided path: $custom") + } + } + + // Logo is replaced using an attribute reference. + document("res/values/attrs.xml").use { document -> + val resources = document.childNodes.item(0) + + fun addAttributeReference(logoName: String) { + val item = document.createElement("attr") + item.setAttribute("format", "reference") + item.setAttribute("name", logoName) + resources.appendChild(item) } - // Overwrite the premium with the custom header as well. - toHeader() + logoResourceNames.forEach { logoName -> + addAttributeReference(logoName) + } + + if (custom != null) { + addAttributeReference(CUSTOM_HEADER_RESOURCE_NAME) + } } - when (header) { - HEADER_OPTION -> toHeader() - PREMIUM_HEADER_OPTION -> toPremium() - REVANCED_HEADER_OPTION -> toReVanced() - REVANCED_BORDERLESS_HEADER_OPTION -> toReVancedBorderless() - else -> toCustom() - } + // Add custom drawables to all styles that use the regular and premium logo. + document("res/values/styles.xml").use { document -> + arrayOf( + "Base.Theme.YouTube.Light" to "light", + "Base.Theme.YouTube.Dark" to "dark", + "CairoLightThemeRingo2Updates" to "light", + "CairoDarkThemeRingo2Updates" to "dark" + ).forEach { (style, mode) -> + val styleElement = document.childNodes.findElementByAttributeValueOrThrow( + "name", style + ) - // Fix 19.25+ A/B layout with different header icons: - // yt_ringo2_wordmark_header, yt_ringo2_premium_wordmark_header - // - // These images are webp and not png, so overwriting them is not so simple. - // Instead change styles.xml to use the old drawable resources. - if (is_19_25_or_greater) { - document("res/values/styles.xml").use { document -> - val documentChildNodes = document.childNodes + fun addDrawableElement(document: Document, logoName: String, mode: String) { + val item = document.createElement("item") + item.setAttribute("name", logoName) + item.textContent = "@drawable/${logoName}_$mode" + styleElement.appendChild(item) + } - arrayOf( - "CairoLightThemeRingo2Updates" to variants[0], - "CairoDarkThemeRingo2Updates" to variants[1] - ).forEach { (styleName, theme) -> - val styleNodes = documentChildNodes.findElementByAttributeValueOrThrow( - "name", - styleName, - ).childNodes + logoResourceNames.forEach { logoName -> + addDrawableElement(document, logoName, mode) + } - val drawable = "@drawable/${HEADER_FILE_NAME}_${theme}" - - arrayOf( - "ytWordmarkHeader", - "ytPremiumWordmarkHeader" - ).forEach { itemName -> - styleNodes.findElementByAttributeValueOrThrow( - "name", - itemName, - ).textContent = drawable - } + if (custom != null) { + addDrawableElement(document, CUSTOM_HEADER_RESOURCE_NAME, mode) } } } + + PreferenceScreen.GENERAL_LAYOUT.addPreferences( + if (custom == null) { + ListPreference("revanced_header_logo") + } else { + ListPreference( + key = "revanced_header_logo", + entriesKey = "revanced_header_logo_custom_entries", + entryValuesKey = "revanced_header_logo_custom_entry_values" + ) + } + ) } } diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemePatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemePatch.kt index 0ef4f6ebd..04d7a3d79 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemePatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/layout/theme/ThemePatch.kt @@ -222,7 +222,7 @@ val themePatch = bytecodePatch( if (is_19_47_or_greater) { PreferenceScreen.GENERAL_LAYOUT.addPreferences( - ListPreference("splash_screen_animation_style") + ListPreference("revanced_splash_screen_animation_style") ) } diff --git a/patches/src/main/kotlin/app/revanced/util/BytecodeUtils.kt b/patches/src/main/kotlin/app/revanced/util/BytecodeUtils.kt index 017a99862..60c7bdb0e 100644 --- a/patches/src/main/kotlin/app/revanced/util/BytecodeUtils.kt +++ b/patches/src/main/kotlin/app/revanced/util/BytecodeUtils.kt @@ -355,7 +355,7 @@ fun Method.indexOfFirstLiteralInstructionOrThrow(literal: Float): Int { * @see indexOfFirstLiteralInstructionOrThrow */ fun Method.indexOfFirstLiteralInstruction(literal: Double) = - indexOfFirstLiteralInstruction(literal.toRawBits().toLong()) + indexOfFirstLiteralInstruction(literal.toRawBits()) /** * Find the index of the first literal instruction with the given double value, @@ -421,7 +421,7 @@ fun Method.indexOfFirstLiteralInstructionReversedOrThrow(literal: Float): Int { * @see indexOfFirstLiteralInstructionOrThrow */ fun Method.indexOfFirstLiteralInstructionReversed(literal: Double) = - indexOfFirstLiteralInstructionReversed(literal.toRawBits().toLong()) + indexOfFirstLiteralInstructionReversed(literal.toRawBits()) /** * Find the index of the last wide literal instruction with the given double value, @@ -715,24 +715,50 @@ internal fun MutableMethod.insertLiteralOverride(literal: Long, override: Boolea } /** - * Called for _all_ instructions with the given literal value. + * Called for _all_ methods with the given literal value. + * Method indices are iterated from last to first. */ fun BytecodePatchContext.forEachLiteralValueInstruction( literal: Long, - block: MutableMethod.(literalInstructionIndex: Int) -> Unit, + block: MutableMethod.(matchingIndex: Int) -> Unit, ) { + val matchingIndexes = ArrayList() + classes.forEach { classDef -> classDef.methods.forEach { method -> - method.implementation?.instructions?.forEachIndexed { index, instruction -> - if (instruction.opcode == CONST && - (instruction as WideLiteralInstruction).wideLiteral == literal - ) { + method.implementation?.instructions?.let { instructions -> + matchingIndexes.clear() + + instructions.forEachIndexed { index, instruction -> + if ((instruction as? WideLiteralInstruction)?.wideLiteral == literal) { + matchingIndexes.add(index) + } + } + + if (matchingIndexes.isNotEmpty()) { val mutableMethod = proxy(classDef).mutableClass.findMutableMethodOf(method) - block.invoke(mutableMethod, index) + + // FIXME: Until patcher V22 is merged, this workaround is needed + // because if multiple patches modify the same class + // then after modifying the method indexes of immutable classes + // are no longer correct. + matchingIndexes.clear() + mutableMethod.instructions.forEachIndexed { index, instruction -> + if ((instruction as? WideLiteralInstruction)?.wideLiteral == literal) { + matchingIndexes.add(index) + } + } + if (matchingIndexes.isEmpty()) return@forEach + // FIXME Remove code above after V22 merge. + + matchingIndexes.asReversed().forEach { index -> + block.invoke(mutableMethod, index) + } } } } } + } private const val RETURN_TYPE_MISMATCH = "Mismatch between override type and Method return type" diff --git a/patches/src/main/resources/addresources/values/arrays.xml b/patches/src/main/resources/addresources/values/arrays.xml index 41a90c129..454ed0c1e 100644 --- a/patches/src/main/resources/addresources/values/arrays.xml +++ b/patches/src/main/resources/addresources/values/arrays.xml @@ -190,16 +190,15 @@ (YouTube closes the animation as soon as the feed is loaded), only the 60fps 1 second styles are exposed in the settings. Imported settings data can still be manually edited to force the other styles. --> - - @string/splash_screen_animation_style_entry_1 - @string/splash_screen_animation_style_entry_2 + + @string/revanced_splash_screen_animation_style_entry_1 + @string/revanced_splash_screen_animation_style_entry_2 - + FPS_60_ONE_SECOND FPS_60_BLACK_AND_WHITE - @string/revanced_exit_fullscreen_entry_1 @@ -270,6 +269,38 @@ MODERN_3 + + + @string/revanced_header_logo_entry_1 + @string/revanced_header_logo_entry_2 + @string/revanced_header_logo_entry_3 + @string/revanced_header_logo_entry_4 + @string/revanced_header_logo_entry_5 + + + DEFAULT + REGULAR + PREMIUM + REVANCED + REVANCED_MINIMAL + + + @string/revanced_header_logo_entry_1 + @string/revanced_header_logo_entry_2 + @string/revanced_header_logo_entry_3 + @string/revanced_header_logo_entry_4 + @string/revanced_header_logo_entry_5 + @string/revanced_header_logo_entry_6 + + + DEFAULT + REGULAR + PREMIUM + REVANCED + REVANCED_MINIMAL + CUSTOM + + @string/revanced_change_start_page_entry_default diff --git a/patches/src/main/resources/addresources/values/strings.xml b/patches/src/main/resources/addresources/values/strings.xml index 585837e77..a0f0abc53 100644 --- a/patches/src/main/resources/addresources/values/strings.xml +++ b/patches/src/main/resources/addresources/values/strings.xml @@ -1369,9 +1369,9 @@ Swipe to expand or close" Enable gradient loading screen Loading screen will have a gradient background Loading screen will have a solid background - Splash screen style - Color - Black and white + Splash screen style + Color + Black and white Enable custom seekbar color Custom seekbar color is shown Original seekbar color is shown @@ -1381,6 +1381,15 @@ Swipe to expand or close" The accent color of the seekbar Invalid seekbar color value + + Header logo + Default + Regular + Premium + ReVanced + ReVanced minimal + Custom + Bypass image region restrictions Using image host yt4.ggpht.com diff --git a/patches/src/main/resources/change-header/drawable-hdpi/revanced_header_logo_dark.png b/patches/src/main/resources/change-header/drawable-hdpi/revanced_header_logo_dark.png new file mode 100644 index 000000000..1b0799737 Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-hdpi/revanced_header_logo_dark.png differ diff --git a/patches/src/main/resources/change-header/drawable-hdpi/revanced_header_logo_light.png b/patches/src/main/resources/change-header/drawable-hdpi/revanced_header_logo_light.png new file mode 100644 index 000000000..581f62864 Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-hdpi/revanced_header_logo_light.png differ diff --git a/patches/src/main/resources/change-header/drawable-hdpi/revanced_header_logo_minimal_dark.png b/patches/src/main/resources/change-header/drawable-hdpi/revanced_header_logo_minimal_dark.png new file mode 100644 index 000000000..19581e9d6 Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-hdpi/revanced_header_logo_minimal_dark.png differ diff --git a/patches/src/main/resources/change-header/drawable-hdpi/revanced_header_logo_minimal_light.png b/patches/src/main/resources/change-header/drawable-hdpi/revanced_header_logo_minimal_light.png new file mode 100644 index 000000000..46e1e2942 Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-hdpi/revanced_header_logo_minimal_light.png differ diff --git a/patches/src/main/resources/change-header/drawable-mdpi/revanced_header_logo_dark.png b/patches/src/main/resources/change-header/drawable-mdpi/revanced_header_logo_dark.png new file mode 100644 index 000000000..3a277b1e3 Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-mdpi/revanced_header_logo_dark.png differ diff --git a/patches/src/main/resources/change-header/drawable-mdpi/revanced_header_logo_light.png b/patches/src/main/resources/change-header/drawable-mdpi/revanced_header_logo_light.png new file mode 100644 index 000000000..33d2cb093 Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-mdpi/revanced_header_logo_light.png differ diff --git a/patches/src/main/resources/change-header/drawable-mdpi/revanced_header_logo_minimal_dark.png b/patches/src/main/resources/change-header/drawable-mdpi/revanced_header_logo_minimal_dark.png new file mode 100644 index 000000000..d9709b5cf Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-mdpi/revanced_header_logo_minimal_dark.png differ diff --git a/patches/src/main/resources/change-header/drawable-mdpi/revanced_header_logo_minimal_light.png b/patches/src/main/resources/change-header/drawable-mdpi/revanced_header_logo_minimal_light.png new file mode 100644 index 000000000..46370125d Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-mdpi/revanced_header_logo_minimal_light.png differ diff --git a/patches/src/main/resources/change-header/drawable-xhdpi/revanced_header_logo_dark.png b/patches/src/main/resources/change-header/drawable-xhdpi/revanced_header_logo_dark.png new file mode 100644 index 000000000..21dad199f Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-xhdpi/revanced_header_logo_dark.png differ diff --git a/patches/src/main/resources/change-header/drawable-xhdpi/revanced_header_logo_light.png b/patches/src/main/resources/change-header/drawable-xhdpi/revanced_header_logo_light.png new file mode 100644 index 000000000..c6f9154d8 Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-xhdpi/revanced_header_logo_light.png differ diff --git a/patches/src/main/resources/change-header/revanced-borderless/drawable-xhdpi/yt_wordmark_header_dark.png b/patches/src/main/resources/change-header/drawable-xhdpi/revanced_header_logo_minimal_dark.png similarity index 100% rename from patches/src/main/resources/change-header/revanced-borderless/drawable-xhdpi/yt_wordmark_header_dark.png rename to patches/src/main/resources/change-header/drawable-xhdpi/revanced_header_logo_minimal_dark.png diff --git a/patches/src/main/resources/change-header/drawable-xhdpi/revanced_header_logo_minimal_light.png b/patches/src/main/resources/change-header/drawable-xhdpi/revanced_header_logo_minimal_light.png new file mode 100644 index 000000000..104fb0edb Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-xhdpi/revanced_header_logo_minimal_light.png differ diff --git a/patches/src/main/resources/change-header/drawable-xxhdpi/revanced_header_logo_dark.png b/patches/src/main/resources/change-header/drawable-xxhdpi/revanced_header_logo_dark.png new file mode 100644 index 000000000..0e9ae9896 Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-xxhdpi/revanced_header_logo_dark.png differ diff --git a/patches/src/main/resources/change-header/drawable-xxhdpi/revanced_header_logo_light.png b/patches/src/main/resources/change-header/drawable-xxhdpi/revanced_header_logo_light.png new file mode 100644 index 000000000..c9f9c0cf9 Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-xxhdpi/revanced_header_logo_light.png differ diff --git a/patches/src/main/resources/change-header/drawable-xxhdpi/revanced_header_logo_minimal_dark.png b/patches/src/main/resources/change-header/drawable-xxhdpi/revanced_header_logo_minimal_dark.png new file mode 100644 index 000000000..beee21133 Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-xxhdpi/revanced_header_logo_minimal_dark.png differ diff --git a/patches/src/main/resources/change-header/drawable-xxhdpi/revanced_header_logo_minimal_light.png b/patches/src/main/resources/change-header/drawable-xxhdpi/revanced_header_logo_minimal_light.png new file mode 100644 index 000000000..59afb27b4 Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-xxhdpi/revanced_header_logo_minimal_light.png differ diff --git a/patches/src/main/resources/change-header/drawable-xxxhdpi/revanced_header_logo_dark.png b/patches/src/main/resources/change-header/drawable-xxxhdpi/revanced_header_logo_dark.png new file mode 100644 index 000000000..af8e0244b Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-xxxhdpi/revanced_header_logo_dark.png differ diff --git a/patches/src/main/resources/change-header/drawable-xxxhdpi/revanced_header_logo_light.png b/patches/src/main/resources/change-header/drawable-xxxhdpi/revanced_header_logo_light.png new file mode 100644 index 000000000..1d141f03e Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-xxxhdpi/revanced_header_logo_light.png differ diff --git a/patches/src/main/resources/change-header/drawable-xxxhdpi/revanced_header_logo_minimal_dark.png b/patches/src/main/resources/change-header/drawable-xxxhdpi/revanced_header_logo_minimal_dark.png new file mode 100644 index 000000000..b98c523db Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-xxxhdpi/revanced_header_logo_minimal_dark.png differ diff --git a/patches/src/main/resources/change-header/drawable-xxxhdpi/revanced_header_logo_minimal_light.png b/patches/src/main/resources/change-header/drawable-xxxhdpi/revanced_header_logo_minimal_light.png new file mode 100644 index 000000000..db2b2aaf6 Binary files /dev/null and b/patches/src/main/resources/change-header/drawable-xxxhdpi/revanced_header_logo_minimal_light.png differ diff --git a/patches/src/main/resources/change-header/revanced-borderless/drawable-hdpi/yt_wordmark_header_dark.png b/patches/src/main/resources/change-header/revanced-borderless/drawable-hdpi/yt_wordmark_header_dark.png deleted file mode 100644 index 17e353903..000000000 Binary files a/patches/src/main/resources/change-header/revanced-borderless/drawable-hdpi/yt_wordmark_header_dark.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced-borderless/drawable-hdpi/yt_wordmark_header_light.png b/patches/src/main/resources/change-header/revanced-borderless/drawable-hdpi/yt_wordmark_header_light.png deleted file mode 100644 index d4998c531..000000000 Binary files a/patches/src/main/resources/change-header/revanced-borderless/drawable-hdpi/yt_wordmark_header_light.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced-borderless/drawable-mdpi/yt_wordmark_header_dark.png b/patches/src/main/resources/change-header/revanced-borderless/drawable-mdpi/yt_wordmark_header_dark.png deleted file mode 100644 index 167d4c9de..000000000 Binary files a/patches/src/main/resources/change-header/revanced-borderless/drawable-mdpi/yt_wordmark_header_dark.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced-borderless/drawable-mdpi/yt_wordmark_header_light.png b/patches/src/main/resources/change-header/revanced-borderless/drawable-mdpi/yt_wordmark_header_light.png deleted file mode 100644 index 471e0079c..000000000 Binary files a/patches/src/main/resources/change-header/revanced-borderless/drawable-mdpi/yt_wordmark_header_light.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced-borderless/drawable-xhdpi/yt_wordmark_header_light.png b/patches/src/main/resources/change-header/revanced-borderless/drawable-xhdpi/yt_wordmark_header_light.png deleted file mode 100644 index 7f9f53fb0..000000000 Binary files a/patches/src/main/resources/change-header/revanced-borderless/drawable-xhdpi/yt_wordmark_header_light.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced-borderless/drawable-xxhdpi/yt_wordmark_header_dark.png b/patches/src/main/resources/change-header/revanced-borderless/drawable-xxhdpi/yt_wordmark_header_dark.png deleted file mode 100644 index 76626d93c..000000000 Binary files a/patches/src/main/resources/change-header/revanced-borderless/drawable-xxhdpi/yt_wordmark_header_dark.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced-borderless/drawable-xxhdpi/yt_wordmark_header_light.png b/patches/src/main/resources/change-header/revanced-borderless/drawable-xxhdpi/yt_wordmark_header_light.png deleted file mode 100644 index 701c08afa..000000000 Binary files a/patches/src/main/resources/change-header/revanced-borderless/drawable-xxhdpi/yt_wordmark_header_light.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced-borderless/drawable-xxxhdpi/yt_wordmark_header_dark.png b/patches/src/main/resources/change-header/revanced-borderless/drawable-xxxhdpi/yt_wordmark_header_dark.png deleted file mode 100644 index cba9eef9d..000000000 Binary files a/patches/src/main/resources/change-header/revanced-borderless/drawable-xxxhdpi/yt_wordmark_header_dark.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced-borderless/drawable-xxxhdpi/yt_wordmark_header_light.png b/patches/src/main/resources/change-header/revanced-borderless/drawable-xxxhdpi/yt_wordmark_header_light.png deleted file mode 100644 index 6c21e375a..000000000 Binary files a/patches/src/main/resources/change-header/revanced-borderless/drawable-xxxhdpi/yt_wordmark_header_light.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced/drawable-hdpi/yt_wordmark_header_dark.png b/patches/src/main/resources/change-header/revanced/drawable-hdpi/yt_wordmark_header_dark.png deleted file mode 100644 index 8e95d04f2..000000000 Binary files a/patches/src/main/resources/change-header/revanced/drawable-hdpi/yt_wordmark_header_dark.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced/drawable-hdpi/yt_wordmark_header_light.png b/patches/src/main/resources/change-header/revanced/drawable-hdpi/yt_wordmark_header_light.png deleted file mode 100644 index 3a71e6bb0..000000000 Binary files a/patches/src/main/resources/change-header/revanced/drawable-hdpi/yt_wordmark_header_light.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced/drawable-mdpi/yt_wordmark_header_dark.png b/patches/src/main/resources/change-header/revanced/drawable-mdpi/yt_wordmark_header_dark.png deleted file mode 100644 index 4aff279ef..000000000 Binary files a/patches/src/main/resources/change-header/revanced/drawable-mdpi/yt_wordmark_header_dark.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced/drawable-mdpi/yt_wordmark_header_light.png b/patches/src/main/resources/change-header/revanced/drawable-mdpi/yt_wordmark_header_light.png deleted file mode 100644 index 48855aa3b..000000000 Binary files a/patches/src/main/resources/change-header/revanced/drawable-mdpi/yt_wordmark_header_light.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced/drawable-xhdpi/yt_wordmark_header_dark.png b/patches/src/main/resources/change-header/revanced/drawable-xhdpi/yt_wordmark_header_dark.png deleted file mode 100644 index ca652bf79..000000000 Binary files a/patches/src/main/resources/change-header/revanced/drawable-xhdpi/yt_wordmark_header_dark.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced/drawable-xhdpi/yt_wordmark_header_light.png b/patches/src/main/resources/change-header/revanced/drawable-xhdpi/yt_wordmark_header_light.png deleted file mode 100644 index 6933bcca7..000000000 Binary files a/patches/src/main/resources/change-header/revanced/drawable-xhdpi/yt_wordmark_header_light.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced/drawable-xxhdpi/yt_wordmark_header_dark.png b/patches/src/main/resources/change-header/revanced/drawable-xxhdpi/yt_wordmark_header_dark.png deleted file mode 100644 index 0e79b3899..000000000 Binary files a/patches/src/main/resources/change-header/revanced/drawable-xxhdpi/yt_wordmark_header_dark.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced/drawable-xxhdpi/yt_wordmark_header_light.png b/patches/src/main/resources/change-header/revanced/drawable-xxhdpi/yt_wordmark_header_light.png deleted file mode 100644 index 43c273f48..000000000 Binary files a/patches/src/main/resources/change-header/revanced/drawable-xxhdpi/yt_wordmark_header_light.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced/drawable-xxxhdpi/yt_wordmark_header_dark.png b/patches/src/main/resources/change-header/revanced/drawable-xxxhdpi/yt_wordmark_header_dark.png deleted file mode 100644 index 59a8783e6..000000000 Binary files a/patches/src/main/resources/change-header/revanced/drawable-xxxhdpi/yt_wordmark_header_dark.png and /dev/null differ diff --git a/patches/src/main/resources/change-header/revanced/drawable-xxxhdpi/yt_wordmark_header_light.png b/patches/src/main/resources/change-header/revanced/drawable-xxxhdpi/yt_wordmark_header_light.png deleted file mode 100644 index 263f3d971..000000000 Binary files a/patches/src/main/resources/change-header/revanced/drawable-xxxhdpi/yt_wordmark_header_light.png and /dev/null differ