From a68befa55060b779e609bb659c5d9580f21ff3f4 Mon Sep 17 00:00:00 2001 From: Brian Duddie Date: Wed, 19 Jul 2017 12:47:14 -0700 Subject: msm8996-common: Run sensors daemon as system user instead of root Grant capabilities and change file permissions to allow the sensors.qcom daemon to start up as the system user/group, rather than running as root. Fixes: 63775281 Test: monitor logcat after reboot, confirm no file open errors. Run QSensorTest, confirm all sensors provide sane data. Confirm that IMU calibration can read + write its saved settings. Run sensors CTS. Change-Id: Ib80ea21900d6af6cd34c82c4a63f50c7e0ac18ff --- rootdir/etc/init.qcom.rc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index fb17836..6bb20c7 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -724,8 +724,11 @@ service qti /vendor/bin/qti service sensors /vendor/bin/sensors.qcom class core - user root - group root wakelock + user system + group system + # Grants the ability for this daemon to bind IPC router ports so it can + # register QMI services + capabilities NET_BIND_SERVICE writepid /dev/cpuset/system-background/tasks on property:ro.use_data_netmgrd=false -- cgit v1.2.3