aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhao Wei Liew <zhaoweiliew@gmail.com>2017-02-25 08:01:58 +0800
committerJason Riordan <jriordan001@gmail.com>2017-02-27 23:33:02 -0500
commit70e53042eb33d1d02e8ac918db9c90093bb996f6 (patch)
treeb9c8eb7be33f113b38578a681be9bba651980cfa
parent5da6b60229b3501f4d1a46c5900f9533e6752c16 (diff)
downloadvendor_replicant-70e53042eb33d1d02e8ac918db9c90093bb996f6.tar.gz
vendor_replicant-70e53042eb33d1d02e8ac918db9c90093bb996f6.tar.bz2
vendor_replicant-70e53042eb33d1d02e8ac918db9c90093bb996f6.zip
cm: Import init.superuser.rc into init.local.rc
With change I73bbf37e547323846cd863b3dcea5c890f9ee969, we need to move all the contents of the su service into the main init.cm.rc file. Change-Id: Id7cf00738dcb81935b27e5de33d1f7dd2b2fcdb3
-rw-r--r--prebuilt/common/etc/init.local.rc18
1 files changed, 16 insertions, 2 deletions
diff --git a/prebuilt/common/etc/init.local.rc b/prebuilt/common/etc/init.local.rc
index 2a5316d4..9c40061e 100644
--- a/prebuilt/common/etc/init.local.rc
+++ b/prebuilt/common/etc/init.local.rc
@@ -1,6 +1,4 @@
# CyanogenMod Extras
-import /init.superuser.rc
-
on init
export ANDROID_CACHE /cache
export TERMINFO /system/etc/terminfo
@@ -211,3 +209,19 @@ on property:sys.io.scheduler=bfq
write /sys/block/sde/queue/iosched/slice_idle 0
write /sys/block/dm-0/queue/iosched/slice_idle 0
+# su daemon
+service su_daemon /system/xbin/su --daemon
+ disabled
+ seclabel u:r:sudaemon:s0
+
+on property:persist.sys.root_access=0
+ stop su_daemon
+
+on property:persist.sys.root_access=1
+ start su_daemon
+
+on property:persist.sys.root_access=2
+ start su_daemon
+
+on property:persist.sys.root_access=3
+ start su_daemon