Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import org.w3c.dom.Element

@Suppress("unused")
internal val enableAndroidDebuggingPatch = resourcePatch(
// name = "Enable Android debugging",
description = "Enables Android developer debugging capabilities. Including this patch can slow down the app."
// name = "Enable Android debugging"
) {
execute {
document("AndroidManifest.xml").use { document ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ fun setOrGetFallbackPackageName(fallbackPackageName: String): String {

val changePackageNamePatch = resourcePatch(
name = "Change package name",
description = "Appends \".morphe\" to the package name by default. " +
"Changing the package name of the app can lead to unexpected issues.",
use = false,
) {
packageNameOption = stringOption(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/morphe/extension/music/patc

@Suppress("unused")
val hideVideoAdsPatch = bytecodePatch(
name = "Hide music video ads",
description = "Adds an option to hide ads that appear while listening to or streaming music videos, podcasts, or songs.",
name = "Hide music video ads"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import app.morphe.util.returnEarly

@Suppress("unused")
val enableExclusiveAudioPlaybackPatch = bytecodePatch(
name = "Enable exclusive audio playback",
description = "Enables the option to play audio without video.",
name = "Enable exclusive audio playback"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/morphe/extension/music/patc

@Suppress("unused")
val permanentRepeatPatch = bytecodePatch(
name = "Permanent repeat",
description = "Adds an option to always repeat even if the playlist ends or another track is played."
name = "Permanent repeat"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/morphe/extension/music/patc

@Suppress("unused")
val hideButtons = bytecodePatch(
name = "Hide buttons",
description = "Adds options to hide the cast, history, notification, and search buttons."
name = "Hide buttons"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/morphe/extension/music/patc

@Suppress("unused")
val hideCategoryBar = bytecodePatch(
name = "Hide category bar",
description = "Adds an option to hide the category bar at the top of the homepage."
name = "Hide category bar"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/morphe/extension/music/patc

@Suppress("unused")
val changeMiniplayerColor = bytecodePatch(
name = "Change miniplayer color",
description = "Adds an option to change the miniplayer background color to match the fullscreen player."
name = "Change miniplayer color"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/morphe/extension/music/patc

@Suppress("unused")
val navigationBarPatch = bytecodePatch(
name = "Navigation bar",
description = "Adds options to hide navigation bar, labels and buttons."
name = "Navigation bar"
) {
dependsOn(
resourceMappingPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/morphe/extension/music/patc

@Suppress("unused")
val hideGetPremiumPatch = bytecodePatch(
name = "Hide 'Get Music Premium'",
description = "Adds an option to hide the \"Get Music Premium\" label in the settings and account menu.",
name = "Hide 'Get Music Premium'"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import app.morphe.util.returnEarly

@Suppress("unused")
val bypassCertificateChecksPatch = bytecodePatch(
name = "Bypass certificate checks",
description = "Bypasses certificate checks which prevent YouTube Music from working on Android Auto.",
name = "Bypass certificate checks"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import app.morphe.patches.music.misc.settings.settingsPatch
import app.morphe.util.returnEarly

val backgroundPlaybackPatch = bytecodePatch(
name = "Remove background playback restrictions",
description = "Removes restrictions on background playback, including playing kids videos in the background.",
name = "Remove background playback restrictions"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ internal fun baseCustomBrandingPatch(
block: ResourcePatchBuilder.() -> Unit,
executeBlock: ResourcePatchContext.() -> Unit = {}
): ResourcePatch = resourcePatch(
name = "Custom branding",
description = "Adds options to change the app icon and app name. " +
"Branding cannot be changed for mounted (root) installations."
name = "Custom branding"
) {
val customName by stringOption(
key = "customName",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ internal val darkThemeBackgroundColorOption = stringOption(
"Dark orange" to "#291800",
"Dark red" to "#290000",
),
title = "Dark theme background color",
description = THEME_COLOR_OPTION_DESCRIPTION
title = "Dark theme background color"
)

/**
Expand All @@ -82,9 +81,7 @@ internal fun baseThemePatch(
block: BytecodePatchBuilder.() -> Unit,
executeBlock: BytecodePatchContext.() -> Unit = {}
) = bytecodePatch(
name = "Theme",
description = "Adds options for theming and applies a custom background theme " +
"(dark background theme defaults to pure black).",
name = "Theme"
) {
darkThemeBackgroundColorOption()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ internal fun forceOriginalAudioPatch(
subclassExtensionClassDescriptor: String,
preferenceScreen: BasePreferenceScreen.Screen
) = bytecodePatch(
name = "Force original audio",
description = "Adds an option to always use the original audio track.",
name = "Force original audio"
) {

block()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ internal fun enableDebuggingPatch(
preferenceScreen: BasePreferenceScreen.Screen,
additionalDebugPreferences: List<BasePreference> = emptyList()
) = bytecodePatch(
name = "Enable debugging",
description = "Adds options for debugging and exporting Morphe logs to the clipboard.",
name = "Enable debugging"
) {

dependsOn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ internal fun checkWatchHistoryDomainNameResolutionPatch(
executeBlock: BytecodePatchContext.() -> Unit = {},
mainActivityFingerprint: Fingerprint
) = bytecodePatch(
name = "Check watch history domain name resolution",
description = "Checks if the device DNS server is preventing user watch history from being saved.",
name = "Check watch history domain name resolution"
) {
block()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ fun gmsCoreSupportPatch(
executeBlock: BytecodePatchContext.() -> Unit = {},
block: BytecodePatchBuilder.() -> Unit = {},
) = bytecodePatch(
name = "GmsCore support",
description = "Allows the app to work without root by using a different package name when patched " +
"using a GmsCore instead of Google Play Services.",
name = "GmsCore support"
) {

dependsOn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ internal fun sanitizeSharingLinksPatch(
preferenceScreen: BasePreferenceScreen.Screen,
replaceMusicLinksWithYouTube: Boolean = false
) = bytecodePatch(
name = PATCH_NAME_SANITIZE_SHARING_LINKS,
description = PATCH_DESCRIPTION_SANITIZE_SHARING_LINKS,
name = PATCH_NAME_SANITIZE_SHARING_LINKS
) {
block()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ internal fun spoofVideoStreamsPatch(
block: BytecodePatchBuilder.() -> Unit,
executeBlock: BytecodePatchContext.() -> Unit = {},
) = bytecodePatch(
name = "Spoof video streams",
description = "Adds options to spoof the client video streams to fix playback.",
name = "Spoof video streams"
) {
block()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ private val hideAdsResourcePatch = resourcePatch {

@Suppress("unused")
val hideAdsPatch = bytecodePatch(
name = "Hide ads",
description = "Adds options to remove general ads.",
name = "Hide ads"
) {
dependsOn(
hideAdsResourcePatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import app.morphe.patches.youtube.misc.settings.PreferenceScreen
import app.morphe.patches.youtube.misc.settings.settingsPatch

val videoAdsPatch = bytecodePatch(
name = "Video ads",
description = "Adds an option to remove ads in the video player.",
name = "Video ads"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ private val copyVideoUrlResourcePatch = resourcePatch {

@Suppress("unused")
val copyVideoUrlPatch = bytecodePatch(
name = "Copy video URL",
description = "Adds options to display buttons in the video player to copy video URLs.",
name = "Copy video URL"
) {
dependsOn(
copyVideoUrlResourcePatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/morphe/extension/youtube/patches/RemoveViewerDiscretionDialogPatch;"

val removeViewerDiscretionDialogPatch = bytecodePatch(
name = "Remove viewer discretion dialog",
description = "Adds an option to remove the dialog that appears when opening a video that has been age-restricted " +
"by accepting it automatically. This does not bypass the age restriction.",
name = "Remove viewer discretion dialog"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =

@Suppress("unused")
val disableDoubleTapActionsPatch = bytecodePatch(
name = "Disable double tap actions",
description = "Adds an option to disable player double tap gestures.",
name = "Disable double tap actions"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import org.w3c.dom.Element

@Suppress("unused")
val doubleTapLengthPatch = resourcePatch(
name = "Double tap to seek",
description = "Adds additional double-tap to seek values to the YouTube settings menu."
name = "Double tap to seek"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ internal const val BUTTON_DESCRIPTOR = "Lapp/morphe/extension/youtube/videoplaye

@Suppress("unused")
val downloadsPatch = bytecodePatch(
name = "Downloads",
description = "Adds support to download videos with an external downloader app " +
"using the in-app download button or a video player action button.",
name = "Downloads"
) {
dependsOn(
downloadsResourcePatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import app.morphe.patcher.patch.bytecodePatch

@Suppress("unused")
val seekbarPatch = bytecodePatch(
name = "Seekbar",
description = "Adds options to disable precise seeking when swiping up on the seekbar, " +
"slide to seek instead of playing at 2x speed when pressing and holding, " +
"tapping the player seekbar to seek, and hiding the video player seekbar."
name = "Seekbar"
) {
dependsOn(
disablePreciseSeekingGesturePatch,
Expand All @@ -25,4 +22,9 @@ val seekbarPatch = bytecodePatch(
"20.37.48",
)
)

execute {
// Empty execute, required for patcher to easily
// figure out what jar file to look in to load the localied strings.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ private val swipeControlsResourcePatch = resourcePatch {

@Suppress("unused")
val swipeControlsPatch = bytecodePatch(
name = "Swipe controls",
description = "Adds options to enable and configure volume and brightness swipe controls.",
name = "Swipe controls"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =

@Suppress("unused")
val autoCaptionsPatch = bytecodePatch(
name = "Auto captions",
description = "Adds an option to disable captions from being automatically enabled.",
name = "Auto captions"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ private val changeHeaderBytecodePatch = bytecodePatch {

@Suppress("unused")
val changeHeaderPatch = resourcePatch(
name = "Change header",
description = "Adds an option to change the header logo in the top left corner of the app.",
name = "Change header"
) {
dependsOn(
changeHeaderBytecodePatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import java.util.logging.Logger

@Suppress("unused")
val hideVideoActionButtonsPatch = resourcePatch(
name = "Hide video action buttons",
description = "Adds options to hide action buttons (such as the Download button) under videos. " +
"Patching version 20.21.37 or lower can hide more player button types."
name = "Hide video action buttons"
) {
dependsOn(
resourceMappingPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
"Lapp/morphe/extension/youtube/patches/NavigationButtonsPatch;"

val navigationButtonsPatch = bytecodePatch(
name = "Navigation buttons",
description = "Adds options to hide and change navigation buttons (such as the Shorts button).",
name = "Navigation buttons"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =
"Lapp/morphe/extension/youtube/patches/HidePlayerOverlayButtonsPatch;"

val hidePlayerOverlayButtonsPatch = bytecodePatch(
name = "Hide player overlay buttons",
description = "Adds options to hide the player Cast, Autoplay, Captions, Previous & Next buttons, and the player " +
"control buttons background.",
name = "Hide player overlay buttons"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/morphe/extension/youtube/pa

@Suppress("unused")
val changeFormFactorPatch = bytecodePatch(
name = "Change form factor",
description = "Adds an option to change the UI appearance to a phone, tablet, or automotive device.",
name = "Change form factor"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =

@Suppress("unused")
val hideEndScreenCardsPatch = bytecodePatch(
name = "Hide end screen cards",
description = "Adds an option to hide suggested video cards at the end of videos.",
name = "Hide end screen cards"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ private const val EXTENSION_CLASS_DESCRIPTOR =

@Suppress("unused")
val hideEndScreenSuggestedVideoPatch = bytecodePatch(
name = "Hide end screen suggested video",
description = "Adds an option to hide the suggested video at the end of videos.",
name = "Hide end screen suggested video"
) {
dependsOn(
sharedExtensionPatch,
Expand Down
Loading
Loading