feat: Restore previous release

This reverts commit 3938f2f1b3.
This commit is contained in:
oSumAtrIX
2023-08-27 21:41:04 +02:00
parent 392021124c
commit 2adfc37a66
496 changed files with 2425 additions and 2551 deletions
@@ -2,8 +2,8 @@ package app.revanced.patches.photomath.detection.signature.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
object CheckSignatureFingerprint : MethodFingerprint(
returnType = "V",
@@ -1,15 +1,13 @@
package app.revanced.patches.photomath.detection.signature.patch
import app.revanced.extensions.toErrorResult
import app.revanced.extensions.exception
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.photomath.detection.signature.fingerprints.CheckSignatureFingerprint
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@Description("Disables detection of incorrect signature.")
class SignatureDetectionPatch : BytecodePatch(
@@ -17,15 +15,13 @@ class SignatureDetectionPatch : BytecodePatch(
CheckSignatureFingerprint
)
) {
override fun execute(context: BytecodeContext): PatchResult {
override fun execute(context: BytecodeContext) {
CheckSignatureFingerprint.result?.apply {
val signatureCheckInstruction = mutableMethod.getInstruction(scanResult.patternScanResult!!.endIndex)
val checkRegister = (signatureCheckInstruction as OneRegisterInstruction).registerA
mutableMethod.replaceInstruction(signatureCheckInstruction.location.index, "const/4 v$checkRegister, 0x1")
} ?: throw CheckSignatureFingerprint.toErrorResult()
return PatchResultSuccess()
} ?: throw CheckSignatureFingerprint.exception
}
}
@@ -2,7 +2,7 @@ package app.revanced.patches.photomath.misc.unlockplus.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.AccessFlags
object IsPlusUnlockedFingerprint : MethodFingerprint(
returnType = "Z",
@@ -1,13 +1,11 @@
package app.revanced.patches.photomath.misc.unlockplus.patch
import app.revanced.extensions.toErrorResult
import app.revanced.extensions.exception
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.photomath.detection.signature.patch.SignatureDetectionPatch
@@ -24,7 +22,7 @@ class UnlockPlusPatch : BytecodePatch(
IsPlusUnlockedFingerprint
)
) {
override fun execute(context: BytecodeContext): PatchResult {
override fun execute(context: BytecodeContext) {
IsPlusUnlockedFingerprint.result?.mutableMethod?.apply {
addInstructions(
0,
@@ -33,9 +31,7 @@ class UnlockPlusPatch : BytecodePatch(
return v0
"""
)
} ?: return IsPlusUnlockedFingerprint.toErrorResult()
return PatchResultSuccess()
} ?: throw IsPlusUnlockedFingerprint.exception
}
}