feat(YouTube Music): Support version 8.05.50 (#4439)

This commit is contained in:
Alberto Ponces 2025-02-11 18:37:58 +00:00 committed by GitHub
parent c631ce91a5
commit b31fed9890
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 64 additions and 27 deletions

View File

@ -8,7 +8,12 @@ val hideVideoAdsPatch = bytecodePatch(
name = "Hide music video ads",
description = "Hides ads that appear while listening to or streaming music videos, podcasts, or songs.",
) {
compatibleWith("com.google.android.apps.youtube.music")
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.50"
)
)
execute {
navigate(showVideoAdsParentFingerprint.originalMethod)

View File

@ -1,24 +1,21 @@
package app.revanced.patches.music.audio.exclusiveaudio
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.util.returnEarly
@Suppress("unused")
val enableExclusiveAudioPlaybackPatch = bytecodePatch(
name = "Enable exclusive audio playback",
description = "Enables the option to play audio without video.",
) {
compatibleWith("com.google.android.apps.youtube.music")
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.50"
)
)
execute {
allowExclusiveAudioPlaybackFingerprint.method.apply {
addInstructions(
0,
"""
const/4 v0, 0x1
return v0
""",
)
}
allowExclusiveAudioPlaybackFingerprint.method.returnEarly(true)
}
}

View File

@ -9,16 +9,15 @@ internal val allowExclusiveAudioPlaybackFingerprint = fingerprint {
returns("Z")
parameters()
opcodes(
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.IF_NEZ,
Opcode.IGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.GOTO,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.RETURN
Opcode.MOVE_RESULT
)
}

View File

@ -11,10 +11,14 @@ val permanentRepeatPatch = bytecodePatch(
description = "Permanently remember your repeating preference even if the playlist ends or another track is played.",
use = false,
) {
compatibleWith("com.google.android.apps.youtube.music")
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.50"
)
)
execute {
val startIndex = repeatTrackFingerprint.patternMatch!!.endIndex
val repeatIndex = startIndex + 1

View File

@ -11,7 +11,12 @@ val hideCategoryBar = bytecodePatch(
description = "Hides the category bar at the top of the homepage.",
use = false,
) {
compatibleWith("com.google.android.apps.youtube.music")
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.50"
)
)
execute {
constructCategoryBarFingerprint.method.apply {

View File

@ -11,7 +11,12 @@ val hideGetPremiumPatch = bytecodePatch(
name = "Hide 'Get Music Premium' label",
description = "Hides the \"Get Music Premium\" label from the account menu and settings.",
) {
compatibleWith("com.google.android.apps.youtube.music")
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.50"
)
)
execute {
hideGetPremiumFingerprint.method.apply {

View File

@ -18,7 +18,12 @@ val removeUpgradeButtonPatch = bytecodePatch(
name = "Remove upgrade button",
description = "Removes the upgrade tab from the pivot bar.",
) {
compatibleWith("com.google.android.apps.youtube.music")
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.50"
)
)
execute {
pivotBarConstructorFingerprint.method.apply {

View File

@ -8,7 +8,12 @@ val bypassCertificateChecksPatch = bytecodePatch(
name = "Bypass certificate checks",
description = "Bypasses certificate checks which prevent YouTube Music from working on Android Auto.",
) {
compatibleWith("com.google.android.apps.youtube.music"("7.29.52"))
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.50"
)
)
execute {
checkCertificateFingerprint.method.returnEarly(true)

View File

@ -4,8 +4,10 @@ import com.android.tools.smali.dexlib2.AccessFlags
import app.revanced.patcher.fingerprint
internal val checkCertificateFingerprint = fingerprint {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returns("Z")
parameters("Ljava/lang/String;")
strings("X509", "Failed to get certificate.")
strings(
"X509",
"Failed to get certificate" // Partial String match.
)
}

View File

@ -8,7 +8,12 @@ val backgroundPlaybackPatch = bytecodePatch(
name = "Remove background playback restrictions",
description = "Removes restrictions on background playback, including playing kids videos in the background.",
) {
compatibleWith("com.google.android.apps.youtube.music")
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.50"
)
)
execute {
kidsBackgroundPlaybackPolicyControllerFingerprint.method.addInstruction(

View File

@ -25,7 +25,12 @@ val spoofClientPatch = bytecodePatch(
name = "Spoof client",
description = "Spoofs the client to fix playback.",
) {
compatibleWith("com.google.android.apps.youtube.music")
compatibleWith(
"com.google.android.apps.youtube.music"(
"7.16.53",
"8.05.50"
)
)
dependsOn(
sharedExtensionPatch,