fix(Disable Pairip license check): Change patch to default off

This commit is contained in:
LisoUseInAIKyrios 2025-05-22 12:14:33 +02:00
parent b143610ed6
commit 74b6a94577
3 changed files with 10 additions and 9 deletions

View File

@ -17,7 +17,8 @@ val removeShareTargetsPatch = resourcePatch(
try {
document("res/xml/shortcuts.xml")
} catch (_: FileNotFoundException) {
return@execute Logger.getLogger(this::class.java.name).warning("The app has no shortcuts")
return@execute Logger.getLogger(this::class.java.name).warning(
"The app has no shortcuts. No changes applied.")
}.use { document ->
val rootNode = document.getNode("shortcuts") as? Element ?: return@use

View File

@ -25,8 +25,7 @@ val removeMetaAIPatch = bytecodePatch(
addInstructions(
returnIndex,
"""
invoke-static {p1, p2, v$returnRegister}, $EXTENSION_CLASS_DESCRIPTOR->overrideConfigBool(JZ)Z
invoke-static { p1, p2, v$returnRegister }, $EXTENSION_CLASS_DESCRIPTOR->overrideConfigBool(JZ)Z
move-result v$returnRegister
"""
)

View File

@ -7,20 +7,21 @@ import java.util.logging.Logger
@Suppress("unused")
val disableLicenseCheckPatch = bytecodePatch(
name = "Disable pairip license check",
description = "Disable Play Integrity Protect (pairip) client-side license check."
name = "Disable Pairip license check",
description = "Disable Play Integrity Protect (Pairip) client-side license check.",
use = false
) {
execute {
if (processLicenseResponseFingerprint.methodOrNull == null || validateLicenseResponseFingerprint.methodOrNull == null)
if (processLicenseResponseFingerprint.methodOrNull == null || validateLicenseResponseFingerprint.methodOrNull == null) {
return@execute Logger.getLogger(this::class.java.name)
.warning("Could not find pairip licensing check. No changes applied.")
.warning("Could not find Pairip licensing check. No changes applied.")
}
// Set first parameter (responseCode) to 0 (success status).
processLicenseResponseFingerprint.method.addInstruction(0, "const/4 p1, 0x0")
// Short-circuit the license response validation.
validateLicenseResponseFingerprint.method.returnEarly();
validateLicenseResponseFingerprint.method.returnEarly()
}
}