mirror of
https://github.com/revanced/revanced-patches
synced 2024-06-30 00:36:16 +02:00
31 lines
1.0 KiB
Kotlin
31 lines
1.0 KiB
Kotlin
package app.revanced.patches.vsco.misc.pro
|
|
|
|
import app.revanced.util.exception
|
|
import app.revanced.patcher.data.BytecodeContext
|
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
import app.revanced.patcher.patch.BytecodePatch
|
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
import app.revanced.patcher.patch.annotation.Patch
|
|
import app.revanced.patches.vsco.misc.pro.fingerprints.RevCatSubscriptionFingerprint
|
|
|
|
@Patch(
|
|
name = "Unlock pro",
|
|
description = "Unlocks pro features.",
|
|
compatiblePackages = [CompatiblePackage("com.vsco.cam")]
|
|
)
|
|
object UnlockProPatch : BytecodePatch(
|
|
setOf(RevCatSubscriptionFingerprint)
|
|
) {
|
|
override fun execute(context: BytecodeContext) {
|
|
RevCatSubscriptionFingerprint.result?.mutableMethod?.apply {
|
|
// Set isSubscribed to true.
|
|
addInstruction(
|
|
0,
|
|
"""
|
|
const p1, 0x1
|
|
"""
|
|
)
|
|
} ?: throw RevCatSubscriptionFingerprint.exception
|
|
}
|
|
}
|