diff --git a/non_plat/attributes b/non_plat/attributes index 769eeda..693ab6e 100644 --- a/non_plat/attributes +++ b/non_plat/attributes @@ -45,3 +45,9 @@ attribute mtk_hal_keyattestation_server; attribute hal_nvramagent; attribute hal_nvramagent_client; attribute hal_nvramagent_server; + +# Date: 2018/05/25 +# FM HIDL +attribute mtk_hal_fm; +attribute mtk_hal_fm_client; +attribute mtk_hal_fm_server; diff --git a/non_plat/file_contexts b/non_plat/file_contexts index b0e7dd8..66a6ec7 100644 --- a/non_plat/file_contexts +++ b/non_plat/file_contexts @@ -541,6 +541,7 @@ /(system\/vendor|vendor)/bin/meta_tst u:object_r:meta_tst_exec:s0 /(system\/vendor|vendor)/bin/pre_meta u:object_r:pre_meta_exec:s0 +/(system\/vendor|vendor)/bin/fm_hidl_service u:object_r:fm_hidl_service_exec:s0 /(system\/vendor|vendor)/bin/wlan_assistant u:object_r:wlan_assistant_exec:s0 /(system\/vendor|vendor)/bin/wmt_loader u:object_r:wmt_loader_exec:s0 /(system\/vendor|vendor)/bin/spm_loader u:object_r:spm_loader_exec:s0 diff --git a/non_plat/fm_hidl_service.te b/non_plat/fm_hidl_service.te new file mode 100644 index 0000000..896412c --- /dev/null +++ b/non_plat/fm_hidl_service.te @@ -0,0 +1,19 @@ +# Set a new domain +type fm_hidl_service, domain; + +# Set domain as server domain of mtk_hal_fm +hal_server_domain(fm_hidl_service, mtk_hal_fm) + +# Set exec file type +type fm_hidl_service_exec, exec_type, vendor_file_type, file_type; + +# Setup for domain transition +init_daemon_domain(fm_hidl_service) + +#add_hwservice(hal_fm_server, mtk_hal_fm_service) + +vndbinder_use(fm_hidl_service) + +r_dir_file(fm_hidl_service, system_file) + +allow fm_hidl_service fm_device:chr_file { rw_file_perms }; \ No newline at end of file diff --git a/non_plat/hwservice.te b/non_plat/hwservice.te index 28d42e7..2630036 100644 --- a/non_plat/hwservice.te +++ b/non_plat/hwservice.te @@ -30,3 +30,7 @@ type mtk_hal_pq_hwservice, untrusted_app_visible_hwservice, hwservice_manager_ty # Date: 2017/07/20 # keymaster attestation hidl type mtk_hal_keyattestation_hwservice, hwservice_manager_type; + +# Date: 2018/05/25 +# FM HIDL +type mtk_hal_fm_hwservice, hwservice_manager_type; diff --git a/non_plat/hwservice_contexts b/non_plat/hwservice_contexts index 759b0db..292c9dd 100644 --- a/non_plat/hwservice_contexts +++ b/non_plat/hwservice_contexts @@ -37,3 +37,7 @@ vendor.mediatek.hardware.pq::IPictureQuality u:object_r:mtk_hal_pq_hwservice:s0 # Date: 2017/07/20 # keymaster attestation hidl vendor.mediatek.hardware.keymaster_attestation::IKeymasterDevice u:object_r:mtk_hal_keyattestation_hwservice:s0 + +# Date: 2018/05/25 +# FM HIDL +vendor.mediatek.hardware.fm::IFmRadio u:object_r:mtk_hal_fm_hwservice:s0 diff --git a/non_plat/mtk_hal_fm.te b/non_plat/mtk_hal_fm.te new file mode 100644 index 0000000..ccd0894 --- /dev/null +++ b/non_plat/mtk_hal_fm.te @@ -0,0 +1,8 @@ +# HwBinder IPC from client to server, and callbacks +binder_call(mtk_hal_fm_client, mtk_hal_fm_server) +binder_call(mtk_hal_fm_server, mtk_hal_fm_client) + +add_hwservice(mtk_hal_fm_server, mtk_hal_fm_hwservice) +allow mtk_hal_fm_client mtk_hal_fm_hwservice:hwservice_manager find; + +vndbinder_use(mtk_hal_fm) \ No newline at end of file diff --git a/non_plat/platform_app.te b/non_plat/platform_app.te index c8c9a24..a08eace 100644 --- a/non_plat/platform_app.te +++ b/non_plat/platform_app.te @@ -92,3 +92,8 @@ allow platform_app aee_dumpsys_data_file:file r_file_perms; # Purpose: allow platform_app to read /data/vendor/mtklog/aee_exp allow platform_app aee_exp_vendor_file:dir { read getattr open }; allow platform_app aee_exp_vendor_file:file { read getattr open }; + +# Date : WK18.21 +# Operation : Migration +# Purpose : Do FM operation via mtk_hal_fm +hal_client_domain(platform_app, mtk_hal_fm) \ No newline at end of file