File tree Expand file tree Collapse file tree 6 files changed +81
-3
lines changed
kotlin/app/revanced/patches/youtube/misc/updatescreen
resources/youtube/settings/xml Expand file tree Collapse file tree 6 files changed +81
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Around half of the patches currently work.
16
16
17
17
- Patch with the following command (file names changed for brevity):
18
18
```
19
- java -jar revanced-cli.jar patch YouTube_16.40.36.apk -p -o YouTube_ReVanced_16.40.36.apk -b revanced-patches-2.160.8.jar -m revanced-integrations-0.96.6.apk -i microg-support -i spoof-player-parameters -i client-spoof -i hide-video-ads -i enable-minimized-playback --exclusive
19
+ java -jar revanced-cli.jar patch YouTube_16.40.36.apk -p -o YouTube_ReVanced_16.40.36.apk -b revanced-patches-2.160.8.jar -m revanced-integrations-0.96.6.apk -i microg-support -i spoof-player-parameters -i client-spoof -i hide-video-ads -i enable-minimized-playback -i disable-update-screen - -exclusive
20
20
```
21
21
22
22
- Or patch with all the supported patches (ignore the errors):
Original file line number Diff line number Diff line change 1
1
kotlin.code.style = official
2
- version = 2.160.8
2
+ version = 2.160.9
Original file line number Diff line number Diff line change
1
+ package app.revanced.patches.youtube.misc.updatescreen.bytecode.fingerprints
2
+
3
+ import app.revanced.patcher.extensions.or
4
+ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
5
+ import com.android.tools.smali.dexlib2.AccessFlags
6
+ import com.android.tools.smali.dexlib2.Opcode
7
+
8
+ object UpdateScreenFingerprint : MethodFingerprint(
9
+ returnType = " Landroid/content/Intent" ,
10
+ accessFlags = AccessFlags .PUBLIC or AccessFlags .FINAL ,
11
+ parameters = listOf("Landroid /content/Intent "),
12
+ opcodes = listOf(
13
+ Opcode .IGET_OBJECT ,
14
+ Opcode .IGET_OBJECT ,
15
+ Opcode .SGET_OBJECT ,
16
+ Opcode .INVOKE_VIRTUAL ,
17
+ Opcode .MOVE_RESULT_OBJECT ,
18
+ Opcode .IGET_OBJECT ,
19
+ Opcode .IF_NEZ ,
20
+ Opcode .SGET_OBJECT ,
21
+ Opcode .IGET_OBJECT
22
+ ),
23
+ strings = listOf("show_force_upgrade", "forward_intent")
24
+ )
Original file line number Diff line number Diff line change
1
+ package app.revanced.patches.youtube.misc.updatescreen.bytecode.patch
2
+
3
+ import app.revanced.patcher.annotation.Name
4
+ import app.revanced.patcher.data.BytecodeContext
5
+ import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
6
+ import app.revanced.patcher.patch.BytecodePatch
7
+ import app.revanced.patches.youtube.misc.updatescreen.bytecode.fingerprints.UpdateScreenFingerprint
8
+ import app.revanced.shared.annotation.YouTubeCompatibility
9
+ import app.revanced.shared.extensions.exception
10
+
11
+ @Name(" disable-update-screen-bytecode-patch" )
12
+ @YouTubeCompatibility
13
+ class UpdateScreenBytecodePatch : BytecodePatch (
14
+ listOf(
15
+ UpdateScreenFingerprint
16
+ )
17
+ ) {
18
+ override fun execute (context : BytecodeContext ) {
19
+
20
+ UpdateScreenFingerprint .result?.mutableMethod?.replaceInstructions(
21
+ 0 ,
22
+ """
23
+ const/4 v0, 0x0
24
+ return-object v0
25
+ """
26
+ ) ? : throw UpdateScreenFingerprint .exception
27
+ }
28
+ }
Original file line number Diff line number Diff line change
1
+ package app.revanced.patches.youtube.misc.updatescreen.resource.patch
2
+
3
+ import app.revanced.patcher.annotation.Description
4
+ import app.revanced.patcher.annotation.Name
5
+ import app.revanced.patcher.data.ResourceContext
6
+ import app.revanced.patcher.patch.ResourcePatch
7
+ import app.revanced.patcher.patch.annotations.DependsOn
8
+ import app.revanced.patcher.patch.annotations.Patch
9
+ import app.revanced.patches.youtube.misc.updatescreen.bytecode.patch.UpdateScreenBytecodePatch
10
+ import app.revanced.shared.annotation.YouTubeCompatibility
11
+ import app.revanced.shared.util.resources.ResourceHelper
12
+
13
+ @Patch
14
+ @Name(" disable-update-screen" )
15
+ @Description(" Disables the app update screen." )
16
+ @DependsOn([UpdateScreenBytecodePatch ::class ])
17
+ @YouTubeCompatibility
18
+ class UpdateScreenPatch : ResourcePatch {
19
+ override fun execute (context : ResourceContext ) {
20
+
21
+ ResourceHelper .patchSuccess(
22
+ context,
23
+ " disable-new-version"
24
+ )
25
+ }
26
+ }
Original file line number Diff line number Diff line change 352
352
<Preference android:title=" " android:selectable="false" android:summary="@string/pref_about_category" />
353
353
<PreferenceScreen android:title="@string/revanced_patches_information" android:summary="@string/revanced_patches_information_summary" >
354
354
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_tool_used" />
355
- <Preference android:title="revanced-patches" android:selectable="false" android:summary="2.160.8 " />
355
+ <Preference android:title="revanced-patches" android:selectable="false" android:summary="2.160.9 " />
356
356
<Preference android:title="revanced-integrations" android:key="revanced-integrations" android:selectable="false"/>
357
357
358
358
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_video_ads_removal_title" />
You can’t perform that action at this time.
0 commit comments