Commit dc2dfb23 authored by syphyr's avatar syphyr Committed by Basil Gello

Make adb use a custom prop for adb root

Change-Id: Ibc6b06d5e4729bd76fc26ffcd072a2ba4219c708
parent b9634cde
......@@ -1015,8 +1015,8 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
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("lineage.service.adb.root", "0"))) {
SystemProperties.set("lineage.service.adb.root", "0");
Settings.Secure.putInt(getActivity().getContentResolver(),
Settings.Secure.ADB_ENABLED, 0);
Settings.Secure.putInt(getActivity().getContentResolver(),
......@@ -1028,8 +1028,9 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
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("lineage.service.adb.root", "0"))) {
SystemProperties.set("lineage.service.adb.root", "0");
Settings.Secure.putInt(getActivity().getContentResolver(),
Settings.Secure.ADB_ENABLED, 0);
Settings.Secure.putInt(getActivity().getContentResolver(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment