feat(Peacock TV): Add Hide ads patch (#6348)

This commit is contained in:
g9q
2025-12-09 20:55:08 -06:00
committed by GitHub
parent dc813fe617
commit 847ee189a9
3 changed files with 30 additions and 0 deletions

View File

@@ -573,6 +573,10 @@ public final class app/revanced/patches/pandora/misc/EnableUnlimitedSkipsPatchKt
public static final fun getEnableUnlimitedSkipsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
public final class app/revanced/patches/peacocktv/ads/HideAdsPatchKt {
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
public final class app/revanced/patches/photomath/detection/deviceid/SpoofDeviceIdPatchKt {
public static final fun getGetDeviceIdPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}

View File

@@ -0,0 +1,10 @@
package app.revanced.patches.peacocktv.ads
import app.revanced.patcher.fingerprint
import com.android.tools.smali.dexlib2.AccessFlags
internal val mediaTailerAdServiceFingerprint = fingerprint {
accessFlags(AccessFlags.PUBLIC)
returns("Ljava/lang/Object")
strings("Could not build MT Advertising service")
}

View File

@@ -0,0 +1,16 @@
package app.revanced.patches.peacocktv.ads
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.util.returnEarly
@Suppress("unused")
val hideAdsPatch = bytecodePatch(
name = "Hide ads",
description = "Hides all video ads.",
) {
compatibleWith("com.peacocktv.peacockandroid")
execute {
mediaTailerAdServiceFingerprint.method.returnEarly(false)
}
}