feat: update patches to latest version

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
oSumAtrIX
2022-05-22 17:11:34 +02:00
parent c4c86b65fd
commit bad25dec1d
33 changed files with 64 additions and 207 deletions

View File

@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.youtube", arrayOf("17.03.38", "17.14.35", "17.17.34")
"com.google.android.youtube", arrayOf("17.03.38", "17.14.35", "17.17.34", "17.19.36")
)]
)
@Target(AnnotationTarget.CLASS)

View File

@ -35,7 +35,7 @@ class IntegrationsPatch : BytecodePatch(
val count = implementation.registerCount - 1
implementation.addInstructions(
result.scanData.endIndex + 1, """
result.scanResult.endIndex + 1, """
invoke-static {v$count}, Lpl/jakubweg/StringRef;->setContext(Landroid/content/Context;)V
sput-object v$count, Lapp/revanced/integrations/Globals;->context:Landroid/content/Context;
""".trimIndent().toInstructions()

View File

@ -3,55 +3,16 @@ package app.revanced.patches.youtube.misc.integrations.signatures
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.signature.implementation.method.MethodSignature
import app.revanced.patcher.signature.implementation.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.signature.implementation.method.annotation.MatchingMethod
import app.revanced.patches.youtube.misc.integrations.annotations.IntegrationsCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("init-signature")
@MatchingMethod(
"Lacnx", "onCreate"
"Lacuu", "onCreate"
)
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
@IntegrationsCompatibility
@Version("0.0.1")
object InitSignature : MethodSignature(
"V",
AccessFlags.PUBLIC.value,
listOf(),
listOf(
Opcode.SGET_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.IGET_OBJECT,
Opcode.CONST_STRING,
Opcode.IF_NEZ,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.IGET_OBJECT,
Opcode.MOVE_OBJECT,
Opcode.CHECK_CAST,
Opcode.MOVE_OBJECT,
Opcode.CHECK_CAST,
Opcode.CONST_4,
Opcode.CONST_STRING,
Opcode.INVOKE_INTERFACE_RANGE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.SPUT_OBJECT,
Opcode.SGET_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IGET_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.INVOKE_VIRTUAL,
Opcode.INVOKE_SUPER,
Opcode.INVOKE_VIRTUAL
)
null, null, null, null,
listOf("Application creation")
)