Merge "Add hidraw device sepolicy for headtracking" into udc-d1-dev

This commit is contained in:
Tom Huang 2023-05-02 04:07:15 +00:00 committed by Android (Google) Code Review
commit dd5df5791f
5 changed files with 9 additions and 6 deletions

View file

@ -2,6 +2,3 @@ type sg_device, dev_type;
type vendor_toe_device, dev_type;
type lwis_device, dev_type;
type rls_device, dev_type;
# Raw HID device
type hidraw_device, dev_type;

View file

@ -48,6 +48,3 @@
# Persist
/mnt/vendor/persist/sensors/registry(/.*)? u:object_r:persist_sensor_reg_file:s0
/mnt/vendor/persist/uwb(/.*)? u:object_r:persist_uwb_file:s0
# Raw HID device
/dev/hidraw[0-9]* u:object_r:hidraw_device:s0

3
vendor/device.te vendored
View file

@ -20,3 +20,6 @@ type st54spi_device, dev_type;
# OTA
type sda_block_device, dev_type;
# Raw HID device
type hidraw_device, dev_type;

View file

@ -179,3 +179,6 @@
/dev/dma_heap/vscaler-secure u:object_r:vscaler_secure_heap_device:s0
/dev/dma_heap/vstream-secure u:object_r:dmabuf_system_secure_heap_device:s0
/dev/uci u:object_r:uci_device:s0
# Raw HID device
/dev/hidraw[0-9]* u:object_r:hidraw_device:s0

View file

@ -46,6 +46,9 @@ binder_call(hal_sensors_default, system_server);
# Allow access for dynamic sensor properties.
get_prop(hal_sensors_default, vendor_dynamic_sensor_prop)
# Allow access to raw HID devices for dynamic sensors.
allow hal_sensors_default hidraw_device:chr_file rw_file_perms;
# Allow access to the display info for ALS.
allow hal_sensors_default sysfs_display:file rw_file_perms;