diff --git a/README.md b/README.md index 3c1b7873e..865db533a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1 @@ -# revanced-patches -Repo for all ReVanced patches +Repo for all ReVanced patches diff --git a/src/main/kotlin/app/revanced/extensions/Extensions.kt b/src/main/kotlin/app/revanced/extensions/Extensions.kt index 1f2ec35a5..45a93519d 100644 --- a/src/main/kotlin/app/revanced/extensions/Extensions.kt +++ b/src/main/kotlin/app/revanced/extensions/Extensions.kt @@ -10,7 +10,7 @@ internal fun MutableMethodImplementation.injectHideCall( ) { this.addInstruction( index, - "invoke-static { v$register }, Lfi/razerman/youtube/XAdRemover;->HideView(Landroid/view/View;)V".toInstruction() + "invoke-static { v$register }, Lapp/revanced/integrations/patches/HideHomeAdsPatch;->HideHomeAds(Landroid/view/View;)V".toInstruction() ) } diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/general/bytecode/patch/GeneralBytecodeAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/general/bytecode/patch/GeneralBytecodeAdsPatch.kt index 7b7f6df6d..a2a59f1b0 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/general/bytecode/patch/GeneralBytecodeAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/general/bytecode/patch/GeneralBytecodeAdsPatch.kt @@ -249,7 +249,7 @@ class GeneralBytecodeAdsPatch : BytecodePatch( val block2 = """ move-object/from16 v1, p3 iget-object v2, v1, $templateNameParameterType->b:Ljava/nio/ByteBuffer; - invoke-static {v0, v2}, Lfi/razerman/youtube/litho/LithoAdRemoval;->containsAd(Ljava/lang/String;Ljava/nio/ByteBuffer;)Z + invoke-static {v0, v2}, Lapp/revanced/integrations/patches/GeneralBytecodeAdsPatch;->containsAd(Ljava/lang/String;Ljava/nio/ByteBuffer;)Z move-result v1 """.trimIndent().toInstructions(lithoMethod) val block3 = """ diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/video/patch/VideoAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/video/patch/VideoAdsPatch.kt index 598d2ae47..d05aee40e 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/video/patch/VideoAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/video/patch/VideoAdsPatch.kt @@ -42,7 +42,7 @@ class VideoAdsPatch : BytecodePatch( // Override the parameter by calling shouldShowAds and setting the parameter to the result result.method.addInstructions( 0, """ - invoke-static { }, Lfi/vanced/libraries/youtube/whitelisting/Whitelist;->shouldShowAds()Z + invoke-static { }, Lapp/revanced/integrations/patches/VideoAdsPatch;->shouldShowAds()Z move-result v1 """ ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt index 36f76e1b3..ecd29fde8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/patch/EnableSeekbarTappingPatch.kt @@ -86,7 +86,7 @@ class EnableSeekbarTappingPatch : BytecodePatch( ) result.method.addInstructions( result.scanResult.endIndex + 1, """ - invoke-static { }, Lfi/razerman/youtube/preferences/BooleanPreferences;->isTapSeekingEnabled()Z + invoke-static { }, Lapp/revanced/integrations/patches/SeekbarTappingPatch;->isTapSeekingEnabled()Z move-result v0 """ ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/castbutton/patch/HideCastButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/castbutton/patch/HideCastButtonPatch.kt index 842e86eea..bd45b6b42 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/castbutton/patch/HideCastButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/castbutton/patch/HideCastButtonPatch.kt @@ -30,7 +30,7 @@ class HideCastButtonPatch : BytecodePatch(listOf()) { setVisibilityMethod.addInstructions( 0, """ - invoke-static {p1}, Lfi/razerman/youtube/XGlobals;->getCastButtonOverrideV2(I)I + invoke-static {p1}, Lapp/revanced/integrations/patches/HideCastButtonPatch;->getCastButtonOverrideV2(I)I move-result p1 """ ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/createbutton/patch/CreateButtonRemoverPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/createbutton/patch/CreateButtonRemoverPatch.kt index 79bb00f3c..a0e2ee8bc 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/createbutton/patch/CreateButtonRemoverPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/createbutton/patch/CreateButtonRemoverPatch.kt @@ -54,8 +54,8 @@ class CreateButtonRemoverPatch : BytecodePatch( // Hide the button view via proxy by passing it to the hideCreateButton method result.method.addInstruction( - moveResultIndex + 1, - "invoke-static { v${moveResultInstruction.registerA} }, Lfi/razerman/youtube/XAdRemover;->hideCreateButton(Landroid/view/View;)V" + result.scanResult.endIndex + 1, + "invoke-static { v$moveResultInstruction.registerA }, Lapp/revanced/integrations/patches/HideCreateButtonPatch;->hideCreateButton(Landroid/view/View;)V" ) return PatchResultSuccess() diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/patch/OldQualityLayoutPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/patch/OldQualityLayoutPatch.kt index b77797a1d..17039e931 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/patch/OldQualityLayoutPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/oldqualitylayout/patch/OldQualityLayoutPatch.kt @@ -58,7 +58,7 @@ class OldQualityLayoutPatch : BytecodePatch( implementation.addInstruction(5, jmpInstruction) result.method.addInstructions( 0, """ - invoke-static { }, Lfi/razerman/youtube/XGlobals;->useOldStyleQualitySettings()Z + invoke-static { }, Lapp/revanced/integrations/patches/OldStyleQualityPatch;->useOldStyleQualitySettings()Z move-result v0 """ ) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/reels/patch/HideReelsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/reels/patch/HideReelsPatch.kt index 6017d50d4..b9df95734 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/reels/patch/HideReelsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/reels/patch/HideReelsPatch.kt @@ -28,7 +28,7 @@ class HideReelsPatch : BytecodePatch( // so we pass the view to the HideReel method result.method.addInstruction( result.scanResult.endIndex, - "invoke-static { v2 }, Lfi/razerman/youtube/XAdRemover;->HideReel(Landroid/view/View;)V" + "invoke-static { v2 }, Lapp/revanced/integrations/patches/HideReelsPatch;->HideReel(Landroid/view/View;)V" ) return PatchResultSuccess() diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/patch/ShortsButtonRemoverPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/patch/ShortsButtonRemoverPatch.kt index 1191caa97..cb66050b8 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/patch/ShortsButtonRemoverPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/patch/ShortsButtonRemoverPatch.kt @@ -41,16 +41,16 @@ class ShortsButtonRemoverPatch : BytecodePatch( // Save the tab enum in XGlobals to avoid smali/register workarounds result1.method.addInstruction( result1.scanResult.endIndex + 1, - "sput-object v$enumRegister, Lfi/razerman/youtube/XGlobals;->lastPivotTab:Ljava/lang/Enum;" + "sput-object v$enumRegister, Lapp/revanced/integrations/patches/HideShortsButtonPatch;->lastPivotTab:Ljava/lang/Enum;" ) // Hide the button view via proxy by passing it to the hideShortsButton method // It only hides it if the last tab name is "TAB_SHORTS" result2.method.addInstruction( result2.scanResult.endIndex + 2, - "invoke-static { v$viewRegister }, Lfi/razerman/youtube/XAdRemover;->hideShortsButton(Landroid/view/View;)V" + "invoke-static { v$viewRegister }, Lapp/revanced/integrations/patches/HideShortsButtonPatch;->hideShortsButton(Landroid/view/View;)V" ) return PatchResultSuccess() } -} +} \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/signatures/PivotBarButtonTabenumSignature.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/signatures/PivotBarButtonTabenumSignature.kt index 6e88d2b45..71f2406c6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/signatures/PivotBarButtonTabenumSignature.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/shorts/button/signatures/PivotBarButtonTabenumSignature.kt @@ -42,4 +42,4 @@ object PivotBarButtonTabenumSignature : MethodSignature( Opcode.INVOKE_STATIC, // SomeEnum.fromValue(tabOrdinal) Opcode.MOVE_RESULT_OBJECT ) -) \ No newline at end of file +) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/patch/IntegrationsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/patch/IntegrationsPatch.kt index 319c0e6cd..a357835e5 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/patch/IntegrationsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/integrations/patch/IntegrationsPatch.kt @@ -28,7 +28,7 @@ class IntegrationsPatch : BytecodePatch( ) ) { override fun execute(data: BytecodeData): PatchResult { - if (data.findClass("Lapp/revanced/integrations/Globals") == null) + if (data.findClass("Lapp/revanced/integrations/utils/Globals") == null) return PatchResultError("Integrations have not been merged yet. This patch can not succeed without the integrations.") val result = InitSignature.result!! @@ -38,8 +38,8 @@ class IntegrationsPatch : BytecodePatch( result.method.addInstructions( result.scanResult.endIndex + 1, """ - invoke-static {v$count}, Lpl/jakubweg/StringRef;->setContext(Landroid/content/Context;)V - sput-object v$count, Lapp/revanced/integrations/Globals;->context:Landroid/content/Context; + invoke-static {v$count}, Lapp/revanced/integrations/sponsorblock/StringRef;->setContext(Landroid/content/Context;)V + sput-object v$count, Lapp/revanced/integrations/utils/Globals;->context:Landroid/content/Context; """ ) @@ -55,7 +55,7 @@ class IntegrationsPatch : BytecodePatch( null, ImmutableMethodImplementation( 1, """ - invoke-static { }, Lapp/revanced/integrations/Globals;->getAppContext()Landroid/content/Context; + invoke-static { }, Lapp/revanced/integrations/utils/Globals;->getAppContext()Landroid/content/Context; move-result-object v0 return-object v0 """.trimIndent().toInstructions(), null, null