mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2025-05-11 13:15:39 +02:00
feat(Angulus): Add Hide ads
patch (#4604)
Co-authored-by: Denis Kerner <denis.kerner@vodafone.com> Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
e2083159b1
commit
87c86b53a9
3 changed files with 36 additions and 0 deletions
|
@ -132,6 +132,10 @@ public final class app/revanced/patches/amazon/DeepLinkingPatchKt {
|
|||
public static final fun getDeepLinkingPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/angulus/ads/RemoveAdsPatchKt {
|
||||
public static final fun getAngulusPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/backdrops/misc/pro/ProUnlockPatchKt {
|
||||
public static final fun getProUnlockPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package app.revanced.patches.angulus.ads
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
// Keywords to search for in case the method name changes:
|
||||
// dailyMeasurementCount
|
||||
// lastMeasurementDate
|
||||
// dailyAdResetCount
|
||||
// MeasurementPrefs
|
||||
|
||||
// This fingerprint targets a method that returns the daily measurement count.
|
||||
// This method is used to determine if the user has reached the daily limit of measurements.
|
||||
internal val getDailyMeasurementCountFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PRIVATE)
|
||||
returns("I")
|
||||
strings("dailyMeasurementCount")
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package app.revanced.patches.angulus.ads
|
||||
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val angulusPatch = bytecodePatch(name = "Hide ads") {
|
||||
compatibleWith("com.drinkplusplus.angulus")
|
||||
|
||||
execute {
|
||||
// Always return 0 as the daily measurement count.
|
||||
getDailyMeasurementCountFingerprint.method.returnEarly()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue