build(revanced-patcher): bump version
This commit is contained in:
@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
|
@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
|
@ -5,10 +5,11 @@ import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.data.toMethodWalker
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.extensions.replaceInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
@ -63,7 +64,7 @@ class DownloadsPatch : BytecodePatch(
|
||||
)
|
||||
//Download videos without watermark.
|
||||
val method3 = ACLCommonShareFingerprint3.result!!.mutableMethod
|
||||
method3.addInstructions(
|
||||
method3.addInstructionsWithLabels(
|
||||
0,
|
||||
"""
|
||||
invoke-static {}, Lapp/revanced/tiktok/download/DownloadsPatch;->shouldRemoveWatermark()Z
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
|
@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.data.toMethodWalker
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
|
@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
|
@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
|
@ -5,9 +5,9 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
@ -45,7 +45,7 @@ class SettingsPatch : BytecodePatch(
|
||||
// Find the indices that need to be patched.
|
||||
val copyrightPolicyLabelId = AboutPageFingerprint.result?.let {
|
||||
val startIndex = it.scanResult.patternScanResult!!.startIndex
|
||||
it.mutableMethod.instruction<WideLiteralInstruction>(startIndex).wideLiteral
|
||||
it.mutableMethod.getInstruction<WideLiteralInstruction>(startIndex).wideLiteral
|
||||
} ?: return AboutPageFingerprint.toErrorResult()
|
||||
|
||||
val copyrightIndex = instructions.indexOfFirst {
|
||||
@ -62,7 +62,7 @@ class SettingsPatch : BytecodePatch(
|
||||
copyrightIndex,
|
||||
copyrightPolicyIndex
|
||||
).forEach { index ->
|
||||
val instruction = instruction(index)
|
||||
val instruction = getInstruction(index)
|
||||
if (instruction.opcode != Opcode.MOVE_RESULT_OBJECT)
|
||||
return PatchResultError("Hardcoded offset changed.")
|
||||
|
||||
@ -77,7 +77,7 @@ class SettingsPatch : BytecodePatch(
|
||||
)
|
||||
|
||||
// Replace the OnClickListener class with a custom one.
|
||||
val onClickListener = instruction<ReferenceInstruction>(index + 4).reference.toString()
|
||||
val onClickListener = getInstruction<ReferenceInstruction>(index + 4).reference.toString()
|
||||
|
||||
context.findClass(onClickListener)?.mutableClass?.methods?.first {
|
||||
it.name == "onClick"
|
||||
@ -98,7 +98,7 @@ class SettingsPatch : BytecodePatch(
|
||||
it.opcode == Opcode.INVOKE_SUPER
|
||||
} + 1
|
||||
|
||||
val thisRegister = instruction<FiveRegisterInstruction>(initializeSettingsIndex - 1).registerC
|
||||
val thisRegister = getInstruction<FiveRegisterInstruction>(initializeSettingsIndex - 1).registerC
|
||||
|
||||
addInstructions(
|
||||
initializeSettingsIndex,
|
||||
|
@ -5,9 +5,9 @@ import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstruction
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
@ -97,14 +97,14 @@ class SpoofSimPatch : BytecodePatch() {
|
||||
|
||||
// Patch Android API and return fake sim information
|
||||
private fun MutableMethod.replaceReference(index: Int, replacement: String) {
|
||||
val resultReg = instruction<OneRegisterInstruction>(index + 1).registerA
|
||||
val resultReg = getInstruction<OneRegisterInstruction>(index + 1).registerA
|
||||
|
||||
addInstructions(
|
||||
index + 2,
|
||||
"""
|
||||
invoke-static {v$resultReg}, Lapp/revanced/tiktok/spoof/sim/SpoofSimPatch;->$replacement(Ljava/lang/String;)Ljava/lang/String;
|
||||
move-result-object v$resultReg
|
||||
"""
|
||||
"""
|
||||
invoke-static {v$resultReg}, Lapp/revanced/tiktok/spoof/sim/SpoofSimPatch;->$replacement(Ljava/lang/String;)Ljava/lang/String;
|
||||
move-result-object v$resultReg
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user