Skip to content

Commit 4a68a56

Browse files
author
qdsp6sw
committed
跳过开启SIM卡安全保护时需要系统登录小米账号的验证功能
1 parent da82860 commit 4a68a56

5 files changed

Lines changed: 48 additions & 0 deletions

File tree

app/src/main/java/com/sevtinge/hyperceiler/module/app/SecurityCenter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import com.sevtinge.hyperceiler.module.hook.securitycenter.lab.AiClipboardEnable;
5555
import com.sevtinge.hyperceiler.module.hook.securitycenter.lab.BlurLocationEnable;
5656
import com.sevtinge.hyperceiler.module.hook.securitycenter.lab.GetNumberEnable;
57+
import com.sevtinge.hyperceiler.module.hook.securitycenter.other.BypassSimLockMiAccountAuth;
5758
import com.sevtinge.hyperceiler.module.hook.securitycenter.other.DisableRootCheck;
5859
import com.sevtinge.hyperceiler.module.hook.securitycenter.other.FuckRiskPkg;
5960
import com.sevtinge.hyperceiler.module.hook.securitycenter.other.LockOneHundredPoints;
@@ -112,6 +113,7 @@ public void handleLoadPackage() {
112113
initHook(FuckRiskPkg.INSTANCE, mPrefsMap.getBoolean("security_center_disable_send_malicious_app_notification"));
113114
initHook(NoLowBatteryWarning.INSTANCE, mPrefsMap.getBoolean("security_center_remove_low_battery_reminder"));
114115
initHook(new UnlockFbo(), mPrefsMap.getBoolean("security_center_unlock_fbo"));
116+
initHook(BypassSimLockMiAccountAuth.INSTANCE, mPrefsMap.getBoolean("security_center_bypass_simlock_miaccount_auth"));
115117

116118
// 小窗和气泡通知
117119
initHook(new RemoveConversationBubbleSettingsRestriction(), mPrefsMap.getBoolean("security_center_remove_conversation_bubble_settings_restriction"));
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* This file is part of HyperCeiler.
3+
4+
* HyperCeiler is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU Affero General Public License as
6+
* published by the Free Software Foundation, either version 3 of the
7+
* License.
8+
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU Affero General Public License for more details.
13+
14+
* You should have received a copy of the GNU Affero General Public License
15+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
17+
* Copyright (C) 2023-2024 HyperCeiler Contributions
18+
*/
19+
package com.sevtinge.hyperceiler.module.hook.securitycenter.other
20+
21+
import com.github.kyuubiran.ezxhelper.*
22+
import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
23+
import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
24+
import com.sevtinge.hyperceiler.module.base.*
25+
26+
object BypassSimLockMiAccountAuth : BaseHook() {
27+
override fun init() {
28+
runCatching {
29+
ClassUtils.loadClass("com.miui.simlock.b").methodFinder()
30+
.filterByName("m")
31+
.single().createHook {
32+
returnConstant(true)
33+
}
34+
}
35+
}
36+
}

app/src/main/res/values-zh-rCN/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,6 +1438,8 @@
14381438
<string name="security_center_sidebar_function_title">全局侧边栏功能</string>
14391439
<string name="security_center_game_speed">快速启动游戏</string>
14401440
<string name="security_center_game_speed_desc">在启动游戏时倍速通过开屏动画,仅部分游戏支持</string>
1441+
<string name="security_center_bypass_simlock_miaccount_auth">SIM卡安全保护跳过登录验证</string>
1442+
<string name="security_center_bypass_simlock_miaccount_auth_desc">开启SIM卡安全保护功能时无需登录小米账号</string>
14411443
<string name="security_center_aosp_app_info">添加 \"原生应用信息\" 入口</string>
14421444
<string name="security_center_aosp_app_info_label">原生应用信息</string>
14431445
<string name="security_center_aosp_app_manager">添加 \"原生应用管理\" 入口</string>

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,6 +1404,8 @@
14041404
<string name="security_center_sidebar_function_title">Sidebar Function</string>
14051405
<string name="security_center_game_speed">Launch the game quickly</string>
14061406
<string name="security_center_game_speed_desc">When launching the game, it passes the opening screen animation at 3x speed, which is only supported by some games</string>
1407+
<string name="security_center_bypass_simlock_miaccount_auth">SIM security no Account needed</string>
1408+
<string name="security_center_bypass_simlock_miaccount_auth_desc">Bypass SIM security Mi Account needed, you can open this function even without logging in XiaoMi Account</string>
14071409
<string name="security_center_aosp_app_info_label">AOSP App Info</string>
14081410
<string name="security_center_aosp_app_info">Add AOSP App Info entry</string>
14091411
<string name="security_center_aosp_app_manager_label">AOSP App Manager</string>

app/src/main/res/xml/security_center.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,12 @@
284284
android:title="@string/security_center_game_speed"
285285
app:isPreferenceVisible="false" />
286286

287+
<SwitchPreference
288+
android:defaultValue="false"
289+
android:key="prefs_key_security_center_bypass_simlock_miaccount_auth"
290+
android:summary="@string/security_center_bypass_simlock_miaccount_auth_desc"
291+
android:title="@string/security_center_bypass_simlock_miaccount_auth" />
292+
287293
</PreferenceCategory>
288294

289295
</PreferenceScreen>

0 commit comments

Comments
 (0)