mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 01:51:27 +01:00
feat(YouTube): Support version 20.14.43 (#5940)
This commit is contained in:
committed by
GitHub
parent
e89660d234
commit
f7f4a1b0f0
@@ -116,7 +116,7 @@ public class Utils {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The version name of the app, such as 19.11.43
|
||||
* @return The version name of the app, such as 20.13.41
|
||||
*/
|
||||
public static String getAppVersionName() {
|
||||
if (versionName == null) {
|
||||
|
||||
@@ -32,6 +32,7 @@ import static app.revanced.extension.youtube.sponsorblock.objects.CategoryBehavi
|
||||
import android.graphics.Color;
|
||||
|
||||
import app.revanced.extension.shared.Logger;
|
||||
import app.revanced.extension.shared.Utils;
|
||||
import app.revanced.extension.shared.settings.BaseSettings;
|
||||
import app.revanced.extension.shared.settings.BooleanSetting;
|
||||
import app.revanced.extension.shared.settings.EnumSetting;
|
||||
@@ -514,10 +515,14 @@ public class Settings extends BaseSettings {
|
||||
DEPRECATED_SWIPE_OVERLAY_BACKGROUND_ALPHA.resetToDefault();
|
||||
}
|
||||
|
||||
// Old spoof versions that no longer work.
|
||||
if (SPOOF_APP_VERSION_TARGET.get().compareTo(SPOOF_APP_VERSION_TARGET.defaultValue) < 0) {
|
||||
Logger.printInfo(() -> "Resetting spoof app version target");
|
||||
// Old spoof versions that no longer work,
|
||||
// or is spoofing to a version the same or newer than this app.
|
||||
if (!SPOOF_APP_VERSION_TARGET.isSetToDefault() &&
|
||||
(SPOOF_APP_VERSION_TARGET.get().compareTo(SPOOF_APP_VERSION_TARGET.defaultValue) < 0
|
||||
|| (Utils.getAppVersionName().compareTo(SPOOF_APP_VERSION_TARGET.get()) <= 0))) {
|
||||
Logger.printInfo(() -> "Resetting spoof app version");
|
||||
SPOOF_APP_VERSION_TARGET.resetToDefault();
|
||||
SPOOF_APP_VERSION.resetToDefault();
|
||||
}
|
||||
|
||||
// RYD requires manually migrating old settings since the lack of
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
package app.revanced.patches.shared.misc.spoof
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import app.revanced.util.literal
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.Method
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
internal val buildInitPlaybackRequestFingerprint = fingerprint {
|
||||
returns("Lorg/chromium/net/UrlRequest\$Builder;")
|
||||
@@ -37,10 +41,6 @@ internal val buildRequestFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
returns("Lorg/chromium/net/UrlRequest") // UrlRequest; or UrlRequest$Builder;
|
||||
custom { methodDef, _ ->
|
||||
if (indexOfNewUrlRequestBuilderInstruction(methodDef) < 0) {
|
||||
return@custom false
|
||||
}
|
||||
|
||||
// Different targets have slightly different parameters
|
||||
|
||||
// Earlier targets have parameters:
|
||||
@@ -74,10 +74,10 @@ internal val buildRequestFingerprint = fingerprint {
|
||||
val parameterTypesSize = parameterTypes.size
|
||||
(parameterTypesSize == 6 || parameterTypesSize == 7 || parameterTypesSize == 8) &&
|
||||
parameterTypes[1] == "Ljava/util/Map;" // URL headers.
|
||||
&& indexOfNewUrlRequestBuilderInstruction(methodDef) >= 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
internal val protobufClassParseByteBufferFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PROTECTED, AccessFlags.STATIC)
|
||||
returns("L")
|
||||
@@ -191,3 +191,13 @@ internal val playbackStartDescriptorFeatureFlagFingerprint = fingerprint {
|
||||
returns("Z")
|
||||
literal { PLAYBACK_START_CHECK_ENDPOINT_USED_FEATURE_FLAG }
|
||||
}
|
||||
|
||||
internal fun indexOfNewUrlRequestBuilderInstruction(method: Method) = method.indexOfFirstInstruction {
|
||||
val reference = getReference<MethodReference>()
|
||||
opcode == Opcode.INVOKE_VIRTUAL && reference?.definingClass == "Lorg/chromium/net/CronetEngine;"
|
||||
&& reference.name == "newUrlRequestBuilder"
|
||||
&& reference.parameterTypes.size == 3
|
||||
&& reference.parameterTypes[0] == "Ljava/lang/String;"
|
||||
&& reference.parameterTypes[1] == "Lorg/chromium/net/UrlRequest\$Callback;"
|
||||
&& reference.parameterTypes[2] == "Ljava/util/concurrent/Executor;"
|
||||
}
|
||||
|
||||
@@ -16,20 +16,17 @@ import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
import app.revanced.util.findFreeRegister
|
||||
import app.revanced.util.findInstructionIndicesReversedOrThrow
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||
import app.revanced.util.insertLiteralOverride
|
||||
import app.revanced.util.returnEarly
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.builder.MutableMethodImplementation
|
||||
import com.android.tools.smali.dexlib2.iface.Method
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
|
||||
import com.android.tools.smali.dexlib2.immutable.ImmutableMethodParameter
|
||||
|
||||
@@ -337,12 +334,3 @@ fun spoofVideoStreamsPatch(
|
||||
executeBlock()
|
||||
}
|
||||
}
|
||||
|
||||
internal fun indexOfNewUrlRequestBuilderInstruction(method: Method) = method.indexOfFirstInstruction {
|
||||
opcode == Opcode.INVOKE_VIRTUAL && getReference<MethodReference>().toString() ==
|
||||
"Lorg/chromium/net/CronetEngine;" +
|
||||
"->newUrlRequestBuilder(" +
|
||||
"Ljava/lang/String;Lorg/chromium/net/UrlRequest${'$'}Callback;" +
|
||||
"Ljava/util/concurrent/Executor;" +
|
||||
")Lorg/chromium/net/UrlRequest${'$'}Builder;"
|
||||
}
|
||||
|
||||
@@ -78,10 +78,9 @@ val hideAdsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -27,10 +27,9 @@ val hideGetPremiumPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -25,10 +25,9 @@ val videoAdsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -55,10 +55,9 @@ val copyVideoUrlPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -26,10 +26,9 @@ val removeViewerDiscretionDialogPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ val disableDoubleTapActionsPatch = bytecodePatch(
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -76,10 +76,9 @@ val downloadsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -22,10 +22,9 @@ val seekbarPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -90,10 +90,9 @@ val swipeControlsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -26,10 +26,9 @@ val autoCaptionsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -45,10 +45,9 @@ val customBrandingPatch = resourcePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -95,10 +95,9 @@ val changeHeaderPatch = resourcePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -24,10 +24,9 @@ val hideButtonsPatch = resourcePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -42,10 +42,9 @@ val navigationButtonsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -60,10 +60,9 @@ val hidePlayerOverlayButtonsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -35,10 +35,9 @@ val changeFormFactorPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -61,10 +61,9 @@ val hideEndscreenCardsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -33,10 +33,9 @@ val hideEndScreenSuggestedVideoPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -31,10 +31,9 @@ val disableFullscreenAmbientModePatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -128,10 +128,9 @@ val hideLayoutComponentsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -59,10 +59,9 @@ val hideInfoCardsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -26,10 +26,9 @@ val hidePlayerFlyoutMenuPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -50,10 +50,9 @@ val hideRelatedVideoOverlayPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -31,10 +31,9 @@ val disableRollingNumberAnimationPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -174,10 +174,9 @@ val hideShortsComponentsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -33,10 +33,9 @@ val disableSignInToTvPopupPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -23,10 +23,9 @@ val hideTimestampPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -155,10 +155,9 @@ val miniplayerPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -23,10 +23,9 @@ val playerPopupPanelsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -23,10 +23,9 @@ internal val exitFullscreenPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -25,10 +25,9 @@ val openVideosFullscreenPatch = bytecodePatch(
|
||||
|
||||
compatibleWith(
|
||||
"com.google.android.youtube"(
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -54,10 +54,9 @@ val customPlayerOverlayOpacityPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -63,10 +63,9 @@ val returnYouTubeDislikePatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -68,10 +68,9 @@ val wideSearchbarPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -46,10 +46,9 @@ val shortsAutoplayPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -66,10 +66,9 @@ val openShortsInRegularPlayerPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -128,10 +128,9 @@ val sponsorBlockPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import app.revanced.patches.shared.misc.settings.preference.PreferenceScreenPref
|
||||
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
||||
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.patches.youtube.misc.playservice.is_19_43_or_greater
|
||||
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.settings.PreferenceScreen
|
||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||
@@ -60,10 +61,9 @@ val spoofAppVersionPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
@@ -79,17 +79,21 @@ val spoofAppVersionPatch = bytecodePatch(
|
||||
tag = "app.revanced.extension.shared.settings.preference.NoTitlePreferenceCategory",
|
||||
preferences = setOf(
|
||||
SwitchPreference("revanced_spoof_app_version"),
|
||||
if (is_19_43_or_greater) {
|
||||
if (is_20_14_or_greater) {
|
||||
ListPreference("revanced_spoof_app_version_target")
|
||||
} else if (is_19_43_or_greater) {
|
||||
ListPreference(
|
||||
key = "revanced_spoof_app_version_target",
|
||||
summaryKey = null
|
||||
summaryKey = null,
|
||||
entriesKey = "revanced_spoof_app_version_target_legacy_20_13_entries",
|
||||
entryValuesKey = "revanced_spoof_app_version_target_legacy_20_13_entry_values"
|
||||
)
|
||||
} else {
|
||||
ListPreference(
|
||||
key = "revanced_spoof_app_version_target",
|
||||
summaryKey = null,
|
||||
entriesKey = "revanced_spoof_app_version_target_legacy_entries",
|
||||
entryValuesKey = "revanced_spoof_app_version_target_legacy_entry_values"
|
||||
entriesKey = "revanced_spoof_app_version_target_legacy_19_34_entries",
|
||||
entryValuesKey = "revanced_spoof_app_version_target_legacy_19_34_entry_values"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -34,10 +34,9 @@ val changeStartPagePatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -36,10 +36,9 @@ val disableResumingShortsOnStartupPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -206,10 +206,9 @@ val themePatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -35,10 +35,9 @@ val alternativeThumbnailsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -29,10 +29,9 @@ val bypassImageRegionRestrictionsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -25,10 +25,9 @@ val announcementsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -26,10 +26,9 @@ val autoRepeatPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -53,10 +53,9 @@ val backgroundPlaybackPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -19,10 +19,9 @@ val enableDebuggingPatch = enableDebuggingPatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
},
|
||||
|
||||
@@ -26,10 +26,9 @@ val spoofDeviceDimensionsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -23,10 +23,9 @@ val checkWatchHistoryDomainNameResolutionPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package app.revanced.patches.youtube.misc.fix.backtoexitgesture
|
||||
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import app.revanced.patcher.fingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val scrollPositionFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PROTECTED, AccessFlags.FINAL)
|
||||
@@ -24,30 +24,18 @@ internal val recyclerViewTopScrollingFingerprint = fingerprint {
|
||||
returns("V")
|
||||
parameters()
|
||||
opcodes(
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.CHECK_CAST,
|
||||
Opcode.CONST_4,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.GOTO,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_INTERFACE,
|
||||
Opcode.INVOKE_INTERFACE
|
||||
)
|
||||
}
|
||||
|
||||
internal val recyclerViewTopScrollingParentFingerprint = fingerprint {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
parameters("L", "L", "Landroid/view/ViewGroup;", "Landroid/view/ViewGroup;")
|
||||
opcodes(
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
@@ -55,5 +43,8 @@ internal val recyclerViewTopScrollingParentFingerprint = fingerprint {
|
||||
Opcode.CONST_16,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.RETURN_VOID
|
||||
)
|
||||
}
|
||||
|
||||
@@ -15,13 +15,14 @@ internal val fixBackToExitGesturePatch = bytecodePatch(
|
||||
) {
|
||||
|
||||
execute {
|
||||
recyclerViewTopScrollingFingerprint.match(recyclerViewTopScrollingParentFingerprint.originalClassDef)
|
||||
.let {
|
||||
it.method.addInstruction(
|
||||
it.patternMatch!!.endIndex,
|
||||
"invoke-static { }, $EXTENSION_CLASS_DESCRIPTOR->onTopView()V"
|
||||
)
|
||||
}
|
||||
recyclerViewTopScrollingFingerprint.match(
|
||||
recyclerViewTopScrollingParentFingerprint.originalClassDef
|
||||
).let {
|
||||
it.method.addInstruction(
|
||||
it.patternMatch!!.endIndex,
|
||||
"invoke-static { }, $EXTENSION_CLASS_DESCRIPTOR->onTopView()V"
|
||||
)
|
||||
}
|
||||
|
||||
scrollPositionFingerprint.let {
|
||||
navigate(it.originalMethod)
|
||||
|
||||
@@ -37,10 +37,9 @@ val gmsCoreSupportPatch = gmsCoreSupportPatch(
|
||||
YOUTUBE_PACKAGE_NAME(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -28,10 +28,9 @@ val disableHapticFeedbackPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -34,10 +34,9 @@ val bypassURLRedirectsPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -43,10 +43,9 @@ val openLinksExternallyPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -32,10 +32,9 @@ val removeTrackingQueryParameterPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -24,10 +24,9 @@ val spoofVideoStreamsPatch = spoofVideoStreamsPatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -46,10 +46,9 @@ val forceOriginalAudioPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -56,10 +56,9 @@ val disableHdrPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -26,10 +26,9 @@ val videoQualityPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -30,10 +30,9 @@ val playbackSpeedPatch = bytecodePatch(
|
||||
"com.google.android.youtube"(
|
||||
"19.34.42",
|
||||
"19.43.41",
|
||||
"19.47.53",
|
||||
"20.07.39",
|
||||
"20.12.46",
|
||||
"20.13.41",
|
||||
"20.14.43",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -173,15 +173,25 @@
|
||||
<string-array name="revanced_spoof_app_version_target_entries">
|
||||
<item>@string/revanced_spoof_app_version_target_entry_1</item>
|
||||
<item>@string/revanced_spoof_app_version_target_entry_2</item>
|
||||
<item>@string/revanced_spoof_app_version_target_entry_3</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_spoof_app_version_target_entry_values">
|
||||
<item>20.13.41</item>
|
||||
<item>19.35.36</item>
|
||||
<item>19.01.34</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_spoof_app_version_target_legacy_entries">
|
||||
<string-array name="revanced_spoof_app_version_target_legacy_20_13_entries">
|
||||
<item>@string/revanced_spoof_app_version_target_entry_2</item>
|
||||
<item>@string/revanced_spoof_app_version_target_entry_3</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_spoof_app_version_target_legacy_20_13_entry_values">
|
||||
<item>19.35.36</item>
|
||||
<item>19.01.34</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_spoof_app_version_target_legacy_entry_values">
|
||||
<string-array name="revanced_spoof_app_version_target_legacy_19_34_entries">
|
||||
<item>19.01.34</item>
|
||||
</string-array>
|
||||
<string-array name="revanced_spoof_app_version_target_legacy_19_34_entry_values">
|
||||
<item>19.01.34</item>
|
||||
</string-array>
|
||||
</patch>
|
||||
|
||||
@@ -1315,8 +1315,9 @@ This will change the appearance and features of the app, but unknown side effect
|
||||
|
||||
If later turned off, it is recommended to clear the app data to prevent UI bugs."</string>
|
||||
<string name="revanced_spoof_app_version_target_title">Spoof app version target</string>
|
||||
<string name="revanced_spoof_app_version_target_entry_1">19.35.36 - Restore old Shorts player icons</string>
|
||||
<string name="revanced_spoof_app_version_target_entry_2">19.01.34 - Restore old navigation icons</string>
|
||||
<string name="revanced_spoof_app_version_target_entry_1">20.13.41 - Restore non collapsed video action bar</string>
|
||||
<string name="revanced_spoof_app_version_target_entry_2">19.35.36 - Restore old Shorts player icons</string>
|
||||
<string name="revanced_spoof_app_version_target_entry_3">19.01.34 - Restore old navigation icons</string>
|
||||
</patch>
|
||||
<patch id="layout.startpage.changeStartPagePatch">
|
||||
<string name="revanced_change_start_page_title">Change start page</string>
|
||||
|
||||
Reference in New Issue
Block a user