diff --git a/app/build.gradle b/app/build.gradle
index 459f0d64..27d8f72f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -30,8 +30,8 @@ android {
minSdkVersion 26
//noinspection OldTargetApi
targetSdkVersion 27
- versionCode 457000
- versionName "4.5.7.1"
+ versionCode 457020
+ versionName "4.5.7.2"
signingConfig signingConfigs.release
}
buildTypes {
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
index 3dd2b806..4c5d26f9 100644
--- a/app/proguard-rules.pro
+++ b/app/proguard-rules.pro
@@ -20,6 +20,6 @@
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-keep class org.meowcat.edxposed.manager.util.json.**{public *; }
--keep class org.meowcat.edxposed.manager.xposed.**{public *; }
+-keep class org.meowcat.edxposed.manager.xposed.**{ *; }
-keep class de.robv.android.xposed.installer.**{public *; }
-repackageclasses ''
\ No newline at end of file
diff --git a/app/src/main/java/org/meowcat/edxposed/manager/SettingsActivity.java b/app/src/main/java/org/meowcat/edxposed/manager/SettingsActivity.java
index 7b485960..f42cc0fa 100644
--- a/app/src/main/java/org/meowcat/edxposed/manager/SettingsActivity.java
+++ b/app/src/main/java/org/meowcat/edxposed/manager/SettingsActivity.java
@@ -116,15 +116,16 @@ public class SettingsActivity extends BaseActivity {
public static class SettingsFragment extends PreferenceFragmentCompat {
private static final File pretendXposedInstallerFlag = new File(XposedApp.BASE_DIR + "conf/pretend_xposed_installer");
private static final File hideEdXposedManagerFlag = new File(XposedApp.BASE_DIR + "conf/hide_edxposed_manager");
- static final File disableResourcesFlag = new File(XposedApp.BASE_DIR + "conf/disable_resources");
- static final File dynamicModulesFlag = new File(XposedApp.BASE_DIR + "conf/dynamicmodules");
- static final File deoptBootFlag = new File(XposedApp.BASE_DIR + "conf/deoptbootimage");
- static final File whiteListModeFlag = new File(XposedApp.BASE_DIR + "conf/usewhitelist");
- static final File blackWhiteListModeFlag = new File(XposedApp.BASE_DIR + "conf/blackwhitelist");
- static final File disableVerboseLogsFlag = new File(XposedApp.BASE_DIR + "conf/disable_verbose_log");
- static final File disableModulesLogsFlag = new File(XposedApp.BASE_DIR + "conf/disable_modules_log");
- static final File verboseLogProcessID = new File(XposedApp.BASE_DIR + "log/all.pid");
- static final File modulesLogProcessID = new File(XposedApp.BASE_DIR + "log/error.pid");
+ private static final File disableHiddenAPIBypassFlag = new File(XposedApp.BASE_DIR + "conf/disable_hidden_api_bypass");
+ private static final File disableResourcesFlag = new File(XposedApp.BASE_DIR + "conf/disable_resources");
+ private static final File dynamicModulesFlag = new File(XposedApp.BASE_DIR + "conf/dynamicmodules");
+ private static final File deoptBootFlag = new File(XposedApp.BASE_DIR + "conf/deoptbootimage");
+ private static final File whiteListModeFlag = new File(XposedApp.BASE_DIR + "conf/usewhitelist");
+ private static final File blackWhiteListModeFlag = new File(XposedApp.BASE_DIR + "conf/blackwhitelist");
+ private static final File disableVerboseLogsFlag = new File(XposedApp.BASE_DIR + "conf/disable_verbose_log");
+ private static final File disableModulesLogsFlag = new File(XposedApp.BASE_DIR + "conf/disable_modules_log");
+ private static final File verboseLogProcessID = new File(XposedApp.BASE_DIR + "log/all.pid");
+ private static final File modulesLogProcessID = new File(XposedApp.BASE_DIR + "log/error.pid");
@SuppressLint({"WorldReadableFiles", "WorldWriteableFiles"})
static void setFilePermissionsFromMode(String name) {
@@ -559,6 +560,37 @@ public class SettingsActivity extends BaseActivity {
return (enabled == hideEdXposedManagerFlag.exists());
});
+ SwitchPreferenceCompat prefDisableHiddenAPIBypass = findPreference("disable_hidden_api_bypass");
+ Objects.requireNonNull(prefDisableHiddenAPIBypass).setChecked(disableHiddenAPIBypassFlag.exists());
+ prefDisableHiddenAPIBypass.setOnPreferenceChangeListener((preference, newValue) -> {
+ boolean enabled = (Boolean) newValue;
+ if (enabled) {
+ FileOutputStream fos = null;
+ try {
+ fos = new FileOutputStream(disableHiddenAPIBypassFlag.getPath());
+ setFilePermissionsFromMode(disableHiddenAPIBypassFlag.getPath());
+ } catch (FileNotFoundException e) {
+ Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
+ } finally {
+ if (fos != null) {
+ try {
+ fos.close();
+ } catch (IOException e) {
+ Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
+ try {
+ disableHiddenAPIBypassFlag.createNewFile();
+ } catch (IOException e1) {
+ Toast.makeText(getActivity(), e1.getMessage(), Toast.LENGTH_SHORT).show();
+ }
+ }
+ }
+ }
+ } else {
+ disableHiddenAPIBypassFlag.delete();
+ }
+ return (enabled == disableHiddenAPIBypassFlag.exists());
+ });
+
}
}
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 3a1d1f01..684f31e6 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -108,7 +108,7 @@
要显示的版本
框架
禁用资源钩子
- 解决与主题引擎的冲突\n警告: 启用该选项将导致修改资源的模块无法工作
+ 解决与主题引擎的冲突 警告: 启用该选项将导致修改资源的模块无法工作
应用
主题
亮色
@@ -313,4 +313,6 @@
假装已安装 Xposed Installer 来使一些过时但有用的模块正常工作\n仅对「模块」中已启用模块生效\n注:开启此功能可能会被某些软件(如 RootBeer)检测到 EdXposed
隐藏 EdXposed Manager
防止软件检测到 EdXposed Manager\n注:模块可能无法正常打开 EdXposed Manager 界面,系统中关于 EdXposed Manager 的一些功能可能无法正常使用
+ 禁用绕过隐藏 API 的限制
+ 禁用绕过隐藏 API 的限制将会通过某些检测(如Snapchat)\n警告: 启用此选项可能会使某些功能无法正常工作,或出现一些其他问题
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 72dc4d20..f42aa2e0 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -344,4 +344,6 @@
Pretend that Xposed Installer is installed to make some outdated but useful modules work\nOnly work for the enabled modules in \"Modules\"\nWARNING: Some software (eg. RootBeer) may detect that EdXposed when this function is turned on
Hide EdXposed Manager
Prevent the software from detecting EdXposed Manager\nWARNING: Modules may not be able to start the EdXposed Manager UI properly, some fratures of EdXposed Manager in the system may not work properly
+ Disable hidden API restrictions bypass
+ Disable hidden API restrictions bypass will pass some detection (eg Snapchat), these APIs are disabled by default\nWARNING: Enable this option may cause some features do not work properly, or some other problems
diff --git a/app/src/main/res/xml/prefs.xml b/app/src/main/res/xml/prefs.xml
index dbf1afa0..68eea10d 100644
--- a/app/src/main/res/xml/prefs.xml
+++ b/app/src/main/res/xml/prefs.xml
@@ -160,10 +160,16 @@
android:title="@string/pref_title_enable_boot_image_deopt"
app:iconSpaceReserved="false" />
+
+
@@ -196,8 +202,8 @@