feat(FotMob): Add Hide ads patch (#6566)
This commit is contained in:
parent
d17a1ba9d7
commit
4b0b7374f2
3 changed files with 31 additions and 0 deletions
|
|
@ -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 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 final class app/revanced/patches/googlenews/customtabs/EnableCustomTabsPatchKt {
|
||||||
public static final fun getEnableCustomTabsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
public static final fun getEnableCustomTabsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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)
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue