2017-02-13 23:40:49 +01:00
|
|
|
# HwBinder IPC from client to server, and callbacks
|
|
|
|
binder_call(hal_audio_client, hal_audio_server)
|
|
|
|
binder_call(hal_audio_server, hal_audio_client)
|
|
|
|
|
2018-06-06 18:30:18 +02:00
|
|
|
hal_attribute_hwservice(hal_audio, hal_audio_hwservice)
|
2021-03-22 21:00:38 +01:00
|
|
|
hal_attribute_service(hal_audio, hal_audio_service)
|
2017-04-14 04:05:27 +02:00
|
|
|
|
2016-10-25 21:42:39 +02:00
|
|
|
allow hal_audio ion_device:chr_file r_file_perms;
|
|
|
|
|
2021-12-03 20:24:28 +01:00
|
|
|
binder_call(hal_audio_server, servicemanager)
|
|
|
|
|
2017-10-18 22:28:33 +02:00
|
|
|
r_dir_file(hal_audio, proc)
|
2017-10-06 19:20:53 +02:00
|
|
|
r_dir_file(hal_audio, proc_asound)
|
2017-10-30 20:58:20 +01:00
|
|
|
allow hal_audio_server audio_device:dir r_dir_perms;
|
|
|
|
allow hal_audio_server audio_device:chr_file rw_file_perms;
|
2016-10-25 21:42:39 +02:00
|
|
|
|
2017-03-09 23:32:16 +01:00
|
|
|
# Needed to provide debug dump output via dumpsys' pipes.
|
|
|
|
allow hal_audio shell:fd use;
|
|
|
|
allow hal_audio shell:fifo_file write;
|
2017-05-04 22:25:52 +02:00
|
|
|
allow hal_audio dumpstate:fd use;
|
|
|
|
allow hal_audio dumpstate:fifo_file write;
|
2017-03-09 23:32:16 +01:00
|
|
|
|
2020-03-27 00:00:51 +01:00
|
|
|
# Needed to allow sound trigger hal to access shared memory from apps.
|
|
|
|
allow hal_audio_server appdomain:fd use;
|
|
|
|
|
2018-02-28 01:21:27 +01:00
|
|
|
# allow hal audio to use vnbinder
|
|
|
|
vndbinder_use(hal_audio)
|
|
|
|
|
2016-10-25 21:42:39 +02:00
|
|
|
###
|
|
|
|
### neverallow rules
|
|
|
|
###
|
|
|
|
|
2017-02-13 23:40:49 +01:00
|
|
|
# Should never execute any executable without a domain transition
|
2017-11-21 06:43:25 +01:00
|
|
|
neverallow hal_audio_server { file_type fs_type }:file execute_no_trans;
|
2016-10-25 21:42:39 +02:00
|
|
|
|
2017-03-14 06:03:10 +01:00
|
|
|
# Only audio HAL may directly access the audio hardware
|
2019-03-19 01:21:17 +01:00
|
|
|
neverallow { halserverdomain -hal_audio_server -hal_omx_server } audio_device:chr_file *;
|
2018-04-09 05:07:32 +02:00
|
|
|
|
2020-06-23 16:52:55 +02:00
|
|
|
get_prop(hal_audio, audio_config_prop)
|
2018-04-09 05:07:32 +02:00
|
|
|
get_prop(hal_audio, bluetooth_a2dp_offload_prop)
|
2019-03-18 04:07:32 +01:00
|
|
|
get_prop(hal_audio, bluetooth_audio_hal_prop)
|