unofficial 20.46.33

This commit is contained in:
LisoUseInAIKyrios
2025-11-14 08:51:20 +02:00
parent c6eaba9af6
commit d62d17fdeb
5 changed files with 38 additions and 2 deletions

View File

@@ -1661,6 +1661,7 @@ public final class app/revanced/patches/youtube/misc/playservice/VersionCheckPat
public static final fun is_20_39_or_greater ()Z
public static final fun is_20_41_or_greater ()Z
public static final fun is_20_45_or_greater ()Z
public static final fun is_20_46_or_greater ()Z
}
public final class app/revanced/patches/youtube/misc/privacy/SanitizeSharingLinksPatchKt {

View File

@@ -61,6 +61,8 @@ internal fun spoofVideoStreamsPatch(
"invoke-static { }, $extensionClassDescriptor->setClientOrderToUse()V"
)
// TODO?: Force off 45708738L ?
// region Enable extension helper method used by other patches
patchIncludedExtensionMethodFingerprint.method.returnEarly(true)

View File

@@ -95,6 +95,8 @@ var is_20_41_or_greater : Boolean by Delegates.notNull()
private set
var is_20_45_or_greater : Boolean by Delegates.notNull()
private set
var is_20_46_or_greater : Boolean by Delegates.notNull()
private set
val versionCheckPatch = resourcePatch(
description = "Uses the Play Store service version to find the major/minor version of the YouTube target app.",
@@ -142,5 +144,6 @@ val versionCheckPatch = resourcePatch(
is_20_39_or_greater = 253980000 <= playStoreServicesVersion
is_20_41_or_greater = 254205000 <= playStoreServicesVersion
is_20_45_or_greater = 254605000 <= playStoreServicesVersion
is_20_46_or_greater = 254705000 <= playStoreServicesVersion
}
}

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.string
import com.android.tools.smali.dexlib2.AccessFlags
/**
* For targets 20.26 and later.
* For targets 20.46 and later.
*/
internal val playerParameterBuilderFingerprint = fingerprint {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
@@ -28,6 +28,32 @@ internal val playerParameterBuilderFingerprint = fingerprint {
"Z",
"Lj\$/time/Duration;"
)
}
/**
* For targets 20.26 and later.
*/
internal val playerParameterBuilder2026Fingerprint = fingerprint {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returns("L")
parameters(
"Ljava/lang/String;", // VideoId.
"[B",
"Ljava/lang/String;", // Player parameters proto buffer.
"Ljava/lang/String;",
"I",
"Z",
"I",
"L",
"Ljava/util/Set;",
"Ljava/lang/String;",
"Ljava/lang/String;",
"L",
"Z", // Appears to indicate if the video id is being opened or is currently playing.
"Z",
"Z",
"Lj\$/time/Duration;"
)
instructions(
string("psps")
)

View File

@@ -11,6 +11,7 @@ import app.revanced.patches.youtube.misc.playservice.is_20_02_or_greater
import app.revanced.patches.youtube.misc.playservice.is_20_10_or_greater
import app.revanced.patches.youtube.misc.playservice.is_20_15_or_greater
import app.revanced.patches.youtube.misc.playservice.is_20_26_or_greater
import app.revanced.patches.youtube.misc.playservice.is_20_46_or_greater
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
private val hooks = mutableSetOf<Hook>()
@@ -41,9 +42,12 @@ val playerResponseMethodHookPatch = bytecodePatch {
execute {
val fingerprint : Fingerprint
if (is_20_26_or_greater) {
if (is_20_46_or_greater) {
parameterIsShortAndOpeningOrPlaying = 13
fingerprint = playerParameterBuilderFingerprint
} else if (is_20_26_or_greater) {
parameterIsShortAndOpeningOrPlaying = 13
fingerprint = playerParameterBuilder2026Fingerprint
} else if (is_20_15_or_greater) {
parameterIsShortAndOpeningOrPlaying = 13
fingerprint = playerParameterBuilder2015Fingerprint