mirror of
https://github.com/followmsi/android_device_asus_deb.git
synced 2024-11-06 22:06:28 +00:00
deb: sensors: Run the sensor daemon as 'system' user/group instead of 'root'
This allows us to get rid of the dac_override SELinux rules, by applying proper permissions to the files managed by the daemon. While at it, also Treble-ized the location of said files. Change-Id: I344b4c80412af0b22dc35da234ef3c9f88983761 Signed-off-by: Daniel Jarai <jaraidaniel@gmail.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
This commit is contained in:
parent
7940a322c1
commit
f4506c20ef
1 changed files with 10 additions and 13 deletions
|
@ -181,18 +181,15 @@ on post-fs-data
|
|||
mkdir /data/system 0775 system system
|
||||
#symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
|
||||
|
||||
#Create directory used by sensor subsystem(dsps)
|
||||
mkdir /data/system/sensors
|
||||
chmod 775 /data/system/sensors
|
||||
write /data/system/sensors/settings 1
|
||||
chmod 660 /data/system/sensors/settings
|
||||
# Setup sensors-related directories and permissions
|
||||
mkdir /persist/sensors 0775 root system
|
||||
write /persist/sensors/settings 1
|
||||
chown root system /persist/sensors/settings
|
||||
chmod 664 /persist/sensors/settings
|
||||
chown root system /persist/sensors/sns.reg
|
||||
chmod 664 /persist/sensors/sns.reg
|
||||
|
||||
# AKM setting data
|
||||
mkdir /data/misc/sensors
|
||||
chmod 775 /data/misc/sensors
|
||||
|
||||
mkdir /persist/sensors
|
||||
chmod 775 /persist/sensors
|
||||
mkdir /data/vendor/sensors 0770 system system
|
||||
|
||||
# Modify from 777 (for camera calibration) to 775
|
||||
chmod 775 /persist/camera_calibration
|
||||
|
@ -301,8 +298,8 @@ service netmgrd /vendor/bin/netmgrd
|
|||
|
||||
service sensors /vendor/bin/sensors.qcom
|
||||
class late_start
|
||||
user root
|
||||
group root wakelock
|
||||
user system
|
||||
group system wakelock
|
||||
|
||||
on property:ro.data.large_tcp_window_size=true
|
||||
# Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
|
||||
|
|
Loading…
Reference in a new issue