1type cuttlefish_sensor_injection, domain; 2type cuttlefish_sensor_injection_exec, exec_type, vendor_file_type, file_type; 3 4# Switch to cuttlefish_sensor_injection domain when executing from shell. 5domain_auto_trans(shell, cuttlefish_sensor_injection_exec, cuttlefish_sensor_injection) 6allow cuttlefish_sensor_injection shell:fd use; 7 8# Allow cuttlefish_sensor_injection to communicate over adb connection. 9allow cuttlefish_sensor_injection adbd:fd use; 10allow cuttlefish_sensor_injection adbd:unix_stream_socket { read write }; 11# Needed to run the binary directly via adb socket. 12allow cuttlefish_sensor_injection devpts:chr_file { read write }; 13 14# Grant cuttlefish_sensor_injection access to the ISensors HAL. 15hal_client_domain(cuttlefish_sensor_injection, hal_sensors) 16binder_use(cuttlefish_sensor_injection) 17