fix: Remove version numbers from individual patches (#2709)

This commit is contained in:
LisoUseInAIKyrios
2023-07-28 22:11:23 +04:00
committed by GitHub
parent d1ccf093cc
commit d97f3990c9
177 changed files with 14 additions and 355 deletions
@@ -4,7 +4,6 @@ import app.revanced.extensions.findMutableMethodOf
import app.revanced.extensions.injectHideViewCall
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
@@ -32,7 +31,6 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c
@Name("Hide ads")
@Description("Removes general ads.")
@HideAdsCompatibility
@Version("0.0.1")
class HideAdsPatch : BytecodePatch() {
override fun execute(context: BytecodeContext): PatchResult {
context.classes.forEach { classDef ->
@@ -1,6 +1,5 @@
package app.revanced.patches.youtube.ad.general.resource.patch
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -22,7 +21,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch.P
]
)
@HideAdsCompatibility
@Version("0.0.1")
class HideAdsResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
PreferenceScreen.ADS.addPreferences(
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.ad.getpremium.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -21,8 +20,7 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("Hide get premium")
@HideGetPremiumCompatibility
@Version("0.0.1")
class HideGetPremiumPatch : BytecodePatch(listOf(GetPremiumViewFingerprint,)) {
class HideGetPremiumPatch : BytecodePatch(listOf(GetPremiumViewFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.ADS.addPreferences(
SwitchPreference(
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.ad.video.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -24,7 +23,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Video ads")
@Description("Removes ads in the video player.")
@VideoAdsCompatibility
@Version("0.0.1")
class VideoAdsPatch : BytecodePatch(
listOf(
LoadVideoAdsFingerprint,
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.interaction.copyvideourl.bytecode.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
@@ -23,7 +22,6 @@ import app.revanced.patches.youtube.video.information.patch.VideoInformationPatc
VideoInformationPatch::class
])
@CopyVideoUrlCompatibility
@Version("0.0.1")
class CopyVideoUrlBytecodePatch : BytecodePatch() {
private companion object {
const val INTEGRATIONS_PLAYER_PACKAGE = "Lapp/revanced/integrations/videoplayer"
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.interaction.downloads.bytecode.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
@@ -19,7 +18,6 @@ import app.revanced.patches.youtube.video.information.patch.VideoInformationPatc
@DependsOn([ExternalDownloadsResourcePatch::class, PlayerControlsBytecodePatch::class, VideoInformationPatch::class])
@Description("Adds support to download and save YouTube videos using an external app.")
@ExternalDownloadsCompatibility
@Version("0.0.1")
class ExternalDownloadsBytecodePatch : BytecodePatch() {
private companion object {
const val BUTTON_DESCRIPTOR = "Lapp/revanced/integrations/videoplayer/ExternalDownloadButton;"
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.interaction.seekbar.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -27,7 +26,6 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c
@Name("Seekbar tapping")
@Description("Enables tap-to-seek on the seekbar of the video player.")
@SeekbarTappingCompatibility
@Version("0.0.1")
class EnableSeekbarTappingPatch : BytecodePatch(
listOf(AccessibilityPlayerProgressTimeFingerprint, SeekbarTappingFingerprint)
) {
@@ -1,6 +1,5 @@
package app.revanced.patches.youtube.interaction.seekbar.patch
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
@@ -13,7 +12,6 @@ import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
@Version("0.0.1")
class EnableSeekbarTappingResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.interaction.swipecontrols.patch.bytecode
import app.revanced.extensions.transformMethods
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
@@ -25,7 +24,6 @@ import org.jf.dexlib2.immutable.ImmutableMethod
@Name("Swipe controls")
@Description("Adds volume and brightness swipe controls.")
@SwipeControlsCompatibility
@Version("0.0.3")
@DependsOn(
[
IntegrationsPatch::class,
@@ -1,7 +1,5 @@
package app.revanced.patches.youtube.interaction.swipecontrols.patch.resource
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -13,7 +11,6 @@ import app.revanced.util.resources.ResourceUtils
import app.revanced.util.resources.ResourceUtils.copyResources
@DependsOn([SettingsPatch::class])
@Version("0.0.1")
class SwipeControlsResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.autocaptions.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
@@ -25,7 +24,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Disable auto captions")
@Description("Disable forced captions from being automatically enabled.")
@HideCaptionsButtonCompatibility
@Version("0.0.1")
class AutoCaptionsPatch : BytecodePatch(
listOf(
StartVideoInformerFingerprint, SubtitleButtonControllerFingerprint, SubtitleTrackFingerprint
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.branding.header.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
@@ -18,7 +17,6 @@ import kotlin.io.path.exists
@Name("Premium heading")
@Description("Shows premium branding on the home screen.")
@PremiumHeadingCompatibility
@Version("0.0.1")
class PremiumHeadingPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
val resDirectory = context["res"]
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.branding.icon.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.*
import app.revanced.patcher.patch.annotations.Patch
@@ -16,7 +15,6 @@ import java.nio.file.Files
@Name("Custom branding")
@Description("Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).")
@CustomBrandingCompatibility
@Version("0.0.1")
class CustomBrandingPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
fun copyResources(resourceGroups: List<ResourceUtils.ResourceGroup>) {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.buttons.action.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -22,7 +21,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Hide video action buttons")
@Description("Adds the options to hide action buttons under a video.")
@HideButtonsCompatibility
@Version("0.0.1")
class HideButtonsPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
@@ -4,7 +4,6 @@ import app.revanced.extensions.findIndexForIdResource
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -31,7 +30,6 @@ import org.jf.dexlib2.iface.reference.MethodReference
@Name("Hide autoplay button")
@Description("Hides the autoplay button in the video player.")
@AutoplayButtonCompatibility
@Version("0.0.1")
class HideAutoplayButtonPatch : BytecodePatch(
listOf(LayoutConstructorFingerprint)
) {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.buttons.captions.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch
@@ -23,7 +22,6 @@ import org.jf.dexlib2.Opcode
@Name("Hide captions button")
@Description("Hides the captions button on video player.")
@HideCaptionsButtonCompatibility
@Version("0.0.1")
class HideCaptionsButtonPatch : BytecodePatch(listOf(
SubtitleButtonControllerFingerprint,
)) {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.buttons.cast.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
@@ -22,7 +21,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Hide cast button")
@Description("Hides the cast button in the video player.")
@CastButtonCompatibility
@Version("0.0.1")
class HideCastButtonPatch : BytecodePatch() {
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.buttons.navigation.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -36,7 +35,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("Navigation buttons")
@Description("Adds options to hide or change navigation buttons.")
@NavigationButtonsCompatibility
@Version("0.0.1")
class NavigationButtonsPatch : BytecodePatch(listOf(AddCreateButtonViewFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.buttons.navigation.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
import app.revanced.patcher.patch.BytecodePatch
@@ -16,7 +15,6 @@ import app.revanced.patches.youtube.layout.buttons.navigation.fingerprints.Pivot
@DependsOn([ResourceMappingPatch::class])
@Description("Resolves necessary fingerprints.")
@Version("0.0.1")
class ResolvePivotBarFingerprintsPatch : BytecodePatch(
listOf(PivotBarConstructorFingerprint)
) {
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.buttons.player.hide.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -25,7 +24,6 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction3rc
@Name("Hide player buttons")
@Description("Adds the option to hide video player previous and next buttons.")
@HidePlayerButtonsCompatibility
@Version("0.0.1")
class HidePlayerButtonsPatch : BytecodePatch(
listOf(PlayerControlsVisibilityModelFingerprint)
) {
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.albumcards.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -23,7 +22,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("Hide album cards")
@Description("Hides the album cards below the artist description.")
@AlbumCardsCompatibility
@Version("0.0.1")
class AlbumCardsPatch : BytecodePatch(
listOf(
AlbumCardsFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.breakingnews.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -23,7 +22,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("Hide breaking news shelf")
@Description("Hides the breaking news shelf on the homepage tab.")
@BreakingNewsCompatibility
@Version("0.0.1")
class BreakingNewsPatch : BytecodePatch(
listOf(BreakingNewsFingerprint)
) {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.hide.comments.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -21,7 +20,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Description("Hides components related to comments.")
@HideCommentsCompatibility
@DependsOn([SettingsPatch::class, LithoFilterPatch::class])
@Version("0.0.1")
class CommentsPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.crowdfundingbox.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -23,7 +22,6 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Name("Hide crowdfunding box")
@Description("Hides the crowdfunding box between the player and video description.")
@CrowdfundingBoxCompatibility
@Version("0.0.1")
class CrowdfundingBoxPatch : BytecodePatch(
listOf(
CrowdfundingBoxFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.endscreencards.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -26,7 +25,6 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction21c
@Name("Hide endscreen cards")
@Description("Hides the suggested video cards at the end of a video in fullscreen.")
@HideEndscreenCardsCompatibility
@Version("0.0.1")
class HideEndscreenCardsPatch : BytecodePatch(
listOf(
LayoutCircleFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.filterbar.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -25,7 +24,6 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Description("Hides the filter bar in video feeds.")
@DependsOn([HideFilterBarResourcePatch::class])
@HideFilterBar
@Version("0.0.1")
class HideFilterBarPatch : BytecodePatch(
listOf(
RelatedChipCloudFingerprint,
@@ -1,6 +1,5 @@
package app.revanced.patches.youtube.layout.hide.filterbar.patch
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -13,7 +12,6 @@ import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
@Version("0.0.1")
class HideFilterBarResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.floatingmicrophone.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -21,7 +20,6 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Description("Hides the floating microphone button which appears in search.")
@DependsOn([HideFloatingMicrophoneButtonResourcePatch::class])
@HideFloatingMicrophoneButtonCompatibility
@Version("0.0.1")
class HideFloatingMicrophoneButtonPatch : BytecodePatch(
listOf(ShowFloatingMicrophoneButtonFingerprint)
) {
@@ -1,6 +1,5 @@
package app.revanced.patches.youtube.layout.hide.floatingmicrophone.patch
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
@@ -15,7 +14,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
@HideFloatingMicrophoneButtonCompatibility
@Version("0.0.1")
class HideFloatingMicrophoneButtonResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.general.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
@@ -28,7 +27,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch.P
@Description("Hides general layout components.")
@DependsOn([LithoFilterPatch::class, SettingsPatch::class])
@HideLayoutComponentsCompatibility
@Version("0.0.1")
class HideLayoutComponentsPatch : BytecodePatch(
listOf(ConvertElementToFlatBufferFingerprint)
) {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.hide.infocards.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
@@ -29,7 +28,6 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction
@Name("Hide info cards")
@Description("Hides info cards in videos.")
@HideInfocardsCompatibility
@Version("0.0.1")
class HideInfoCardsPatch : BytecodePatch(
listOf(
InfocardsIncognitoParentFingerprint,
@@ -1,6 +1,5 @@
package app.revanced.patches.youtube.layout.hide.infocards.resource.patch
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -14,7 +13,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@HideInfocardsCompatibility
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
@Version("0.0.1")
class HideInfocardsResourcePatch : ResourcePatch {
internal companion object {
var drawerResourceId: Long = -1
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.loadmorebutton.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -22,7 +21,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Description("Hides the button under videos that loads similar videos.")
@DependsOn([HideLoadMoreButtonResourcePatch::class])
@HideLoadMoreButtonCompatibility
@Version("0.0.1")
class HideLoadMoreButtonPatch : BytecodePatch(listOf(HideLoadMoreButtonFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
HideLoadMoreButtonFingerprint.result?.let {
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.personalinformation.bytecode.pa
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -23,7 +22,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("Hide email address")
@Description("Hides the email address in the account switcher.")
@HideEmailAddressCompatibility
@Version("0.0.1")
class HideEmailAddressPatch : BytecodePatch(
listOf(
AccountSwitcherAccessibilityLabelFingerprint
@@ -4,7 +4,6 @@ import app.revanced.extensions.indexOfFirstConstantInstructionValue
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -23,7 +22,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Description("Hides the dark background overlay from the player when player controls are visible.")
@DependsOn([HidePlayerOverlayResourcePatch::class])
@HidePlayerOverlayPatchCompatibility
@Version("0.0.2")
class HidePlayerOverlayPatch : BytecodePatch(listOf(CreatePlayerOverviewFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
CreatePlayerOverviewFingerprint.result?.let { result ->
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.hide.seekbar.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
@@ -33,7 +32,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Hide seekbar")
@Description("Hides the seekbar.")
@HideSeekbarCompatibility
@Version("0.0.1")
class HideSeekbarPatch : BytecodePatch(
listOf(SeekbarFingerprint)
) {
@@ -5,7 +5,6 @@ import app.revanced.extensions.injectHideViewCall
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -38,7 +37,6 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Name("Hide Shorts components")
@Description("Hides components from YouTube Shorts.")
@HideShortsComponentsCompatibility
@Version("0.0.1")
class HideShortsComponentsPatch : BytecodePatch(
listOf(
CreateShortsButtonsFingerprint,
@@ -1,6 +1,5 @@
package app.revanced.patches.youtube.layout.hide.shorts.resource.patch
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -13,7 +12,6 @@ import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@DependsOn([SettingsPatch::class, ResourceMappingPatch::class])
@Version("0.0.1")
class HideShortsComponentsResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.hide.time.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.patch.BytecodePatch
@@ -23,7 +22,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Hide timestamp")
@Description("Hides timestamp in video player.")
@HideTimeCompatibility
@Version("0.0.1")
class HideTimestampPatch : BytecodePatch(
listOf(
TimeCounterFingerprint
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.hide.watchinvr.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.patch.BytecodePatch
@@ -22,7 +21,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Hide watch in VR")
@Description("Hides the option to watch in VR from the player settings flyout panel.")
@WatchInVRCompatibility
@Version("0.0.1")
class WatchInVRPatch : BytecodePatch(
listOf(
WatchInVRFingerprint
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.hide.watermark.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
@@ -26,7 +25,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Hide watermark")
@Description("Hides creator's watermarks on videos.")
@HideWatermarkCompatibility
@Version("0.0.1")
class HideWatermarkPatch : BytecodePatch(
listOf(
HideWatermarkParentFingerprint
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.panels.fullscreen.remove.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
@@ -26,7 +25,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Description("Disables video description and comments panel in fullscreen view.")
@FullscreenPanelsCompatibility
@Version("0.0.1")
class FullscreenPanelsRemoverPatch : BytecodePatch(
listOf(
FullscreenViewAdderParentFingerprint
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.panels.popup.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.patch.BytecodePatch
@@ -23,7 +22,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Disable player popup panels")
@Description("Disables panels from appearing automatically when going into fullscreen (playlist or live chat).")
@PlayerPopupPanelsCompatibility
@Version("0.0.1")
class PlayerPopupPanelsPatch : BytecodePatch(
listOf(
EngagementPanelControllerFingerprint
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.player.background.patch
import app.revanced.extensions.doRecursively
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -16,7 +15,6 @@ import org.w3c.dom.Element
@Name("Remove player controls background")
@Description("Removes the background from the video player controls.")
@PlayerControlsBackgroundCompatibility
@Version("0.0.1")
class PlayerControlsBackgroundPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
context.xmlEditor[RESOURCE_FILE_PATH].use { editor ->
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -42,7 +41,6 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Name("Return YouTube Dislike")
@Description("Shows the dislike count of videos using the Return YouTube Dislike API.")
@ReturnYouTubeDislikeCompatibility
@Version("0.0.1")
class ReturnYouTubeDislikePatch : BytecodePatch(
listOf(
TextComponentConstructorFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.searchbar.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -27,7 +26,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Wide searchbar")
@Description("Replaces the search icon with a wide search bar. This will hide the YouTube logo when active.")
@WideSearchbarCompatibility
@Version("0.0.1")
class WideSearchbarPatch : BytecodePatch(
listOf(
SetWordmarkHeaderFingerprint, CreateSearchSuggestionsFingerprint
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.seekbar.bytecode.patch
import app.revanced.extensions.indexOfFirstConstantInstructionValue
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -27,7 +26,6 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
@Description("Hide or set a custom seekbar color")
@DependsOn([IntegrationsPatch::class, LithoColorHookPatch::class, SeekbarColorResourcePatch::class])
@SeekbarColorCompatibility
@Version("0.0.1")
class SeekbarColorBytecodePatch : BytecodePatch(
listOf(PlayerSeekbarColorFingerprint, ShortsSeekbarColorFingerprint, SetSeekbarClickedColorFingerprint)
) {
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.sponsorblock.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
@@ -56,7 +55,6 @@ import org.jf.dexlib2.iface.reference.StringReference
@Name("SponsorBlock")
@Description("Integrates SponsorBlock which allows skipping video segments such as sponsored content.")
@SponsorBlockCompatibility
@Version("0.0.1")
class SponsorBlockBytecodePatch : BytecodePatch(
listOf(
SeekbarFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.spoofappversion.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
@@ -26,7 +25,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("Spoof app version")
@Description("Tricks YouTube into thinking, you are running an older version of the app. One of the side effects also includes restoring the old UI.")
@SpoofAppVersionCompatibility
@Version("0.0.1")
class SpoofAppVersionPatch : BytecodePatch(
listOf(
SpoofAppVersionFingerprint
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.startupshortsreset.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.patch.BytecodePatch
@@ -22,7 +21,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Disable Shorts on startup")
@Description("Disables playing YouTube Shorts when launching YouTube.")
@StartupShortsResetCompatibility
@Version("0.0.1")
class DisableShortsOnStartupPatch : BytecodePatch(
listOf(
UserWasInShortsFingerprint
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.tabletminiplayer.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
@@ -29,7 +28,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("Tablet mini player")
@Description("Enables the tablet mini player layout.")
@TabletMiniPlayerCompatibility
@Version("0.0.1")
class TabletMiniPlayerPatch : BytecodePatch(
listOf(
MiniPlayerDimensionsCalculatorParentFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.layout.theme.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
@@ -16,7 +15,6 @@ import app.revanced.patches.youtube.layout.theme.bytecode.fingerprints.LithoThem
@Name("Litho color hook")
@Description("Adds a hook to set color of Litho components.")
@ThemeCompatibility
@Version("0.0.1")
class LithoColorHookPatch : BytecodePatch(listOf(LithoThemeFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
LithoThemeFingerprint.result?.let {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.layout.theme.bytecode.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.*
import app.revanced.patcher.patch.annotations.DependsOn
@@ -16,7 +15,6 @@ import app.revanced.patches.youtube.layout.theme.resource.ThemeResourcePatch
@Description("Applies a custom theme.")
@DependsOn([LithoColorHookPatch::class, SeekbarColorBytecodePatch::class, ThemeResourcePatch::class])
@ThemeCompatibility
@Version("0.0.1")
class ThemeBytecodePatch : BytecodePatch() {
override fun execute(context: BytecodeContext): PatchResult {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.autorepeat.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
@@ -26,7 +25,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@Name("Always autorepeat")
@Description("Always repeats the playing video again.")
@AutoRepeatCompatibility
@Version("0.0.1")
class AutoRepeatPatch : BytecodePatch(
listOf(
AutoRepeatParentFingerprint
@@ -50,7 +48,7 @@ class AutoRepeatPatch : BytecodePatch(
val playMethod = parentResult.mutableMethod
AutoRepeatFingerprint.resolve(context, parentResult.classDef)
//String is: Laamp;->E()V
val methodToCall = playMethod.definingClass + "->" + playMethod.name + "()V";
val methodToCall = playMethod.definingClass + "->" + playMethod.name + "()V"
//This is the method we search for
val result = AutoRepeatFingerprint.result
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.debugging.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
@@ -20,7 +19,6 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Description("Adds debugging options.")
@DebuggingCompatibility
@Version("0.0.2")
class DebuggingPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
SettingsPatch.PreferenceScreen.MISC.addPreferences(
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.fix.backtoexitgesture.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
@@ -19,7 +18,6 @@ import app.revanced.patches.youtube.misc.fix.backtoexitgesture.fingerprints.Recy
@Description("Fixes the swipe back to exit gesture.")
@FixBackToExitGestureCompatibility
@Version("0.0.1")
class FixBackToExitGesturePatch : BytecodePatch(
listOf(
RecyclerViewTopScrollingParentFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.misc.fix.playback.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -21,7 +20,6 @@ import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
@Description("Spoofs a patched client to allow playback.")
@ClientSpoofCompatibility
@DependsOn([SpoofSignatureVerificationPatch::class])
@Version("0.0.1")
class ClientSpoofPatch : BytecodePatch(
listOf(UserAgentHeaderBuilderFingerprint)
) {
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.misc.fix.playback.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -27,7 +26,6 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction
IntegrationsPatch::class,
PlayerTypeHookPatch::class
])
@Version("0.0.1")
class SpoofSignatureVerificationPatch : BytecodePatch(
listOf(
ProtobufParameterBuilderFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.misc.links.open.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
@@ -23,7 +22,6 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction21c
@Name("Open links externally")
@Description("Open links outside of the app directly in your browser.")
@OpenLinksExternallyCompatibility
@Version("0.0.1")
class OpenLinksExternallyPatch : BytecodePatch(
listOf(
GetCustomTabPackageNameFingerprint,
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.litho.filter.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -31,7 +30,6 @@ import java.io.Closeable
@DependsOn([IntegrationsPatch::class])
@Description("Hooks the method which parses the bytes into a ComponentContext to filter components.")
@Version("0.0.1")
class LithoFilterPatch : BytecodePatch(
listOf(ComponentContextParserFingerprint, LithoFilterFingerprint, ProtobufBufferReferenceFingerprint)
), Closeable {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.microg.patch.bytecode
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
@@ -30,7 +29,6 @@ import app.revanced.util.microg.MicroGBytecodeHelper
@Name("Vanced MicroG support")
@Description("Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG.")
@MicroGPatchCompatibility
@Version("0.0.1")
class MicroGBytecodePatch : BytecodePatch(
listOf(
ServiceCheckFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.misc.minimizedplayback.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
@@ -33,7 +32,6 @@ import org.jf.dexlib2.iface.reference.MethodReference
@Description("Enables minimized and background playback.")
@DependsOn([IntegrationsPatch::class, PlayerTypeHookPatch::class, SettingsPatch::class])
@MinimizedPlaybackCompatibility
@Version("0.0.1")
class MinimizedPlaybackPatch : BytecodePatch(
listOf(
MinimizedPlaybackManagerFingerprint,
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.playercontrols.bytecode.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
@@ -20,7 +19,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@DependsOn([BottomControlsResourcePatch::class])
@Description("Manages the code for the player controls of the YouTube player.")
@PlayerControlsCompatibility
@Version("0.0.1")
class PlayerControlsBytecodePatch : BytecodePatch(
listOf(PlayerControlsVisibilityFingerprint, BottomControlsInflateFingerprint)
) {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.playeroverlay.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch
@@ -16,7 +15,6 @@ import app.revanced.patches.youtube.misc.playeroverlay.fingerprint.PlayerOverlay
@Name("Player overlays hook")
@Description("Hook for adding custom overlays to the video player.")
@PlayerOverlaysHookCompatibility
@Version("0.0.1")
@DependsOn([IntegrationsPatch::class])
class PlayerOverlaysHookPatch : BytecodePatch(
listOf(
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.misc.playertype.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -21,7 +20,6 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction
@Name("Player type hook")
@Description("Hook to get the current player type and video playback state.")
@PlayerTypeHookCompatibility
@Version("0.0.1")
@DependsOn([IntegrationsPatch::class])
class PlayerTypeHookPatch : BytecodePatch(
listOf(PlayerTypeFingerprint, VideoStateFingerprint)
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.misc.settings.bytecode.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -24,10 +23,9 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.util.MethodUtil
import java.io.Closeable
@DependsOn([IntegrationsPatch::class, SettingsResourcePatch::class, ])
@DependsOn([IntegrationsPatch::class, SettingsResourcePatch::class])
@Name("Settings")
@Description("Adds settings for ReVanced to YouTube.")
@Version("0.0.1")
class SettingsPatch : BytecodePatch(
listOf(LicenseActivityFingerprint, SetThemeFingerprint)
), Closeable {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.misc.zoomhaptics.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -23,7 +22,6 @@ import app.revanced.patches.youtube.misc.zoomhaptics.fingerprints.ZoomHapticsFin
@Description("Disables haptics when zooming.")
@DependsOn([SettingsPatch::class])
@ZoomHapticsCompatibility
@Version("0.0.1")
class ZoomHapticsPatch : BytecodePatch(
listOf(ZoomHapticsFingerprint)
) {
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.video.hdrbrightness.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
@@ -24,7 +23,6 @@ import org.jf.dexlib2.iface.reference.FieldReference
@Name("HDR auto brightness")
@Description("Makes the brightness of HDR videos follow the system default.")
@HDRBrightnessCompatibility
@Version("0.0.2")
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
class HDRBrightnessPatch : BytecodePatch(
listOf(HDRBrightnessFingerprint)
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.video.information.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.data.toMethodWalker
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
@@ -36,7 +35,6 @@ import org.jf.dexlib2.util.MethodUtil
@Name("Video information")
@Description("Hooks YouTube to get information about the current playing video.")
@VideoInformationCompatibility
@Version("0.0.1")
@DependsOn([IntegrationsPatch::class, VideoIdPatch::class])
class VideoInformationPatch : BytecodePatch(
listOf(
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.video.quality.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -36,7 +35,6 @@ import org.jf.dexlib2.iface.reference.FieldReference
@Name("Remember video quality")
@Description("Adds the ability to remember the video quality you chose in the video quality flyout.")
@RememberVideoQualityCompatibility
@Version("0.0.1")
class RememberVideoQualityPatch : BytecodePatch(
listOf(
VideoQualitySetterFingerprint,
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.video.speed
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
@@ -17,7 +16,6 @@ import app.revanced.patches.youtube.video.speed.remember.patch.RememberPlaybackS
@Description("Adds custom playback speeds and ability to remember the playback speed you chose in the video playback speed flyout.")
@DependsOn([CustomPlaybackSpeedPatch::class, RememberPlaybackSpeedPatch::class])
@PlaybackSpeedCompatibility
@Version("0.0.1")
class PlaybackSpeed : BytecodePatch() {
override fun execute(context: BytecodeContext): PatchResult {
return PatchResultSuccess() // All patches this patch depends on succeed.
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.video.speed.custom.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
@@ -34,7 +33,6 @@ import org.jf.dexlib2.immutable.ImmutableField
@Name("Custom playback speed")
@Description("Adds custom playback speed options.")
@DependsOn([IntegrationsPatch::class, LithoFilterPatch::class, SettingsPatch::class, BottomSheetHookPatch::class])
@Version("0.0.1")
class CustomPlaybackSpeedPatch : BytecodePatch(
listOf(
SpeedArrayGeneratorFingerprint,
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.video.speed.remember.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -26,7 +25,6 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction
@Name("Remember playback speed")
@Description("Adds the ability to remember the playback speed you chose in the playback speed flyout.")
@DependsOn([IntegrationsPatch::class, SettingsPatch::class, VideoInformationPatch::class, CustomPlaybackSpeedPatch::class])
@Version("0.0.1")
class RememberPlaybackSpeedPatch : BytecodePatch(
listOf(
InitializePlaybackSpeedValuesFingerprint
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.video.videoid.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -21,7 +20,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("Video id hook")
@Description("Hooks to detect when the video id changes")
@VideoIdCompatibility
@Version("0.0.1")
@DependsOn([IntegrationsPatch::class])
class VideoIdPatch : BytecodePatch(
listOf(VideoIdFingerprint, VideoIdFingerprintBackgroundPlay)
@@ -2,7 +2,6 @@ package app.revanced.patches.youtube.video.videoqualitymenu.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
@@ -28,7 +27,6 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Name("Old video quality menu")
@Description("Shows the old video quality with the advanced video quality options instead of the new one.")
@OldVideoQualityMenuCompatibility
@Version("0.0.1")
class OldVideoQualityMenuPatch : BytecodePatch(
listOf(VideoQualityMenuViewInflateFingerprint)
) {