Scott Randolph | 008c60b | 2017-06-01 17:24:53 -0700 | [diff] [blame] | 1 | # evs_mock mock hardware driver service |
Hans Chang | d86a5d5 | 2017-09-27 13:58:02 -0700 | [diff] [blame] | 2 | type hal_evs_driver, domain, coredomain; |
Scott Randolph | 008c60b | 2017-06-01 17:24:53 -0700 | [diff] [blame] | 3 | hal_server_domain(hal_evs_driver, hal_evs) |
Dan Harms | 4762e29 | 2019-05-17 12:17:53 -0700 | [diff] [blame] | 4 | hal_client_domain(hal_evs_driver, hal_evs) |
Scott Randolph | 008c60b | 2017-06-01 17:24:53 -0700 | [diff] [blame] | 5 | |
| 6 | # allow init to launch processes in this context |
Dan Harms | 4762e29 | 2019-05-17 12:17:53 -0700 | [diff] [blame] | 7 | type hal_evs_driver_exec, exec_type, file_type, system_file_type; |
Scott Randolph | 008c60b | 2017-06-01 17:24:53 -0700 | [diff] [blame] | 8 | init_daemon_domain(hal_evs_driver) |
Changyeon Jo | d1cfa58 | 2019-03-01 16:39:09 -0800 | [diff] [blame] | 9 | binder_use(hal_evs_driver) |
Scott Randolph | 008c60b | 2017-06-01 17:24:53 -0700 | [diff] [blame] | 10 | |
| 11 | # Allow use of USB devices, gralloc buffers, and surface flinger |
| 12 | allow hal_evs_driver device:dir { open read }; |
Changyeon Jo | d1cfa58 | 2019-03-01 16:39:09 -0800 | [diff] [blame] | 13 | allow hal_evs_driver video_device:chr_file rw_file_perms; |
Scott Randolph | 008c60b | 2017-06-01 17:24:53 -0700 | [diff] [blame] | 14 | hal_client_domain(hal_evs_driver, hal_graphics_allocator); |
Changyeon Jo | d1cfa58 | 2019-03-01 16:39:09 -0800 | [diff] [blame] | 15 | hal_client_domain(hal_evs_driver, hal_graphics_composer) |
| 16 | hal_client_domain(hal_evs_driver, hal_configstore) |
Scott Randolph | 008c60b | 2017-06-01 17:24:53 -0700 | [diff] [blame] | 17 | |
Changyeon Jo | d1cfa58 | 2019-03-01 16:39:09 -0800 | [diff] [blame] | 18 | allow hal_evs_driver gpu_device:chr_file rw_file_perms; |
Scott Randolph | 008c60b | 2017-06-01 17:24:53 -0700 | [diff] [blame] | 19 | binder_call(hal_evs_driver, surfaceflinger); |
| 20 | allow hal_evs_driver surfaceflinger_service:service_manager find; |
Changyeon Jo | d1cfa58 | 2019-03-01 16:39:09 -0800 | [diff] [blame] | 21 | allow hal_evs_driver ion_device:chr_file r_file_perms; |
Changyeon Jo | 6fa3802 | 2019-05-03 16:35:16 -0700 | [diff] [blame] | 22 | |
| 23 | # Allow the driver to access kobject uevents |
| 24 | allow hal_evs_driver self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl; |