blob: d1970b9bd4e6696e0a3b12cb92260a9daca73c23 [file] [log] [blame]
Alex Klyubinac2b4cd2017-02-13 14:40:49 -08001# 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
Steven Moreland9234e002018-06-06 09:30:18 -07005hal_attribute_hwservice(hal_audio, hal_audio_hwservice)
Ytai Ben-Tsvi9eaf3be2021-03-22 13:00:38 -07006hal_attribute_service(hal_audio, hal_audio_service)
Alex Klyubin53656c12017-04-13 19:05:27 -07007
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -07008allow hal_audio ion_device:chr_file r_file_perms;
9
Mikhail Naganov80483852017-10-18 20:28:33 +000010r_dir_file(hal_audio, proc)
Tri Vo464f59a2017-10-06 10:20:53 -070011r_dir_file(hal_audio, proc_asound)
Sunny Kapdibc0c88f2017-10-30 12:58:20 -070012allow hal_audio_server audio_device:dir r_dir_perms;
13allow hal_audio_server audio_device:chr_file rw_file_perms;
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070014
Mikhail Naganovd7c88dd2017-03-09 14:32:16 -080015# Needed to provide debug dump output via dumpsys' pipes.
16allow hal_audio shell:fd use;
17allow hal_audio shell:fifo_file write;
Mikhail Naganov9686cbc2017-05-04 13:25:52 -070018allow hal_audio dumpstate:fd use;
19allow hal_audio dumpstate:fifo_file write;
Mikhail Naganovd7c88dd2017-03-09 14:32:16 -080020
Ytai Ben-Tsvid09bf562020-03-26 16:00:51 -070021# Needed to allow sound trigger hal to access shared memory from apps.
22allow hal_audio_server appdomain:fd use;
23
Haynes Mathew Georgeebc7b432018-02-27 16:21:27 -080024# allow hal audio to use vnbinder
25vndbinder_use(hal_audio)
26
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070027###
28### neverallow rules
29###
30
Alex Klyubinac2b4cd2017-02-13 14:40:49 -080031# Should never execute any executable without a domain transition
Jeff Vander Stoep6a28b682017-11-20 21:43:25 -080032neverallow hal_audio_server { file_type fs_type }:file execute_no_trans;
Jeff Vander Stoep27ae5452016-10-25 12:42:39 -070033
Jeff Vander Stoep7fa59c82017-03-13 22:03:10 -070034# Only audio HAL may directly access the audio hardware
Vignesh Kulothungan155ca122019-03-18 17:21:17 -070035neverallow { halserverdomain -hal_audio_server -hal_omx_server } audio_device:chr_file *;
Jaekyun Seok224921d2018-04-09 12:07:32 +090036
Inseob Kimebde47c2020-06-23 23:52:55 +090037get_prop(hal_audio, audio_config_prop)
Jaekyun Seok224921d2018-04-09 12:07:32 +090038get_prop(hal_audio, bluetooth_a2dp_offload_prop)
Cheney Nie55a74b2019-03-18 11:07:32 +080039get_prop(hal_audio, bluetooth_audio_hal_prop)