fix: Revert previous release

The previous release depends on a version of ReVanced Patcher which prevents usage of resource patches on lower Android versions. To solve this issue temporarily, until a fix is present, the previous release is reverted.
This commit is contained in:
oSumAtrIX 2023-08-27 04:26:14 +02:00
parent 933e88e5fa
commit ed24a201a9
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4
496 changed files with 2551 additions and 2425 deletions

View file

@ -3,12 +3,14 @@ package app.revanced.util.patch
import app.revanced.extensions.findMutableMethodOf
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
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
import org.jf.dexlib2.iface.ClassDef
import org.jf.dexlib2.iface.Method
import org.jf.dexlib2.iface.instruction.Instruction
abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
internal abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
abstract fun filterMap(
classDef: ClassDef,
@ -26,7 +28,7 @@ abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
}
}
override fun execute(context: BytecodeContext) {
override fun execute(context: BytecodeContext): PatchResult {
// Find all methods to patch
buildMap {
context.classes.forEach { classDef ->
@ -60,5 +62,7 @@ abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
}
}
}
return PatchResultSuccess()
}
}

View file

@ -2,7 +2,7 @@ package app.revanced.util.patch
import app.revanced.extensions.containsConstantInstructionValue
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import com.android.tools.smali.dexlib2.Opcode
import org.jf.dexlib2.Opcode
abstract class LiteralValueFingerprint(
returnType: String? = null,

View file

@ -2,15 +2,15 @@ package app.revanced.util.patch
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.ClassDef
import org.jf.dexlib2.iface.instruction.Instruction
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
import org.jf.dexlib2.iface.reference.MethodReference
typealias Instruction35cInfo = Triple<IMethodCall, Instruction35c, Int>
internal typealias Instruction35cInfo = Triple<IMethodCall, Instruction35c, Int>
interface IMethodCall {
internal interface IMethodCall {
val definedClassName: String
val methodName: String
val methodParams: Array<String>
@ -62,14 +62,14 @@ interface IMethodCall {
}
}
inline fun <reified E> fromMethodReference(methodReference: MethodReference)
internal inline fun <reified E> fromMethodReference(methodReference: MethodReference)
where E : Enum<E>, E : IMethodCall = enumValues<E>().firstOrNull { search ->
search.definedClassName == methodReference.definingClass
&& search.methodName == methodReference.name
&& methodReference.parameterTypes.toTypedArray().contentEquals(search.methodParams)
}
inline fun <reified E> filterMapInstruction35c(
internal inline fun <reified E> filterMapInstruction35c(
integrationsClassDescriptorPrefix: String,
classDef: ClassDef,
instruction: Instruction,