Skip to content

Commit 049e7f0

Browse files
zainarbaniLisoUseInAIKyriosoSumAtrIX
authored
feat(YouTube): Support versions 19.25 and 19.34 (ReVanced#3629)
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
1 parent c9c7f01 commit 049e7f0

File tree

141 files changed

+2279
-2256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+2279
-2256
lines changed

api/revanced-patches.api

+15-4
Original file line numberDiff line numberDiff line change
@@ -1850,10 +1850,6 @@ public final class app/revanced/patches/youtube/layout/startpage/ChangeStartPage
18501850
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
18511851
}
18521852

1853-
public final class app/revanced/patches/youtube/layout/startpage/fingerprints/StartActivityFingerprint : app/revanced/patcher/fingerprint/MethodFingerprint {
1854-
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/startpage/fingerprints/StartActivityFingerprint;
1855-
}
1856-
18571853
public final class app/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch : app/revanced/patcher/patch/BytecodePatch {
18581854
public static final field INSTANCE Lapp/revanced/patches/youtube/layout/startupshortsreset/DisableResumingShortsOnStartupPatch;
18591855
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
@@ -2203,12 +2199,27 @@ public final class app/revanced/util/BytecodeUtilsKt {
22032199
public static final fun findMutableMethodOf (Lapp/revanced/patcher/util/proxy/mutableTypes/MutableClass;Lcom/android/tools/smali/dexlib2/iface/Method;)Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;
22042200
public static final fun findOpcodeIndicesReversed (Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/Opcode;)Ljava/util/List;
22052201
public static final fun findOpcodeIndicesReversed (Lcom/android/tools/smali/dexlib2/iface/Method;Lkotlin/jvm/functions/Function1;)Ljava/util/List;
2202+
public static final fun forEachLiteralValueInstruction (Lapp/revanced/patcher/data/BytecodeContext;JLkotlin/jvm/functions/Function2;)V
22062203
public static final fun getException (Lapp/revanced/patcher/fingerprint/MethodFingerprint;)Lapp/revanced/patcher/patch/PatchException;
2204+
public static final fun indexOfFirstInstruction (Lcom/android/tools/smali/dexlib2/iface/Method;ILcom/android/tools/smali/dexlib2/Opcode;)I
22072205
public static final fun indexOfFirstInstruction (Lcom/android/tools/smali/dexlib2/iface/Method;ILkotlin/jvm/functions/Function1;)I
2206+
public static final fun indexOfFirstInstruction (Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/Opcode;)I
22082207
public static final fun indexOfFirstInstruction (Lcom/android/tools/smali/dexlib2/iface/Method;Lkotlin/jvm/functions/Function1;)I
2208+
public static synthetic fun indexOfFirstInstruction$default (Lcom/android/tools/smali/dexlib2/iface/Method;ILcom/android/tools/smali/dexlib2/Opcode;ILjava/lang/Object;)I
22092209
public static synthetic fun indexOfFirstInstruction$default (Lcom/android/tools/smali/dexlib2/iface/Method;ILkotlin/jvm/functions/Function1;ILjava/lang/Object;)I
2210+
public static final fun indexOfFirstInstructionOrThrow (Lcom/android/tools/smali/dexlib2/iface/Method;ILcom/android/tools/smali/dexlib2/Opcode;)I
22102211
public static final fun indexOfFirstInstructionOrThrow (Lcom/android/tools/smali/dexlib2/iface/Method;ILkotlin/jvm/functions/Function1;)I
2212+
public static final fun indexOfFirstInstructionOrThrow (Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/Opcode;)I
2213+
public static synthetic fun indexOfFirstInstructionOrThrow$default (Lcom/android/tools/smali/dexlib2/iface/Method;ILcom/android/tools/smali/dexlib2/Opcode;ILjava/lang/Object;)I
22112214
public static synthetic fun indexOfFirstInstructionOrThrow$default (Lcom/android/tools/smali/dexlib2/iface/Method;ILkotlin/jvm/functions/Function1;ILjava/lang/Object;)I
2215+
public static final fun indexOfFirstInstructionReversed (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lcom/android/tools/smali/dexlib2/Opcode;)I
2216+
public static final fun indexOfFirstInstructionReversed (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;)I
2217+
public static synthetic fun indexOfFirstInstructionReversed$default (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lcom/android/tools/smali/dexlib2/Opcode;ILjava/lang/Object;)I
2218+
public static synthetic fun indexOfFirstInstructionReversed$default (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)I
2219+
public static final fun indexOfFirstInstructionReversedOrThrow (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lcom/android/tools/smali/dexlib2/Opcode;)I
2220+
public static final fun indexOfFirstInstructionReversedOrThrow (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;)I
2221+
public static synthetic fun indexOfFirstInstructionReversedOrThrow$default (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lcom/android/tools/smali/dexlib2/Opcode;ILjava/lang/Object;)I
2222+
public static synthetic fun indexOfFirstInstructionReversedOrThrow$default (Lcom/android/tools/smali/dexlib2/iface/Method;Ljava/lang/Integer;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)I
22122223
public static final fun indexOfFirstWideLiteralInstructionValue (Lcom/android/tools/smali/dexlib2/iface/Method;J)I
22132224
public static final fun indexOfFirstWideLiteralInstructionValueOrThrow (Lcom/android/tools/smali/dexlib2/iface/Method;J)I
22142225
public static final fun indexOfFirstWideLiteralInstructionValueReversed (Lcom/android/tools/smali/dexlib2/iface/Method;J)I

src/main/kotlin/app/revanced/patches/tiktok/interaction/cleardisplay/RememberClearDisplayPatch.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import app.revanced.patches.tiktok.shared.fingerprints.OnRenderFirstFrameFingerp
1313
import app.revanced.util.exception
1414
import app.revanced.util.indexOfFirstInstructionOrThrow
1515
import com.android.tools.smali.dexlib2.Opcode
16-
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c
16+
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
1717

1818
@Patch(
1919
name = "Remember clear display",
@@ -34,8 +34,8 @@ object RememberClearDisplayPatch : BytecodePatch(
3434
OnClearDisplayEventFingerprint.result?.mutableMethod?.let {
3535
// region Hook the "Clear display" configuration save event to remember the state of clear display.
3636

37-
val isEnabledIndex = it.indexOfFirstInstructionOrThrow { opcode == Opcode.IGET_BOOLEAN } + 1
38-
val isEnabledRegister = it.getInstruction<Instruction22c>(isEnabledIndex - 1).registerA
37+
val isEnabledIndex = it.indexOfFirstInstructionOrThrow(Opcode.IGET_BOOLEAN) + 1
38+
val isEnabledRegister = it.getInstruction<TwoRegisterInstruction>(isEnabledIndex - 1).registerA
3939

4040
it.addInstructions(
4141
isEnabledIndex,

src/main/kotlin/app/revanced/patches/youtube/ad/general/HideAdsPatch.kt

+2-21
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
2626
CompatiblePackage(
2727
"com.google.android.youtube",
2828
[
29-
"18.32.39",
30-
"18.37.36",
3129
"18.38.44",
32-
"18.43.45",
33-
"18.44.41",
34-
"18.45.43",
35-
"18.48.39",
3630
"18.49.37",
37-
"19.01.34",
38-
"19.02.39",
39-
"19.03.36",
40-
"19.04.38",
41-
"19.05.36",
42-
"19.06.39",
43-
"19.07.40",
44-
"19.08.36",
45-
"19.09.38",
46-
"19.10.39",
47-
"19.11.43",
48-
"19.12.41",
49-
"19.13.37",
50-
"19.14.43",
51-
"19.15.36",
5231
"19.16.39",
32+
"19.25.37",
33+
"19.34.42",
5334
],
5435
),
5536
],

src/main/kotlin/app/revanced/patches/youtube/ad/getpremium/HideGetPremiumPatch.kt

+2-21
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
2020
compatiblePackages = [
2121
CompatiblePackage(
2222
"com.google.android.youtube", [
23-
"18.32.39",
24-
"18.37.36",
2523
"18.38.44",
26-
"18.43.45",
27-
"18.44.41",
28-
"18.45.43",
29-
"18.48.39",
3024
"18.49.37",
31-
"19.01.34",
32-
"19.02.39",
33-
"19.03.36",
34-
"19.04.38",
35-
"19.05.36",
36-
"19.06.39",
37-
"19.07.40",
38-
"19.08.36",
39-
"19.09.38",
40-
"19.10.39",
41-
"19.11.43",
42-
"19.12.41",
43-
"19.13.37",
44-
"19.14.43",
45-
"19.15.36",
4625
"19.16.39",
26+
"19.25.37",
27+
"19.34.42",
4728
]
4829
)
4930
]

src/main/kotlin/app/revanced/patches/youtube/ad/video/VideoAdsPatch.kt

+2-21
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,11 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
2525
CompatiblePackage(
2626
"com.google.android.youtube",
2727
[
28-
"18.32.39",
29-
"18.37.36",
3028
"18.38.44",
31-
"18.43.45",
32-
"18.44.41",
33-
"18.45.43",
34-
"18.48.39",
3529
"18.49.37",
36-
"19.01.34",
37-
"19.02.39",
38-
"19.03.36",
39-
"19.04.38",
40-
"19.05.36",
41-
"19.06.39",
42-
"19.07.40",
43-
"19.08.36",
44-
"19.09.38",
45-
"19.10.39",
46-
"19.11.43",
47-
"19.12.41",
48-
"19.13.37",
49-
"19.14.43",
50-
"19.15.36",
5130
"19.16.39",
31+
"19.25.37",
32+
"19.34.42",
5233
]
5334
)
5435
]

src/main/kotlin/app/revanced/patches/youtube/interaction/copyvideourl/CopyVideoUrlBytecodePatch.kt

+3-16
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,11 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
1919
CompatiblePackage(
2020
"com.google.android.youtube",
2121
[
22-
"18.48.39",
22+
"18.38.44",
2323
"18.49.37",
24-
"19.01.34",
25-
"19.02.39",
26-
"19.03.36",
27-
"19.04.38",
28-
"19.05.36",
29-
"19.06.39",
30-
"19.07.40",
31-
"19.08.36",
32-
"19.09.38",
33-
"19.10.39",
34-
"19.11.43",
35-
"19.12.41",
36-
"19.13.37",
37-
"19.14.43",
38-
"19.15.36",
3924
"19.16.39",
25+
"19.25.37",
26+
"19.34.42",
4027
],
4128
),
4229
],

src/main/kotlin/app/revanced/patches/youtube/interaction/dialog/RemoveViewerDiscretionDialogPatch.kt

+2-21
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,11 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
2222
compatiblePackages = [
2323
CompatiblePackage(
2424
"com.google.android.youtube", [
25-
"18.32.39",
26-
"18.37.36",
2725
"18.38.44",
28-
"18.43.45",
29-
"18.44.41",
30-
"18.45.43",
31-
"18.48.39",
3226
"18.49.37",
33-
"19.01.34",
34-
"19.02.39",
35-
"19.03.36",
36-
"19.04.38",
37-
"19.05.36",
38-
"19.06.39",
39-
"19.07.40",
40-
"19.08.36",
41-
"19.09.38",
42-
"19.10.39",
43-
"19.11.43",
44-
"19.12.41",
45-
"19.13.37",
46-
"19.14.43",
47-
"19.15.36",
4827
"19.16.39",
28+
"19.25.37",
29+
"19.34.42",
4930
]
5031
)
5132
]

src/main/kotlin/app/revanced/patches/youtube/interaction/downloads/DownloadsPatch.kt

+3-16
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,11 @@ import app.revanced.util.resultOrThrow
2525
CompatiblePackage(
2626
"com.google.android.youtube",
2727
[
28-
"18.48.39",
28+
"18.38.44",
2929
"18.49.37",
30-
"19.01.34",
31-
"19.02.39",
32-
"19.03.36",
33-
"19.04.38",
34-
"19.05.36",
35-
"19.06.39",
36-
"19.07.40",
37-
"19.08.36",
38-
"19.09.38",
39-
"19.10.39",
40-
"19.11.43",
41-
"19.12.41",
42-
"19.13.37",
43-
"19.14.43",
44-
"19.15.36",
4530
"19.16.39",
31+
"19.25.37",
32+
"19.34.42",
4633
],
4734
),
4835
],

src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/DisablePreciseSeekingGesturePatch.kt

+2-21
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,11 @@ import app.revanced.util.alsoResolve
2424
CompatiblePackage(
2525
"com.google.android.youtube",
2626
[
27-
"18.32.39",
28-
"18.37.36",
2927
"18.38.44",
30-
"18.43.45",
31-
"18.44.41",
32-
"18.45.43",
33-
"18.48.39",
3428
"18.49.37",
35-
"19.01.34",
36-
"19.02.39",
37-
"19.03.36",
38-
"19.04.38",
39-
"19.05.36",
40-
"19.06.39",
41-
"19.07.40",
42-
"19.08.36",
43-
"19.09.38",
44-
"19.10.39",
45-
"19.11.43",
46-
"19.12.41",
47-
"19.13.37",
48-
"19.14.43",
49-
"19.15.36",
5029
"19.16.39",
30+
"19.25.37",
31+
"19.34.42",
5132
]
5233
)
5334
]

src/main/kotlin/app/revanced/patches/youtube/interaction/seekbar/EnableSeekbarTappingPatch.kt

+3-19
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,11 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
2727
CompatiblePackage(
2828
"com.google.android.youtube",
2929
[
30-
"18.43.45",
31-
"18.44.41",
32-
"18.45.43",
33-
"18.48.39",
30+
// 18.38.44 patches but crashes on startup.
3431
"18.49.37",
35-
"19.01.34",
36-
"19.02.39",
37-
"19.03.36",
38-
"19.04.38",
39-
"19.05.36",
40-
"19.06.39",
41-
"19.07.40",
42-
"19.08.36",
43-
"19.09.38",
44-
"19.10.39",
45-
"19.11.43",
46-
"19.12.41",
47-
"19.13.37",
48-
"19.14.43",
49-
"19.15.36",
5032
"19.16.39",
33+
"19.25.37",
34+
"19.34.42",
5135
]
5236
)
5337
]

0 commit comments

Comments
 (0)