feat(VSCO - Unlock pro): Constrain to last working version

This commit is contained in:
oSumAtrIX 2024-02-25 18:38:11 +01:00
parent ebae8cffb9
commit 6dd4a7c29e
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4

View file

@ -1,20 +1,20 @@
package app.revanced.patches.vsco.misc.pro package app.revanced.patches.vsco.misc.pro
import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.vsco.misc.pro.fingerprints.RevCatSubscriptionFingerprint import app.revanced.patches.vsco.misc.pro.fingerprints.RevCatSubscriptionFingerprint
import app.revanced.util.exception
@Patch( @Patch(
name = "Unlock pro", name = "Unlock pro",
description = "Unlocks pro features.", description = "Unlocks pro features.",
compatiblePackages = [CompatiblePackage("com.vsco.cam")] compatiblePackages = [CompatiblePackage("com.vsco.cam", ["345"])],
) )
object UnlockProPatch : BytecodePatch( object UnlockProPatch : BytecodePatch(
setOf(RevCatSubscriptionFingerprint) setOf(RevCatSubscriptionFingerprint),
) { ) {
override fun execute(context: BytecodeContext) { override fun execute(context: BytecodeContext) {
RevCatSubscriptionFingerprint.result?.mutableMethod?.apply { RevCatSubscriptionFingerprint.result?.mutableMethod?.apply {
@ -23,7 +23,7 @@ object UnlockProPatch : BytecodePatch(
0, 0,
""" """
const p1, 0x1 const p1, 0x1
""" """,
) )
} ?: throw RevCatSubscriptionFingerprint.exception } ?: throw RevCatSubscriptionFingerprint.exception
} }