diff --git a/basic/non_plat/audiocmdservice_atci.te b/basic/non_plat/audiocmdservice_atci.te index ed9f24c..8cbc809 100644 --- a/basic/non_plat/audiocmdservice_atci.te +++ b/basic/non_plat/audiocmdservice_atci.te @@ -21,7 +21,7 @@ allow audiocmdservice_atci bootdevice_block_device:blk_file rw_file_perms; # can route /dev/binder traffic to /dev/vndbinder vndbinder_use(audiocmdservice_atci) -binder_call(audiocmdservice_atci, mtk_hal_audio) +binder_call(audiocmdservice_atci, hal_audio_default) hal_client_domain(audiocmdservice_atci, hal_audio) diff --git a/basic/non_plat/file_contexts b/basic/non_plat/file_contexts index 29f1011..eaffa3c 100644 --- a/basic/non_plat/file_contexts +++ b/basic/non_plat/file_contexts @@ -695,7 +695,6 @@ /(vendor|system/vendor)/bin/hw/android\.hardware\.bluetooth@1\.[0-9]-service-mediatek u:object_r:mtk_hal_bluetooth_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.gnss@2\.1-service-mediatek u:object_r:mtk_hal_gnss_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.gnss-service\.mediatek u:object_r:mtk_hal_gnss_exec:s0 -/(vendor|system/vendor)/bin/hw/android\.hardware\.audio\.service\.mediatek u:object_r:mtk_hal_audio_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.mediatek\.hardware\.mtkpower@1\.0-service u:object_r:mtk_hal_power_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.sensors@1\.0-service-mediatek u:object_r:mtk_hal_sensors_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.sensors@2\.0-service-mediatek u:object_r:mtk_hal_sensors_exec:s0 diff --git a/basic/non_plat/fpsgo_native.te b/basic/non_plat/fpsgo_native.te index a2feb46..f9e5b97 100644 --- a/basic/non_plat/fpsgo_native.te +++ b/basic/non_plat/fpsgo_native.te @@ -26,7 +26,7 @@ allow fpsgo_native logd:process setsched; allow fpsgo_native mediaserver:process setsched; allow fpsgo_native mediaswcodec:process setsched; allow fpsgo_native mediaextractor:process setsched; -allow fpsgo_native mtk_hal_audio:process setsched; +allow fpsgo_native hal_audio_default:process setsched; allow fpsgo_native mtk_hal_sensors:process setsched; allow fpsgo_native mtk_hal_c2:process setsched; allow fpsgo_native mtk_hal_gnss:process setsched; diff --git a/basic/non_plat/hal_audio_default.te b/basic/non_plat/hal_audio_default.te new file mode 100644 index 0000000..81a925a --- /dev/null +++ b/basic/non_plat/hal_audio_default.te @@ -0,0 +1,228 @@ +# ============================================== +# Common SEPolicy Rule +# ============================================== +wakelock_use(hal_audio_default) + +add_hwservice(hal_audio_default, mtk_hal_bluetooth_audio_hwservice) +allow hal_audio_default ion_device:chr_file r_file_perms; + +allow hal_audio_default system_file:dir r_dir_perms; + +r_dir_file(hal_audio_default, proc) +allow hal_audio_default audio_device:dir r_dir_perms; +allow hal_audio_default audio_device:chr_file rw_file_perms; + +# Date : WK14.32 +# Operation : Migration +# Purpose : Set audio driver permission to access SD card for debug purpose and accss NVRam. +allow hal_audio_default sdcard_type:dir create_dir_perms; +allow hal_audio_default sdcard_type:file create_file_perms; +allow hal_audio_default nvram_data_file:dir w_dir_perms; +allow hal_audio_default nvram_data_file:file create_file_perms; +allow hal_audio_default nvram_data_file:lnk_file r_file_perms; +allow hal_audio_default nvdata_file:lnk_file r_file_perms; +allow hal_audio_default nvdata_file:dir create_dir_perms; +allow hal_audio_default nvdata_file:file create_file_perms; + +# Date : WK14.34 +# Operation : Migration +# Purpose : nvram access (dumchar case for nand and legacy chip) +allow hal_audio_default nvram_device:chr_file rw_file_perms; +allow hal_audio_default self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl; + +# Date : WK14.36 +# Operation : Migration +# Purpose : media server and bt process communication for A2DP data.and other control flow +allow hal_audio_default bt_a2dp_stream_socket:sock_file w_file_perms; +allow hal_audio_default bt_int_adp_socket:sock_file w_file_perms; + +# Date : WK14.36 +# Operation : Migration +# Purpose : access nvram, otp, ccci cdoec devices. +allow hal_audio_default ccci_device:chr_file rw_file_perms; +allow hal_audio_default eemcs_device:chr_file rw_file_perms; +allow hal_audio_default devmap_device:chr_file r_file_perms; +allow hal_audio_default ebc_device:chr_file rw_file_perms; +allow hal_audio_default nvram_device:blk_file rw_file_perms; + +# Date : WK14.38 +# Operation : Migration +# Purpose : FM driver access +allow hal_audio_default fm_device:chr_file rw_file_perms; + +# Data : WK14.39 +# Operation : Migration +# Purpose : dump for debug +set_prop(hal_audio_default, vendor_mtk_audiohal_prop) + +# Date : WK14.40 +# Operation : Migration +# Purpose : HDMI driver access +allow hal_audio_default graphics_device:chr_file rw_file_perms; + +# Date : WK14.40 +# Operation : Migration +# Purpose : Smartpa +allow hal_audio_default smartpa_device:chr_file rw_file_perms; +allow hal_audio_default sysfs_rt_param:file rw_file_perms; +allow hal_audio_default sysfs_rt_param:dir r_dir_perms; +allow hal_audio_default sysfs_rt_calib:file rw_file_perms; +allow hal_audio_default sysfs_rt_calib:dir r_dir_perms; + +# Date : WK14.41 +# Operation : Migration +# Purpose : WFD HID Driver +allow hal_audio_default uhid_device:chr_file rw_file_perms; + +# Date : WK14.43 +# Operation : Migration +# Purpose : VOW +allow hal_audio_default vow_device:chr_file rw_file_perms; + +# Date: WK14.44 +# Operation : Migration +# Purpose : EVDO +allow hal_audio_default rpc_socket:sock_file w_file_perms; +allow hal_audio_default ttySDIO_device:chr_file rw_file_perms; + +# Data: WK14.44 +# Operation : Migration +# Purpose : for low SD card latency issue +allow hal_audio_default sysfs_lowmemorykiller:file r_file_perms; + +# Data: WK14.45 +# Operation : Migration +# Purpose : for change thermal policy when needed +allow hal_audio_default proc_mtkcooler:dir search; +allow hal_audio_default proc_mtktz:dir search; +allow hal_audio_default proc_thermal:dir search; +allow hal_audio_default thermal_manager_data_file:file create_file_perms; +allow hal_audio_default thermal_manager_data_file:dir { rw_dir_perms setattr }; + +# for as33970 +allow hal_audio_default sysfs_reset_dsp:file rw_file_perms; +allow hal_audio_default tahiti_device:chr_file rw_file_perms_no_map; +# for smartpa +allow hal_audio_default sysfs_chip_vendor:file r_file_perms; +allow hal_audio_default sysfs_pa_num:file rw_file_perms; + +# Data : WK14.47 +# Operation : Audio playback +# Purpose : Music as ringtone +allow hal_audio_default radio:dir r_dir_perms; +allow hal_audio_default radio:file r_file_perms; + +# Data : WK14.47 +# Operation : CTS +# Purpose : cts search strange app +allow hal_audio_default untrusted_app:dir search; + +# Date : WK15.03 +# Operation : Migration +# Purpose : offloadservice +allow hal_audio_default offloadservice_device:chr_file rw_file_perms; + +# Date : WK15.34 +# Operation : Migration +# Purpose: for camera middleware dump image buffer to sdcard & audio frameworks dump +allow hal_audio_default storage_file:dir search; +allow hal_audio_default storage_file:lnk_file rw_file_perms; +allow hal_audio_default mnt_user_file:dir rw_dir_perms; +allow hal_audio_default mnt_user_file:lnk_file rw_file_perms; + +# Date : WK16.17 +# Operation : Migration +# Purpose: read/open sysfs node +allow hal_audio_default sysfs_ccci:file r_file_perms; +allow hal_audio_default sysfs_ccci:dir search; + +# Date : WK16.18 +# Operation : Migration +# Purpose: research root dir "/" +allow hal_audio_default tmpfs:dir search; + +# Purpose: Dump debug info +allow hal_audio_default kmsg_device:chr_file w_file_perms; +allow hal_audio_default fuse:file rw_file_perms; + +# Date : WK16.27 +# Operation : Migration +# Purpose: tunning tool update parameters +binder_call(hal_audio_default, radio) +allow hal_audio_default mtk_audiohal_data_file:dir create_dir_perms; +allow hal_audio_default mtk_audiohal_data_file:file create_file_perms; +# Date : WK16.33 +# Purpose: Allow to access ged for gralloc_extra functions +allow hal_audio_default proc_ged:file rw_file_perms; + +# Fix bootup violation +allow hal_audio_default fuse:dir r_dir_perms; + +# for usb phone call, allow sys_nice +allow hal_audio_default self:capability sys_nice; + +# Date : W17.29 +# Boot for opening trace file: Permission denied (13) +allow hal_audio_default debugfs_tracing:file w_file_perms; + +# Audio Tuning Tool Android O porting +binder_call(hal_audio_default, audiocmdservice_atci) + +# Add for control PowerHAL +hal_client_domain(hal_audio_default, hal_power) + +# cm4 smartpa +allow hal_audio_default audio_ipi_device:chr_file rw_file_perms; +allow hal_audio_default audio_scp_device:chr_file r_file_perms; + +# Date : WK18.21 +# Operation: P migration +# Purpose: Allow to search /mnt/vendor/nvdata for fstab when using NVM_Init() +allow hal_audio_default mnt_vendor_file:dir search; + +# Date: 2019/06/14 +# Operation : Migration +allow hal_audio_default audioserver:fifo_file w_file_perms; +allow hal_audio_default sysfs_boot_mode:file r_file_perms; +allow hal_audio_default sysfs_dt_firmware_android:dir search; + +# Date : WK18.44 +# Operation: adsp +allow hal_audio_default adsp_device:file rw_file_perms; +allow hal_audio_default adsp_device:chr_file rw_file_perms; + +# Date : 2020/3/21 +# Operation: audio dptx +allow hal_audio_default dri_device:chr_file rw_file_perms; +allow hal_audio_default gpu_device:dir search; + +# Date : WK20.26 +allow hal_audio_default sysfs_dt_firmware_android:file r_file_perms; + +# Date : WK20.36 +# Operation : Migration +# Purpose : AAudio HAL +allow hal_audio_default debugfs_ion:dir search; + +# Date : 2021/06/15 +# Purpose: Allow to change mtk MMQoS scenario +allow hal_audio_default sysfs_mtk_mmqos_scen:file w_file_perms; +allow hal_audio_default sysfs_mtk_mmqos_scen_v2:file w_file_perms; + +# Allow ReadDefaultFstab(). +read_fstab(hal_audio_default) + +# Date : WK21.23 +# Operation : Migration +# Purpose : factory mode +allow hal_audio_default sysfs_boot_info:file r_file_perms; + +# Date : WK21.32 +# Operation : Migration +# Purpose: permission for audioserver to use ccci node +allow hal_audio_default ccci_aud_device:chr_file rw_file_perms; + +# Date: 2022/12/01 +# Purpose: Allow Audio HAL to get and set vendor_mtk_audio_prop +get_prop(hal_audio_default, vendor_mtk_audio_prop) +set_prop(hal_audio_default, vendor_mtk_audio_prop) diff --git a/basic/non_plat/init.te b/basic/non_plat/init.te index 0a54fd9..c8ca940 100644 --- a/basic/non_plat/init.te +++ b/basic/non_plat/init.te @@ -52,10 +52,6 @@ allow init tmpfs:lnk_file create_file_perms; # Purpose : bt hal interface permission allow init mtk_hal_bluetooth_exec:file getattr; -# Date : WK17.02 -# Purpose: Fix audio hal service fail -allow init mtk_hal_audio_exec:file getattr; - # Date : W17.20 # Purpose: Enable PRODUCT_FULL_TREBLE allow init vendor_block_device:lnk_file relabelto; diff --git a/basic/non_plat/kernel.te b/basic/non_plat/kernel.te index 5831906..576e9e4 100644 --- a/basic/non_plat/kernel.te +++ b/basic/non_plat/kernel.te @@ -70,7 +70,7 @@ allow kernel audioserver:fd use; # Date : WK18.02 # Operation: SQC # Purpose: Allow SCP SmartPA kthread to write debug dump to sdcard -allow kernel mtk_hal_audio:fd use; +allow kernel hal_audio_default:fd use; allow kernel factory:fd use; # Date : WK18.29 diff --git a/basic/non_plat/meta_tst.te b/basic/non_plat/meta_tst.te index bdb87cb..6ce0a5d 100644 --- a/basic/non_plat/meta_tst.te +++ b/basic/non_plat/meta_tst.te @@ -266,7 +266,7 @@ allow meta_tst mddb_data_file:dir create_dir_perms; # Date: W17.43 # Purpose : Allow meta_tst to call Audio HAL service -binder_call(meta_tst, mtk_hal_audio) +binder_call(meta_tst, hal_audio_default) allow meta_tst mtk_audiohal_data_file:dir r_dir_perms; #Data:W1745 diff --git a/basic/non_plat/mtk_hal_audio.te b/basic/non_plat/mtk_hal_audio.te deleted file mode 100644 index 23c3b6a..0000000 --- a/basic/non_plat/mtk_hal_audio.te +++ /dev/null @@ -1,244 +0,0 @@ -# ============================================== -# Common SEPolicy Rule -# ============================================== -type mtk_hal_audio, domain; - -type mtk_hal_audio_exec, exec_type, vendor_file_type, file_type; -init_daemon_domain(mtk_hal_audio) - -hal_server_domain(mtk_hal_audio, hal_audio) -hal_client_domain(mtk_hal_audio, hal_allocator) - -wakelock_use(mtk_hal_audio) - -add_hwservice(mtk_hal_audio, mtk_hal_bluetooth_audio_hwservice) -allow mtk_hal_audio ion_device:chr_file r_file_perms; - -allow mtk_hal_audio system_file:dir r_dir_perms; - -r_dir_file(mtk_hal_audio, proc) -allow mtk_hal_audio audio_device:dir r_dir_perms; -allow mtk_hal_audio audio_device:chr_file rw_file_perms; - -# mtk_hal_audio should never execute any executable without -# a domain transition -neverallow mtk_hal_audio { file_type fs_type }:file execute_no_trans; - -# mtk_hal_audio should never need network access. -# Disallow network sockets apart from TCP sockets. -neverallow mtk_hal_audio domain:{ udp_socket rawip_socket } *; - -# Date : WK14.32 -# Operation : Migration -# Purpose : Set audio driver permission to access SD card for debug purpose and accss NVRam. -allow mtk_hal_audio sdcard_type:dir create_dir_perms; -allow mtk_hal_audio sdcard_type:file create_file_perms; -allow mtk_hal_audio nvram_data_file:dir w_dir_perms; -allow mtk_hal_audio nvram_data_file:file create_file_perms; -allow mtk_hal_audio nvram_data_file:lnk_file r_file_perms; -allow mtk_hal_audio nvdata_file:lnk_file r_file_perms; -allow mtk_hal_audio nvdata_file:dir create_dir_perms; -allow mtk_hal_audio nvdata_file:file create_file_perms; - -# Date : WK14.34 -# Operation : Migration -# Purpose : nvram access (dumchar case for nand and legacy chip) -allow mtk_hal_audio nvram_device:chr_file rw_file_perms; -allow mtk_hal_audio self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl; - -# Date : WK14.36 -# Operation : Migration -# Purpose : media server and bt process communication for A2DP data.and other control flow -allow mtk_hal_audio bt_a2dp_stream_socket:sock_file w_file_perms; -allow mtk_hal_audio bt_int_adp_socket:sock_file w_file_perms; - -# Date : WK14.36 -# Operation : Migration -# Purpose : access nvram, otp, ccci cdoec devices. -allow mtk_hal_audio ccci_device:chr_file rw_file_perms; -allow mtk_hal_audio eemcs_device:chr_file rw_file_perms; -allow mtk_hal_audio devmap_device:chr_file r_file_perms; -allow mtk_hal_audio ebc_device:chr_file rw_file_perms; -allow mtk_hal_audio nvram_device:blk_file rw_file_perms; - -# Date : WK14.38 -# Operation : Migration -# Purpose : FM driver access -allow mtk_hal_audio fm_device:chr_file rw_file_perms; - -# Data : WK14.39 -# Operation : Migration -# Purpose : dump for debug -set_prop(mtk_hal_audio, vendor_mtk_audiohal_prop) - -# Date : WK14.40 -# Operation : Migration -# Purpose : HDMI driver access -allow mtk_hal_audio graphics_device:chr_file rw_file_perms; - -# Date : WK14.40 -# Operation : Migration -# Purpose : Smartpa -allow mtk_hal_audio smartpa_device:chr_file rw_file_perms; -allow mtk_hal_audio sysfs_rt_param:file rw_file_perms; -allow mtk_hal_audio sysfs_rt_param:dir r_dir_perms; -allow mtk_hal_audio sysfs_rt_calib:file rw_file_perms; -allow mtk_hal_audio sysfs_rt_calib:dir r_dir_perms; - -# Date : WK14.41 -# Operation : Migration -# Purpose : WFD HID Driver -allow mtk_hal_audio uhid_device:chr_file rw_file_perms; - -# Date : WK14.43 -# Operation : Migration -# Purpose : VOW -allow mtk_hal_audio vow_device:chr_file rw_file_perms; - -# Date: WK14.44 -# Operation : Migration -# Purpose : EVDO -allow mtk_hal_audio rpc_socket:sock_file w_file_perms; -allow mtk_hal_audio ttySDIO_device:chr_file rw_file_perms; - -# Data: WK14.44 -# Operation : Migration -# Purpose : for low SD card latency issue -allow mtk_hal_audio sysfs_lowmemorykiller:file r_file_perms; - -# Data: WK14.45 -# Operation : Migration -# Purpose : for change thermal policy when needed -allow mtk_hal_audio proc_mtkcooler:dir search; -allow mtk_hal_audio proc_mtktz:dir search; -allow mtk_hal_audio proc_thermal:dir search; -allow mtk_hal_audio thermal_manager_data_file:file create_file_perms; -allow mtk_hal_audio thermal_manager_data_file:dir { rw_dir_perms setattr }; - -# for as33970 -allow mtk_hal_audio sysfs_reset_dsp:file rw_file_perms; -allow mtk_hal_audio tahiti_device:chr_file rw_file_perms_no_map; -# for smartpa -allow mtk_hal_audio sysfs_chip_vendor:file r_file_perms; -allow mtk_hal_audio sysfs_pa_num:file rw_file_perms; - -# Data : WK14.47 -# Operation : Audio playback -# Purpose : Music as ringtone -allow mtk_hal_audio radio:dir r_dir_perms; -allow mtk_hal_audio radio:file r_file_perms; - -# Data : WK14.47 -# Operation : CTS -# Purpose : cts search strange app -allow mtk_hal_audio untrusted_app:dir search; - -# Date : WK15.03 -# Operation : Migration -# Purpose : offloadservice -allow mtk_hal_audio offloadservice_device:chr_file rw_file_perms; - -# Date : WK15.34 -# Operation : Migration -# Purpose: for camera middleware dump image buffer to sdcard & audio frameworks dump -allow mtk_hal_audio storage_file:dir search; -allow mtk_hal_audio storage_file:lnk_file rw_file_perms; -allow mtk_hal_audio mnt_user_file:dir rw_dir_perms; -allow mtk_hal_audio mnt_user_file:lnk_file rw_file_perms; - -# Date : WK16.17 -# Operation : Migration -# Purpose: read/open sysfs node -allow mtk_hal_audio sysfs_ccci:file r_file_perms; -allow mtk_hal_audio sysfs_ccci:dir search; - -# Date : WK16.18 -# Operation : Migration -# Purpose: research root dir "/" -allow mtk_hal_audio tmpfs:dir search; - -# Purpose: Dump debug info -allow mtk_hal_audio kmsg_device:chr_file w_file_perms; -allow mtk_hal_audio fuse:file rw_file_perms; - -# Date : WK16.27 -# Operation : Migration -# Purpose: tunning tool update parameters -binder_call(mtk_hal_audio, radio) -allow mtk_hal_audio mtk_audiohal_data_file:dir create_dir_perms; -allow mtk_hal_audio mtk_audiohal_data_file:file create_file_perms; -# Date : WK16.33 -# Purpose: Allow to access ged for gralloc_extra functions -allow mtk_hal_audio proc_ged:file rw_file_perms; - -# Fix bootup violation -allow mtk_hal_audio fuse:dir r_dir_perms; - -# for usb phone call, allow sys_nice -allow mtk_hal_audio self:capability sys_nice; - -# Date : W17.29 -# Boot for opening trace file: Permission denied (13) -allow mtk_hal_audio debugfs_tracing:file w_file_perms; - -# Audio Tuning Tool Android O porting -binder_call(mtk_hal_audio, audiocmdservice_atci) - -# Add for control PowerHAL -hal_client_domain(mtk_hal_audio, hal_power) - -# cm4 smartpa -allow mtk_hal_audio audio_ipi_device:chr_file rw_file_perms; -allow mtk_hal_audio audio_scp_device:chr_file r_file_perms; - -# Date : WK18.21 -# Operation: P migration -# Purpose: Allow to search /mnt/vendor/nvdata for fstab when using NVM_Init() -allow mtk_hal_audio mnt_vendor_file:dir search; - -# Date: 2019/06/14 -# Operation : Migration -allow mtk_hal_audio audioserver:fifo_file w_file_perms; -allow mtk_hal_audio sysfs_boot_mode:file r_file_perms; -allow mtk_hal_audio sysfs_dt_firmware_android:dir search; - -# Date : WK18.44 -# Operation: adsp -allow mtk_hal_audio adsp_device:file rw_file_perms; -allow mtk_hal_audio adsp_device:chr_file rw_file_perms; - -# Date : 2020/3/21 -# Operation: audio dptx -allow mtk_hal_audio dri_device:chr_file rw_file_perms; -allow mtk_hal_audio gpu_device:dir search; - -# Date : WK20.26 -allow mtk_hal_audio sysfs_dt_firmware_android:file r_file_perms; - -# Date : WK20.36 -# Operation : Migration -# Purpose : AAudio HAL -allow mtk_hal_audio debugfs_ion:dir search; - -# Date : 2021/06/15 -# Purpose: Allow to change mtk MMQoS scenario -allow mtk_hal_audio sysfs_mtk_mmqos_scen:file w_file_perms; -allow mtk_hal_audio sysfs_mtk_mmqos_scen_v2:file w_file_perms; - -# Allow ReadDefaultFstab(). -read_fstab(mtk_hal_audio) - -# Date : WK21.23 -# Operation : Migration -# Purpose : factory mode -allow mtk_hal_audio sysfs_boot_info:file r_file_perms; - -# Date : WK21.32 -# Operation : Migration -# Purpose: permission for audioserver to use ccci node -allow mtk_hal_audio ccci_aud_device:chr_file rw_file_perms; - -# Date: 2022/12/01 -# Purpose: Allow Audio HAL to get and set vendor_mtk_audio_prop -get_prop(mtk_hal_audio, vendor_mtk_audio_prop) -set_prop(mtk_hal_audio, vendor_mtk_audio_prop) diff --git a/basic/non_plat/mtk_hal_power.te b/basic/non_plat/mtk_hal_power.te index 6f1ae3f..8326647 100644 --- a/basic/non_plat/mtk_hal_power.te +++ b/basic/non_plat/mtk_hal_power.te @@ -24,7 +24,7 @@ allow mtk_hal_power sysfs_mtk_core_ctl:file rw_file_perms; allow mtk_hal_power proc_thermal:file rw_file_perms; # proc info -allow mtk_hal_power mtk_hal_audio:dir r_dir_perms; +allow mtk_hal_power hal_audio_default:dir r_dir_perms; # Date : 2017/10/02 # Operation: SQC diff --git a/basic/non_plat/radio.te b/basic/non_plat/radio.te index 255d63e..bb6038c 100644 --- a/basic/non_plat/radio.te +++ b/basic/non_plat/radio.te @@ -47,7 +47,7 @@ hal_client_domain(radio, hal_mtk_imsa) #Dat: 2017/06/29 #Purpose: For audio parameter tuning -binder_call(radio, mtk_hal_audio) +binder_call(radio, hal_audio_default) # Date : WK18.16 # Operation: P migration diff --git a/basic/non_plat/rild.te b/basic/non_plat/rild.te index 651a9f3..02c94e3 100644 --- a/basic/non_plat/rild.te +++ b/basic/non_plat/rild.te @@ -160,7 +160,7 @@ allow rild netd_socket:sock_file { write read }; #Date : W17.20 #Purpose: allow access to audio hal -binder_call(rild, mtk_hal_audio) +binder_call(rild, hal_audio_default) hal_client_domain(rild, hal_audio) # Date : W19.16 diff --git a/basic/non_plat/system_server.te b/basic/non_plat/system_server.te index 8e61df4..c4b6995 100644 --- a/basic/non_plat/system_server.te +++ b/basic/non_plat/system_server.te @@ -62,7 +62,7 @@ allow system_server proc_mtktz:file r_file_perms; # Date:W17.02 # Operation : audio hal developing # Purpose : audio hal interface permission -allow system_server mtk_hal_audio:process { getsched setsched }; +allow system_server hal_audio_default:process { getsched setsched }; # Dat: 2017/02/14 # Purpose: allow get telephony Sensitive property @@ -262,8 +262,8 @@ allow system_server mediaserver_tmpfs:file w_file_perms; dontaudit system_server hal_wifi_default:process sigkill; dontaudit system_server eara_io:process sigkill; -# Purpose : dontaudit system_server is not allowed to kill mtk_hal_audio -dontaudit system_server mtk_hal_audio:process sigkill; +# Purpose : dontaudit system_server is not allowed to kill hal_audio_default +dontaudit system_server hal_audio_default:process sigkill; dontaudit system_server mtk_hal_c2:process sigkill; # Search /proc/mgq diff --git a/bsp/non_plat/factory.te b/bsp/non_plat/factory.te index e8d10e2..1a8df5c 100644 --- a/bsp/non_plat/factory.te +++ b/bsp/non_plat/factory.te @@ -17,8 +17,8 @@ allow factory protect1_block_device:blk_file getattr; allow factory protect2_block_device:blk_file getattr; # Purpose : Allow factory to call android.hardware.audio@2.0-service-mediatek -binder_call(factory, mtk_hal_audio) -allow factory mtk_hal_audio:binder call; +binder_call(factory, hal_audio_default) +allow factory hal_audio_default:binder call; allow factory mtk_audiohal_data_file:dir r_dir_perms; allow factory audio_device:chr_file rw_file_perms; allow factory audio_device:dir w_dir_perms; diff --git a/bsp/non_plat/mtk_hal_audio.te b/bsp/non_plat/mtk_hal_audio.te index a44a747..0256a5a 100644 --- a/bsp/non_plat/mtk_hal_audio.te +++ b/bsp/non_plat/mtk_hal_audio.te @@ -1,2 +1,2 @@ # Purpose : adsp -allow mtk_hal_audio adsp_device:chr_file { rw_file_perms }; +allow hal_audio_default adsp_device:chr_file { rw_file_perms };