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 {
kotlin("jvm") version "1.9.10"
alias(libs.plugins.binary.compatibility.validator)
`maven-publish`
}

View File

@ -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" }

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.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>,

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.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())
}
}
}

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.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.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

View File

@ -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

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.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

View File

@ -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

View File

@ -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,

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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"
}

View File

@ -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

View File

@ -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")

View File

@ -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")

View File

@ -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 ->

View File

@ -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

View File

@ -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(

View File

@ -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")

View File

@ -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

View File

@ -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"),

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"
}

View File

@ -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;")}
)

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.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",

View File

@ -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, _ ->

View File

@ -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, _ ->

View File

@ -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, _ ->

View File

@ -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,

View File

@ -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

View File

@ -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"),
)

View File

@ -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

View File

@ -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")
)

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.Opcode
object ShowAdFingerprint : MethodFingerprint(
internal object ShowAdFingerprint : MethodFingerprint(
"Z",
AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
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
object GenericMediaAdFingerprint : MediaAdFingerprint(
internal object GenericMediaAdFingerprint : MediaAdFingerprint(
opcodes = listOf(
Opcode.INVOKE_INTERFACE,
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.Method
abstract class MediaAdFingerprint(
internal abstract class MediaAdFingerprint(
returnType: String? = "Z",
accessFlags: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL,
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.reference.MethodReference
object PaidPartnershipAdFingerprint : MediaAdFingerprint(
internal object PaidPartnershipAdFingerprint : MediaAdFingerprint(
"V",
null,
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
object ShoppingAdFingerprint : MediaAdFingerprint(
internal object ShoppingAdFingerprint : MediaAdFingerprint(
opcodes = listOf(
Opcode.IF_EQZ,
Opcode.IGET_OBJECT,

View File

@ -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"),

View File

@ -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

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.Opcode
object IsLoggedInFingerprint : MethodFingerprint(
internal object IsLoggedInFingerprint : MethodFingerprint(
returnType = "Z",
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
opcodes = listOf(

View File

@ -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

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.Opcode
object HasPurchasedFingerprint : MethodFingerprint(
internal object HasPurchasedFingerprint : MethodFingerprint(
returnType = "Z",
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
strings = listOf("isPurchaseDoneRecently = true, access platform profile present? = "),

View File

@ -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

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.Opcode
object LicenseValidationFingerprint : MethodFingerprint(
internal object LicenseValidationFingerprint : MethodFingerprint(
returnType = "Z",
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
parameters = listOf("Landroid/content/Context;"),

View File

@ -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

View File

@ -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;"),

View File

@ -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

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.Opcode
object IsFreeVersionFingerprint : MethodFingerprint(
internal object IsFreeVersionFingerprint : MethodFingerprint(
returnType = "Ljava/lang/Boolean;",
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
strings = listOf("free"),

View File

@ -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",

View File

@ -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

View File

@ -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 ->

View File

@ -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"),

View File

@ -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

View File

@ -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

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.Opcode
object UnlockProFingerprint : MethodFingerprint(
internal object UnlockProFingerprint : MethodFingerprint(
"Z",
AccessFlags.STATIC or AccessFlags.SYNTHETIC,
parameters = listOf("L"),

View File

@ -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,

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.Opcode
object ShowMusicVideoAdsFingerprint : MethodFingerprint(
internal object ShowMusicVideoAdsFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), listOf(
Opcode.IPUT_BOOLEAN,
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.
object AllCodecsReferenceFingerprint : MethodFingerprint(
internal object AllCodecsReferenceFingerprint : MethodFingerprint(
"J", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L"), listOf(
Opcode.INVOKE_STATIC,
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.
object CodecsLockFingerprint : MethodFingerprint(
internal object CodecsLockFingerprint : MethodFingerprint(
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, opcodes = listOf(
Opcode.INVOKE_DIRECT,
Opcode.INVOKE_VIRTUAL,

View File

@ -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

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.Opcode
object AllowExclusiveAudioPlaybackFingerprint: MethodFingerprint(
internal object AllowExclusiveAudioPlaybackFingerprint: MethodFingerprint(
"Z",
AccessFlags.PUBLIC or AccessFlags.FINAL,
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.
object ExclusiveAudioFingerprint : MethodFingerprint(
internal object ExclusiveAudioFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf("L", "Z"),

View File

@ -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

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.Opcode
object RepeatTrackFingerprint : MethodFingerprint(
internal object RepeatTrackFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.FINAL,
listOf("L", "L"),

View File

@ -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

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.Opcode
object DisableShuffleFingerprint : MethodFingerprint(
internal object DisableShuffleFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.FINAL,
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.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,

View File

@ -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

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.Opcode
object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
internal object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.FINAL,
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.Opcode
object HideGetPremiumFingerprint : MethodFingerprint(
internal object HideGetPremiumFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
Opcode.IF_NEZ,
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.Opcode
object HideGetPremiumParentFingerprint : MethodFingerprint(
internal object HideGetPremiumParentFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
Opcode.IGET_BOOLEAN,
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.
object PivotBarConstructorFingerprint : MethodFingerprint(
internal object PivotBarConstructorFingerprint : MethodFingerprint(
"V",
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
listOf("L", "Z"),

View File

@ -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

View File

@ -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;"),

View File

@ -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.")
)

View File

@ -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")
)

View File

@ -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: ")
)

View File

@ -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"),

View File

@ -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")
)

View File

@ -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"),

View File

@ -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

View File

@ -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,

View File

@ -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

View File

@ -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")
)

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -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"
}

View File

@ -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

View File

@ -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()

View File

@ -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

View File

@ -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"

View File

@ -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) =

View File

@ -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