feat(YouTube): Support version 19.02.34 (#2627)

This commit is contained in:
LisoUseInAIKyrios 2024-01-18 00:24:55 +04:00 committed by GitHub
parent df8eadbca9
commit 94e08b74ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
59 changed files with 145 additions and 77 deletions

View File

@ -33,7 +33,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -32,7 +32,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -20,7 +20,8 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
"com.google.android.youtube", [ "com.google.android.youtube", [
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -21,7 +21,18 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
dependencies = [IntegrationsPatch::class, SettingsPatch::class], dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [ compatiblePackages = [
CompatiblePackage( CompatiblePackage(
"com.google.android.youtube" "com.google.android.youtube", [
"18.32.39",
"18.37.36",
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34",
"19.02.34"
]
) )
] ]
) )

View File

@ -20,7 +20,8 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
"com.google.android.youtube", [ "com.google.android.youtube", [
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
), ),
] ]

View File

@ -30,7 +30,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -32,7 +32,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
], ],

View File

@ -34,7 +34,8 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -32,7 +32,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
], ],

View File

@ -30,7 +30,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -40,7 +40,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.Opcode
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -37,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -35,7 +35,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction3rc
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -30,7 +30,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -30,7 +30,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -29,7 +29,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -30,7 +30,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -33,7 +33,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -30,7 +30,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -26,7 +26,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -26,7 +26,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -40,7 +40,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -37,7 +37,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -26,7 +26,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -26,7 +26,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -27,11 +27,11 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.38.44", "18.38.44",
"18.43.45", "18.43.45",
"18.44.41", "18.44.41",
"18.45.41",
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -34,7 +34,8 @@ import app.revanced.patches.youtube.shared.fingerprints.SeekbarOnDrawFingerprint
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -38,7 +38,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -25,7 +25,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -26,7 +26,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -27,7 +27,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -21,7 +21,8 @@ import org.w3c.dom.Element
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
], ],

View File

@ -55,7 +55,8 @@ import com.android.tools.smali.dexlib2.iface.reference.TypeReference
CompatiblePackage( CompatiblePackage(
"com.google.android.youtube", [ "com.google.android.youtube", [
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -29,7 +29,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -26,7 +26,8 @@ import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -40,7 +40,8 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference
"com.google.android.youtube", [ "com.google.android.youtube", [
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
], ],

View File

@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -27,7 +27,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -35,7 +35,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
) )
) )
] ]

View File

@ -38,7 +38,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -43,7 +43,8 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -31,7 +31,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -26,7 +26,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -19,7 +19,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
"com.google.android.youtube", [ "com.google.android.youtube", [
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -35,7 +35,8 @@ object GmsCoreSupportPatch : AbstractGmsCoreSupportPatch(
"com.google.android.youtube", setOf( "com.google.android.youtube", setOf(
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
) )
) )
), ),

View File

