Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
HChenX committed Jun 15, 2024
2 parents fee1092 + ed7d870 commit c6cefb0
Show file tree
Hide file tree
Showing 13 changed files with 102 additions and 36 deletions.
1 change: 1 addition & 0 deletions app/src/main/assets/tips/tips-zh_CN
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ HyperCeiler!启动!
进程 "system" 没有响应
当你正在凝望 Tip 的时候,Tip 也在凝望你。
Tip: Tip: Tip: Tip:
☆这不神奇吗★
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.sevtinge.hyperceiler.module.base.HookExpand;
import com.sevtinge.hyperceiler.module.hook.GlobalActions;
import com.sevtinge.hyperceiler.module.hook.systemframework.AllowAutoStart;
import com.sevtinge.hyperceiler.module.hook.systemframework.AllowDisableProtectedPackage;
import com.sevtinge.hyperceiler.module.hook.systemframework.AllowUntrustedTouch;
import com.sevtinge.hyperceiler.module.hook.systemframework.AllowUntrustedTouchForU;
import com.sevtinge.hyperceiler.module.hook.systemframework.AppLinkVerify;
Expand Down Expand Up @@ -125,6 +126,7 @@ public void handleLoadPackage() {
initHook(new DisableMiuiLite(), mPrefsMap.getBoolean("system_framework_disablt_miuilite_check"));
initHook(new HookEntry(), mPrefsMap.getBoolean("system_framework_hook_entry"));
initHook(new PstedClipboard(), mPrefsMap.getBoolean("system_framework_posted_clipboard"));
initHook(new AllowDisableProtectedPackage(), mPrefsMap.getBoolean("system_framework_allow_disable_protected_package"));
// 允许应用后台读取剪切板
initHook(new ClipboardWhitelist(), mPrefsMap.getBoolean("system_framework_clipboard_whitelist"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.sevtinge.hyperceiler.module.hook.systemsettings.AddMiuiPlusEntry;
import com.sevtinge.hyperceiler.module.hook.systemsettings.AllowManageAllNotifications;
import com.sevtinge.hyperceiler.module.hook.systemsettings.AppsFreezerEnable;
import com.sevtinge.hyperceiler.module.hook.systemsettings.DisableInstallUnknownVerify;
import com.sevtinge.hyperceiler.module.hook.systemsettings.EnableFoldArea;
import com.sevtinge.hyperceiler.module.hook.systemsettings.EnablePadArea;
import com.sevtinge.hyperceiler.module.hook.systemsettings.EnableSpeedMode;
Expand Down Expand Up @@ -75,6 +76,7 @@ public void handleLoadPackage() {
initHook(new QuickManageUnknownAppSources(), mPrefsMap.getBoolean("system_settings_permission_unknown_origin_app"));
initHook(new QuickManagerAccessibilityPermission(), mPrefsMap.getBoolean("system_settings_permission_accessibility"));
initHook(new InternationalBuild(), mPrefsMap.getBoolean("system_settings_international_build"));
initHook(new DisableInstallUnknownVerify(), mPrefsMap.getBoolean("system_settings_permission_disable_install_unknown_verify"));
initHook(new NewNFCPage(), mPrefsMap.getBoolean("system_settings_new_nfc_page"));
initHook(new AppsFreezerEnable(), mPrefsMap.getBoolean("system_settings_apps_freezer"));
// initHook(new BluetoothRestrict(), mPrefsMap.getBoolean("various_disable_bluetooth_restrict"));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.sevtinge.hyperceiler.module.hook.systemframework;

import com.sevtinge.hyperceiler.module.base.BaseHook;

import java.util.List;

public class AllowDisableProtectedPackage extends BaseHook {
@Override
public void init() throws NoSuchMethodException {
findAndHookMethod("com.android.server.pm.PackageManagerService", "setEnabledSettings", List.class, int.class, String.class, new MethodHook(){
@Override
protected void before(MethodHookParam param) throws Throwable {
findAndHookMethod("com.android.server.pm.ProtectedPackages", "isPackageStateProtected", int.class, String.class, new MethodHook(){
@Override
protected void before(MethodHookParam param) throws Throwable {
param.setResult(false);
}
});
}
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.sevtinge.hyperceiler.module.hook.systemsettings;

import com.sevtinge.hyperceiler.module.base.BaseHook;

public class DisableInstallUnknownVerify extends BaseHook {
@Override
public void init() throws NoSuchMethodException {
findAndHookMethod("com.android.settings.applications.appinfo.ExternalSourcesDetails", "doUnknownSourceVerify", new MethodHook(){
@Override
protected void before(MethodHookParam param) throws Throwable {
param.setResult(false);
}
});
}
}
6 changes: 4 additions & 2 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@
<string name="system_framework_quick_screenshot_desc">禁用截图延迟</string>
<string name="system_framework_disable_link_turbo_toast">隐藏正在使用流量加速 Toast</string>
<string name="system_framework_allow_third_theme">允许使用第三方主题</string>
<string name="system_framework_allow_disable_protected_package">允许冻结受保护的应用</string>
<!--核心破解-->
<string name="system_framework_corepatch_title">包管理服务</string>
<string name="system_framework_core_patch_downgr">允许降级安装应用</string>
Expand Down Expand Up @@ -975,6 +976,7 @@
<string name="system_settings_permission_unknown_origin_app">安装未知应用权限直达</string>
<string name="system_settings_permission_unknown_origin_app_desc">使用国际版行为,直接跳转对应应用 \"安装未知应用\" 的权限开关</string>
<string name="system_settings_permission_accessibility">无障碍服务权限直达</string>
<string name="system_settings_permission_disable_install_unknown_verify">禁用开启安装未知应用时的校验</string>

<string name="system_settings_develop_title">开发者选项</string>
<string name="system_settings_apps_freezer">强制显示暂停执行已缓存的应用</string>
Expand Down Expand Up @@ -1775,7 +1777,7 @@

<!--通话管理-->
<string name="telecom">通话管理</string>
<string name="scam_reminder_bypass_caption">允许直接拨打呼叫转移MMI码</string>
<string name="scam_reminder_bypass_description">允许直接拨打类似**21*8#的MMI码来开启呼叫转移</string>
<string name="scam_reminder_bypass_caption">允许直接拨打呼叫转移 MMI 码</string>
<string name="scam_reminder_bypass_description">允许直接拨打类似 **21*8# 的 MMI 码以开启呼叫转移</string>

</resources>
3 changes: 2 additions & 1 deletion app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
<item>com.android.phone</item> <!--电话服务-->
<item>com.android.providers.downloads</item> <!--下载管理程序-->
<item>com.android.providers.downloads.ui</item> <!--下载管理-->
<item>com.android.systemui</item> <!--系统界面-->
<item>com.android.server.telecom</item>
<item>com.android.settings</item> <!--系统设置-->
<item>com.android.systemui</item> <!--系统界面-->
<item>com.android.thememanager</item> <!--主题壁纸-->
<item>com.android.updater</item> <!--系统更新-->
<item>com.lbe.security.miui</item> <!--权限管理服务-->
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@
<string name="system_framework_quick_screenshot_desc">Disable screenshot delay</string>
<string name="system_framework_disable_link_turbo_toast">Hide LinkTurbo Toast</string>
<string name="system_framework_allow_third_theme">Allows to use third-party themes</string>
<string name="system_framework_allow_disable_protected_package">Allows to disable protected apps</string>
<!--Package Manager Service-->
<string name="system_framework_corepatch_title">Package Manager Service</string>
<string name="system_framework_core_patch_downgr">Allow downgrade</string>
Expand Down Expand Up @@ -950,6 +951,7 @@
<string name="system_settings_permission_unknown_origin_app">Install unknown app permissions without searching the application list</string>
<string name="system_settings_permission_unknown_origin_app_desc">Use the international build, jump directly to the permission switch of the corresponding application “displayed on top of other applications”</string>
<string name="system_settings_permission_accessibility">Accessibility services permissions without searching the application list</string>
<string name="system_settings_permission_disable_install_unknown_verify">Disable verify when turn on allow install unknown package permission</string>
<string name="system_settings_develop_title">Developer options</string>
<string name="system_settings_apps_freezer">Force showing freeze cached apps</string>
<string name="system_settings_apps_freezer_more">Once enabled, this feature can be found in \"Developer Options,\" but its functionality is not guaranteed</string>
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/xml/framework_other.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@
android:title="@string/system_framework_clipboard_whitelist_list"
app:isPreferenceVisible="false" />

<SwitchPreference
android:defaultValue="false"
android:key="prefs_key_system_framework_allow_disable_protected_package"
android:title="@string/system_framework_allow_disable_protected_package" />

</PreferenceCategory>

<PreferenceCategory android:title="@string/system_framework_shortcut_title">
Expand Down
38 changes: 19 additions & 19 deletions app/src/main/res/xml/prefs_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@
android:summary="com.android.incallui"
android:title="@string/incallui" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.TelecomFragment"
android:icon="@drawable/ic_call"
android:key="prefs_key_telecom"
android:summary="com.android.server.telecom"
android:title="@string/telecom" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.MmsFragment"
android:icon="@drawable/ic_mms"
Expand Down Expand Up @@ -93,11 +86,11 @@
android:title="@string/downloads" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.SystemUIFragment"
android:icon="@drawable/ic_system_ui"
android:key="prefs_key_system_ui"
android:summary="com.android.systemui"
android:title="@string/system_ui" />
android:fragment="com.sevtinge.hyperceiler.ui.fragment.TelecomFragment"
android:icon="@drawable/ic_call"
android:key="prefs_key_telecom"
android:summary="com.android.server.telecom"
android:title="@string/telecom" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.SystemSettingsFragment"
Expand All @@ -106,6 +99,13 @@
android:summary="com.android.settings"
android:title="@string/system_settings" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.SystemUIFragment"
android:icon="@drawable/ic_system_ui"
android:key="prefs_key_system_ui"
android:summary="com.android.systemui"
android:title="@string/system_ui" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.ThemeManagerFragment"
android:icon="@drawable/ic_theme_manager"
Expand Down Expand Up @@ -148,20 +148,20 @@
android:summary="com.miui.backup"
android:title="@string/backup" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.ContentExtensionFragment"
android:icon="@drawable/ic_contentextension"
android:key="prefs_key_content_extension"
android:summary="com.miui.contentextension"
android:title="@string/content_extension" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.MiCloudServiceFragment"
android:icon="@drawable/ic_micloud_service"
android:key="prefs_key_micloud_service"
android:summary="com.miui.cloudservice"
android:title="@string/micloud_service" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.ContentExtensionFragment"
android:icon="@drawable/ic_contentextension"
android:key="prefs_key_content_extension"
android:summary="com.miui.contentextension"
android:title="@string/content_extension" />

<com.sevtinge.hyperceiler.prefs.PreferenceHeader
android:fragment="com.sevtinge.hyperceiler.ui.fragment.CreationFragment"
android:icon="@drawable/ic_creation"
Expand Down
33 changes: 21 additions & 12 deletions app/src/main/res/xml/prefs_set_homepage_entrance.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@

<SwitchPreference
android:defaultValue="true"
android:icon="@drawable/ic_system_ui"
android:key="prefs_key_system_ui_state"
android:layout="@layout/preference_header"
android:summary="com.android.systemui"
android:title="@string/system_ui" />
android:icon="@drawable/ic_call"
android:key="prefs_key_telecom_state"
android:summary="com.android.server.telecom"
android:title="@string/telecom" />


<SwitchPreference
android:defaultValue="true"
Expand All @@ -109,6 +110,14 @@
android:summary="com.android.settings"
android:title="@string/system_settings" />

<SwitchPreference
android:defaultValue="true"
android:icon="@drawable/ic_system_ui"
android:key="prefs_key_system_ui_state"
android:layout="@layout/preference_header"
android:summary="com.android.systemui"
android:title="@string/system_ui" />

<SwitchPreference
android:defaultValue="true"
android:icon="@drawable/ic_theme_manager"
Expand Down Expand Up @@ -157,21 +166,21 @@
android:summary="com.miui.backup"
android:title="@string/backup" />

<SwitchPreference
android:defaultValue="true"
android:icon="@drawable/ic_contentextension"
android:key="prefs_key_content_extension_state"
android:layout="@layout/preference_header"
android:summary="com.miui.contentextension"
android:title="@string/content_extension" />

<SwitchPreference
android:defaultValue="true"
android:icon="@drawable/ic_micloud_service"
android:key="prefs_key_micloud_service_state"
android:layout="@layout/preference_header"
android:summary="com.miui.cloudservice"
android:title="@string/micloud_service" />

<SwitchPreference
android:defaultValue="true"
android:icon="@drawable/ic_contentextension"
android:key="prefs_key_content_extension_state"
android:layout="@layout/preference_header"
android:summary="com.miui.contentextension"
android:title="@string/content_extension" />

<SwitchPreference
android:defaultValue="true"
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/xml/system_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@
android:key="prefs_key_system_settings_permission_accessibility"
android:title="@string/system_settings_permission_accessibility" />

<SwitchPreference
android:defaultValue="false"
android:key="prefs_key_system_settings_permission_disable_install_unknown_verify"
android:title="@string/system_settings_permission_disable_install_unknown_verify" />

</PreferenceCategory>

<PreferenceCategory android:title="@string/system_settings_develop_title">
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ lsparanoid = "0.6.0"
annotation = "1.8.0"
core = "1.13.1"
collection = "1.4.0"
fragment = "1.8.0-rc01"
fragment = "1.8.0"
recyclerview = "1.3.2"
lifecycle-common = "2.8.1"
lifecycle-common = "2.8.2"
vectordrawable = "1.2.0"
vectordrawable-animated = "1.2.0"
customview = "1.2.0-alpha02"
Expand Down

0 comments on commit c6cefb0

Please sign in to comment.