diff --git a/src/main/kotlin/app/revanced/patches/Index.kt b/src/main/kotlin/app/revanced/patches/Index.kt index 4c4e843d..8c45945d 100644 --- a/src/main/kotlin/app/revanced/patches/Index.kt +++ b/src/main/kotlin/app/revanced/patches/Index.kt @@ -7,7 +7,6 @@ import app.revanced.patches.music.audio.EnableAudioOnlyPatch import app.revanced.patches.music.layout.RemoveTasteBuilderPatch import app.revanced.patches.music.layout.RemoveUpgradeTabPatch import app.revanced.patches.music.premium.BackgroundPlayPatch -import app.revanced.patches.youtube.ad.HomeAdsPatch import app.revanced.patches.youtube.ad.HomePromoPatch import app.revanced.patches.youtube.ad.VideoAdsPatch import app.revanced.patches.youtube.interaction.EnableSeekbarTappingPatch @@ -27,7 +26,7 @@ object Index { val patches: List<() -> Patch> = listOf( ::IntegrationsPatch, ::FixLocaleConfigErrorPatch, - ::HomeAdsPatch, + //::HomeAdsPatch, ::VideoAdsPatch, ::HomePromoPatch, ::MinimizedPlaybackPatch, diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/HomePromoPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/HomePromoPatch.kt index 60cf6105..f92d1673 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/HomePromoPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/HomePromoPatch.kt @@ -22,7 +22,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction11x private val compatiblePackages = listOf( PackageMetadata( "com.google.android.youtube", - listOf("17.03.38", "17.14.35") + listOf("17.03.38", "17.14.35", "17.17.34") ) ) @@ -43,8 +43,8 @@ class HomePromoPatch : BytecodePatch( MethodSignatureMetadata( "promoted-discovery-app-parent-method", MethodMetadata( - "Ljjl;", - "lG", + "Ljre;", + "lP", ), PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value. compatiblePackages, @@ -94,8 +94,8 @@ class HomePromoPatch : BytecodePatch( MethodSignatureMetadata( "promoted-discovery-action-parent-method", MethodMetadata( - "Ljjc;", - "lG", + "Ljqv;", + "lP", ), PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value. compatiblePackages, @@ -150,7 +150,7 @@ class HomePromoPatch : BytecodePatch( val requiredMethod = result.findParentMethod( MethodSignature( MethodSignatureMetadata( - "promoted-discovery-action-parent-method", + "promoted-discovery-action-method", methodMetadata, PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value. compatiblePackages, diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/VideoAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/VideoAdsPatch.kt index 4498d335..0f8396bb 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/VideoAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/VideoAdsPatch.kt @@ -20,7 +20,7 @@ import org.jf.dexlib2.Opcode private val packageMetadata = listOf( PackageMetadata( "com.google.android.youtube", - listOf("17.14.35") + listOf("17.14.35", "17.17.34") ) ) @@ -39,7 +39,7 @@ class VideoAdsPatch : BytecodePatch( MethodSignatureMetadata( "show-video-ads-constructor", MethodMetadata( - "zai", + "Laadb", "", ), PatternScanMethod.Fuzzy(2),// FIXME: Test this threshold and find the best value. diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/EnableSeekbarTappingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/EnableSeekbarTappingPatch.kt index 3f49f830..65ecd121 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/EnableSeekbarTappingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/EnableSeekbarTappingPatch.kt @@ -24,7 +24,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c private val compatiblePackages = listOf( PackageMetadata( "com.google.android.youtube", - listOf("17.14.35") + listOf("17.17.34") ) ) @@ -40,7 +40,7 @@ class EnableSeekbarTappingPatch : BytecodePatch( MethodSignature( MethodSignatureMetadata( "enable-seekbar-tapping-parent-signature", - MethodMetadata("Lesa;", ""), // unknown + MethodMetadata("Lzhj;", "J"), // unknown PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value. compatiblePackages, "Signature for a parent method, which is needed to find the actual method required to be patched.", @@ -85,7 +85,7 @@ class EnableSeekbarTappingPatch : BytecodePatch( MethodSignature( MethodSignatureMetadata( "enable-seekbar-tapping-signature", - MethodMetadata("Lesa;", "onTouchEvent"), // unknown + MethodMetadata("Lfao;", "onTouchEvent"), // unknown PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value. compatiblePackages, "Signature for the method required to be patched.", @@ -97,7 +97,6 @@ class EnableSeekbarTappingPatch : BytecodePatch( listOf( Opcode.INVOKE_VIRTUAL, Opcode.MOVE_RESULT_WIDE, - Opcode.INT_TO_FLOAT, Opcode.IGET, Opcode.IGET_OBJECT, Opcode.IGET, @@ -115,15 +114,6 @@ class EnableSeekbarTappingPatch : BytecodePatch( Opcode.NEW_INSTANCE, Opcode.INVOKE_DIRECT, Opcode.IPUT_OBJECT, - Opcode.NEW_INSTANCE, - Opcode.INVOKE_VIRTUAL, - Opcode.MOVE_RESULT, - Opcode.FLOAT_TO_INT, - Opcode.INVOKE_VIRTUAL, - Opcode.MOVE_RESULT, - Opcode.FLOAT_TO_INT, - Opcode.INVOKE_DIRECT, - Opcode.IPUT_OBJECT, Opcode.INVOKE_VIRTUAL ) ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/CreateButtonRemoverPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/CreateButtonRemoverPatch.kt index 4bcde789..7293dd65 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/CreateButtonRemoverPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/CreateButtonRemoverPatch.kt @@ -20,7 +20,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c private val compatiblePackages = listOf( PackageMetadata( "com.google.android.youtube", - listOf("17.14.35") + listOf("17.14.35", "17.17.34") ) ) @@ -36,7 +36,7 @@ class CreateButtonRemoverPatch : BytecodePatch( MethodSignature( MethodSignatureMetadata( "create-button-method", - MethodMetadata(null, null), // unknown + MethodMetadata("Lkne", "z"), // unknown PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value. compatiblePackages, "Signature for the method required to be patched.", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/HideReelsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/HideReelsPatch.kt index 59fc80e6..47ce377b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/HideReelsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/HideReelsPatch.kt @@ -18,7 +18,7 @@ import org.jf.dexlib2.Opcode private val compatiblePackages = listOf( PackageMetadata( "com.google.android.youtube", - listOf("17.14.35") + listOf("17.17.34") ) ) @@ -34,7 +34,7 @@ class HideReelsPatch : BytecodePatch( MethodSignature( MethodSignatureMetadata( "hide-reels-signature", - MethodMetadata(null, null), // unknown + MethodMetadata("Ljvy", ""), // unknown PatternScanMethod.Fuzzy(3), // FIXME: Test this threshold and find the best value. compatiblePackages, "Signature for the method required to be patched.", @@ -59,7 +59,6 @@ class HideReelsPatch : BytecodePatch( "[B", "[B", "[B", - "[B", "[B" ), listOf( diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/MinimizedPlaybackPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/MinimizedPlaybackPatch.kt index 2383fcfd..91551d52 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/MinimizedPlaybackPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/MinimizedPlaybackPatch.kt @@ -19,7 +19,7 @@ import org.jf.dexlib2.Opcode private val compatiblePackages = listOf( PackageMetadata( "com.google.android.youtube", - listOf("17.14.35") + listOf("17.14.35", "17.17.34") ) ) @@ -35,7 +35,7 @@ class MinimizedPlaybackPatch : BytecodePatch( MethodSignature( MethodSignatureMetadata( "minimized-playback-manager", - MethodMetadata(null, null), // unknown + MethodMetadata("Lype", "j"), // unknown PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value. compatiblePackages, "Signature for the method required to be patched.", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/OldQualityLayoutPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/OldQualityLayoutPatch.kt index 65eb3744..80114a36 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/OldQualityLayoutPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/OldQualityLayoutPatch.kt @@ -21,7 +21,7 @@ import org.jf.dexlib2.builder.instruction.BuilderInstruction21t private val compatiblePackages = listOf( PackageMetadata( "com.google.android.youtube", - listOf("17.14.35") + listOf("17.17.34") ) ) @@ -37,7 +37,7 @@ class OldQualityLayoutPatch : BytecodePatch( MethodSignature( MethodSignatureMetadata( "old-quality-parent-method-signature", - MethodMetadata(null, null), // unknown + MethodMetadata("Libh", ""), // unknown PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value. compatiblePackages, "Signature to find a parent method required by the Old Quality Layout patch.", @@ -45,7 +45,7 @@ class OldQualityLayoutPatch : BytecodePatch( ), "V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, - listOf("L", "L", "L", "L", "L", "L", "L", "[B"), + listOf("L", "L", "L", "L", "L", "L", "L"), listOf( Opcode.INVOKE_DIRECT, Opcode.IPUT_OBJECT, @@ -82,7 +82,7 @@ class OldQualityLayoutPatch : BytecodePatch( MethodSignature( MethodSignatureMetadata( "old-quality-method-signature", - MethodMetadata(null, null), // unknown + MethodMetadata("Libh", null), // unknown PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value. compatiblePackages, "Signature to find the method required by the Old Quality Layout patch", diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/ShortsButtonRemoverPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/ShortsButtonRemoverPatch.kt index 0b0102c6..7a393ef1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/ShortsButtonRemoverPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/ShortsButtonRemoverPatch.kt @@ -19,7 +19,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction11x private val compatiblePackages = listOf( PackageMetadata( "com.google.android.youtube", - listOf("17.14.35") + listOf("17.14.35", "17.17.34") ) ) @@ -35,7 +35,7 @@ class ShortsButtonRemoverPatch : BytecodePatch( MethodSignature( MethodSignatureMetadata( "pivotbar-buttons-method-tabenum", - MethodMetadata(null, null), // unknown + MethodMetadata("Lkne", "z"), // unknown PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value. compatiblePackages, "Signature for the pivotbar method that creates all button views.", @@ -69,7 +69,7 @@ class ShortsButtonRemoverPatch : BytecodePatch( MethodSignature( MethodSignatureMetadata( "pivotbar-buttons-method-view", - MethodMetadata(null, null), // unknown + MethodMetadata("Lkne", "z"), // unknown PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value. compatiblePackages, "Signature for the pivotbar method that creates all button views.", diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/FixLocaleConfigErrorPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/FixLocaleConfigErrorPatch.kt index 873ea1ad..aefc1807 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/FixLocaleConfigErrorPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/FixLocaleConfigErrorPatch.kt @@ -11,7 +11,7 @@ import org.w3c.dom.Element private val compatiblePackages = listOf( PackageMetadata( "com.google.android.youtube", - listOf("17.14.35") + listOf("17.14.35", "17.17.34") ) ) class FixLocaleConfigErrorPatch : ResourcePatch( diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/IntegrationsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/IntegrationsPatch.kt index 7683f18f..33b7ea25 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/IntegrationsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/IntegrationsPatch.kt @@ -22,7 +22,7 @@ import org.jf.dexlib2.immutable.ImmutableMethodImplementation private val compatiblePackages = listOf( PackageMetadata( "com.google.android.youtube", - listOf("17.03.38", "17.14.35") + listOf("17.03.38", "17.14.35", "17.17.34") ) ) @@ -38,7 +38,7 @@ class IntegrationsPatch : BytecodePatch( MethodSignature( MethodSignatureMetadata( "integrations-patch", - MethodMetadata(null, null), // unknown + MethodMetadata("Lacnx", "onCreate"), PatternScanMethod.Fuzzy(2), // FIXME: Test this threshold and find the best value. compatiblePackages, "Inject the integrations into the application with the method of this signature",