mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-03 08:04:36 +02:00
cleanup
This commit is contained in:
parent
66281f4185
commit
ef970fd706
@ -1,16 +1,10 @@
|
|||||||
package app.revanced.patches.youtube.layout.general.mixplaylists.bytecode.fingerprints
|
package app.revanced.patches.youtube.layout.general.mixplaylists.bytecode.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("mix-playlists-first-fingerprint")
|
|
||||||
@YouTubeCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object CreateMixPlaylistFingerprint : MethodFingerprint(
|
object CreateMixPlaylistFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
access = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
access = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
|
@ -1,16 +1,10 @@
|
|||||||
package app.revanced.patches.youtube.layout.general.mixplaylists.bytecode.fingerprints
|
package app.revanced.patches.youtube.layout.general.mixplaylists.bytecode.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
|
|
||||||
@Name("mix-playlists-fourth-fingerprint")
|
|
||||||
@YouTubeCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object FourthCreateMixPlaylistFingerprint : MethodFingerprint(
|
object FourthCreateMixPlaylistFingerprint : MethodFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.CONST,
|
Opcode.CONST,
|
||||||
|
@ -1,16 +1,10 @@
|
|||||||
package app.revanced.patches.youtube.layout.general.mixplaylists.bytecode.fingerprints
|
package app.revanced.patches.youtube.layout.general.mixplaylists.bytecode.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("mix-playlists-second-fingerprint")
|
|
||||||
@YouTubeCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object SecondCreateMixPlaylistFingerprint : MethodFingerprint(
|
object SecondCreateMixPlaylistFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
access = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
access = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
|
@ -1,16 +1,10 @@
|
|||||||
package app.revanced.patches.youtube.layout.general.mixplaylists.bytecode.fingerprints
|
package app.revanced.patches.youtube.layout.general.mixplaylists.bytecode.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
|
|
||||||
@Name("mix-playlists-third-fingerprint")
|
|
||||||
@YouTubeCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object ThirdCreateMixPlaylistFingerprint : MethodFingerprint(
|
object ThirdCreateMixPlaylistFingerprint : MethodFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.INVOKE_STATIC,
|
Opcode.INVOKE_STATIC,
|
||||||
|
@ -1,16 +1,10 @@
|
|||||||
package app.revanced.patches.youtube.layout.general.personalinformation.bytecode.fingerprints
|
package app.revanced.patches.youtube.layout.general.personalinformation.bytecode.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourcdIdPatch
|
||||||
import app.revanced.shared.annotation.YouTubeCompatibility
|
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
|
|
||||||
@Name("account-switcher-accessibility-label-fingerprint")
|
|
||||||
@YouTubeCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object AccountSwitcherAccessibilityLabelFingerprint : MethodFingerprint(
|
object AccountSwitcherAccessibilityLabelFingerprint : MethodFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
@ -40,8 +40,8 @@ class CreateButtonRemoverBytecodePatch : BytecodePatch(
|
|||||||
createRef = (pivotBarInstructions.elementAt(startIndex) as ReferenceInstruction).reference as DexBackedMethodReference
|
createRef = (pivotBarInstructions.elementAt(startIndex) as ReferenceInstruction).reference as DexBackedMethodReference
|
||||||
} ?: return PivotBarFingerprint.toErrorResult()
|
} ?: return PivotBarFingerprint.toErrorResult()
|
||||||
|
|
||||||
PivotBarCreateButtonViewFingerprint.result?.let {
|
PivotBarCreateButtonViewFingerprint.result?.let { result ->
|
||||||
with (it.mutableMethod){
|
with (result.mutableMethod){
|
||||||
val createButtonInstructions = implementation!!.instructions
|
val createButtonInstructions = implementation!!.instructions
|
||||||
createButtonInstructions.filter { instruction ->
|
createButtonInstructions.filter { instruction ->
|
||||||
val fieldReference = (instruction as? ReferenceInstruction)?.reference as? DexBackedMethodReference
|
val fieldReference = (instruction as? ReferenceInstruction)?.reference as? DexBackedMethodReference
|
||||||
|
@ -6,7 +6,7 @@ import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
|||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
object EmptyColorFingerprint : MethodFingerprint(
|
object EmptyColorFingerprint : MethodFingerprint(
|
||||||
"V",
|
returnType = "V",
|
||||||
opcodes = listOf(Opcode.DIV_LONG_2ADDR),
|
opcodes = listOf(Opcode.DIV_LONG_2ADDR),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.implementation?.instructions?.any { instruction ->
|
methodDef.implementation?.instructions?.any { instruction ->
|
||||||
|
@ -7,7 +7,10 @@ import org.jf.dexlib2.Opcode
|
|||||||
import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction
|
import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction
|
||||||
|
|
||||||
object LegacyVideoAdsFingerprint : MethodFingerprint(
|
object LegacyVideoAdsFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
returnType = "V",
|
||||||
|
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
parameters = listOf(),
|
||||||
|
opcodes = listOf(
|
||||||
Opcode.CONST_WIDE_16,
|
Opcode.CONST_WIDE_16,
|
||||||
Opcode.IPUT_WIDE,
|
Opcode.IPUT_WIDE,
|
||||||
Opcode.CONST_WIDE_16,
|
Opcode.CONST_WIDE_16,
|
||||||
|
@ -6,7 +6,10 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
object LithoThemeFingerprint : MethodFingerprint(
|
object LithoThemeFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PROTECTED or AccessFlags.FINAL, listOf("L"), listOf(
|
returnType = "V",
|
||||||
|
access = AccessFlags.PROTECTED or AccessFlags.FINAL,
|
||||||
|
parameters = listOf("L"),
|
||||||
|
opcodes = listOf(
|
||||||
Opcode.APUT,
|
Opcode.APUT,
|
||||||
Opcode.NEW_INSTANCE,
|
Opcode.NEW_INSTANCE,
|
||||||
Opcode.INVOKE_DIRECT,
|
Opcode.INVOKE_DIRECT,
|
||||||
|
@ -6,7 +6,10 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
object MainstreamVideoAdsFingerprint : MethodFingerprint(
|
object MainstreamVideoAdsFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PRIVATE or AccessFlags.FINAL, listOf("L","Z"), listOf(
|
returnType = "V",
|
||||||
|
access = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
||||||
|
parameters = listOf("L","Z"),
|
||||||
|
opcodes = listOf(
|
||||||
Opcode.IGET_OBJECT,
|
Opcode.IGET_OBJECT,
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
@ -6,9 +6,12 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
object OnDrawFingerprint : MethodFingerprint (
|
object OnDrawFingerprint : MethodFingerprint (
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L"),
|
returnType = "V",
|
||||||
listOf(Opcode.MOVE_OBJECT_FROM16, Opcode.MOVE_OBJECT_FROM16),
|
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
customFingerprint = { methodDef ->
|
parameters = listOf("L"),
|
||||||
methodDef.name == "onDraw"
|
opcodes = listOf(
|
||||||
}
|
Opcode.MOVE_OBJECT_FROM16,
|
||||||
|
Opcode.MOVE_OBJECT_FROM16
|
||||||
|
),
|
||||||
|
customFingerprint = {it.name == "onDraw"}
|
||||||
)
|
)
|
@ -6,7 +6,10 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
object SubtitleButtonControllerFingerprint : MethodFingerprint(
|
object SubtitleButtonControllerFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L"), listOf(
|
returnType = "V",
|
||||||
|
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
parameters = listOf("L"),
|
||||||
|
opcodes = listOf(
|
||||||
Opcode.IGET_OBJECT,
|
Opcode.IGET_OBJECT,
|
||||||
Opcode.IF_NEZ,
|
Opcode.IF_NEZ,
|
||||||
Opcode.RETURN_VOID,
|
Opcode.RETURN_VOID,
|
||||||
@ -15,6 +18,6 @@ object SubtitleButtonControllerFingerprint : MethodFingerprint(
|
|||||||
Opcode.IF_NEZ,
|
Opcode.IF_NEZ,
|
||||||
Opcode.CONST,
|
Opcode.CONST,
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.IGET_OBJECT,
|
Opcode.IGET_OBJECT
|
||||||
)
|
)
|
||||||
)
|
)
|
@ -5,11 +5,11 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
object TimebarFingerprint : MethodFingerprint(
|
object TimebarFingerprint : MethodFingerprint(
|
||||||
"V",
|
returnType = "V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
listOf("L"),
|
parameters = listOf("L"),
|
||||||
customFingerprint = { methodDef ->
|
customFingerprint = {
|
||||||
methodDef.definingClass.endsWith("/TimeBar;")
|
it.definingClass.endsWith("/TimeBar;")
|
||||||
&& methodDef.name.contains("draw")
|
&& it.name.contains("draw")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user