Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 518cf181 authored by syphyr's avatar syphyr Committed by Tim Schumacher
Browse files

Make adb use a custom prop for adb root

Change-Id: Ibc6b06d5e4729bd76fc26ffcd072a2ba4219c708
parent 84853ab5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -892,8 +892,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
        String oldValue = SystemProperties.get(ROOT_ACCESS_PROPERTY, "0");
        SystemProperties.set(ROOT_ACCESS_PROPERTY, newValue.toString());
        if (Integer.valueOf(newValue.toString()) < 2 && !oldValue.equals(newValue)
                && "1".equals(SystemProperties.get("service.adb.root", "0"))) {
            SystemProperties.set("service.adb.root", "0");
                && "1".equals(SystemProperties.get("cm.service.adb.root", "0"))) {
            SystemProperties.set("cm.service.adb.root", "0");
            Settings.Global.putInt(getActivity().getContentResolver(),
                    Settings.Global.ADB_ENABLED, 0);
            Settings.Global.putInt(getActivity().getContentResolver(),
@@ -905,8 +905,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
    private void resetRootAccessOptions() {
        String oldValue = SystemProperties.get(ROOT_ACCESS_PROPERTY, "0");
        SystemProperties.set(ROOT_ACCESS_PROPERTY, "0");
        if (!oldValue.equals("0") && "1".equals(SystemProperties.get("service.adb.root", "0"))) {
            SystemProperties.set("service.adb.root", "0");
        if (!oldValue.equals("0") && "1".equals(SystemProperties.get("cm.service.adb.root", "0"))) {
            SystemProperties.set("cm.service.adb.root", "0");
            Settings.Global.putInt(getActivity().getContentResolver(),
                    Settings.Global.ADB_ENABLED, 0);
            Settings.Global.putInt(getActivity().getContentResolver(),