@ -28,7 +28,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -31,7 +31,8 @@ import com.android.tools.smali.dexlib2.iface.reference.StringReference
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -36,7 +36,8 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
[ [
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -33,7 +33,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -29,7 +29,8 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -18,9 +18,9 @@ import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.builder.BuilderInstruction import com.android.tools.smali.dexlib2.builder.BuilderInstruction
import com.android.tools.smali.dexlib2.builder.MutableMethodImplementation import com.android.tools.smali.dexlib2.builder.MutableMethodImplementation
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
import com.android.tools.smali.dexlib2.immutable.ImmutableMethod import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
import com.android.tools.smali.dexlib2.immutable.ImmutableMethodParameter import com.android.tools.smali.dexlib2.immutable.ImmutableMethodParameter
import com.android.tools.smali.dexlib2.util.MethodUtil import com.android.tools.smali.dexlib2.util.MethodUtil
@ -135,23 +135,24 @@ object VideoInformationPatch : BytecodePatch(
*/ */
videoTimeHook(INTEGRATIONS_CLASS_DESCRIPTOR, "setVideoTime") videoTimeHook(INTEGRATIONS_CLASS_DESCRIPTOR, "setVideoTime")
/* /*
* Hook the user playback speed selection * Hook the user playback speed selection
*/ */
OnPlaybackSpeedItemClickFingerprint.result?.apply { OnPlaybackSpeedItemClickFingerprint.result?.mutableMethod?.apply {
speedSelectionInsertMethod = mutableMethod speedSelectionInsertMethod = this
speedSelectionInsertIndex = scanResult.patternScanResult!!.startIndex - 3 val speedSelectionMethodInstructions = this.implementation!!.instructions
val speedSelectionValueInstructionIndex = speedSelectionMethodInstructions.indexOfFirst {
it.opcode == Opcode.IGET
}
speedSelectionValueRegister = speedSelectionValueRegister =
mutableMethod.getInstruction<FiveRegisterInstruction>(speedSelectionInsertIndex).registerD getInstruction<TwoRegisterInstruction>(speedSelectionValueInstructionIndex).registerA
setPlaybackSpeedClassFieldReference =
val speedSelectionMethodInstructions = mutableMethod.implementation!!.instructions getInstruction<ReferenceInstruction>(speedSelectionValueInstructionIndex + 1).reference.toString()
setPlaybackSpeedMethodReference =
getInstruction<ReferenceInstruction>(speedSelectionValueInstructionIndex + 2).reference.toString()
setPlaybackSpeedContainerClassFieldReference = setPlaybackSpeedContainerClassFieldReference =
getReference(speedSelectionMethodInstructions, -1, Opcode.IF_EQZ) getReference(speedSelectionMethodInstructions, -1, Opcode.IF_EQZ)
setPlaybackSpeedClassFieldReference = speedSelectionInsertIndex = speedSelectionValueInstructionIndex + 1
getReference(speedSelectionMethodInstructions, 1, Opcode.IGET)
setPlaybackSpeedMethodReference =
getReference(speedSelectionMethodInstructions, 2, Opcode.IGET)
} ?: throw OnPlaybackSpeedItemClickFingerprint.exception } ?: throw OnPlaybackSpeedItemClickFingerprint.exception
userSelectedPlaybackSpeedHook(INTEGRATIONS_CLASS_DESCRIPTOR, "userSelectedPlaybackSpeed") userSelectedPlaybackSpeedHook(INTEGRATIONS_CLASS_DESCRIPTOR, "userSelectedPlaybackSpeed")

View File

@ -2,18 +2,19 @@ package app.revanced.patches.youtube.video.information.fingerprints
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint import app.revanced.patcher.fingerprint.MethodFingerprint
import app.revanced.util.getReference
import com.android.tools.smali.dexlib2.AccessFlags import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
internal object OnPlaybackSpeedItemClickFingerprint : MethodFingerprint( internal object OnPlaybackSpeedItemClickFingerprint : MethodFingerprint(
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
returnType = "V", returnType = "V",
parameters = listOf("L", "L", "I", "J"), parameters = listOf("L", "L", "I", "J"),
customFingerprint = { methodDef, _ -> methodDef.name == "onItemClick" }, customFingerprint = { methodDef, _ ->
opcodes = listOf( methodDef.name == "onItemClick" && methodDef.implementation?.instructions?.find {
Opcode.MOVE_RESULT_OBJECT, it.opcode == Opcode.IGET_OBJECT &&
Opcode.INVOKE_VIRTUAL, it.getReference<FieldReference>()!!.type == "Lcom/google/android/libraries/youtube/innertube/model/player/PlayerResponseModel;"
Opcode.INVOKE_VIRTUAL, } != null
Opcode.RETURN_VOID }
)
) )

View File

@ -33,7 +33,8 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
"com.google.android.youtube", [ "com.google.android.youtube", [
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -16,7 +16,8 @@ import app.revanced.patches.youtube.video.speed.remember.RememberPlaybackSpeedPa
"com.google.android.youtube", [ "com.google.android.youtube", [
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]

View File

@ -33,7 +33,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.45.43", "18.45.43",
"18.48.39", "18.48.39",
"18.49.37", "18.49.37",
"19.01.34" "19.01.34",
"19.02.34"
] ]
) )
] ]