2017-02-13 14:40:49 -08: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 09:30:18 -07:00
|
|
|
hal_attribute_hwservice(hal_audio, hal_audio_hwservice)
|
2017-04-13 19:05:27 -07:00
|
|
|
|
2016-10-25 12:42:39 -07:00
|
|
|
allow hal_audio ion_device:chr_file r_file_perms;
|
|
|
|
|
2017-10-18 13:28:33 -07:00
|
|
|
r_dir_file(hal_audio, proc)
|
2017-10-06 10:20:53 -07:00
|
|
|
r_dir_file(hal_audio, proc_asound)
|
2017-10-30 12:58:20 -07: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 12:42:39 -07:00
|
|
|
|
2017-03-09 14:32:16 -08: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 13:25:52 -07:00
|
|
|
allow hal_audio dumpstate:fd use;
|
|
|
|
allow hal_audio dumpstate:fifo_file write;
|
2017-03-09 14:32:16 -08:00
|
|
|
|
2018-02-27 16:21:27 -08:00
|
|
|
# allow hal audio to use vnbinder
|
|
|
|
vndbinder_use(hal_audio)
|
|
|
|
|
2016-10-25 12:42:39 -07:00
|
|
|
###
|
|
|
|
### neverallow rules
|
|
|
|
###
|
|
|
|
|
2017-02-13 14:40:49 -08:00
|
|
|
# Should never execute any executable without a domain transition
|
2017-11-20 21:43:25 -08:00
|
|
|
neverallow hal_audio_server { file_type fs_type }:file execute_no_trans;
|
2016-10-25 12:42:39 -07:00
|
|
|
|
2017-02-13 14:40:49 -08:00
|
|
|
# Should never need network access.
|
2016-10-25 12:42:39 -07:00
|
|
|
# Disallow network sockets.
|
2017-11-20 21:43:25 -08:00
|
|
|
neverallow hal_audio_server domain:{ tcp_socket udp_socket rawip_socket } *;
|
2017-03-13 22:03:10 -07:00
|
|
|
|
|
|
|
# Only audio HAL may directly access the audio hardware
|
2019-03-18 17:21:17 -07:00
|
|
|
neverallow { halserverdomain -hal_audio_server -hal_omx_server } audio_device:chr_file *;
|
2018-04-08 20:07:32 -07:00
|
|
|
|
|
|
|
get_prop(hal_audio, bluetooth_a2dp_offload_prop)
|
2019-03-17 20:07:32 -07:00
|
|
|
get_prop(hal_audio, bluetooth_audio_hal_prop)
|