mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 01:51:27 +01:00
unofficial 20.46.33
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user