feat(YouTube): Support version 19.03.35 (#2640)

This commit is contained in:
LisoUseInAIKyrios 2024-01-24 17:19:02 +04:00 committed by GitHub
parent ba6d1dcd29
commit ff08f58ac4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
59 changed files with 135 additions and 64 deletions

View File

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

View File

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

View File

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

View File

@ -21,7 +21,8 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
"18.48.39",
"18.49.37",
"19.01.34",
"19.02.34"
"19.02.39",
"19.03.35"
]
)
]

View File

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

View File

@ -21,7 +21,8 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
"18.48.39",
"18.49.37",
"19.01.34",
"19.02.34"
"19.02.39",
"19.03.35"
]
),
]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -39,7 +39,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.48.39",
"18.49.37",
"19.01.34",
"19.02.34"
"19.02.39",
"19.03.35"
]
)
]
@ -59,6 +60,8 @@ object HideShortsComponentsPatch : BytecodePatch(
override fun execute(context: BytecodeContext) {
// region Hide the Shorts shelf.
// This patch point is not present in 19.03.x and greater.
// If 19.02.x and lower is dropped, then this section of code and the fingerprint should be removed.
ReelConstructorFingerprint.result?.let {
it.mutableMethod.apply {
val insertIndex = it.scanResult.patternScanResult!!.startIndex + 2
@ -71,7 +74,7 @@ object HideShortsComponentsPatch : BytecodePatch(
"hideShortsShelf"
)
}
} ?: throw ReelConstructorFingerprint.exception
} // Do not throw an exception if not resolved.
// endregion

View File

@ -97,9 +97,15 @@ object HideShortsComponentsResourcePatch : ResourcePatch() {
)
)
fun String.getId() = ResourceMappingPatch.resourceMappings.single { it.name == this }.id
ResourceMappingPatch.resourceMappings.find {
it.type == "layout" && it.name == "reel_multiple_items_shelf"
}?.also {
reelMultipleItemShelfId = it.id
}
reelMultipleItemShelfId = "reel_multiple_items_shelf".getId()
reelPlayerRightCellButtonHeight = "reel_player_right_cell_button_height".getId()
reelPlayerRightCellButtonHeight =
ResourceMappingPatch.resourceMappings.single {
it.type == "dimen" && it.name == "reel_player_right_cell_button_height"
}.id
}
}

View File

@ -1,13 +1,19 @@
package app.revanced.patches.youtube.layout.hide.shorts.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.MethodFingerprint
import app.revanced.patches.youtube.layout.hide.shorts.HideShortsComponentsResourcePatch
import app.revanced.util.patch.LiteralValueFingerprint
import app.revanced.util.containsWideLiteralInstructionValue
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal object ReelConstructorFingerprint : LiteralValueFingerprint(
internal object ReelConstructorFingerprint : MethodFingerprint(
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
opcodes = listOf(Opcode.INVOKE_VIRTUAL),
literalSupplier = { HideShortsComponentsResourcePatch.reelMultipleItemShelfId }
customFingerprint = { methodDef, _ ->
// Cannot use LiteralValueFingerprint, because the resource id may not be present.
val reelMultipleItemShelfId = HideShortsComponentsResourcePatch.reelMultipleItemShelfId
reelMultipleItemShelfId != -1L
&& methodDef.containsWideLiteralInstructionValue(reelMultipleItemShelfId)
}
)

View File

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

View File

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

View File

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

View File

@ -22,7 +22,8 @@ import org.w3c.dom.Element
"18.48.39",
"18.49.37",
"19.01.34",
"19.02.34"
"19.02.39",
"19.03.35"
]
)
],

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -36,7 +36,8 @@ object GmsCoreSupportPatch : AbstractGmsCoreSupportPatch(
"18.48.39",
"18.49.37",
"19.01.34",
"19.02.34"
"19.02.39",
"19.03.35"
)
)
),

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -17,7 +17,8 @@ import app.revanced.patches.youtube.video.speed.remember.RememberPlaybackSpeedPa
"18.48.39",
"18.49.37",
"19.01.34",
"19.02.34"
"19.02.39",
"19.03.35"
]
)
]

View File

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