feat: Publish as a library (#3356)

This commit is contained in:
oSumAtrIX 2023-12-02 22:35:13 +01:00 committed by GitHub
parent 1f1cae12e4
commit 4b878eeeda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
500 changed files with 2369 additions and 719 deletions

1639
api/revanced-patches.api Normal file

File diff suppressed because it is too large Load diff

View file

@ -2,6 +2,7 @@ import org.gradle.kotlin.dsl.support.listFilesOrdered
plugins { plugins {
kotlin("jvm") version "1.9.10" kotlin("jvm") version "1.9.10"
alias(libs.plugins.binary.compatibility.validator)
`maven-publish` `maven-publish`
} }

View file

@ -3,9 +3,13 @@ revanced-patcher = "19.1.0"
smali = "3.0.3" smali = "3.0.3"
guava = "32.1.2-jre" guava = "32.1.2-jre"
gson = "2.10.1" gson = "2.10.1"
binary-compatibility-validator = "0.13.2"
[libraries] [libraries]
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" } revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }
smali = { module = "com.android.tools.smali:smali", version.ref = "smali" } smali = { module = "com.android.tools.smali:smali", version.ref = "smali" }
guava = { module = "com.google.guava:guava", version.ref = "guava" } guava = { module = "com.google.guava:guava", version.ref = "guava" }
gson = { module = "com.google.code.gson:gson", version.ref = "gson" } gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
[plugins]
binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibility-validator" }

View file

@ -2,10 +2,10 @@ package app.revanced.patches.all.connectivity.wifi.spoof
import app.revanced.patcher.patch.annotation.Patch import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.util.patch.AbstractTransformInstructionsPatch import app.revanced.patches.all.misc.transformation.AbstractTransformInstructionsPatch
import app.revanced.util.patch.IMethodCall import app.revanced.patches.all.misc.transformation.IMethodCall
import app.revanced.util.patch.Instruction35cInfo import app.revanced.patches.all.misc.transformation.Instruction35cInfo
import app.revanced.util.patch.filterMapInstruction35c import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
import com.android.tools.smali.dexlib2.iface.ClassDef import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.iface.Method import com.android.tools.smali.dexlib2.iface.Method
import com.android.tools.smali.dexlib2.iface.instruction.Instruction import com.android.tools.smali.dexlib2.iface.instruction.Instruction
@ -40,7 +40,7 @@ object SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>()
// Information about method calls we want to replace // Information about method calls we want to replace
enum class MethodCall( private enum class MethodCall(
override val definedClassName: String, override val definedClassName: String,
override val methodName: String, override val methodName: String,
override val methodParams: Array<String>, override val methodParams: Array<String>,

View file

@ -1,13 +1,14 @@
package app.revanced.util.patch package app.revanced.patches.all.misc.transformation
import app.revanced.extensions.findMutableMethodOf
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.util.findMutableMethodOf
import com.android.tools.smali.dexlib2.iface.ClassDef import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.iface.Method import com.android.tools.smali.dexlib2.iface.Method
import com.android.tools.smali.dexlib2.iface.instruction.Instruction import com.android.tools.smali.dexlib2.iface.instruction.Instruction
@Suppress("MemberVisibilityCanBePrivate")
abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() { abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
abstract fun filterMap( abstract fun filterMap(
@ -20,7 +21,7 @@ abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
abstract fun transform(mutableMethod: MutableMethod, entry: T) abstract fun transform(mutableMethod: MutableMethod, entry: T)
// Returns the patch indices as a Sequence, which will execute lazily. // Returns the patch indices as a Sequence, which will execute lazily.
private fun findPatchIndices(classDef: ClassDef, method: Method): Sequence<T>? { fun findPatchIndices(classDef: ClassDef, method: Method): Sequence<T>? {
return method.implementation?.instructions?.asSequence()?.withIndex()?.mapNotNull { (index, instruction) -> return method.implementation?.instructions?.asSequence()?.withIndex()?.mapNotNull { (index, instruction) ->
filterMap(classDef, method, instruction, index) filterMap(classDef, method, instruction, index)
} }
@ -35,11 +36,7 @@ abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
// Since the Sequence executes lazily, // Since the Sequence executes lazily,
// using any() results in only calling // using any() results in only calling
// filterMap until the first index has been found. // filterMap until the first index has been found.
val patchIndices = findPatchIndices(classDef, method) if (findPatchIndices(classDef, method)?.any() == true) add(method)
if (patchIndices?.any() == true) {
add(method)
}
} }
} }
@ -55,9 +52,7 @@ abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
val patchIndices = findPatchIndices(mutableClass, mutableMethod)?.toCollection(ArrayDeque()) val patchIndices = findPatchIndices(mutableClass, mutableMethod)?.toCollection(ArrayDeque())
?: return@methods ?: return@methods
while (!patchIndices.isEmpty()) { while (!patchIndices.isEmpty()) transform(mutableMethod, patchIndices.removeLast())
transform(mutableMethod, patchIndices.removeLast())
}
} }
} }
} }

