Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
Tymek
4a71df5214
Fix(Jakdojade) Renamed ad to ads and used returnEarly 2026-03-19 01:49:54 +01:00
Tymek
36d1e83f2a
Chore(Jakdojade) Removed unnecessary commented code 2026-01-13 16:40:02 +01:00
Tymek
7cf5102fb0
Fix(Jakdojade) Code style fixes 2026-01-13 16:38:10 +01:00
Tymek
0e020c5760
feat(Jakdojade) Add Remove ads patch 2026-01-13 03:42:49 +01:00
5 changed files with 154 additions and 0 deletions

View file

@ -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;
}

View file

@ -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
"""
)
}
}

View file

@ -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;")
}

View file

@ -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
"""
)
}
}

View file

@ -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;")
}