1 #Allow access to nanohub device 2 allow hal_sensors sensors_device:chr_file rw_file_perms; 3 4 # Allow acess to uinput for lidstate determination 5 allow hal_sensors uhid_device:chr_file rw_file_perms; 6 7 # Allow access to persistent partition for calibration data 8 allow hal_sensors persist_file:dir search; 9 allow hal_sensors sensors_cal_file:dir create_dir_perms; 10 allow hal_sensors sensors_cal_file:file create_file_perms; 11 12 # Allow access to saved settings file and nanohub_lock dir/file 13 allow hal_sensors sensor_vendor_data_file:dir create_dir_perms; 14 allow hal_sensors sensor_vendor_data_file:file create_file_perms; 15 16 # Allow access to sensor properties 17 set_prop(hal_sensors, sensors_prop) 18 19 # Allow access to gralloc shared memory (ion), for sensor direct report 20 allow hal_sensors ion_device:chr_file { open read ioctl }; 21 allow hal_sensors hal_graphics_allocator:fd use; 22 23 # allow sensor hal to call scheduling policy service in system server 24 allow hal_sensors_default system_server:binder call; 25 26 # allow access to detect change in /dev folder 27 allow hal_sensors_default device:dir { open read }; 28