Compare commits
4 commits
main
...
github/for
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a71df5214 | ||
|
|
36d1e83f2a | ||
|
|
7cf5102fb0 | ||
|
|
0e020c5760 |
5 changed files with 154 additions and 0 deletions
|
|
@ -352,6 +352,10 @@ public final class app/revanced/patches/irplus/ad/RemoveAdsPatchKt {
|
|||
public static final fun getRemoveAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/jakdojade/ads/DisableAdsPatchKt {
|
||||
public static final fun getDisableAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/letterboxd/ads/HideAdsPatchKt {
|
||||
public static final fun getHideAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
package app.revanced.patches.jakdojade.ad
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val disableAdsPatch = bytecodePatch(
|
||||
name = "Disable ads",
|
||||
) {
|
||||
compatibleWith("com.citynav.jakdojade.pl.android")
|
||||
|
||||
execute {
|
||||
// Spoof isPremium() to always return true.
|
||||
// We can do this beacuse Jakdojade Premium's only feature is ad removal.
|
||||
isPremiumFingerprint.method.returnEarly(true)
|
||||
|
||||
// Spoof Premium renewal date in the UI.
|
||||
// We need to do the spoofing in order to avoid app crashes when opening profile menu.
|
||||
getPremiumRenewalDateFingerprint.method.replaceInstructions(
|
||||
0,
|
||||
"""
|
||||
const-string v0, ""
|
||||
return-object v0
|
||||
"""
|
||||
)
|
||||
// Spoof Premium type.
|
||||
getGoogleProductFingerprint.method.replaceInstructions(
|
||||
0,
|
||||
"""
|
||||
sget-object v0, Lcom/citynav/jakdojade/pl/android/billing/output/GoogleProduct;->PREMIUM_YEARLY_V4:Lcom/citynav/jakdojade/pl/android/billing/output/GoogleProduct;
|
||||
return-object v0
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package app.revanced.patches.jakdojade.ad
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val isPremiumFingerprint = fingerprint {
|
||||
returns("Z")
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
parameters()
|
||||
opcodes(
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
)
|
||||
}
|
||||
|
||||
internal val getPremiumRenewalDateFingerprint = fingerprint {
|
||||
returns("Ljava/lang/String;")
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
parameters()
|
||||
opcodes(
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
)
|
||||
}
|
||||
|
||||
internal val getGoogleProductFingerprint = fingerprint {
|
||||
returns("Lcom/citynav/jakdojade/pl/android/billing/output/GoogleProduct;")
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
parameters("Lcom/citynav/jakdojade/pl/android/profiles/ui/profile/userprofile/model/PremiumType;")
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package app.revanced.patches.jakdojade.ads
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val disableAdsPatch = bytecodePatch(
|
||||
name = "Disable ads",
|
||||
) {
|
||||
compatibleWith("com.citynav.jakdojade.pl.android")
|
||||
|
||||
execute {
|
||||
// Spoof isPremium() to always return true.
|
||||
// We can do this beacuse Jakdojade Premium's only feature is ad removal.
|
||||
isPremiumFingerprint.method.returnEarly(true)
|
||||
|
||||
// Spoof Premium renewal date in the UI.
|
||||
// We need to do the spoofing in order to avoid app crashes when opening profile menu.
|
||||
getPremiumRenewalDateFingerprint.method.returnEarly("")
|
||||
// Spoof Premium type.
|
||||
getGoogleProductFingerprint.method.replaceInstructions(
|
||||
0,
|
||||
"""
|
||||
sget-object v0, Lcom/citynav/jakdojade/pl/android/billing/output/GoogleProduct;->PREMIUM_YEARLY_V4:Lcom/citynav/jakdojade/pl/android/billing/output/GoogleProduct;
|
||||
return-object v0
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package app.revanced.patches.jakdojade.ads
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val isPremiumFingerprint = fingerprint {
|
||||
returns("Z")
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
parameters()
|
||||
opcodes(
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
)
|
||||
}
|
||||
|
||||
internal val getPremiumRenewalDateFingerprint = fingerprint {
|
||||
returns("Ljava/lang/String;")
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
parameters()
|
||||
opcodes(
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
)
|
||||
}
|
||||
|
||||
internal val getGoogleProductFingerprint = fingerprint {
|
||||
returns("Lcom/citynav/jakdojade/pl/android/billing/output/GoogleProduct;")
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
parameters("Lcom/citynav/jakdojade/pl/android/profiles/ui/profile/userprofile/model/PremiumType;")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue