From 146cf88d6f85101791b37c0ee4b01e0f1895640d Mon Sep 17 00:00:00 2001 From: "yuru.zhu" Date: Sat, 18 Jan 2020 09:56:38 +0800 Subject: [PATCH] [ALPS03934549] MTKLogger support for LogHandler [Solution] MTKLogger support for LogHandler MTK-Commit-Id: 58a1ac0f72764fced2c0eac8421160d42d90b05c Change-Id: I5117ffb2b12707e4819938553f580a440a9ae6a2 CR-Id: ALPS03934549 Feature: MTKLogger --- non_plat/attributes | 6 ++++++ non_plat/connsyslogger.te | 3 ++- non_plat/hwservice.te | 4 ++++ non_plat/hwservice_contexts | 4 ++++ non_plat/mtk_hal_log.te | 6 ++++++ non_plat/platform_app.te | 8 +++++++- 6 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 non_plat/mtk_hal_log.te diff --git a/non_plat/attributes b/non_plat/attributes index 693ab6e..246cba7 100644 --- a/non_plat/attributes +++ b/non_plat/attributes @@ -51,3 +51,9 @@ attribute hal_nvramagent_server; attribute mtk_hal_fm; attribute mtk_hal_fm_client; attribute mtk_hal_fm_server; + +# Date: 2018/03/23 +# log hidl +attribute mtk_hal_log; +attribute mtk_hal_log_client; +attribute mtk_hal_log_server; diff --git a/non_plat/connsyslogger.te b/non_plat/connsyslogger.te index 904dadf..181330d 100755 --- a/non_plat/connsyslogger.te +++ b/non_plat/connsyslogger.te @@ -7,7 +7,8 @@ type connsyslogger,domain; type connsyslogger_exec, exec_type, file_type, vendor_file_type; typeattribute connsyslogger mlstrustedsubject; - +# Purpose : for create hidl server +hal_server_domain(connsyslogger, mtk_hal_log) # ============================================== # MTK Policy Rule # ============================================== diff --git a/non_plat/hwservice.te b/non_plat/hwservice.te index 2630036..8223b4b 100644 --- a/non_plat/hwservice.te +++ b/non_plat/hwservice.te @@ -34,3 +34,7 @@ type mtk_hal_keyattestation_hwservice, hwservice_manager_type; # Date: 2018/05/25 # FM HIDL type mtk_hal_fm_hwservice, hwservice_manager_type; + +# Date: 2018/03/23 +# log hidl +type mtk_hal_log_hwservice, hwservice_manager_type; diff --git a/non_plat/hwservice_contexts b/non_plat/hwservice_contexts index 292c9dd..52d1ac1 100644 --- a/non_plat/hwservice_contexts +++ b/non_plat/hwservice_contexts @@ -41,3 +41,7 @@ vendor.mediatek.hardware.keymaster_attestation::IKeymasterDevice u:object_r:mtk_ # Date: 2018/05/25 # FM HIDL vendor.mediatek.hardware.fm::IFmRadio u:object_r:mtk_hal_fm_hwservice:s0 + +# Date: 2018/03/23 +# log hidl +vendor.mediatek.hardware.log::ILog u:object_r:mtk_hal_log_hwservice:s0 diff --git a/non_plat/mtk_hal_log.te b/non_plat/mtk_hal_log.te new file mode 100644 index 0000000..6b37d71 --- /dev/null +++ b/non_plat/mtk_hal_log.te @@ -0,0 +1,6 @@ +# HwBinder IPC from client to server, and callbacks +binder_call(mtk_hal_log_client, mtk_hal_log_server) +binder_call(mtk_hal_log_server, mtk_hal_log_client) + +add_hwservice(mtk_hal_log_server, mtk_hal_log_hwservice) +allow mtk_hal_log_client mtk_hal_log_hwservice:hwservice_manager find; diff --git a/non_plat/platform_app.te b/non_plat/platform_app.te index a08eace..d6f713b 100644 --- a/non_plat/platform_app.te +++ b/non_plat/platform_app.te @@ -96,4 +96,10 @@ 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 +hal_client_domain(platform_app, mtk_hal_fm) + +# Date: 2018/03/23 +# Operation : Migration +# Purpose : MTKLogger need connect to log hidl server +# Package: com.mediatek.mtklogger +hal_client_domain(platform_app, mtk_hal_log)