feat(FotMob): Add Hide ads patch (#6566)

This commit is contained in:
Sayanth 2026-02-07 01:21:43 +05:30 committed by GitHub
parent d17a1ba9d7
commit 4b0b7374f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 0 deletions

View file

@ -232,6 +232,10 @@ public final class app/revanced/patches/finanzonline/detection/root/RootDetectio
public static final fun getRootDetectionPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
public final class app/revanced/patches/fotmob/ads/HideAdsPatchKt {
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
public final class app/revanced/patches/googlenews/customtabs/EnableCustomTabsPatchKt {
public static final fun getEnableCustomTabsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}

View file

@ -0,0 +1,12 @@
package app.revanced.patches.fotmob.ads
import com.android.tools.smali.dexlib2.AccessFlags
import app.revanced.patcher.fingerprint
internal val shouldDisplayAdsMethod = fingerprint {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returns("Z")
custom { method, classDef ->
method.name == "shouldDisplayAds" && classDef.type.endsWith("AdsService;")
}
}

View file

@ -0,0 +1,15 @@
package app.revanced.patches.fotmob.ads
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.util.returnEarly
@Suppress("unused")
val hideAdsPatch = bytecodePatch(
name = "Hide ads",
) {
compatibleWith("com.mobilefootie.wc2010")
execute {
shouldDisplayAdsMethod.method.returnEarly(false)
}
}