mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-14 13:21:02 +01:00
Compare commits
9 Commits
v5.37.0-de
...
v5.37.0-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a582eced8 | ||
|
|
2db0948bea | ||
|
|
a3ba92e742 | ||
|
|
2a85a3b290 | ||
|
|
eee72208dd | ||
|
|
dcd42454bd | ||
|
|
782353c18a | ||
|
|
b53b870e8f | ||
|
|
09b941abf0 |
28
CHANGELOG.md
28
CHANGELOG.md
@@ -1,3 +1,31 @@
|
|||||||
|
# [5.37.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v5.37.0-dev.4...v5.37.0-dev.5) (2025-09-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Viber - Hide ads:** Add constrain to known working version ([2db0948](https://github.com/ReVanced/revanced-patches/commit/2db0948beaf2b68391a1fe7f21e92d31c7df61e7))
|
||||||
|
|
||||||
|
# [5.37.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v5.37.0-dev.3...v5.37.0-dev.4) (2025-09-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube Music - Spoof streaming data:** Fix audio playback stuttering ([#5839](https://github.com/ReVanced/revanced-patches/issues/5839)) ([2a85a3b](https://github.com/ReVanced/revanced-patches/commit/2a85a3b29092729ae16d1fd93803634ce5f08e95))
|
||||||
|
|
||||||
|
# [5.37.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v5.37.0-dev.2...v5.37.0-dev.3) (2025-09-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Spotify:** Remove broken `Spoof client` patch ([#5833](https://github.com/ReVanced/revanced-patches/issues/5833)) ([dcd4245](https://github.com/ReVanced/revanced-patches/commit/dcd42454bd5f87dddd720534f6120c4ef90063a3))
|
||||||
|
|
||||||
|
# [5.37.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v5.37.0-dev.1...v5.37.0-dev.2) (2025-09-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Resolve patching with dev branch ([09b941a](https://github.com/ReVanced/revanced-patches/commit/09b941abf0e8029999565082b02a88b5de507ec4))
|
||||||
|
|
||||||
# [5.37.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.36.0...v5.37.0-dev.1) (2025-09-14)
|
# [5.37.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.36.0...v5.37.0-dev.1) (2025-09-14)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
dependencies {
|
||||||
|
compileOnly(project(":extensions:shared:library"))
|
||||||
|
compileOnly(project(":extensions:youtube:stub"))
|
||||||
|
compileOnly(libs.annotation)
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package app.revanced.extension.music.patches.spoof;
|
||||||
|
|
||||||
|
import static app.revanced.extension.shared.spoof.ClientType.ANDROID_VR_1_43_32;
|
||||||
|
import static app.revanced.extension.shared.spoof.ClientType.ANDROID_VR_1_61_48;
|
||||||
|
|
||||||
|
import app.revanced.extension.shared.spoof.ClientType;
|
||||||
|
import app.revanced.extension.shared.spoof.requests.StreamingDataRequest;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
public class SpoofVideoStreamsPatch {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Injection point.
|
||||||
|
*/
|
||||||
|
public static void setClientOrderToUse() {
|
||||||
|
ClientType[] availableClients = {
|
||||||
|
ANDROID_VR_1_43_32,
|
||||||
|
ANDROID_VR_1_61_48,
|
||||||
|
};
|
||||||
|
|
||||||
|
StreamingDataRequest.setClientOrderToUse(availableClients, ANDROID_VR_1_43_32);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -34,6 +34,5 @@ public class BaseSettings {
|
|||||||
public static final BooleanSetting SPOOF_VIDEO_STREAMS_IOS_FORCE_AVC = new BooleanSetting("revanced_spoof_video_streams_ios_force_avc", FALSE, true,
|
public static final BooleanSetting SPOOF_VIDEO_STREAMS_IOS_FORCE_AVC = new BooleanSetting("revanced_spoof_video_streams_ios_force_avc", FALSE, true,
|
||||||
"revanced_spoof_video_streams_ios_force_avc_user_dialog_message", new SpoofiOSAvailability());
|
"revanced_spoof_video_streams_ios_force_avc_user_dialog_message", new SpoofiOSAvailability());
|
||||||
// Client type must be last spoof setting due to cyclic references.
|
// Client type must be last spoof setting due to cyclic references.
|
||||||
public static final EnumSetting<ClientType> SPOOF_VIDEO_STREAMS_CLIENT_TYPE = new EnumSetting<>("revanced_spoof_video_streams_client_type", ClientType.ANDROID_VR_NO_AUTH, true, parent(SPOOF_VIDEO_STREAMS));
|
public static final EnumSetting<ClientType> SPOOF_VIDEO_STREAMS_CLIENT_TYPE = new EnumSetting<>("revanced_spoof_video_streams_client_type", ClientType.ANDROID_VR_1_61_48, true, parent(SPOOF_VIDEO_STREAMS));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import app.revanced.extension.shared.settings.BaseSettings;
|
|||||||
|
|
||||||
public enum ClientType {
|
public enum ClientType {
|
||||||
// https://dumps.tadiphone.dev/dumps/oculus/eureka
|
// https://dumps.tadiphone.dev/dumps/oculus/eureka
|
||||||
ANDROID_VR_NO_AUTH(
|
ANDROID_VR_1_61_48(
|
||||||
28,
|
28,
|
||||||
"ANDROID_VR",
|
"ANDROID_VR",
|
||||||
"com.google.android.apps.youtube.vr.oculus",
|
"com.google.android.apps.youtube.vr.oculus",
|
||||||
@@ -27,7 +27,7 @@ public enum ClientType {
|
|||||||
"1.61.48",
|
"1.61.48",
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
"Android VR No auth"
|
"Android VR 1.61"
|
||||||
),
|
),
|
||||||
// Chromecast with Google TV 4K.
|
// Chromecast with Google TV 4K.
|
||||||
// https://dumps.tadiphone.dev/dumps/google/kirkwood
|
// https://dumps.tadiphone.dev/dumps/google/kirkwood
|
||||||
@@ -96,6 +96,26 @@ public enum ClientType {
|
|||||||
forceAVC()
|
forceAVC()
|
||||||
? "iOS TV Force AVC"
|
? "iOS TV Force AVC"
|
||||||
: "iOS TV"
|
: "iOS TV"
|
||||||
|
),
|
||||||
|
/**
|
||||||
|
* Uses non adaptive bitrate, which fixes audio stuttering with YT Music.
|
||||||
|
* Uses VP9 and not AV1.
|
||||||
|
*/
|
||||||
|
ANDROID_VR_1_43_32(
|
||||||
|
ANDROID_VR_1_61_48.id,
|
||||||
|
ANDROID_VR_1_61_48.clientName,
|
||||||
|
ANDROID_VR_1_61_48.packageName,
|
||||||
|
ANDROID_VR_1_61_48.deviceMake,
|
||||||
|
ANDROID_VR_1_61_48.deviceModel,
|
||||||
|
ANDROID_VR_1_61_48.osName,
|
||||||
|
ANDROID_VR_1_61_48.osVersion,
|
||||||
|
ANDROID_VR_1_61_48.androidSdkVersion,
|
||||||
|
ANDROID_VR_1_61_48.buildId,
|
||||||
|
"107.0.5284.2",
|
||||||
|
"1.43.32",
|
||||||
|
ANDROID_VR_1_61_48.requiresAuth,
|
||||||
|
ANDROID_VR_1_61_48.useAuth,
|
||||||
|
"Android VR 1.43"
|
||||||
);
|
);
|
||||||
|
|
||||||
private static boolean forceAVC() {
|
private static boolean forceAVC() {
|
||||||
|
|||||||
@@ -252,8 +252,9 @@ public class SpoofVideoStreamsPatch {
|
|||||||
public static final class AudioStreamLanguageOverrideAvailability implements Setting.Availability {
|
public static final class AudioStreamLanguageOverrideAvailability implements Setting.Availability {
|
||||||
@Override
|
@Override
|
||||||
public boolean isAvailable() {
|
public boolean isAvailable() {
|
||||||
|
ClientType clientType = BaseSettings.SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get();
|
||||||
return BaseSettings.SPOOF_VIDEO_STREAMS.get()
|
return BaseSettings.SPOOF_VIDEO_STREAMS.get()
|
||||||
&& BaseSettings.SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get() == ClientType.ANDROID_VR_NO_AUTH;
|
&& (clientType == ClientType.ANDROID_VR_1_61_48 || clientType == ClientType.ANDROID_VR_1_43_32);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ final class PlayerRoutes {
|
|||||||
// but if this is a fall over client it will set the language even though
|
// but if this is a fall over client it will set the language even though
|
||||||
// the audio language is not selectable in the UI.
|
// the audio language is not selectable in the UI.
|
||||||
ClientType userSelectedClient = BaseSettings.SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get();
|
ClientType userSelectedClient = BaseSettings.SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get();
|
||||||
Locale streamLocale = userSelectedClient == ClientType.ANDROID_VR_NO_AUTH
|
Locale streamLocale = (userSelectedClient == ClientType.ANDROID_VR_1_61_48
|
||||||
|
|| userSelectedClient == ClientType.ANDROID_VR_1_43_32)
|
||||||
? BaseSettings.SPOOF_VIDEO_STREAMS_LANGUAGE.get().getLocale()
|
? BaseSettings.SPOOF_VIDEO_STREAMS_LANGUAGE.get().getLocale()
|
||||||
: Locale.getDefault();
|
: Locale.getDefault();
|
||||||
|
|
||||||
|
|||||||
@@ -35,21 +35,22 @@ import app.revanced.extension.shared.spoof.ClientType;
|
|||||||
*/
|
*/
|
||||||
public class StreamingDataRequest {
|
public class StreamingDataRequest {
|
||||||
|
|
||||||
private static final ClientType[] CLIENT_ORDER_TO_USE;
|
private static volatile ClientType[] clientOrderToUse = ClientType.values();
|
||||||
|
|
||||||
static {
|
public static void setClientOrderToUse(ClientType[] availableClients, ClientType preferredClient) {
|
||||||
ClientType[] allClientTypes = ClientType.values();
|
Objects.requireNonNull(availableClients);
|
||||||
ClientType preferredClient = BaseSettings.SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get();
|
|
||||||
|
|
||||||
CLIENT_ORDER_TO_USE = new ClientType[allClientTypes.length];
|
clientOrderToUse = new ClientType[availableClients.length];
|
||||||
CLIENT_ORDER_TO_USE[0] = preferredClient;
|
clientOrderToUse[0] = preferredClient;
|
||||||
|
|
||||||
int i = 1;
|
int i = 1;
|
||||||
for (ClientType c : allClientTypes) {
|
for (ClientType c : availableClients) {
|
||||||
if (c != preferredClient) {
|
if (c != preferredClient) {
|
||||||
CLIENT_ORDER_TO_USE[i++] = c;
|
clientOrderToUse[i++] = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger.printDebug(() -> "Available spoof clients: " + Arrays.toString(clientOrderToUse));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String AUTHORIZATION_HEADER = "Authorization";
|
private static final String AUTHORIZATION_HEADER = "Authorization";
|
||||||
@@ -193,9 +194,9 @@ public class StreamingDataRequest {
|
|||||||
|
|
||||||
// Retry with different client if empty response body is received.
|
// Retry with different client if empty response body is received.
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (ClientType clientType : CLIENT_ORDER_TO_USE) {
|
for (ClientType clientType : clientOrderToUse) {
|
||||||
// Show an error if the last client type fails, or if debug is enabled then show for all attempts.
|
// Show an error if the last client type fails, or if debug is enabled then show for all attempts.
|
||||||
final boolean showErrorToast = (++i == CLIENT_ORDER_TO_USE.length) || debugEnabled;
|
final boolean showErrorToast = (++i == clientOrderToUse.length) || debugEnabled;
|
||||||
|
|
||||||
HttpURLConnection connection = send(clientType, videoId, playerHeaders, showErrorToast);
|
HttpURLConnection connection = send(clientType, videoId, playerHeaders, showErrorToast);
|
||||||
if (connection != null) {
|
if (connection != null) {
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package app.revanced.extension.youtube.patches.spoof;
|
||||||
|
|
||||||
|
import static app.revanced.extension.shared.spoof.ClientType.ANDROID_CREATOR;
|
||||||
|
import static app.revanced.extension.shared.spoof.ClientType.ANDROID_UNPLUGGED;
|
||||||
|
import static app.revanced.extension.shared.spoof.ClientType.ANDROID_VR_1_61_48;
|
||||||
|
import static app.revanced.extension.shared.spoof.ClientType.IOS_UNPLUGGED;
|
||||||
|
|
||||||
|
import app.revanced.extension.shared.settings.BaseSettings;
|
||||||
|
import app.revanced.extension.shared.spoof.ClientType;
|
||||||
|
import app.revanced.extension.shared.spoof.requests.StreamingDataRequest;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
public class SpoofVideoStreamsPatch {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Injection point.
|
||||||
|
*/
|
||||||
|
public static void setClientOrderToUse() {
|
||||||
|
ClientType[] availableClients = {
|
||||||
|
ANDROID_VR_1_61_48,
|
||||||
|
ANDROID_UNPLUGGED,
|
||||||
|
ANDROID_CREATOR,
|
||||||
|
IOS_UNPLUGGED
|
||||||
|
};
|
||||||
|
|
||||||
|
StreamingDataRequest.setClientOrderToUse(availableClients,
|
||||||
|
BaseSettings.SPOOF_VIDEO_STREAMS_CLIENT_TYPE.get());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -86,7 +86,8 @@ public class SpoofStreamingDataSideEffectsPreference extends Preference {
|
|||||||
String summary = str(key + "_summary");
|
String summary = str(key + "_summary");
|
||||||
|
|
||||||
// Android VR supports AV1 but all other clients do not.
|
// Android VR supports AV1 but all other clients do not.
|
||||||
if (clientType != ClientType.ANDROID_VR_NO_AUTH) {
|
if (clientType != ClientType.ANDROID_VR_1_61_48
|
||||||
|
&& clientType != ClientType.ANDROID_VR_1_43_32) {
|
||||||
summary += '\n' + str("revanced_spoof_video_streams_about_no_av1");
|
summary += '\n' + str("revanced_spoof_video_streams_about_no_av1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ org.gradle.jvmargs = -Xms512M -Xmx2048M
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
android.useAndroidX = true
|
android.useAndroidX = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 5.37.0-dev.1
|
version = 5.37.0-dev.5
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
package app.revanced.patches.music.misc.spoof
|
package app.revanced.patches.music.misc.spoof
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
|
import app.revanced.patches.music.misc.extension.sharedExtensionPatch
|
||||||
|
import app.revanced.patches.music.misc.gms.musicActivityOnCreateFingerprint
|
||||||
import app.revanced.patches.music.playservice.is_7_33_or_greater
|
import app.revanced.patches.music.playservice.is_7_33_or_greater
|
||||||
import app.revanced.patches.music.playservice.is_8_11_or_greater
|
import app.revanced.patches.music.playservice.is_8_11_or_greater
|
||||||
import app.revanced.patches.music.playservice.is_8_15_or_greater
|
import app.revanced.patches.music.playservice.is_8_15_or_greater
|
||||||
import app.revanced.patches.music.playservice.versionCheckPatch
|
import app.revanced.patches.music.playservice.versionCheckPatch
|
||||||
import app.revanced.patches.shared.misc.spoof.spoofVideoStreamsPatch
|
import app.revanced.patches.shared.misc.spoof.spoofVideoStreamsPatch
|
||||||
|
|
||||||
|
private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/music/patches/spoof/SpoofVideoStreamsPatch;"
|
||||||
|
|
||||||
val spoofVideoStreamsPatch = spoofVideoStreamsPatch(
|
val spoofVideoStreamsPatch = spoofVideoStreamsPatch(
|
||||||
|
fixMediaFetchHotConfigChanges = { true },
|
||||||
|
fixMediaFetchHotConfigAlternativeChanges = { is_8_11_or_greater && !is_8_15_or_greater },
|
||||||
|
fixParsePlaybackResponseFeatureFlag = { is_7_33_or_greater },
|
||||||
block = {
|
block = {
|
||||||
compatibleWith(
|
compatibleWith(
|
||||||
"com.google.android.apps.youtube.music"(
|
"com.google.android.apps.youtube.music"(
|
||||||
@@ -14,9 +22,12 @@ val spoofVideoStreamsPatch = spoofVideoStreamsPatch(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
dependsOn(versionCheckPatch, userAgentClientSpoofPatch)
|
dependsOn(sharedExtensionPatch, versionCheckPatch, userAgentClientSpoofPatch)
|
||||||
},
|
},
|
||||||
fixMediaFetchHotConfigChanges = { true },
|
executeBlock = {
|
||||||
fixMediaFetchHotConfigAlternativeChanges = { is_8_11_or_greater && !is_8_15_or_greater },
|
musicActivityOnCreateFingerprint.method.addInstruction(
|
||||||
fixParsePlaybackResponseFeatureFlag = { is_7_33_or_greater }
|
1, // Must use 1 index so context is set by extension patch.
|
||||||
|
"invoke-static { }, $EXTENSION_CLASS_DESCRIPTOR->setClientOrderToUse()V"
|
||||||
|
)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
@@ -43,7 +43,7 @@ fun spoofVideoStreamsPatch(
|
|||||||
) {
|
) {
|
||||||
block()
|
block()
|
||||||
|
|
||||||
dependsOn(sharedExtensionPatch, addResourcesPatch)
|
dependsOn(addResourcesPatch)
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
// region Enable extension helper method used by other patches
|
// region Enable extension helper method used by other patches
|
||||||
|
|||||||
@@ -187,11 +187,16 @@ val customThemePatch = resourcePatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Login screen gradient.
|
// Login screen gradient.
|
||||||
document("res/drawable/start_screen_gradient.xml").use { document ->
|
try {
|
||||||
val gradientNode = document.getElementsByTagName("gradient").item(0) as Element
|
document("res/drawable/start_screen_gradient.xml").use { document ->
|
||||||
|
val gradientNode = document.getElementsByTagName("gradient").item(0) as Element
|
||||||
|
|
||||||
gradientNode.setAttribute("android:startColor", "@color/gray_7")
|
gradientNode.setAttribute("android:startColor", "@color/gray_7")
|
||||||
gradientNode.setAttribute("android:endColor", "@color/gray_7")
|
gradientNode.setAttribute("android:endColor", "@color/gray_7")
|
||||||
|
}
|
||||||
|
} catch (_: Exception) {
|
||||||
|
// Fails for 9.0.66+
|
||||||
|
// printWarn("Failed to locate start_screen_gradient.xml, skipping modification.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ import app.revanced.util.returnEarly
|
|||||||
|
|
||||||
internal const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/spotify/misc/fix/SpoofClientPatch;"
|
internal const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/spotify/misc/fix/SpoofClientPatch;"
|
||||||
|
|
||||||
|
@Deprecated("Patch no longer functions")
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
val spoofClientPatch = bytecodePatch(
|
val spoofClientPatch = bytecodePatch(
|
||||||
name = "Spoof client",
|
|
||||||
description = "Spoofs the client to fix various functions of the app.",
|
description = "Spoofs the client to fix various functions of the app.",
|
||||||
) {
|
) {
|
||||||
val requestListenerPort by intOption(
|
val requestListenerPort by intOption(
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ val hideAdsPatch = bytecodePatch(
|
|||||||
name = "Hide Ads",
|
name = "Hide Ads",
|
||||||
description = "Hides ad banners between chats.",
|
description = "Hides ad banners between chats.",
|
||||||
) {
|
) {
|
||||||
compatibleWith("com.viber.voip")
|
compatibleWith("com.viber.voip"("25.9.2.0"))
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
// Return 1 (true) indicating ads should be disabled.
|
// Return 1 (true) indicating ads should be disabled.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.revanced.patches.youtube.misc.spoof
|
package app.revanced.patches.youtube.misc.spoof
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patches.all.misc.resources.addResources
|
import app.revanced.patches.all.misc.resources.addResources
|
||||||
import app.revanced.patches.shared.misc.settings.preference.ListPreference
|
import app.revanced.patches.shared.misc.settings.preference.ListPreference
|
||||||
import app.revanced.patches.shared.misc.settings.preference.NonInteractivePreference
|
import app.revanced.patches.shared.misc.settings.preference.NonInteractivePreference
|
||||||
@@ -13,56 +14,70 @@ import app.revanced.patches.youtube.misc.playservice.is_20_14_or_greater
|
|||||||
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
|
import app.revanced.patches.youtube.shared.mainActivityOnCreateFingerprint
|
||||||
|
|
||||||
val spoofVideoStreamsPatch = spoofVideoStreamsPatch({
|
private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/spoof/SpoofVideoStreamsPatch;"
|
||||||
compatibleWith(
|
|
||||||
"com.google.android.youtube"(
|
val spoofVideoStreamsPatch = spoofVideoStreamsPatch(
|
||||||
"19.34.42",
|
block = {
|
||||||
"19.43.41",
|
compatibleWith(
|
||||||
"19.47.53",
|
"com.google.android.youtube"(
|
||||||
"20.07.39",
|
"19.34.42",
|
||||||
"20.12.46",
|
"19.43.41",
|
||||||
"20.13.41",
|
"19.47.53",
|
||||||
|
"20.07.39",
|
||||||
|
"20.12.46",
|
||||||
|
"20.13.41",
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
dependsOn(
|
dependsOn(
|
||||||
userAgentClientSpoofPatch,
|
userAgentClientSpoofPatch,
|
||||||
settingsPatch,
|
settingsPatch,
|
||||||
versionCheckPatch
|
versionCheckPatch
|
||||||
)
|
)
|
||||||
}, {
|
},
|
||||||
is_19_34_or_greater
|
fixMediaFetchHotConfigChanges = {
|
||||||
}, {
|
is_19_34_or_greater
|
||||||
// In 20.14 the flag was merged with 20.03 start playback flag.
|
},
|
||||||
is_20_10_or_greater && !is_20_14_or_greater
|
fixMediaFetchHotConfigAlternativeChanges = {
|
||||||
}, {
|
// In 20.14 the flag was merged with 20.03 start playback flag.
|
||||||
is_20_03_or_greater
|
is_20_10_or_greater && !is_20_14_or_greater
|
||||||
}, {
|
},
|
||||||
addResources("youtube", "misc.fix.playback.spoofVideoStreamsPatch")
|
fixParsePlaybackResponseFeatureFlag = {
|
||||||
|
is_20_03_or_greater
|
||||||
|
},
|
||||||
|
executeBlock = {
|
||||||
|
addResources("youtube", "misc.fix.playback.spoofVideoStreamsPatch")
|
||||||
|
|
||||||
PreferenceScreen.MISC.addPreferences(
|
PreferenceScreen.MISC.addPreferences(
|
||||||
PreferenceScreenPreference(
|
PreferenceScreenPreference(
|
||||||
key = "revanced_spoof_video_streams_screen",
|
key = "revanced_spoof_video_streams_screen",
|
||||||
sorting = PreferenceScreenPreference.Sorting.UNSORTED,
|
sorting = PreferenceScreenPreference.Sorting.UNSORTED,
|
||||||
preferences = setOf(
|
preferences = setOf(
|
||||||
SwitchPreference("revanced_spoof_video_streams"),
|
SwitchPreference("revanced_spoof_video_streams"),
|
||||||
ListPreference("revanced_spoof_video_streams_client_type"),
|
ListPreference("revanced_spoof_video_streams_client_type"),
|
||||||
NonInteractivePreference(
|
NonInteractivePreference(
|
||||||
// Requires a key and title but the actual text is chosen at runtime.
|
// Requires a key and title but the actual text is chosen at runtime.
|
||||||
key = "revanced_spoof_video_streams_about_android",
|
key = "revanced_spoof_video_streams_about_android",
|
||||||
tag = "app.revanced.extension.youtube.settings.preference.SpoofStreamingDataSideEffectsPreference"
|
tag = "app.revanced.extension.youtube.settings.preference.SpoofStreamingDataSideEffectsPreference"
|
||||||
|
),
|
||||||
|
ListPreference(
|
||||||
|
key = "revanced_spoof_video_streams_language",
|
||||||
|
// Language strings are declared in Setting patch.
|
||||||
|
entriesKey = "revanced_language_entries",
|
||||||
|
entryValuesKey = "revanced_language_entry_values",
|
||||||
|
tag = "app.revanced.extension.shared.settings.preference.SortedListPreference"
|
||||||
|
),
|
||||||
|
SwitchPreference("revanced_spoof_video_streams_ios_force_avc"),
|
||||||
|
SwitchPreference("revanced_spoof_streaming_data_stats_for_nerds"),
|
||||||
),
|
),
|
||||||
ListPreference(
|
|
||||||
key = "revanced_spoof_video_streams_language",
|
|
||||||
// Language strings are declared in Setting patch.
|
|
||||||
entriesKey = "revanced_language_entries",
|
|
||||||
entryValuesKey = "revanced_language_entry_values",
|
|
||||||
tag = "app.revanced.extension.shared.settings.preference.SortedListPreference"
|
|
||||||
),
|
|
||||||
SwitchPreference("revanced_spoof_video_streams_ios_force_avc"),
|
|
||||||
SwitchPreference("revanced_spoof_streaming_data_stats_for_nerds"),
|
|
||||||
),
|
),
|
||||||
),
|
)
|
||||||
)
|
|
||||||
})
|
mainActivityOnCreateFingerprint.method.addInstruction(
|
||||||
|
1, // Must use 1 index so context is set by extension patch.,
|
||||||
|
"invoke-static { }, $EXTENSION_CLASS_DESCRIPTOR->setClientOrderToUse()V"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|||||||
@@ -131,7 +131,7 @@
|
|||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="revanced_spoof_video_streams_client_type_entry_values">
|
<string-array name="revanced_spoof_video_streams_client_type_entry_values">
|
||||||
<item>ANDROID_UNPLUGGED</item>
|
<item>ANDROID_UNPLUGGED</item>
|
||||||
<item>ANDROID_VR_NO_AUTH</item>
|
<item>ANDROID_VR_1_61_48</item>
|
||||||
<item>IOS_UNPLUGGED</item>
|
<item>IOS_UNPLUGGED</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
</patch>
|
</patch>
|
||||||
|
|||||||
Reference in New Issue
Block a user