blob: 9e17d064e72879d0b91266ce52f5bf3e1de713a4 [file] [log] [blame]
Yiwei Zhang544d6b32019-02-07 15:00:55 -08001# gpuservice - server for gpu stats and other gpu related services
2typeattribute gpuservice coredomain;
Peiyong Lin7924dc62018-11-01 13:47:51 -07003type gpuservice_exec, system_file_type, exec_type, file_type;
4
5init_daemon_domain(gpuservice)
6
7binder_call(gpuservice, adbd)
8binder_call(gpuservice, shell)
9binder_use(gpuservice)
10
11# Access the GPU.
12allow gpuservice gpu_device:chr_file rw_file_perms;
13
14# GPU service will need to load GPU driver, for example Vulkan driver in order
15# to get the capability of the driver.
16allow gpuservice same_process_hal_file:file { open read getattr execute map };
17allow gpuservice ion_device:chr_file r_file_perms;
18get_prop(gpuservice, hwservicemanager_prop)
19hwbinder_use(gpuservice)
20
21# Access /dev/graphics/fb0.
22allow gpuservice graphics_device:dir search;
23allow gpuservice graphics_device:chr_file rw_file_perms;
24
Yiwei Zhangff0f79c2018-11-27 15:21:43 -080025# Needed for dumpsys pipes.
26allow gpuservice shell:fifo_file write;
27
Peiyong Lin7924dc62018-11-01 13:47:51 -070028# Use socket supplied by adbd, for cmd gpu vkjson etc.
29allow gpuservice adbd:unix_stream_socket { read write getattr };
30
Yiwei Zhang6e8191e2019-01-23 14:28:56 -080031# Needed for interactive shell
32allow gpuservice devpts:chr_file { read write getattr };
33
Yiwei Zhang0051c932019-05-09 23:15:49 -070034# Needed for dumpstate to dumpsys gpu.
35allow gpuservice dumpstate:fd use;
36allow gpuservice dumpstate:fifo_file write;
37
Peiyong Lin7924dc62018-11-01 13:47:51 -070038add_service(gpuservice, gpu_service)
39
40# Only uncomment below line when in development
41# userdebug_or_eng(`permissive gpuservice;')