diff --git a/src/main/kotlin/app/revanced/patches/music/misc/microg/MicroGBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/music/misc/microg/MicroGBytecodePatch.kt index 70bba94f5..c1adb1e15 100644 --- a/src/main/kotlin/app/revanced/patches/music/misc/microg/MicroGBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/music/misc/microg/MicroGBytecodePatch.kt @@ -12,8 +12,8 @@ import app.revanced.util.microg.MicroGBytecodeHelper @Patch( - name = "MicroG support", - description = "Allows YouTube Music ReVanced to run without root and under a different package name.", + name = "Vanced MicroG support", + description = "Allows YouTube Music to run without root and under a different package name.", dependencies = [MicroGResourcePatch::class], compatiblePackages = [CompatiblePackage("com.google.android.apps.youtube.music")] ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt index 8aeb85d24..e19765ba8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt @@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumVideoAdvertisementPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt similarity index 92% rename from src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumVideoAdvertisementPatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt index 99313ff34..139bec006 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumVideoAdvertisementPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt @@ -18,7 +18,17 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction name = "Hide get premium", dependencies = [IntegrationsPatch::class, SettingsPatch::class], compatiblePackages = [ - CompatiblePackage("com.google.android.youtube", ["18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"]) + CompatiblePackage( + "com.google.android.youtube", [ + "18.16.37", + "18.19.35", + "18.20.39", + "18.23.35", + "18.29.38", + "18.32.39", + "18.37.36" + ] + ) ] ) object HideGetPremiumPatch : BytecodePatch(setOf(GetPremiumViewFingerprint)) { diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt index 4489ba882..31e442ee3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt @@ -29,7 +29,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt index 118bc6e72..e9638043f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt @@ -24,7 +24,8 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/ExternalDownloadsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/ExternalDownloadsBytecodePatch.kt index 05940a035..f02aae13f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/ExternalDownloadsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/ExternalDownloadsBytecodePatch.kt @@ -24,7 +24,8 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ), ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt index 00fd6cf4e..185292232 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt @@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt index 323c1c144..04a6196ae 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/SwipeControlsBytecodePatch.kt @@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt index d4572128b..6421de5c0 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/AutoCaptionsPatch.kt @@ -1,5 +1,6 @@ package app.revanced.patches.youtube.layout.autocaptions +import app.revanced.extensions.exception import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels @@ -28,7 +29,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ], @@ -47,38 +49,32 @@ object AutoCaptionsPatch : BytecodePatch( ) ) - val startVideoInformerMethod = StartVideoInformerFingerprint.result!!.mutableMethod + mapOf( + StartVideoInformerFingerprint to 0, + SubtitleButtonControllerFingerprint to 1 + ).forEach { (fingerprint, enabled) -> + fingerprint.result?.mutableMethod?.addInstructions( + 0, + """ + const/4 v0, 0x$enabled + sput-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z + """ + ) ?: throw fingerprint.exception + } - startVideoInformerMethod.addInstructions( - 0, """ - const/4 v0, 0x0 - sput-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z - """ - ) - - val subtitleButtonControllerMethod = SubtitleButtonControllerFingerprint.result!!.mutableMethod - - subtitleButtonControllerMethod.addInstructions( - 0, """ - const/4 v0, 0x1 - sput-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z - """ - ) - - val subtitleTrackMethod = SubtitleTrackFingerprint.result!!.mutableMethod - - subtitleTrackMethod.addInstructionsWithLabels( - 0, """ - invoke-static {}, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->autoCaptionsEnabled()Z - move-result v0 - if-eqz v0, :auto_captions_enabled - sget-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z - if-nez v0, :auto_captions_enabled - const/4 v0, 0x1 - return v0 - :auto_captions_enabled - nop - """ + SubtitleTrackFingerprint.result?.mutableMethod?.addInstructionsWithLabels( + 0, + """ + invoke-static {}, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->autoCaptionsEnabled()Z + move-result v0 + if-eqz v0, :auto_captions_enabled + sget-boolean v0, Lapp/revanced/integrations/patches/DisableAutoCaptionsPatch;->captionsButtonDisabled:Z + if-nez v0, :auto_captions_enabled + const/4 v0, 0x1 + return v0 + :auto_captions_enabled + nop + """ ) } } diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/StartVideoInformerFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/StartVideoInformerFingerprint.kt index 31fab1f21..a1969ed09 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/StartVideoInformerFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/autocaptions/fingerprints/StartVideoInformerFingerprint.kt @@ -6,25 +6,11 @@ import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.Opcode object StartVideoInformerFingerprint : MethodFingerprint( - "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L", "L", "L", "L"), listOf( - Opcode.INVOKE_STATIC, - Opcode.IGET_OBJECT, - Opcode.IGET_OBJECT, - Opcode.NEW_INSTANCE, - Opcode.INVOKE_DIRECT, + returnType = "V", + accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, + opcodes = listOf( Opcode.INVOKE_INTERFACE, - Opcode.IF_EQZ, - Opcode.CONST_STRING, - Opcode.INVOKE_INTERFACE, - Opcode.IGET_OBJECT, - Opcode.INVOKE_VIRTUAL, - Opcode.MOVE_RESULT, - Opcode.IF_EQZ, - Opcode.IGET_OBJECT, - Opcode.INVOKE_VIRTUAL, - Opcode.MOVE_RESULT, - Opcode.CONST_4, - Opcode.IF_EQ, - Opcode.GOTO, - ) + Opcode.RETURN_VOID + ), + strings = listOf("pc") ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt index b65ae86bd..0dd28b2b3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/action/HideButtonsPatch.kt @@ -27,7 +27,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt index e47ecda9b..a04196b53 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/autoplay/HideAutoplayButtonPatch.kt @@ -37,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt index 0bdce13ae..98f6a8328 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/captions/HideCaptionsButtonPatch.kt @@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.Opcode "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt index 43c3bd630..07e77c68c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/navigation/NavigationButtonsPatch.kt @@ -36,7 +36,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt index 9cdc60c42..ab77bf82c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/buttons/player/hide/HidePlayerButtonsPatch.kt @@ -32,7 +32,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction3rc "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt index 56b72a7a4..f5bf28a24 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/albumcards/AlbumCardsPatch.kt @@ -27,7 +27,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt index 6c4511c44..c6cbea4b7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/breakingnews/BreakingNewsPatch.kt @@ -27,7 +27,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt index 8baebec68..daef32de5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/comments/CommentsPatch.kt @@ -26,7 +26,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt index faa0dd047..4c7f311e6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/crowdfundingbox/CrowdfundingBoxPatch.kt @@ -27,7 +27,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt index 731bcd64f..8afa56d00 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/HideEndscreenCardsPatch.kt @@ -30,7 +30,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/fingerprints/LayoutIconFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/fingerprints/LayoutIconFingerprint.kt index 92c4accec..c9e2dbf4d 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/fingerprints/LayoutIconFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/endscreencards/fingerprints/LayoutIconFingerprint.kt @@ -7,8 +7,6 @@ import com.android.tools.smali.dexlib2.Opcode object LayoutIconFingerprint : LiteralValueFingerprint( returnType = "Landroid/view/View;", opcodes = listOf( - Opcode.CONST_4, - Opcode.CONST, Opcode.INVOKE_VIRTUAL, Opcode.MOVE_RESULT_OBJECT, Opcode.CHECK_CAST, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt index b60e9624a..f8a4458bf 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/filterbar/HideFilterBarPatch.kt @@ -27,7 +27,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt index dc8f57904..8ec4bd788 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/floatingmicrophone/HideFloatingMicrophoneButtonPatch.kt @@ -23,7 +23,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt index 1ca70ada3..2b8cff0cd 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/general/HideLayoutComponentsPatch.kt @@ -27,7 +27,14 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction LithoFilterPatch::class, SettingsPatch::class ], - compatiblePackages = [CompatiblePackage("com.google.android.youtube", ["18.32.39"])] + compatiblePackages = [ + CompatiblePackage( + "com.google.android.youtube", [ + "18.32.39", + "18.37.36" + ] + ) + ] ) @Suppress("unused") object HideLayoutComponentsPatch : BytecodePatch( diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt index 08e116f49..a09daed51 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/infocards/HideInfoCardsPatch.kt @@ -35,7 +35,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt index 5c963a25a..3a287bf16 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/HideLoadMoreButtonPatch.kt @@ -23,7 +23,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/HideEmailAddressPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/HideEmailAddressPatch.kt index 6abddaf96..1d1c6157f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/HideEmailAddressPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/personalinformation/HideEmailAddressPatch.kt @@ -23,7 +23,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt index 8281d5d9a..39b2a540a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/seekbar/HideSeekbarPatch.kt @@ -32,7 +32,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt index c3070ecf7..2e22f69a8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/shorts/HideShortsComponentsPatch.kt @@ -36,7 +36,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] @@ -54,8 +55,6 @@ object HideShortsComponentsPatch : BytecodePatch( private const val FILTER_CLASS_DESCRIPTOR = "Lapp/revanced/integrations/patches/components/ShortsFilter;" override fun execute(context: BytecodeContext) { - LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR) - // region Hide the Shorts shelf. ReelConstructorFingerprint.result?.let { @@ -74,13 +73,20 @@ object HideShortsComponentsPatch : BytecodePatch( // endregion - // region Hide the Shorts buttons. + // region Hide the Shorts buttons in older versions of YouTube. // Some Shorts buttons are views, hide them by setting their visibility to GONE. CreateShortsButtonsFingerprint.result?.let { - ShortsButtons.values().forEach { button -> button.injectHideCall(it.mutableMethod) } + ShortsButtons.entries.forEach { button -> button.injectHideCall(it.mutableMethod) } } ?: throw CreateShortsButtonsFingerprint.exception + + // endregion + + // region Hide the Shorts buttons in newer versions of YouTube. + + LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR) + // endregion // region Hide the navigation bar. diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt index 5724549bf..836a601f3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/HideTimestampPatch.kt @@ -24,7 +24,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/HideWatermarkPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/HideWatermarkPatch.kt index bc462c9d8..72bda6de5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/HideWatermarkPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/watermark/HideWatermarkPatch.kt @@ -28,7 +28,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt index 53427bb72..e91a9ff2b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/panels/popup/PlayerPopupPanelsPatch.kt @@ -24,7 +24,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt index 82f4989cf..764434c33 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/player/background/PlayerControlsBackgroundPatch.kt @@ -18,7 +18,8 @@ import org.w3c.dom.Element "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt index 235c0e3f7..28be7e5f9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/ReturnYouTubeDislikePatch.kt @@ -31,7 +31,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction PlayerTypeHookPatch::class, ], compatiblePackages = [ - CompatiblePackage("com.google.android.youtube", ["18.32.39"]) + CompatiblePackage("com.google.android.youtube", ["18.37.36"]) ] ) @Suppress("unused") @@ -91,49 +91,40 @@ object ReturnYouTubeDislikePatch : BytecodePatch( throw TextComponentAtomicReferenceFingerprint.exception }?.let { textComponentContextFingerprintResult -> val conversionContextIndex = textComponentContextFingerprintResult - .scanResult.patternScanResult!!.startIndex + .scanResult.patternScanResult!!.endIndex val atomicReferenceStartIndex = TextComponentAtomicReferenceFingerprint.result!! .scanResult.patternScanResult!!.startIndex - val insertIndex = atomicReferenceStartIndex + 6 + val insertIndex = atomicReferenceStartIndex + 9 textComponentContextFingerprintResult.mutableMethod.apply { - // Get the conversion context obfuscated field name, and the registers for the AtomicReference and CharSequence + // Get the conversion context obfuscated field name val conversionContextFieldReference = getInstruction(conversionContextIndex).reference - // Reuse the free register to make room for the atomic reference register. + // Free register to hold the conversion context val freeRegister = getInstruction(atomicReferenceStartIndex).registerB val atomicReferenceRegister = - getInstruction(atomicReferenceStartIndex + 1).registerC + getInstruction(atomicReferenceStartIndex + 6).registerC - val moveCharSequenceInstruction = getInstruction(insertIndex - 1) + // Instruction that is replaced, and also has the CharacterSequence register. + val moveCharSequenceInstruction = getInstruction(insertIndex) val charSequenceSourceRegister = moveCharSequenceInstruction.registerB val charSequenceTargetRegister = moveCharSequenceInstruction.registerA - // In order to preserve the atomic reference register, because it is overwritten, - // use another free register to store it. - replaceInstruction( - atomicReferenceStartIndex + 2, - "move-result-object v$freeRegister" - ) - replaceInstruction( - atomicReferenceStartIndex + 3, - "move-object v$charSequenceSourceRegister, v$freeRegister" - ) - // Move the current instance to the free register, and get the conversion context from it. - replaceInstruction(insertIndex - 1, "move-object/from16 v$freeRegister, p0") + // Must replace the instruction to preserve the control flow label. + replaceInstruction(insertIndex, "move-object/from16 v$freeRegister, p0") addInstructions( - insertIndex, + insertIndex + 1, """ # Move context to free register - iget-object v$freeRegister, v$freeRegister, $conversionContextFieldReference + iget-object v$freeRegister, v$freeRegister, $conversionContextFieldReference invoke-static {v$freeRegister, v$atomicReferenceRegister, v$charSequenceSourceRegister}, $INTEGRATIONS_CLASS_DESCRIPTOR->onLithoTextLoaded(Ljava/lang/Object;Ljava/util/concurrent/atomic/AtomicReference;Ljava/lang/CharSequence;)Ljava/lang/CharSequence; move-result-object v$freeRegister - # Replace the original char sequence with the modified one. + # Replace the original instruction move-object v${charSequenceTargetRegister}, v${freeRegister} """ ) @@ -152,7 +143,7 @@ object ReturnYouTubeDislikePatch : BytecodePatch( val isDisLikesBooleanReference = getInstruction(patternResult.endIndex).reference val textViewFieldReference = // Like/Dislike button TextView field - getInstruction(patternResult.endIndex - 2).reference + getInstruction(patternResult.endIndex - 1).reference // Check if the hooked TextView object is that of the dislike button. // If RYD is disabled, or the TextView object is not that of the dislike button, the execution flow is not interrupted. diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/ShortsTextViewFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/ShortsTextViewFingerprint.kt index 1009acbd5..c5efc64e4 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/ShortsTextViewFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/ShortsTextViewFingerprint.kt @@ -1,12 +1,12 @@ package app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints +import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.Opcode object ShortsTextViewFingerprint : MethodFingerprint( - // 18.29.38 method is public final visibility, but in 18.23.35 and older it's protected final. - // If 18.23.35 is dropped then accessFlags should be specified here. + accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, returnType = "V", parameters = listOf("L", "L"), opcodes = listOf( @@ -27,7 +27,6 @@ object ShortsTextViewFingerprint : MethodFingerprint( Opcode.IF_EQ, Opcode.RETURN_VOID, Opcode.IGET_OBJECT, // TextView field - Opcode.CHECK_CAST, Opcode.IGET_BOOLEAN, // boolean field ) ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentAtomicReferenceFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentAtomicReferenceFingerprint.kt index 069ec8bb6..b929e2c11 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentAtomicReferenceFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentAtomicReferenceFingerprint.kt @@ -13,13 +13,17 @@ object TextComponentAtomicReferenceFingerprint : MethodFingerprint( accessFlags = AccessFlags.PROTECTED or AccessFlags.FINAL, parameters = listOf("L"), opcodes = listOf( - Opcode.MOVE_OBJECT, // Register A and B is context, use B as context, reuse A as free register + Opcode.MOVE_OBJECT, // Register B is free register + Opcode.MOVE_OBJECT_FROM16, + Opcode.MOVE_OBJECT_FROM16, + Opcode.MOVE_OBJECT_FROM16, + Opcode.MOVE_OBJECT_FROM16, + Opcode.MOVE_OBJECT_FROM16, Opcode.INVOKE_VIRTUAL, // Register C is atomic reference Opcode.MOVE_RESULT_OBJECT, // Register A is char sequence - Opcode.MOVE_OBJECT, Opcode.CHECK_CAST, - Opcode.MOVE_OBJECT, - Opcode.INVOKE_INTERFACE, // Insert hook here + Opcode.MOVE_OBJECT, // Replace this instruction with patch code + Opcode.INVOKE_INTERFACE, Opcode.MOVE_RESULT, Opcode.IF_EQZ, Opcode.INVOKE_INTERFACE, diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentContextFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentContextFingerprint.kt index 9c2e7d7e7..c23573bc2 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentContextFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/returnyoutubedislike/fingerprints/TextComponentContextFingerprint.kt @@ -13,12 +13,14 @@ object TextComponentContextFingerprint : MethodFingerprint( accessFlags = AccessFlags.PROTECTED or AccessFlags.FINAL, parameters = listOf("L"), opcodes = listOf( + Opcode.MOVE_OBJECT_FROM16, + Opcode.MOVE_OBJECT_FROM16, + Opcode.INVOKE_STATIC_RANGE, + Opcode.MOVE_RESULT_OBJECT, + Opcode.IGET_OBJECT, + Opcode.IGET_OBJECT, + Opcode.IGET_OBJECT, + Opcode.IGET_OBJECT, Opcode.IGET_OBJECT, // conversion context field name - Opcode.IGET_OBJECT, - Opcode.IGET_OBJECT, - Opcode.IGET_BOOLEAN, - Opcode.IGET, - Opcode.IGET, - Opcode.IGET, ) ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt index b30c08cb4..900e1c296 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/searchbar/WideSearchbarPatch.kt @@ -27,7 +27,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt index 0fb4b2657..5ae4631b7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/sponsorblock/SponsorBlockBytecodePatch.kt @@ -44,7 +44,8 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ], diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt index e5984f0b4..f1bfa624c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/spoofappversion/SpoofAppVersionPatch.kt @@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableShortsOnStartupPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableShortsOnStartupPatch.kt index 742a74d78..4db654652 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableShortsOnStartupPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/startupshortsreset/DisableShortsOnStartupPatch.kt @@ -23,7 +23,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt index 07d87a2cf..774ccd352 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/tabletminiplayer/TabletMiniPlayerPatch.kt @@ -33,7 +33,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ) ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt index 70fb7b0c9..6a97db107 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/thumbnails/AlternativeThumbnailsPatch.kt @@ -25,7 +25,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt index 9f610c71a..1238fdb2e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/AutoRepeatPatch.kt @@ -29,7 +29,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/ClientSpoofPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/ClientSpoofPatch.kt index ec4f1955a..2bf64166b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/ClientSpoofPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/ClientSpoofPatch.kt @@ -24,7 +24,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofSignatureResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/fix/playback/SpoofSignatureResourcePatch.kt deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt index 6bc6d74b5..fecf51010 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/links/OpenLinksExternallyPatch.kt @@ -19,7 +19,20 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference @Patch( name = "Open links externally", description = "Open links outside of the app directly in your browser.", - compatiblePackages = [CompatiblePackage("com.google.android.youtube", ["18.16.37", "18.19.35", "18.20.39", "18.23.35", "18.29.38", "18.32.39"])] + compatiblePackages = [ + CompatiblePackage( + "com.google.android.youtube", + [ + "18.16.37", + "18.19.35", + "18.20.39", + "18.23.35", + "18.29.38", + "18.32.39", + "18.37.36" + ] + ) + ] ) @Suppress("unused") object OpenLinksExternallyPatch : AbstractTransformInstructionsPatch>( diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/LithoFilterPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/LithoFilterPatch.kt index 46a21b6ec..07ec2eaa7 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/LithoFilterPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/LithoFilterPatch.kt @@ -103,7 +103,7 @@ object LithoFilterPatch : BytecodePatch( val emptyComponentFieldIndex = builderMethodIndex + 2 bytesToComponentContextMethod.mutableMethod.apply { - val insertHookIndex = bytesToComponentContextMethod.scanResult.patternScanResult!!.endIndex + val insertHookIndex = bytesToComponentContextMethod.scanResult.patternScanResult!!.endIndex + 1 // region Get free registers that this patch uses. // Registers are overwritten right after they are used in this patch, therefore free to clobber. diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ComponentContextParserFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ComponentContextParserFingerprint.kt index 5fa5401dc..62916db69 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ComponentContextParserFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/litho/filter/fingerprints/ComponentContextParserFingerprint.kt @@ -5,9 +5,9 @@ import com.android.tools.smali.dexlib2.Opcode object ComponentContextParserFingerprint : MethodFingerprint( opcodes = listOf( + Opcode.INVOKE_VIRTUAL, Opcode.INVOKE_VIRTUAL, Opcode.IPUT_OBJECT, - Opcode.NEW_INSTANCE ), strings = listOf("Component was not found %s because it was removed due to duplicate converter bindings.") ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/MicroGBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/MicroGBytecodePatch.kt index 400119e2c..01af68664 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/MicroGBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/MicroGBytecodePatch.kt @@ -14,7 +14,7 @@ import app.revanced.util.microg.MicroGBytecodeHelper @Patch( name = "Vanced MicroG support", - description = "Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG.", + description = "Allows YouTube to run without root and under a different package name with Vanced MicroG.", dependencies = [ MicroGResourcePatch::class, HideCastButtonPatch::class, @@ -28,7 +28,8 @@ import app.revanced.util.microg.MicroGBytecodeHelper "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt index 07fb680a6..eb94ba06c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/minimizedplayback/MinimizedPlaybackPatch.kt @@ -34,7 +34,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/HDRBrightnessPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/HDRBrightnessPatch.kt index 0002ddb7b..c92a743a8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/HDRBrightnessPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/hdrbrightness/HDRBrightnessPatch.kt @@ -26,7 +26,8 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt index bb0ed936d..d9008763f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/RememberVideoQualityPatch.kt @@ -36,7 +36,8 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/SetQualityByIndexMethodClassFieldReferenceFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/SetQualityByIndexMethodClassFieldReferenceFingerprint.kt index aa76503fa..551f2ae4a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/SetQualityByIndexMethodClassFieldReferenceFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/quality/fingerprints/SetQualityByIndexMethodClassFieldReferenceFingerprint.kt @@ -11,7 +11,7 @@ object SetQualityByIndexMethodClassFieldReferenceFingerprint : MethodFingerprint parameters = listOf("L"), opcodes = listOf( Opcode.IGET_OBJECT, - Opcode.INVOKE_INTERFACE, - Opcode.RETURN_VOID + Opcode.IPUT_OBJECT, + Opcode.IGET_OBJECT, ) ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt index 0c950f20b..8b621518b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/speed/PlaybackSpeedPatch.kt @@ -18,7 +18,8 @@ import app.revanced.patches.youtube.video.speed.remember.RememberPlaybackSpeedPa "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ] diff --git a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/OldVideoQualityMenuPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/OldVideoQualityMenuPatch.kt index 48a55f29a..602587c24 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/OldVideoQualityMenuPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/video/videoqualitymenu/OldVideoQualityMenuPatch.kt @@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction "18.20.39", "18.23.35", "18.29.38", - "18.32.39" + "18.32.39", + "18.37.36" ] ) ]