diff --git a/app/src/main/java/com/sevtinge/hyperceiler/XposedInit.kt b/app/src/main/java/com/sevtinge/hyperceiler/XposedInit.kt index 9f13bcda65..f797fa240c 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/XposedInit.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/XposedInit.kt @@ -42,6 +42,7 @@ class XposedInit : BaseXposedInit(), IXposedHookInitPackageResources { } init(lpparam) + //CrashRecord.init(EzXHelper.appContext) SystemFrameworkForCorePatch().handleLoadPackage(lpparam) } diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseXposedInit.java b/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseXposedInit.java index 3c255aaaa5..be04a17397 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseXposedInit.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseXposedInit.java @@ -69,6 +69,8 @@ public abstract class BaseXposedInit implements IXposedHookLoadPackage, IXposedHookZygoteInit { + public static boolean isSafeModeOn = false; + public static ResourcesHook mResHook; public static String mModulePath = null; public static PrefsMap mPrefsMap = new PrefsMap<>(); @@ -159,6 +161,7 @@ public void setXSharedPrefs() { } public void init(LoadPackageParam lpparam) { + if (isSafeModeOn) return; String packageName = lpparam.packageName; switch (packageName) { case "android" -> { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/thememanager/ThemeCrackNew.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/thememanager/ThemeCrackNew.kt index 4a0c083f7a..bb06abbc93 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/thememanager/ThemeCrackNew.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/thememanager/ThemeCrackNew.kt @@ -14,6 +14,7 @@ import com.sevtinge.hyperceiler.utils.DexKit.closeDexKit import com.sevtinge.hyperceiler.utils.DexKit.dexKitBridge import com.sevtinge.hyperceiler.utils.DexKit.initDexKit import com.sevtinge.hyperceiler.utils.log.XposedLogUtils.logE +import com.sevtinge.hyperceiler.utils.log.XposedLogUtils.logI import com.sevtinge.hyperceiler.utils.setObjectField import de.robv.android.xposed.callbacks.XC_LoadPackage import miui.drm.DrmManager @@ -23,6 +24,7 @@ class ThemeCrackNew { val TAG = "ThemeCrackNew" fun init(lpparam: XC_LoadPackage.LoadPackageParam) { if (!mPrefsMap.getBoolean("various_enable_super_function") && !mPrefsMap.getBoolean("various_theme_crack") && !(getBuildType().equals("debug"))) return + logI(TAG, "com.android.thememanager", "Hooked.") initDexKit(lpparam) try { loadClass("com.android.thememanager.detail.theme.model.OnlineResourceDetail").methodFinder().filterByName("toResource").toList().createHooks { diff --git a/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/DevelopmentFragment.java b/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/DevelopmentFragment.java new file mode 100644 index 0000000000..2679f45df6 --- /dev/null +++ b/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/DevelopmentFragment.java @@ -0,0 +1,13 @@ +package com.sevtinge.hyperceiler.ui.fragment; + +import com.sevtinge.hyperceiler.R; +import com.sevtinge.hyperceiler.ui.fragment.base.SettingsPreferenceFragment; + +public class DevelopmentFragment extends SettingsPreferenceFragment { + @Override + public int getContentResId() { + return R.xml.prefs_development; + } + } + + diff --git a/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/DevelopmentUIFragment.java b/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/DevelopmentUIFragment.java new file mode 100644 index 0000000000..c8c4ee3484 --- /dev/null +++ b/app/src/main/java/com/sevtinge/hyperceiler/ui/fragment/DevelopmentUIFragment.java @@ -0,0 +1,13 @@ +package com.sevtinge.hyperceiler.ui.fragment; + +import com.sevtinge.hyperceiler.R; +import com.sevtinge.hyperceiler.ui.fragment.base.SettingsPreferenceFragment; + +public class DevelopmentUIFragment extends SettingsPreferenceFragment { + @Override + public int getContentResId() { + return R.xml.prefs_development_ui; + } +} + + diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 47ac990a67..a62bfd45bb 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -1367,6 +1367,9 @@ 添加 删除 + + 开发者选项 + 界面元素测试 Tip: 叮咚~ 来了一条消息! 哦,是 Tip 啊,那没事了( Tip: 您可以在 \"关于-支持\" 中捐赠以支持和维护我们的开发。 diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 13c048ce2b..e537ef6cbd 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -605,4 +605,15 @@ 1 2 + + + Test1 + Test2 + + + + 0 + 1 + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e92f61130c..ab27eb2cfb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1320,6 +1320,8 @@ Quickly restart apps Add Delete + Developer Options + UI Tip: Here\'s a tip! Tip: You can support us by donating in \"About - Support\". diff --git a/app/src/main/res/xml/prefs_development.xml b/app/src/main/res/xml/prefs_development.xml new file mode 100644 index 0000000000..ec4bcfdeac --- /dev/null +++ b/app/src/main/res/xml/prefs_development.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/xml/prefs_development_ui.xml b/app/src/main/res/xml/prefs_development_ui.xml new file mode 100644 index 0000000000..8b59389d08 --- /dev/null +++ b/app/src/main/res/xml/prefs_development_ui.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/xml/prefs_settings.xml b/app/src/main/res/xml/prefs_settings.xml index 08f68d46c7..cf1df95f19 100644 --- a/app/src/main/res/xml/prefs_settings.xml +++ b/app/src/main/res/xml/prefs_settings.xml @@ -59,6 +59,11 @@ android:summary="@string/settings_safe_mode_desc" android:title="@string/settings_safe_mode" /> + +