aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuK1337 <priv.luk@gmail.com>2018-02-01 19:07:26 +0100
committerCosme Domínguez Díaz <cosme.ddiaz@gmail.com>2018-02-25 21:43:05 +0100
commit3a50f5c9f117b983c35b6d1975e9b9488132e07d (patch)
tree3890ca15b6c7cfe946025123062b1ae6def8e1b5
parent21978cf2c1e33336c8e4b8d6d55dc833bd10be87 (diff)
msm8996-common: rootdir: Move sensors permissions handling to 'post-fs-data'
* We need to set proper permissions earlier otherwise users might be forced to reboot as their sensors wouldn't work due to not working sensors daemon. Change-Id: Idbb5dd8a539a85c9b498e70b158569a2c9f37682
-rw-r--r--rootdir/etc/init.qcom.rc12
1 files changed, 12 insertions, 0 deletions
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
index 2fae40e..92a0d0b 100644
--- a/rootdir/etc/init.qcom.rc
+++ b/rootdir/etc/init.qcom.rc
@@ -157,6 +157,18 @@ on post-fs-data
mkdir /data/vendor/location/mq 0770 gps gps
mkdir /data/vendor/location/xtwifi 0770 gps gps
+ # SSC/SLPI sensors
+ mkdir /persist/sensors 0775 root system
+ chown root system /persist/sensors/sensors_settings
+ chmod 0664 /persist/sensors/sensors_settings
+ chown root system /persist/sensors/sns.reg
+ chmod 0664 /persist/sensors/sns.reg
+
+ # /dev/sensors only supports an ioctl to get the current SLPI timestamp;
+ # allow the sensors daemon to perform this as non-root
+ chown root system /dev/sensors
+ chmod 0660 /dev/sensors
+
# Create /data/time folder for time-services
mkdir /data/time/ 0700 system system
mkdir /data/audio/ 0770 media audio