From b05728ac64b662b18abfbd45a55282d41821d19f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=80=E6=BC=93=E4=B8=A8Sevtinge?= <89193494+Sevtinge@users.noreply.github.com> Date: Tue, 14 Nov 2023 20:11:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=9B=B4=E6=96=B0-=E5=90=AF=E7=94=A8=E4=BC=AA=E8=A3=85?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sevtinge/hyperceiler/module/app/Updater.java | 14 ++++++++------ app/src/main/res/values-zh-rCN/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + app/src/main/res/xml/updater.xml | 12 +++++++++++- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Updater.java b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Updater.java index 885887a781..d11ee46e09 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/app/Updater.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/app/Updater.java @@ -17,14 +17,16 @@ public class Updater extends BaseModule { public void handleLoadPackage() { // dexKit load initHook(LoadHostDir.INSTANCE); - if (mPrefsMap.getStringAsInt("updater_version_mode", 1) != 1) { - initHook(VersionCodeNew.INSTANCE); - } else { - initHook(new VersionCodeModify(), !TextUtils.isEmpty(mPrefsMap.getString("various_updater_miui_version", ""))); + if (mPrefsMap.getBoolean("updater_enable_miui_version")) { + if (mPrefsMap.getStringAsInt("updater_version_mode", 1) != 1) { + initHook(VersionCodeNew.INSTANCE); + } else { + initHook(new VersionCodeModify(), !TextUtils.isEmpty(mPrefsMap.getString("various_updater_miui_version", ""))); + } + initHook(AndroidVersionCode.INSTANCE, !TextUtils.isEmpty(mPrefsMap.getString("various_updater_android_version", ""))); + initHook(DeviceModify.INSTANCE, !TextUtils.isEmpty(mPrefsMap.getString("updater_device", ""))); } - initHook(AndroidVersionCode.INSTANCE, !TextUtils.isEmpty(mPrefsMap.getString("various_updater_android_version", ""))); initHook(new VabUpdate(), mPrefsMap.getBoolean("updater_fuck_vab")); - initHook(DeviceModify.INSTANCE, !TextUtils.isEmpty(mPrefsMap.getString("updater_device", ""))); // dexKit finish initHook(CloseHostDir.INSTANCE); } diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index ca09c0152d..f2bee5cdb9 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -756,6 +756,7 @@ 启用 Fold 主题 系统更新 + 启用伪装版本 移除 OTA 验证 仅支持 VAB 设备,其他非 VAB 设备请不要开启!\n- 无需内测权限即可刷入完整内测卡刷包\n- 跨不同版本类型刷入后建议清除数据\n- 不支持任何非官方 ROM 使用\n- 此功能有一定危险性,请在了解 Fastboot 操作后再评估是否开启 伪装类型 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e196ab5c10..03c047e5f4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1336,6 +1336,7 @@ Mi Sound Increase sampling rate Allow all apps to use dark mode + Enable Fake version for Updater Tip: Here\'s a tip! Tip: You can support us by donating in \"About - Support\". diff --git a/app/src/main/res/xml/updater.xml b/app/src/main/res/xml/updater.xml index 8c476a27bb..9cbcea5f51 100644 --- a/app/src/main/res/xml/updater.xml +++ b/app/src/main/res/xml/updater.xml @@ -8,30 +8,40 @@ android:key="prefs_key_updater_fuck_vab" android:defaultValue="false" /> + + + app:entryValues="@array/updater_version_mode_value" + android:dependency="prefs_key_updater_enable_miui_version" />