sdm660-common: rootdir: 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
This commit is contained in:
parent
782a520d58
commit
3b630141b0
2 changed files with 14 additions and 7 deletions
|
@ -419,6 +419,7 @@ on post-fs-data
|
||||||
# Create /data/time folder for time-services
|
# Create /data/time folder for time-services
|
||||||
mkdir /data/vendor/time/ 0700 system system
|
mkdir /data/vendor/time/ 0700 system system
|
||||||
|
|
||||||
|
|
||||||
setprop vold.post_fs_data_done 1
|
setprop vold.post_fs_data_done 1
|
||||||
|
|
||||||
#Create a folder for SRS to be able to create a usercfg file
|
#Create a folder for SRS to be able to create a usercfg file
|
||||||
|
@ -630,15 +631,20 @@ service vendor.sensors /vendor/bin/sscrpcd
|
||||||
disabled
|
disabled
|
||||||
|
|
||||||
service vendor.sensors.qti /vendor/bin/sensors.qti
|
service vendor.sensors.qti /vendor/bin/sensors.qti
|
||||||
class core
|
class main
|
||||||
user system
|
user system
|
||||||
group system
|
group system
|
||||||
|
# Grants the ability for this daemon to bind IPC router ports so it can
|
||||||
|
# register QMI services
|
||||||
|
capabilities NET_BIND_SERVICE
|
||||||
|
|
||||||
service vendor.sensors.qcom /vendor/bin/sensors.qcom
|
service vendor.sensors.qcom /vendor/bin/sensors.qcom
|
||||||
class core
|
class main
|
||||||
user root
|
user system
|
||||||
group root
|
group system
|
||||||
writepid /dev/cpuset/system-background/tasks
|
# Grants the ability for this daemon to bind IPC router ports so it can
|
||||||
|
# register QMI services
|
||||||
|
capabilities NET_BIND_SERVICE
|
||||||
|
|
||||||
on property:ro.vendor.use_data_netmgrd=false
|
on property:ro.vendor.use_data_netmgrd=false
|
||||||
# netmgr not supported on specific target
|
# netmgr not supported on specific target
|
||||||
|
|
|
@ -236,7 +236,9 @@ firmware_directories /vendor/firmware_mnt/image/
|
||||||
/dev/tsc_ci0 0660 media media
|
/dev/tsc_ci0 0660 media media
|
||||||
|
|
||||||
# sensors
|
# sensors
|
||||||
/dev/sensors 0660 system system
|
# /dev/sensors only supports an ioctl to get the current SLPI timestamp
|
||||||
|
# allow the sensors daemon to perform this as non-root
|
||||||
|
/dev/sensors 0660 root system
|
||||||
/sys/devices/i2c-12/12-* pollrate_ms 0664 system system
|
/sys/devices/i2c-12/12-* pollrate_ms 0664 system system
|
||||||
/sys/devices/f9925000.i2c/i2c-0/0-* enable 0660 input system
|
/sys/devices/f9925000.i2c/i2c-0/0-* enable 0660 input system
|
||||||
/sys/devices/f9925000.i2c/i2c-0/0-* poll_delay 0660 input system
|
/sys/devices/f9925000.i2c/i2c-0/0-* poll_delay 0660 input system
|
||||||
|
@ -413,7 +415,6 @@ firmware_directories /vendor/firmware_mnt/image/
|
||||||
/sys/class/graphics/fb0 dynamic_bitclk 0664 system graphics
|
/sys/class/graphics/fb0 dynamic_bitclk 0664 system graphics
|
||||||
/sys/devices/virtual/hdcp/msm_hdcp min_level_change 0664 system graphics
|
/sys/devices/virtual/hdcp/msm_hdcp min_level_change 0664 system graphics
|
||||||
|
|
||||||
|
|
||||||
#QG device
|
#QG device
|
||||||
/dev/qg 0660 system system
|
/dev/qg 0660 system system
|
||||||
/dev/qg_battery 0660 system system
|
/dev/qg_battery 0660 system system
|
||||||
|
|
Loading…
Reference in a new issue