xref: /aosp_15_r20/system/sepolicy/prebuilts/api/33.0/public/hal_audio.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1# HwBinder IPC from client to server, and callbacks
2binder_call(hal_audio_client, hal_audio_server)
3binder_call(hal_audio_server, hal_audio_client)
4
5hal_attribute_hwservice(hal_audio, hal_audio_hwservice)
6hal_attribute_service(hal_audio, hal_audio_service)
7
8allow hal_audio ion_device:chr_file r_file_perms;
9
10binder_call(hal_audio_server, servicemanager)
11
12r_dir_file(hal_audio, proc)
13r_dir_file(hal_audio, proc_asound)
14allow hal_audio_server audio_device:dir r_dir_perms;
15allow hal_audio_server audio_device:chr_file rw_file_perms;
16
17# Needed to provide debug dump output via dumpsys' pipes.
18allow hal_audio shell:fd use;
19allow hal_audio shell:fifo_file write;
20allow hal_audio dumpstate:fd use;
21allow hal_audio dumpstate:fifo_file write;
22
23# Needed to allow sound trigger hal to access shared memory from apps.
24allow hal_audio_server appdomain:fd use;
25
26# allow self to set scheduler (and allows Binder RT PI)
27allow hal_audio_server self:global_capability_class_set sys_nice;
28
29# allow hal audio to use vnbinder
30vndbinder_use(hal_audio)
31
32###
33### neverallow rules
34###
35
36# Should never execute any executable without a domain transition
37neverallow hal_audio_server { file_type fs_type }:file execute_no_trans;
38
39# Only audio HAL may directly access the audio hardware
40neverallow { halserverdomain -hal_audio_server -hal_omx_server } audio_device:chr_file *;
41
42get_prop(hal_audio, audio_config_prop)
43get_prop(hal_audio, bluetooth_a2dp_offload_prop)
44get_prop(hal_audio, bluetooth_audio_hal_prop)
45