Skip to content

Commit 105a9fa

Browse files
committed
feat(YouTube/Spoof app version): change the default to off and show the dialog when the app is first installed
1 parent 6400a4c commit 105a9fa

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

src/main/kotlin/app/revanced/patches/youtube/general/spoofappversion/SpoofAppVersionPatch.kt

-13
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package app.revanced.patches.youtube.general.spoofappversion
33
import app.revanced.patcher.data.ResourceContext
44
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
55
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
6-
import app.revanced.patches.youtube.utils.integrations.Constants.GENERAL_CLASS_DESCRIPTOR
76
import app.revanced.patches.youtube.utils.integrations.Constants.PATCH_STATUS_CLASS_DESCRIPTOR
87
import app.revanced.patches.youtube.utils.settings.SettingsBytecodePatch
98
import app.revanced.patches.youtube.utils.settings.SettingsPatch
@@ -42,18 +41,6 @@ object SpoofAppVersionPatch : BaseResourcePatch(
4241
0,
4342
"const-string v0, \"19.13.37\""
4443
)
45-
SettingsBytecodePatch.contexts.findMethodOrThrow(PATCH_STATUS_CLASS_DESCRIPTOR) {
46-
name == "SpoofAppVersionDefaultBoolean"
47-
}.replaceInstruction(
48-
0,
49-
"const/4 v0, 0x1"
50-
)
51-
SettingsBytecodePatch.contexts.findMethodOrThrow(PATCH_STATUS_CLASS_DESCRIPTOR) {
52-
name == "SpoofAppVersionUserDialogMessage"
53-
}.replaceInstruction(
54-
0,
55-
"const-string v0, \"revanced_spoof_app_version_user_dialog_message_19_16\""
56-
)
5744
}
5845
}
5946
}

src/main/resources/youtube/settings/host/values/strings.xml

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
<string name="revanced_extended_confirm_user_dialog_title">Do you wish to proceed?</string>
1414
<string name="revanced_extended_restart_first_run">Restart to load the layout normally</string>
1515
<string name="revanced_extended_restart_message">Refresh and restart</string>
16+
<string name="revanced_extended_restart_first_run_rolling_number">"There is a YouTube server-side bug that causes rolling number text such as likes, views, and upload dates to be hidden for some users.
17+
18+
A temporary workaround for this issue is to spoof the app version to 19.13.37.
19+
20+
Do you want to spoof the app version before restarting the app?"</string>
1621
<string name="revanced_playback_speed_normal">Normal</string>
1722

1823
<string name="revanced_external_downloader_package_name_video_title">Video downloader package name</string>
@@ -375,7 +380,6 @@ This does not bypass the age restriction. It just accepts it automatically."</st
375380
This will change the appearance and features of the app, but unknown side effects may occur.
376381

377382
If later turned off, it is recommended to clear the app data to prevent UI bugs."</string>
378-
<string name="revanced_spoof_app_version_user_dialog_message_19_16">Disabling this setting may result in a YouTube server-side bug that causes rolling number text such as likes, views, and upload dates to be hidden.</string>
379383
<string name="revanced_spoof_app_version_target_title">Edit spoof app version</string>
380384
<string name="revanced_spoof_app_version_target_summary">Type the spoof app version target.</string>
381385
<string name="revanced_spoof_app_version_target_entry_title">Spoof app version target</string>

0 commit comments

Comments
 (0)