blob: 505e64d919b6c46351125112d31bb12c80c22597 [file] [log] [blame]
# in addition to ioctl commands granted to domain allow system_server to use:
allowxperm system_server self:udp_socket ioctl priv_sock_ioctls;
# At a minimum, used for GPS (b/32290392)
allow system_server self:socket ioctl; # create already in core policy
allowxperm system_server self:socket ioctl msm_sock_ipc_ioctls;
# Grant access to Qualcomm MSM Interface (QMI) radio sockets
qmux_socket(system_server)
# /dev/uhid
allow system_server uhid_device:chr_file rw_file_perms;
# talk to perfd
allow system_server perfd_data_file:dir search;
allow system_server perfd_data_file:sock_file write;
allow system_server perfd:unix_stream_socket connectto;
allow system_server location:unix_stream_socket connectto;
allow system_server location_data_file:sock_file write;
allow system_server netmgrd_socket:dir search;
unix_socket_connect(system_server, netmgrd, netmgrd)
# talk to peripheral manager
allow system_server per_mgr_service:service_manager find;
binder_call(system_server, per_mgr)
# files in /sys
r_dir_file(system_server, sysfs_type)
# write to files owned by location daemon
allow system_server location_data_file:dir create_dir_perms;
allow system_server location_data_file:{ file fifo_file } create_file_perms;
## Rules needed for sensors HAL when it is running in passthrough mode.
# Access to the nanohub device
allow system_server sensors_device:chr_file rw_file_perms;
# Access to the lock file to arbitrate access
allow system_server nanohub_lock_file:dir create_dir_perms;
allow system_server nanohub_lock_file:file create_file_perms;
# Access to uinput for lidstate determination
allow system_server uhid_device:chr_file rw_file_perms;
# Allow access to persistent partition for calibration data
allow system_server persist_file:dir search;
allow system_server sensors_cal_file:dir create_dir_perms;
allow system_server sensors_cal_file:file create_file_perms;
# Allow access to saved settings file
allow system_server sensors_saved_settings_file:dir create_dir_perms;
allow system_server sensors_saved_settings_file:file create_file_perms;
# Allow access to sensor properties
set_prop(system_server, sensors_prop)
## End sensor HAL section
# interact with thermal_config
set_prop(system_server, thermal_prop)
# rpm
r_dir_file(system_server, debugfs_rpm)
# kgsl
allow system_server debugfs_kgsl:file { open read getattr };
userdebug_or_eng(`
allow system_server diag_device:chr_file rw_file_perms;
')