[ALPS03938413] FM Radio: Add sepolicy for fm_hidle_service

[Detail]
Add sepolicy for fm_hidle_service.

MTK-Commit-Id: 13358f71839220423a732b81b0e3c1d2e4210cb8

Change-Id: I761732065bbcec7fa398ab481b7921509232e693
CR-Id: ALPS03938413
Feature: [Module]FM Radio Driver
This commit is contained in:
Mason Lai 2020-01-18 09:53:45 +08:00
parent 7329e46829
commit 364e2c8274
7 changed files with 47 additions and 0 deletions

View File

@ -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;

View File

@ -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

View File

@ -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 };

View File

@ -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;

View File

@ -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

8
non_plat/mtk_hal_fm.te Normal file
View File

@ -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)

View File

@ -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)