mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-02 23:52:57 +01:00
feat: Publish as a library (#3356)
This commit is contained in:
parent
1f1cae12e4
commit
4b878eeeda
1639
api/revanced-patches.api
Normal file
1639
api/revanced-patches.api
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,6 +2,7 @@ import org.gradle.kotlin.dsl.support.listFilesOrdered
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "1.9.10"
|
||||
alias(libs.plugins.binary.compatibility.validator)
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
|
@ -3,9 +3,13 @@ revanced-patcher = "19.1.0"
|
||||
smali = "3.0.3"
|
||||
guava = "32.1.2-jre"
|
||||
gson = "2.10.1"
|
||||
binary-compatibility-validator = "0.13.2"
|
||||
|
||||
[libraries]
|
||||
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }
|
||||
smali = { module = "com.android.tools.smali:smali", version.ref = "smali" }
|
||||
guava = { module = "com.google.guava:guava", version.ref = "guava" }
|
||||
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" }
|
||||
|
@ -2,10 +2,10 @@ package app.revanced.patches.all.connectivity.wifi.spoof
|
||||
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.util.patch.AbstractTransformInstructionsPatch
|
||||
import app.revanced.util.patch.IMethodCall
|
||||
import app.revanced.util.patch.Instruction35cInfo
|
||||
import app.revanced.util.patch.filterMapInstruction35c
|
||||
import app.revanced.patches.all.misc.transformation.AbstractTransformInstructionsPatch
|
||||
import app.revanced.patches.all.misc.transformation.IMethodCall
|
||||
import app.revanced.patches.all.misc.transformation.Instruction35cInfo
|
||||
import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
|
||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||
import com.android.tools.smali.dexlib2.iface.Method
|
||||
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
|
||||
enum class MethodCall(
|
||||
private enum class MethodCall(
|
||||
override val definedClassName: String,
|
||||
override val methodName: String,
|
||||
override val methodParams: Array<String>,
|
||||
|
@ -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.patch.BytecodePatch
|
||||
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.Method
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
|
||||
|
||||
abstract fun filterMap(
|
||||
@ -20,7 +21,7 @@ abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
|
||||
abstract fun transform(mutableMethod: MutableMethod, entry: T)
|
||||
|
||||
// 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) ->
|
||||
filterMap(classDef, method, instruction, index)
|
||||
}
|
||||
@ -35,11 +36,7 @@ abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
|
||||
// Since the Sequence executes lazily,
|
||||
// using any() results in only calling
|
||||
// filterMap until the first index has been found.
|
||||
val patchIndices = findPatchIndices(classDef, method)
|
||||
|
||||
if (patchIndices?.any() == true) {
|
||||
add(method)
|
||||
}
|
||||
if (findPatchIndices(classDef, method)?.any() == true) add(method)
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,9 +52,7 @@ abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
|
||||
val patchIndices = findPatchIndices(mutableClass, mutableMethod)?.toCollection(ArrayDeque())
|
||||
?: return@methods
|
||||
|
||||
while (!patchIndices.isEmpty()) {
|
||||
transform(mutableMethod, patchIndices.removeLast())
|
||||
}
|
||||
while (!patchIndices.isEmpty()) transform(mutableMethod, patchIndices.removeLast())
|
||||
}
|
||||
}
|
||||
}
|
@ -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.util.proxy.mutableTypes.MutableMethod
|
@ -2,10 +2,10 @@ package app.revanced.patches.all.screencapture.removerestriction
|
||||
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.util.patch.AbstractTransformInstructionsPatch
|
||||
import app.revanced.util.patch.IMethodCall
|
||||
import app.revanced.util.patch.Instruction35cInfo
|
||||
import app.revanced.util.patch.filterMapInstruction35c
|
||||
import app.revanced.patches.all.misc.transformation.AbstractTransformInstructionsPatch
|
||||
import app.revanced.patches.all.misc.transformation.IMethodCall
|
||||
import app.revanced.patches.all.misc.transformation.Instruction35cInfo
|
||||
import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
|
||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||
import com.android.tools.smali.dexlib2.iface.Method
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||
|
@ -4,10 +4,10 @@ import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.util.patch.AbstractTransformInstructionsPatch
|
||||
import app.revanced.util.patch.IMethodCall
|
||||
import app.revanced.util.patch.Instruction35cInfo
|
||||
import app.revanced.util.patch.filterMapInstruction35c
|
||||
import app.revanced.patches.all.misc.transformation.AbstractTransformInstructionsPatch
|
||||
import app.revanced.patches.all.misc.transformation.IMethodCall
|
||||
import app.revanced.patches.all.misc.transformation.Instruction35cInfo
|
||||
import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||
import com.android.tools.smali.dexlib2.iface.Method
|
||||
|
@ -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.PatchExtensions.stringPatchOption
|
||||
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.Method
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.backdrops.misc.pro.fingerprints
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object ProUnlockFingerprint : MethodFingerprint(
|
||||
internal object ProUnlockFingerprint : MethodFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.candylinkvpn.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
object IsPremiumPurchasedFingerprint : MethodFingerprint(
|
||||
internal object IsPremiumPurchasedFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.definingClass.endsWith("PreferenceProvider;") &&
|
||||
methodDef.name == "isPremiumPurchased"
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.cieid.restrictions.root.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
object CheckRootFingerprint : MethodFingerprint(
|
||||
internal object CheckRootFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.definingClass == "Lit/ipzs/cieid/BaseActivity;" && methodDef.name == "onResume"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -1,3 +1,3 @@
|
||||
package app.revanced.patches.facebook.ads.story.fingerprints
|
||||
|
||||
object AdsInsertionFingerprint : FieldMethodFingerprint(fieldValue = "AdBucketDataSourceUtil\$attemptAdsInsertion\$1")
|
||||
internal object AdsInsertionFingerprint : FieldMethodFingerprint(fieldValue = "AdBucketDataSourceUtil\$attemptAdsInsertion\$1")
|
@ -1,3 +1,3 @@
|
||||
package app.revanced.patches.facebook.ads.story.fingerprints
|
||||
|
||||
object FetchMoreAdsFingerprint : FieldMethodFingerprint(fieldValue = "AdBucketDataSourceUtil\$attemptFetchMoreAds\$1")
|
||||
internal object FetchMoreAdsFingerprint : FieldMethodFingerprint(fieldValue = "AdBucketDataSourceUtil\$attemptFetchMoreAds\$1")
|
||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.facebook.ads.story.fingerprints
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.iface.value.StringEncodedValue
|
||||
|
||||
abstract class FieldMethodFingerprint(fieldValue: String) : MethodFingerprint(
|
||||
internal abstract class FieldMethodFingerprint(fieldValue: String) : MethodFingerprint(
|
||||
returnType = "V",
|
||||
parameters = listOf(),
|
||||
customFingerprint = { methodDef, classDef ->
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -5,7 +5,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#isBootStateOk (3.0.1)
|
||||
object BootStateFingerprint : MethodFingerprint(
|
||||
internal object BootStateFingerprint : MethodFingerprint(
|
||||
"Z",
|
||||
accessFlags = AccessFlags.PUBLIC.value,
|
||||
opcodes = listOf(
|
||||
|
@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#createKey (3.0.1)
|
||||
object CreateKeyFingerprint : MethodFingerprint(
|
||||
internal object CreateKeyFingerprint : MethodFingerprint(
|
||||
"Z",
|
||||
accessFlags = AccessFlags.PUBLIC.value,
|
||||
strings = listOf("attestation", "SHA-256", "random", "EC", "AndroidKeyStore")
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.RootDetection#isRooted (3.0.1)
|
||||
object RootDetectionFingerprint : MethodFingerprint(
|
||||
internal object RootDetectionFingerprint : MethodFingerprint(
|
||||
"L",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||
parameters = listOf("L"),
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.googlerecorder.restrictions.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
object OnApplicationCreateFingerprint : MethodFingerprint(
|
||||
internal object OnApplicationCreateFingerprint : MethodFingerprint(
|
||||
strings = listOf("com.google.android.feature.PIXEL_2017_EXPERIENCE"),
|
||||
customFingerprint = custom@{ methodDef, classDef ->
|
||||
if (methodDef.name != "onCreate") return@custom false
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.replaceInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.hexeditor.ad.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
object PrimaryAdsFingerprint : MethodFingerprint(
|
||||
internal object PrimaryAdsFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.iconpackstudio.misc.pro.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
object CheckProFingerprint : MethodFingerprint(
|
||||
internal object CheckProFingerprint : MethodFingerprint(
|
||||
"Z",
|
||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("IPSPurchaseRepository;")}
|
||||
)
|
||||
|
@ -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.BootloaderCheckFingerprint
|
||||
import app.revanced.patches.idaustria.detection.root.fingerprints.RootCheckFingerprint
|
||||
import app.revanced.util.Utils.returnEarly
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Patch(
|
||||
name = "Remove root detection",
|
||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.idaustria.detection.root.fingerprints
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object AttestationSupportedCheckFingerprint : MethodFingerprint(
|
||||
internal object AttestationSupportedCheckFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
accessFlags = AccessFlags.PUBLIC.value,
|
||||
customFingerprint = { methodDef, _ ->
|
||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.idaustria.detection.root.fingerprints
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object BootloaderCheckFingerprint : MethodFingerprint(
|
||||
internal object BootloaderCheckFingerprint : MethodFingerprint(
|
||||
"Z",
|
||||
accessFlags = AccessFlags.PUBLIC.value,
|
||||
customFingerprint = { methodDef, _ ->
|
||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.idaustria.detection.root.fingerprints
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object RootCheckFingerprint : MethodFingerprint(
|
||||
internal object RootCheckFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
accessFlags = AccessFlags.PUBLIC.value,
|
||||
customFingerprint = { methodDef, _ ->
|
||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.idaustria.detection.signature.fingerprints
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object SpoofSignatureFingerprint : MethodFingerprint(
|
||||
internal object SpoofSignatureFingerprint : MethodFingerprint(
|
||||
"L",
|
||||
parameters = listOf("L"),
|
||||
accessFlags = AccessFlags.PRIVATE.value,
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.inshorts.ad.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
object InshortsAdsFingerprint : MethodFingerprint(
|
||||
internal object InshortsAdsFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
strings = listOf("GoogleAdLoader","exception in requestAd"),
|
||||
)
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
|
@ -2,6 +2,6 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
object MediaFingerprint : MethodFingerprint(
|
||||
internal object MediaFingerprint : MethodFingerprint(
|
||||
strings = listOf("force_overlay", "Media#updateFields", "live_reels_metadata")
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object ShowAdFingerprint : MethodFingerprint(
|
||||
internal object ShowAdFingerprint : MethodFingerprint(
|
||||
"Z",
|
||||
AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
|
||||
listOf("L", "L", "Z", "Z"),
|
||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
||||
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object GenericMediaAdFingerprint : MediaAdFingerprint(
|
||||
internal object GenericMediaAdFingerprint : MediaAdFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
|
@ -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.Method
|
||||
|
||||
abstract class MediaAdFingerprint(
|
||||
internal abstract class MediaAdFingerprint(
|
||||
returnType: String? = "Z",
|
||||
accessFlags: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
parameters: Iterable<String>? = listOf(),
|
||||
|
@ -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.reference.MethodReference
|
||||
|
||||
object PaidPartnershipAdFingerprint : MediaAdFingerprint(
|
||||
internal object PaidPartnershipAdFingerprint : MediaAdFingerprint(
|
||||
"V",
|
||||
null,
|
||||
listOf("L", "L"),
|
||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
||||
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object ShoppingAdFingerprint : MediaAdFingerprint(
|
||||
internal object ShoppingAdFingerprint : MediaAdFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.IGET_OBJECT,
|
||||
|
@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object IrplusAdsFingerprint : MethodFingerprint(
|
||||
internal object IrplusAdsFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
listOf("L", "Z"),
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object IsLoggedInFingerprint : MethodFingerprint(
|
||||
internal object IsLoggedInFingerprint : MethodFingerprint(
|
||||
returnType = "Z",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
|
||||
opcodes = listOf(
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object HasPurchasedFingerprint : MethodFingerprint(
|
||||
internal object HasPurchasedFingerprint : MethodFingerprint(
|
||||
returnType = "Z",
|
||||
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
||||
strings = listOf("isPurchaseDoneRecently = true, access platform profile present? = "),
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.replaceInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object LicenseValidationFingerprint : MethodFingerprint(
|
||||
internal object LicenseValidationFingerprint : MethodFingerprint(
|
||||
returnType = "Z",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||
parameters = listOf("Landroid/content/Context;"),
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.replaceInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -7,7 +7,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
@FuzzyPatternScanMethod(2)
|
||||
object VerifySignatureFingerprint : MethodFingerprint(
|
||||
internal object VerifySignatureFingerprint : MethodFingerprint(
|
||||
returnType = "Z",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||
parameters = listOf("Landroid/app/Activity;"),
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.replaceInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object IsFreeVersionFingerprint : MethodFingerprint(
|
||||
internal object IsFreeVersionFingerprint : MethodFingerprint(
|
||||
returnType = "Ljava/lang/Boolean;",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||
strings = listOf("free"),
|
||||
|
@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object LoadInboxAdsFingerprint : MethodFingerprint(
|
||||
internal object LoadInboxAdsFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
strings = listOf(
|
||||
"ads_load_begin",
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.messenger.inputfield.fingerprints
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.dexbacked.value.DexBackedStringEncodedValue
|
||||
|
||||
object SendTypingIndicatorFingerprint : MethodFingerprint(
|
||||
internal object SendTypingIndicatorFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
parameters = listOf(),
|
||||
customFingerprint = { methodDef, classDef ->
|
||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.messenger.inputfield.fingerprints
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object SwitchMessangeInputEmojiButtonFingerprint : MethodFingerprint(
|
||||
internal object SwitchMessangeInputEmojiButtonFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
parameters = listOf("L", "Z"),
|
||||
strings = listOf("afterTextChanged", "expression_search"),
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object UnlockProFingerprint : MethodFingerprint(
|
||||
internal object UnlockProFingerprint : MethodFingerprint(
|
||||
"Z",
|
||||
AccessFlags.STATIC or AccessFlags.SYNTHETIC,
|
||||
parameters = listOf("L"),
|
||||
|
@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
@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(
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.NEW_INSTANCE,
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object ShowMusicVideoAdsFingerprint : MethodFingerprint(
|
||||
internal object ShowMusicVideoAdsFingerprint : MethodFingerprint(
|
||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), listOf(
|
||||
Opcode.IPUT_BOOLEAN,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
|
@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
|
||||
@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(
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
|
@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
|
||||
@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(
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object AllowExclusiveAudioPlaybackFingerprint: MethodFingerprint(
|
||||
internal object AllowExclusiveAudioPlaybackFingerprint: MethodFingerprint(
|
||||
"Z",
|
||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
listOf(),
|
||||
|
@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
|
||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||
object ExclusiveAudioFingerprint : MethodFingerprint(
|
||||
internal object ExclusiveAudioFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
listOf("L", "Z"),
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object RepeatTrackFingerprint : MethodFingerprint(
|
||||
internal object RepeatTrackFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
listOf("L", "L"),
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object DisableShuffleFingerprint : MethodFingerprint(
|
||||
internal object DisableShuffleFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
listOf(),
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
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(
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
|
||||
internal object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
listOf("I", "L", "Z"),
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object HideGetPremiumFingerprint : MethodFingerprint(
|
||||
internal object HideGetPremiumFingerprint : MethodFingerprint(
|
||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
||||
Opcode.IF_NEZ,
|
||||
Opcode.CONST_16,
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object HideGetPremiumParentFingerprint : MethodFingerprint(
|
||||
internal object HideGetPremiumParentFingerprint : MethodFingerprint(
|
||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
||||
Opcode.IGET_BOOLEAN,
|
||||
Opcode.CONST_4,
|
||||
|
@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
|
||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||
object PivotBarConstructorFingerprint : MethodFingerprint(
|
||||
internal object PivotBarConstructorFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
listOf("L", "Z"),
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object CheckCertificateFingerprint : MethodFingerprint(
|
||||
internal object CheckCertificateFingerprint : MethodFingerprint(
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
returnType = "Z",
|
||||
parameters = listOf("Ljava/lang/String;"),
|
||||
|
@ -3,6 +3,6 @@ package app.revanced.patches.music.misc.microg.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
object CastContextFetchFingerprint : MethodFingerprint(
|
||||
internal object CastContextFetchFingerprint : MethodFingerprint(
|
||||
strings = listOf("Error fetching CastContext.")
|
||||
)
|
@ -3,6 +3,6 @@ package app.revanced.patches.music.misc.microg.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
object CastDynamiteModuleFingerprint : MethodFingerprint(
|
||||
internal object CastDynamiteModuleFingerprint : MethodFingerprint(
|
||||
strings = listOf("com.google.android.gms.cast.framework.internal.CastDynamiteModuleImpl")
|
||||
)
|
@ -3,6 +3,6 @@ package app.revanced.patches.music.misc.microg.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
object CastDynamiteModuleV2Fingerprint : MethodFingerprint(
|
||||
internal object CastDynamiteModuleV2Fingerprint : MethodFingerprint(
|
||||
strings = listOf("Failed to load module via V2: ")
|
||||
)
|
@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object GooglePlayUtilityFingerprint : MethodFingerprint(
|
||||
internal object GooglePlayUtilityFingerprint : MethodFingerprint(
|
||||
"I",
|
||||
AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||
listOf("L", "I"),
|
||||
|
@ -3,6 +3,6 @@ package app.revanced.patches.music.misc.microg.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
object PrimeFingerprint : MethodFingerprint(
|
||||
internal object PrimeFingerprint : MethodFingerprint(
|
||||
strings = listOf("com.google.android.GoogleCamera", "com.android.vending")
|
||||
)
|
@ -7,7 +7,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
|
||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||
object ServiceCheckFingerprint : MethodFingerprint(
|
||||
internal object ServiceCheckFingerprint : MethodFingerprint(
|
||||
"V",
|
||||
AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||
listOf("L", "I"),
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
|
||||
@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(
|
||||
Opcode.CONST_4,
|
||||
Opcode.IF_EQZ,
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.myexpenses.misc.pro.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
object IsEnabledFingerprint : MethodFingerprint(
|
||||
internal object IsEnabledFingerprint : MethodFingerprint(
|
||||
"Z",
|
||||
strings = listOf("feature", "feature.licenceStatus")
|
||||
)
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.nfctoolsse.misc.pro.fingerprints
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object IsLicenseRegisteredFingerprint : MethodFingerprint(
|
||||
internal object IsLicenseRegisteredFingerprint : MethodFingerprint(
|
||||
returnType = "Z",
|
||||
accessFlags = AccessFlags.PUBLIC.value,
|
||||
strings = listOf("kLicenseCheck")
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.nyx.misc.pro.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
object CheckProFingerprint : MethodFingerprint(
|
||||
internal object CheckProFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.definingClass.endsWith("BillingManager;") && methodDef.name == "isProVersion"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.replaceInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.photomath.detection.deviceid.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
|
||||
object GetDeviceIdFingerprint : MethodFingerprint(
|
||||
internal object GetDeviceIdFingerprint : MethodFingerprint(
|
||||
returnType = "Ljava/lang/String;",
|
||||
strings = listOf("androidId", "android_id"),
|
||||
parameters = listOf()
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.photomath.detection.signature.fingerprints
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object CheckSignatureFingerprint : MethodFingerprint(
|
||||
internal object CheckSignatureFingerprint : MethodFingerprint(
|
||||
strings = listOf(
|
||||
"packageInfo.signatures",
|
||||
"currentSignature"
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.extensions.InstructionExtensions.replaceInstructions
|
||||
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
|
||||
|
||||
@Patch(description = "Enables textbook access")
|
||||
object EnableBookpointPatch : BytecodePatch(
|
||||
internal object EnableBookpointPatch : BytecodePatch(
|
||||
setOf(IsBookpointEnabledFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) =
|
||||
|
@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object IsBookpointEnabledFingerprint : MethodFingerprint(
|
||||
internal object IsBookpointEnabledFingerprint : MethodFingerprint(
|
||||
returnType = "Z",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
parameters = listOf(),
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user