2015-09-09 19:48:04 +02:00
|
|
|
# audioserver - audio services daemon
|
2016-02-09 21:12:13 +01:00
|
|
|
type audioserver, domain;
|
2015-09-09 19:48:04 +02:00
|
|
|
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)
|
|
|
|
|
2016-01-27 18:37:18 +01:00
|
|
|
r_dir_file(audioserver, proc)
|
2016-02-09 21:12:13 +01:00
|
|
|
allow audioserver ion_device:chr_file r_file_perms;
|
|
|
|
allow audioserver system_file:dir r_dir_perms;
|
2016-01-27 18:37:18 +01:00
|
|
|
|
2016-02-09 21:12:13 +01:00
|
|
|
# used for TEE sink - pcm capture for debug.
|
|
|
|
userdebug_or_eng(`
|
|
|
|
allow audioserver media_data_file:dir create_dir_perms;
|
|
|
|
')
|
2015-09-09 19:48:04 +02:00
|
|
|
|
|
|
|
allow audioserver audio_device:dir r_dir_perms;
|
|
|
|
allow audioserver audio_device:chr_file rw_file_perms;
|
|
|
|
|
2016-02-09 21:12:13 +01:00
|
|
|
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;
|
2015-09-09 19:48:04 +02:00
|
|
|
|
|
|
|
# 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;
|
2016-01-06 20:32:07 +01:00
|
|
|
|