device_phh_treble/sepolicy/vndk_detect.te
Pierre-Hugues Husson 1e27cc1157 Override vendor's usb_audio_policy_configuration
Android 8.1 added the support for new type of USB Audio devices
(USB_HEADSET, instead of old USB_DEVICE)
Some older USB devices got converted to this USB_HEADSET while still
using the old protocol.
There is no driver change needed, but the audio policy needs to be
changed.
Since vendors are simply using AOSP usb_audio_policy_configuration
Override it by ourself.
2018-04-01 00:30:31 +02:00

21 lines
735 B
Plaintext

type vndk_detect, coredomain, domain;
type vndk_detect_exec, exec_type, file_type;
init_daemon_domain(vndk_detect);
allow vndk_detect sepolicy_file:file r_file_perms;
set_prop(vndk_detect,system_prop);
allow vndk_detect shell_exec:file rx_file_perms;
allow vndk_detect toolbox_exec:file rx_file_perms;
#/system/bin/grep
allow vndk_detect system_file:file rx_file_perms;
#mount -o bind /system/bin/adbd /sbin/adbd
allow vndk_detect adbd_exec:file { getattr read };
allow vndk_detect rootfs:file { mounton getattr };
allow vndk_detect self:capability { sys_admin };
#mount -o bind /system/etc/usb_audio_policy_configuration.xml /vendor/etc/usb_audio_policy_configuration.xml
allow init vendor_configs_file:file { getattr mounton };