platform_system_sepolicy/audioserver.te
Glenn Kasten 962e3a6a05 Restore audio tee sink
Bug: 27323882
Change-Id: Idf3977d74817c4f90f9e993d2e1e5302cc56f41d
2016-02-23 16:16:16 -08:00

50 lines
1.6 KiB
Text

# audioserver - audio services daemon
type audioserver, domain;
type audioserver_exec, exec_type, file_type;
init_daemon_domain(audioserver)
r_dir_file(audioserver, sdcard_type)
binder_use(audioserver)
binder_call(audioserver, binderservicedomain)
binder_call(audioserver, { appdomain autoplay_app })
binder_service(audioserver)
r_dir_file(audioserver, proc)
allow audioserver ion_device:chr_file r_file_perms;
allow audioserver system_file:dir r_dir_perms;
# used for TEE sink - pcm capture for debug.
userdebug_or_eng(`
allow audioserver media_data_file:dir create_dir_perms;
allow audioserver audioserver_data_file:dir create_dir_perms;
allow audioserver audioserver_data_file:file create_file_perms;
')
allow audioserver audio_device:dir r_dir_perms;
allow audioserver audio_device:chr_file rw_file_perms;
allow audioserver audioserver_service:service_manager { add find };
allow audioserver appops_service:service_manager find;
allow audioserver batterystats_service:service_manager find;
allow audioserver permission_service:service_manager find;
allow audioserver power_service:service_manager find;
allow audioserver scheduling_policy_service:service_manager find;
# Grant access to audio files to audioserver
allow audioserver audio_data_file:dir ra_dir_perms;
allow audioserver audio_data_file:file create_file_perms;
# Needed on some devices for playing audio on paired BT device,
# but seems appropriate for all devices.
unix_socket_connect(audioserver, bluetooth, bluetooth)
###
### neverallow rules
###
# audioserver should never execute any executable without a
# domain transition
neverallow audioserver { file_type fs_type }:file execute_no_trans;