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