blob: c5bc9602e053680a7f91ceedae183fcba9d41ecc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# read and write factory calibration and sensor configuration data
allow hal_sensors_default mnt_vendor_file:dir search;
allow hal_sensors_default persist_file:dir search;
r_dir_file(hal_sensors_default, persist_sensors_file)
allow hal_sensors_default persist_sensors_file:dir create_dir_perms;
allow hal_sensors_default persist_sensors_file:file create_file_perms;
# interact with the sensors low power island (SLPI) CPU
allow hal_sensors_default self:socket { create ioctl read write };
allowxperm hal_sensors_default self:socket ioctl msm_sock_ipc_ioctls;
r_dir_file(hal_sensors_default, sysfs_msm_subsys);
allow hal_sensors_default qdsp_device:chr_file r_file_perms;
allow hal_sensors_default sensors_vendor_data_file:dir create_dir_perms;
allow hal_sensors_default sensors_vendor_data_file:file create_file_perms;
# needed by elmyra_raw.cpp
allow hal_sensors_default chre:unix_stream_socket connectto;
allow hal_sensors_default chre_socket:sock_file write;
dontaudit hal_sensors_default kernel:system module_request;
# Allow to read /sys/class/power_supply/usb/input_current_now
r_dir_file(hal_sensors_default, sysfs_batteryinfo)
r_dir_file(hal_sensors_default, adsprpcd_file)
|