View file

@ -1,4 +1,4 @@
package app.revanced.util.patch package app.revanced.patches.all.misc.transformation
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod

View file

@ -2,10 +2,10 @@ package app.revanced.patches.all.screencapture.removerestriction
import app.revanced.patcher.patch.annotation.Patch import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.util.patch.AbstractTransformInstructionsPatch import app.revanced.patches.all.misc.transformation.AbstractTransformInstructionsPatch
import app.revanced.util.patch.IMethodCall import app.revanced.patches.all.misc.transformation.IMethodCall
import app.revanced.util.patch.Instruction35cInfo import app.revanced.patches.all.misc.transformation.Instruction35cInfo
import app.revanced.util.patch.filterMapInstruction35c import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
import com.android.tools.smali.dexlib2.iface.ClassDef import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.iface.Method import com.android.tools.smali.dexlib2.iface.Method
import com.android.tools.smali.dexlib2.iface.instruction.Instruction import com.android.tools.smali.dexlib2.iface.instruction.Instruction

View file

@ -4,10 +4,10 @@ import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.annotation.Patch import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.util.patch.AbstractTransformInstructionsPatch import app.revanced.patches.all.misc.transformation.AbstractTransformInstructionsPatch
import app.revanced.util.patch.IMethodCall import app.revanced.patches.all.misc.transformation.IMethodCall
import app.revanced.util.patch.Instruction35cInfo import app.revanced.patches.all.misc.transformation.Instruction35cInfo
import app.revanced.util.patch.filterMapInstruction35c import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.ClassDef import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.iface.Method import com.android.tools.smali.dexlib2.iface.Method

View file

@ -6,7 +6,7 @@ import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patcher.patch.options.PatchOption import app.revanced.patcher.patch.options.PatchOption
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.util.patch.AbstractTransformInstructionsPatch import app.revanced.patches.all.misc.transformation.AbstractTransformInstructionsPatch
import com.android.tools.smali.dexlib2.iface.ClassDef import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.iface.Method import com.android.tools.smali.dexlib2.iface.Method
import com.android.tools.smali.dexlib2.iface.instruction.Instruction import com.android.tools.smali.dexlib2.iface.instruction.Instruction

View file

@ -1,6 +1,6 @@
package app.revanced.patches.backdrops.misc.pro package app.revanced.patches.backdrops.misc.pro
import app.revanced.extensions.exception 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.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction

View file

