1# EdgeTPU vendor service.
2type edgetpu_vendor_server, domain;
3type edgetpu_vendor_server_exec, exec_type, vendor_file_type, file_type;
4init_daemon_domain(edgetpu_vendor_server)
5
6# The vendor service will use binder calls.
7binder_use(edgetpu_vendor_server);
8
9# The vendor service will serve a binder service.
10binder_service(edgetpu_vendor_server);
11
12# EdgeTPU vendor service to register the service to service_manager.
13add_service(edgetpu_vendor_server, edgetpu_vendor_service);
14
15# Allow communications between other vendor services.
16allow edgetpu_vendor_server vndbinder_device:chr_file { read write open ioctl map };
17
18# Allow EdgeTPU vendor service to access its data files.
19allow edgetpu_vendor_server edgetpu_vendor_service_data_file:file create_file_perms;
20allow edgetpu_vendor_server edgetpu_vendor_service_data_file:dir create_dir_perms;
21
22# Allow EdgeTPU vendor service to access Android shared memory allocated
23# by the camera hal for on-device compilation.
24allow edgetpu_vendor_server hal_camera_default:fd use;
25
26# Allow EdgeTPU vendor service to read the kernel version.
27# This is done inside the InitGoogle.
28allow edgetpu_vendor_server proc_version:file r_file_perms;
29
30# Allow EdgeTPU vendor service to read the overcommit_memory info.
31allow edgetpu_vendor_server proc_overcommit_memory:file r_file_perms;
32
33# Allow EdgeTPU vendor service to read hetero runtime properties
34get_prop(edgetpu_vendor_server, vendor_hetero_runtime_prop)
35