Implementing simple bypass for client-side license checking

This commit is contained in:
hoodles 2025-05-08 13:10:54 -07:00
parent 35637c8bc7
commit ef14f3ab9c
3 changed files with 42 additions and 0 deletions

View file

@ -144,6 +144,10 @@ public final class app/revanced/patches/angulus/ads/RemoveAdsPatchKt {
public static final fun getAngulusPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
public final class app/revanced/patches/angulus/misc/license/DisableLicenseCheckPatchKt {
public static final fun getDisableLicenseCheckPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
public final class app/revanced/patches/backdrops/misc/pro/ProUnlockPatchKt {
public static final fun getProUnlockPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}

View file

@ -0,0 +1,21 @@
package app.revanced.patches.angulus.misc.license
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.util.returnEarly
@Suppress("unused")
val disableLicenseCheckPatch = bytecodePatch(
name = "Disable license check",
description = "Disable client-side license check to prevent app from closing on startup."
) {
compatibleWith("com.drinkplusplus.angulus"("5.0.20"))
execute {
// Set first parameter (responseCode) to 0.
processLicenseResponseFingerprint.method.addInstruction(0, "const/4 p1, 0x0")
// Short-circuit the license response validation.
validateLicenseResponseFingerprint.method.returnEarly();
}
}

View file

@ -0,0 +1,17 @@
package app.revanced.patches.angulus.misc.license
import app.revanced.patcher.fingerprint
internal val processLicenseResponseFingerprint = fingerprint {
custom { method, classDef ->
classDef.type == "Lcom/pairip/licensecheck/LicenseClient;" &&
method.name == "processResponse"
}
}
internal val validateLicenseResponseFingerprint = fingerprint {
custom { method, classDef ->
classDef.type == "Lcom/pairip/licensecheck/ResponseValidator;" &&
method.name == "validateResponse"
}
}