@ -3,7 +3,7 @@ package app.revanced.patches.backdrops.misc.pro.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object ProUnlockFingerprint : MethodFingerprint( internal object ProUnlockFingerprint : MethodFingerprint(
opcodes = listOf( opcodes = listOf(
Opcode.INVOKE_VIRTUAL, Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT, Opcode.MOVE_RESULT_OBJECT,

View file

@ -1,6 +1,6 @@
package app.revanced.patches.candylinkvpn package app.revanced.patches.candylinkvpn
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -2,7 +2,7 @@ package app.revanced.patches.candylinkvpn.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
object IsPremiumPurchasedFingerprint : MethodFingerprint( internal object IsPremiumPurchasedFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ -> customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("PreferenceProvider;") && methodDef.definingClass.endsWith("PreferenceProvider;") &&
methodDef.name == "isPremiumPurchased" methodDef.name == "isPremiumPurchased"

View file

@ -1,6 +1,6 @@
package app.revanced.patches.cieid.restrictions.root package app.revanced.patches.cieid.restrictions.root
import app.revanced.extensions.exception 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

View file

@ -2,7 +2,7 @@ package app.revanced.patches.cieid.restrictions.root.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
object CheckRootFingerprint : MethodFingerprint( internal object CheckRootFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ -> customFingerprint = { methodDef, _ ->
methodDef.definingClass == "Lit/ipzs/cieid/BaseActivity;" && methodDef.name == "onResume" methodDef.definingClass == "Lit/ipzs/cieid/BaseActivity;" && methodDef.name == "onResume"
} }

View file

@ -1,6 +1,6 @@
package app.revanced.patches.facebook.ads.story package app.revanced.patches.facebook.ads.story
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -1,3 +1,3 @@
package app.revanced.patches.facebook.ads.story.fingerprints package app.revanced.patches.facebook.ads.story.fingerprints
object AdsInsertionFingerprint : FieldMethodFingerprint(fieldValue = "AdBucketDataSourceUtil\$attemptAdsInsertion\$1") internal object AdsInsertionFingerprint : FieldMethodFingerprint(fieldValue = "AdBucketDataSourceUtil\$attemptAdsInsertion\$1")

View file

@ -1,3 +1,3 @@
package app.revanced.patches.facebook.ads.story.fingerprints package app.revanced.patches.facebook.ads.story.fingerprints
object FetchMoreAdsFingerprint : FieldMethodFingerprint(fieldValue = "AdBucketDataSourceUtil\$attemptFetchMoreAds\$1") internal object FetchMoreAdsFingerprint : FieldMethodFingerprint(fieldValue = "AdBucketDataSourceUtil\$attemptFetchMoreAds\$1")

View file

@ -3,7 +3,7 @@ package app.revanced.patches.facebook.ads.story.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.iface.value.StringEncodedValue import com.android.tools.smali.dexlib2.iface.value.StringEncodedValue
abstract class FieldMethodFingerprint(fieldValue: String) : MethodFingerprint( internal abstract class FieldMethodFingerprint(fieldValue: String) : MethodFingerprint(
returnType = "V", returnType = "V",
parameters = listOf(), parameters = listOf(),
customFingerprint = { methodDef, classDef -> customFingerprint = { methodDef, classDef ->

View file

@ -1,6 +1,6 @@
package app.revanced.patches.finanzonline.detection.bootloader package app.revanced.patches.finanzonline.detection.bootloader
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -5,7 +5,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#isBootStateOk (3.0.1) // Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#isBootStateOk (3.0.1)
object BootStateFingerprint : MethodFingerprint( internal object BootStateFingerprint : MethodFingerprint(
"Z", "Z",
accessFlags = AccessFlags.PUBLIC.value, accessFlags = AccessFlags.PUBLIC.value,
opcodes = listOf( opcodes = listOf(

View file

@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#createKey (3.0.1) // Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#createKey (3.0.1)
object CreateKeyFingerprint : MethodFingerprint( internal object CreateKeyFingerprint : MethodFingerprint(
"Z", "Z",
accessFlags = AccessFlags.PUBLIC.value, accessFlags = AccessFlags.PUBLIC.value,
strings = listOf("attestation", "SHA-256", "random", "EC", "AndroidKeyStore") strings = listOf("attestation", "SHA-256", "random", "EC", "AndroidKeyStore")

View file

@ -1,6 +1,6 @@
package app.revanced.patches.finanzonline.detection.root package app.revanced.patches.finanzonline.detection.root
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.RootDetection#isRooted (3.0.1) // Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.RootDetection#isRooted (3.0.1)
object RootDetectionFingerprint : MethodFingerprint( internal object RootDetectionFingerprint : MethodFingerprint(
"L", "L",
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC, accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
parameters = listOf("L"), parameters = listOf("L"),

View file

@ -1,6 +1,6 @@
package app.revanced.patches.googlerecorder.restrictions package app.revanced.patches.googlerecorder.restrictions
import app.revanced.extensions.exception 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.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction

View file

@ -2,7 +2,7 @@ package app.revanced.patches.googlerecorder.restrictions.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
object OnApplicationCreateFingerprint : MethodFingerprint( internal object OnApplicationCreateFingerprint : MethodFingerprint(
strings = listOf("com.google.android.feature.PIXEL_2017_EXPERIENCE"), strings = listOf("com.google.android.feature.PIXEL_2017_EXPERIENCE"),
customFingerprint = custom@{ methodDef, classDef -> customFingerprint = custom@{ methodDef, classDef ->
if (methodDef.name != "onCreate") return@custom false if (methodDef.name != "onCreate") return@custom false

View file

@ -1,6 +1,6 @@
package app.revanced.patches.hexeditor.ad package app.revanced.patches.hexeditor.ad
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -2,7 +2,7 @@ package app.revanced.patches.hexeditor.ad.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
object PrimaryAdsFingerprint : MethodFingerprint( internal object PrimaryAdsFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ -> customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled" methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
} }

View file

@ -2,7 +2,7 @@ package app.revanced.patches.iconpackstudio.misc.pro.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
object CheckProFingerprint : MethodFingerprint( internal object CheckProFingerprint : MethodFingerprint(
"Z", "Z",
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("IPSPurchaseRepository;")} customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("IPSPurchaseRepository;")}
) )

View file

@ -7,7 +7,7 @@ import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.idaustria.detection.root.fingerprints.AttestationSupportedCheckFingerprint import app.revanced.patches.idaustria.detection.root.fingerprints.AttestationSupportedCheckFingerprint
import app.revanced.patches.idaustria.detection.root.fingerprints.BootloaderCheckFingerprint import app.revanced.patches.idaustria.detection.root.fingerprints.BootloaderCheckFingerprint
import app.revanced.patches.idaustria.detection.root.fingerprints.RootCheckFingerprint import app.revanced.patches.idaustria.detection.root.fingerprints.RootCheckFingerprint
import app.revanced.util.Utils.returnEarly import app.revanced.util.returnEarly
@Patch( @Patch(
name = "Remove root detection", name = "Remove root detection",

View file

@ -3,7 +3,7 @@ package app.revanced.patches.idaustria.detection.root.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
object AttestationSupportedCheckFingerprint : MethodFingerprint( internal object AttestationSupportedCheckFingerprint : MethodFingerprint(
"V", "V",
accessFlags = AccessFlags.PUBLIC.value, accessFlags = AccessFlags.PUBLIC.value,
customFingerprint = { methodDef, _ -> customFingerprint = { methodDef, _ ->

View file

@ -3,7 +3,7 @@ package app.revanced.patches.idaustria.detection.root.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
object BootloaderCheckFingerprint : MethodFingerprint( internal object BootloaderCheckFingerprint : MethodFingerprint(
"Z", "Z",
accessFlags = AccessFlags.PUBLIC.value, accessFlags = AccessFlags.PUBLIC.value,
customFingerprint = { methodDef, _ -> customFingerprint = { methodDef, _ ->

View file

@ -3,7 +3,7 @@ package app.revanced.patches.idaustria.detection.root.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
object RootCheckFingerprint : MethodFingerprint( internal object RootCheckFingerprint : MethodFingerprint(
"V", "V",
accessFlags = AccessFlags.PUBLIC.value, accessFlags = AccessFlags.PUBLIC.value,
customFingerprint = { methodDef, _ -> customFingerprint = { methodDef, _ ->

View file

@ -3,7 +3,7 @@ package app.revanced.patches.idaustria.detection.signature.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
object SpoofSignatureFingerprint : MethodFingerprint( internal object SpoofSignatureFingerprint : MethodFingerprint(
"L", "L",
parameters = listOf("L"), parameters = listOf("L"),
accessFlags = AccessFlags.PRIVATE.value, accessFlags = AccessFlags.PRIVATE.value,

View file

@ -1,6 +1,6 @@
package app.revanced.patches.inshorts.ad package app.revanced.patches.inshorts.ad
import app.revanced.extensions.exception 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

View file

@ -2,7 +2,7 @@ package app.revanced.patches.inshorts.ad.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
object InshortsAdsFingerprint : MethodFingerprint( internal object InshortsAdsFingerprint : MethodFingerprint(
"V", "V",
strings = listOf("GoogleAdLoader","exception in requestAd"), strings = listOf("GoogleAdLoader","exception in requestAd"),
) )

View file

@ -1,6 +1,6 @@
package app.revanced.patches.instagram.patches.ads.timeline package app.revanced.patches.instagram.patches.ads.timeline
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction

View file

@ -2,6 +2,6 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
object MediaFingerprint : MethodFingerprint( internal object MediaFingerprint : MethodFingerprint(
strings = listOf("force_overlay", "Media#updateFields", "live_reels_metadata") strings = listOf("force_overlay", "Media#updateFields", "live_reels_metadata")
) )

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object ShowAdFingerprint : MethodFingerprint( internal object ShowAdFingerprint : MethodFingerprint(
"Z", "Z",
AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL, AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
listOf("L", "L", "Z", "Z"), listOf("L", "L", "Z", "Z"),

View file

@ -2,7 +2,7 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object GenericMediaAdFingerprint : MediaAdFingerprint( internal object GenericMediaAdFingerprint : MediaAdFingerprint(
opcodes = listOf( opcodes = listOf(
Opcode.INVOKE_INTERFACE, Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT, Opcode.MOVE_RESULT_OBJECT,

View file

@ -7,7 +7,7 @@ import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.ClassDef import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.iface.Method import com.android.tools.smali.dexlib2.iface.Method
abstract class MediaAdFingerprint( internal abstract class MediaAdFingerprint(
returnType: String? = "Z", returnType: String? = "Z",
accessFlags: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL, accessFlags: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters: Iterable<String>? = listOf(), parameters: Iterable<String>? = listOf(),

View file

@ -4,7 +4,7 @@ import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
import com.android.tools.smali.dexlib2.iface.reference.MethodReference import com.android.tools.smali.dexlib2.iface.reference.MethodReference
object PaidPartnershipAdFingerprint : MediaAdFingerprint( internal object PaidPartnershipAdFingerprint : MediaAdFingerprint(
"V", "V",
null, null,
listOf("L", "L"), listOf("L", "L"),

View file

@ -2,7 +2,7 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object ShoppingAdFingerprint : MediaAdFingerprint( internal object ShoppingAdFingerprint : MediaAdFingerprint(
opcodes = listOf( opcodes = listOf(
Opcode.IF_EQZ, Opcode.IF_EQZ,
Opcode.IGET_OBJECT, Opcode.IGET_OBJECT,

View file

@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
object IrplusAdsFingerprint : MethodFingerprint( internal object IrplusAdsFingerprint : MethodFingerprint(
"V", "V",
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
listOf("L", "Z"), listOf("L", "Z"),

View file

@ -1,6 +1,6 @@
package app.revanced.patches.lightroom.misc.login package app.revanced.patches.lightroom.misc.login
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object IsLoggedInFingerprint : MethodFingerprint( internal object IsLoggedInFingerprint : MethodFingerprint(
returnType = "Z", returnType = "Z",
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL, accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
opcodes = listOf( opcodes = listOf(

View file

@ -1,6 +1,6 @@
package app.revanced.patches.lightroom.misc.premium package app.revanced.patches.lightroom.misc.premium
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object HasPurchasedFingerprint : MethodFingerprint( internal object HasPurchasedFingerprint : MethodFingerprint(
returnType = "Z", returnType = "Z",
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL, accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
strings = listOf("isPurchaseDoneRecently = true, access platform profile present? = "), strings = listOf("isPurchaseDoneRecently = true, access platform profile present? = "),

View file

@ -1,6 +1,6 @@
package app.revanced.patches.memegenerator.detection.license package app.revanced.patches.memegenerator.detection.license
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object LicenseValidationFingerprint : MethodFingerprint( internal object LicenseValidationFingerprint : MethodFingerprint(
returnType = "Z", returnType = "Z",
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC, accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
parameters = listOf("Landroid/content/Context;"), parameters = listOf("Landroid/content/Context;"),

View file

@ -1,6 +1,6 @@
package app.revanced.patches.memegenerator.detection.signature package app.revanced.patches.memegenerator.detection.signature
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -7,7 +7,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
@FuzzyPatternScanMethod(2) @FuzzyPatternScanMethod(2)
object VerifySignatureFingerprint : MethodFingerprint( internal object VerifySignatureFingerprint : MethodFingerprint(
returnType = "Z", returnType = "Z",
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC, accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
parameters = listOf("Landroid/app/Activity;"), parameters = listOf("Landroid/app/Activity;"),

View file

@ -1,6 +1,6 @@
package app.revanced.patches.memegenerator.misc.pro package app.revanced.patches.memegenerator.misc.pro
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object IsFreeVersionFingerprint : MethodFingerprint( internal object IsFreeVersionFingerprint : MethodFingerprint(
returnType = "Ljava/lang/Boolean;", returnType = "Ljava/lang/Boolean;",
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC, accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
strings = listOf("free"), strings = listOf("free"),

View file

@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
object LoadInboxAdsFingerprint : MethodFingerprint( internal object LoadInboxAdsFingerprint : MethodFingerprint(
returnType = "V", returnType = "V",
strings = listOf( strings = listOf(
"ads_load_begin", "ads_load_begin",

View file

@ -1,6 +1,6 @@
package app.revanced.patches.messenger.ads.inbox.patch package app.revanced.patches.messenger.ads.inbox.patch
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -3,7 +3,7 @@ package app.revanced.patches.messenger.inputfield.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.dexbacked.value.DexBackedStringEncodedValue import com.android.tools.smali.dexlib2.dexbacked.value.DexBackedStringEncodedValue
object SendTypingIndicatorFingerprint : MethodFingerprint( internal object SendTypingIndicatorFingerprint : MethodFingerprint(
returnType = "V", returnType = "V",
parameters = listOf(), parameters = listOf(),
customFingerprint = { methodDef, classDef -> customFingerprint = { methodDef, classDef ->

View file

@ -3,7 +3,7 @@ package app.revanced.patches.messenger.inputfield.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object SwitchMessangeInputEmojiButtonFingerprint : MethodFingerprint( internal object SwitchMessangeInputEmojiButtonFingerprint : MethodFingerprint(
returnType = "V", returnType = "V",
parameters = listOf("L", "Z"), parameters = listOf("L", "Z"),
strings = listOf("afterTextChanged", "expression_search"), strings = listOf("afterTextChanged", "expression_search"),

View file

@ -1,6 +1,6 @@
package app.revanced.patches.messenger.inputfield.patch package app.revanced.patches.messenger.inputfield.patch
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction

View file

@ -1,6 +1,6 @@
package app.revanced.patches.messenger.inputfield.patch package app.revanced.patches.messenger.inputfield.patch
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object UnlockProFingerprint : MethodFingerprint( internal object UnlockProFingerprint : MethodFingerprint(
"Z", "Z",
AccessFlags.STATIC or AccessFlags.SYNTHETIC, AccessFlags.STATIC or AccessFlags.SYNTHETIC,
parameters = listOf("L"), parameters = listOf("L"),

View file

@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value. @FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
object ShowMusicVideoAdsConstructorFingerprint : MethodFingerprint( internal object ShowMusicVideoAdsConstructorFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L"), listOf( "V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L"), listOf(
Opcode.INVOKE_DIRECT, Opcode.INVOKE_DIRECT,
Opcode.NEW_INSTANCE, Opcode.NEW_INSTANCE,

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object ShowMusicVideoAdsFingerprint : MethodFingerprint( internal object ShowMusicVideoAdsFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), listOf( "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), listOf(
Opcode.IPUT_BOOLEAN, Opcode.IPUT_BOOLEAN,
Opcode.INVOKE_VIRTUAL, Opcode.INVOKE_VIRTUAL,

View file

@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value. @FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
object AllCodecsReferenceFingerprint : MethodFingerprint( internal object AllCodecsReferenceFingerprint : MethodFingerprint(
"J", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L"), listOf( "J", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L"), listOf(
Opcode.INVOKE_STATIC, Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT, Opcode.MOVE_RESULT_OBJECT,

View file

@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value. @FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
object CodecsLockFingerprint : MethodFingerprint( internal object CodecsLockFingerprint : MethodFingerprint(
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, opcodes = listOf( "L", AccessFlags.PUBLIC or AccessFlags.STATIC, opcodes = listOf(
Opcode.INVOKE_DIRECT, Opcode.INVOKE_DIRECT,
Opcode.INVOKE_VIRTUAL, Opcode.INVOKE_VIRTUAL,

View file

@ -1,6 +1,6 @@
package app.revanced.patches.music.audio.exclusiveaudio package app.revanced.patches.music.audio.exclusiveaudio
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object AllowExclusiveAudioPlaybackFingerprint: MethodFingerprint( internal object AllowExclusiveAudioPlaybackFingerprint: MethodFingerprint(
"Z", "Z",
AccessFlags.PUBLIC or AccessFlags.FINAL, AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf(), listOf(),

View file

@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value. @FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
object ExclusiveAudioFingerprint : MethodFingerprint( internal object ExclusiveAudioFingerprint : MethodFingerprint(
"V", "V",
AccessFlags.PUBLIC or AccessFlags.FINAL, AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf("L", "Z"), listOf("L", "Z"),

View file

@ -1,6 +1,6 @@
package app.revanced.patches.music.interaction.permanentrepeat package app.revanced.patches.music.interaction.permanentrepeat
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object RepeatTrackFingerprint : MethodFingerprint( internal object RepeatTrackFingerprint : MethodFingerprint(
"V", "V",
AccessFlags.PUBLIC or AccessFlags.FINAL, AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf("L", "L"), listOf("L", "L"),

View file

@ -1,6 +1,6 @@
package app.revanced.patches.music.interaction.permanentshuffle package app.revanced.patches.music.interaction.permanentshuffle
import app.revanced.extensions.exception 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

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object DisableShuffleFingerprint : MethodFingerprint( internal object DisableShuffleFingerprint : MethodFingerprint(
"V", "V",
AccessFlags.PUBLIC or AccessFlags.FINAL, AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf(), listOf(),

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object CompactHeaderConstructorFingerprint : MethodFingerprint( internal object CompactHeaderConstructorFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L", "L"), listOf( "V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L", "L"), listOf(
Opcode.INVOKE_DIRECT, Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT, Opcode.IPUT_OBJECT,

View file

@ -1,6 +1,6 @@
package app.revanced.patches.music.layout.minimizedplayback package app.revanced.patches.music.layout.minimizedplayback
import app.revanced.extensions.exception 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

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object MinimizedPlaybackManagerFingerprint : MethodFingerprint( internal object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
"V", "V",
AccessFlags.PUBLIC or AccessFlags.FINAL, AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf("I", "L", "Z"), listOf("I", "L", "Z"),

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object HideGetPremiumFingerprint : MethodFingerprint( internal object HideGetPremiumFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf( "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
Opcode.IF_NEZ, Opcode.IF_NEZ,
Opcode.CONST_16, Opcode.CONST_16,

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object HideGetPremiumParentFingerprint : MethodFingerprint( internal object HideGetPremiumParentFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf( "V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
Opcode.IGET_BOOLEAN, Opcode.IGET_BOOLEAN,
Opcode.CONST_4, Opcode.CONST_4,

View file

@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value. @FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
object PivotBarConstructorFingerprint : MethodFingerprint( internal object PivotBarConstructorFingerprint : MethodFingerprint(
"V", "V",
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
listOf("L", "Z"), listOf("L", "Z"),

View file

@ -1,6 +1,6 @@
package app.revanced.patches.music.misc.androidauto package app.revanced.patches.music.misc.androidauto
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
object CheckCertificateFingerprint : MethodFingerprint( internal object CheckCertificateFingerprint : MethodFingerprint(
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
returnType = "Z", returnType = "Z",
parameters = listOf("Ljava/lang/String;"), parameters = listOf("Ljava/lang/String;"),

View file

@ -3,6 +3,6 @@ package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
object CastContextFetchFingerprint : MethodFingerprint( internal object CastContextFetchFingerprint : MethodFingerprint(
strings = listOf("Error fetching CastContext.") strings = listOf("Error fetching CastContext.")
) )

View file

@ -3,6 +3,6 @@ package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
object CastDynamiteModuleFingerprint : MethodFingerprint( internal object CastDynamiteModuleFingerprint : MethodFingerprint(
strings = listOf("com.google.android.gms.cast.framework.internal.CastDynamiteModuleImpl") strings = listOf("com.google.android.gms.cast.framework.internal.CastDynamiteModuleImpl")
) )

View file

@ -3,6 +3,6 @@ package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
object CastDynamiteModuleV2Fingerprint : MethodFingerprint( internal object CastDynamiteModuleV2Fingerprint : MethodFingerprint(
strings = listOf("Failed to load module via V2: ") strings = listOf("Failed to load module via V2: ")
) )

View file

@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
object GooglePlayUtilityFingerprint : MethodFingerprint( internal object GooglePlayUtilityFingerprint : MethodFingerprint(
"I", "I",
AccessFlags.PUBLIC or AccessFlags.STATIC, AccessFlags.PUBLIC or AccessFlags.STATIC,
listOf("L", "I"), listOf("L", "I"),

View file

@ -3,6 +3,6 @@ package app.revanced.patches.music.misc.microg.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
object PrimeFingerprint : MethodFingerprint( internal object PrimeFingerprint : MethodFingerprint(
strings = listOf("com.google.android.GoogleCamera", "com.android.vending") strings = listOf("com.google.android.GoogleCamera", "com.android.vending")
) )

View file

@ -7,7 +7,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value. @FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
object ServiceCheckFingerprint : MethodFingerprint( internal object ServiceCheckFingerprint : MethodFingerprint(
"V", "V",
AccessFlags.PUBLIC or AccessFlags.STATIC, AccessFlags.PUBLIC or AccessFlags.STATIC,
listOf("L", "I"), listOf("L", "I"),

View file

@ -1,6 +1,6 @@
package app.revanced.patches.music.premium.backgroundplay package app.revanced.patches.music.premium.backgroundplay
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value. @FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
object BackgroundPlaybackDisableFingerprint : MethodFingerprint( internal object BackgroundPlaybackDisableFingerprint : MethodFingerprint(
"Z", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L"), listOf( "Z", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L"), listOf(
Opcode.CONST_4, Opcode.CONST_4,
Opcode.IF_EQZ, Opcode.IF_EQZ,

View file

@ -1,6 +1,6 @@
package app.revanced.patches.myexpenses.misc.pro package app.revanced.patches.myexpenses.misc.pro
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -2,7 +2,7 @@ package app.revanced.patches.myexpenses.misc.pro.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
object IsEnabledFingerprint : MethodFingerprint( internal object IsEnabledFingerprint : MethodFingerprint(
"Z", "Z",
strings = listOf("feature", "feature.licenceStatus") strings = listOf("feature", "feature.licenceStatus")
) )

View file

@ -1,6 +1,6 @@
package app.revanced.patches.nfctoolsse.misc.pro package app.revanced.patches.nfctoolsse.misc.pro
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -3,7 +3,7 @@ package app.revanced.patches.nfctoolsse.misc.pro.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
object IsLicenseRegisteredFingerprint : MethodFingerprint( internal object IsLicenseRegisteredFingerprint : MethodFingerprint(
returnType = "Z", returnType = "Z",
accessFlags = AccessFlags.PUBLIC.value, accessFlags = AccessFlags.PUBLIC.value,
strings = listOf("kLicenseCheck") strings = listOf("kLicenseCheck")

View file

@ -1,6 +1,6 @@
package app.revanced.patches.nyx.misc.pro package app.revanced.patches.nyx.misc.pro
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -2,7 +2,7 @@ package app.revanced.patches.nyx.misc.pro.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
object CheckProFingerprint : MethodFingerprint( internal object CheckProFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ -> customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("BillingManager;") && methodDef.name == "isProVersion" methodDef.definingClass.endsWith("BillingManager;") && methodDef.name == "isProVersion"
} }

View file

@ -1,6 +1,6 @@
package app.revanced.patches.photomath.detection.deviceid package app.revanced.patches.photomath.detection.deviceid
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch

View file

@ -2,7 +2,7 @@ package app.revanced.patches.photomath.detection.deviceid.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
object GetDeviceIdFingerprint : MethodFingerprint( internal object GetDeviceIdFingerprint : MethodFingerprint(
returnType = "Ljava/lang/String;", returnType = "Ljava/lang/String;",
strings = listOf("androidId", "android_id"), strings = listOf("androidId", "android_id"),
parameters = listOf() parameters = listOf()

View file

@ -1,6 +1,6 @@
package app.revanced.patches.photomath.detection.signature package app.revanced.patches.photomath.detection.signature
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction

View file

@ -3,7 +3,7 @@ package app.revanced.patches.photomath.detection.signature.fingerprints
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
object CheckSignatureFingerprint : MethodFingerprint( internal object CheckSignatureFingerprint : MethodFingerprint(
strings = listOf( strings = listOf(
"packageInfo.signatures", "packageInfo.signatures",
"currentSignature" "currentSignature"

View file

@ -1,6 +1,6 @@
package app.revanced.patches.photomath.misc.bookpoint package app.revanced.patches.photomath.misc.bookpoint
import app.revanced.extensions.exception import app.revanced.util.exception
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
@ -8,7 +8,7 @@ import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.photomath.misc.bookpoint.fingerprints.IsBookpointEnabledFingerprint import app.revanced.patches.photomath.misc.bookpoint.fingerprints.IsBookpointEnabledFingerprint
@Patch(description = "Enables textbook access") @Patch(description = "Enables textbook access")
object EnableBookpointPatch : BytecodePatch( internal object EnableBookpointPatch : BytecodePatch(
setOf(IsBookpointEnabledFingerprint) setOf(IsBookpointEnabledFingerprint)
) { ) {
override fun execute(context: BytecodeContext) = override fun execute(context: BytecodeContext) =

View file

@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
object IsBookpointEnabledFingerprint : MethodFingerprint( internal object IsBookpointEnabledFingerprint : MethodFingerprint(
returnType = "Z", returnType = "Z",
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters = listOf(), parameters = listOf(),

Some files were not shown because too many files have changed in this diff Show more