[ALPS04387792] BGService: add sepolicy permission

[Detail]
1. add BGService sepolicy permission

MTK-Commit-Id: f5832af535feb84ff9f94ae25eb02fc6f5959762

Change-Id: I22a1e8d6e17a2f455771adf677d2ce8cb32e6550
CR-Id: ALPS04387792
Feature: [Android Default] Camera Application Basic Functions
This commit is contained in:
otis.huang 2020-01-18 10:20:04 +08:00 committed by Otis Huang
parent 1a9ed28058
commit ae6fbad5e9
7 changed files with 26 additions and 2 deletions

View File

@ -80,3 +80,11 @@ attribute mtk_hal_md_dbfilter_server;
attribute hal_hdmi;
attribute hal_hdmi_client;
attribute hal_hdmi_server;
# Date: 2019/09/06
# BGService HIDL
attribute mtk_hal_bgs;
attribute mtk_hal_bgs_client;
attribute mtk_hal_bgs_server;

View File

@ -57,3 +57,7 @@ type mtk_hal_md_dbfilter_hwservice, hwservice_manager_type;
# Date: 2019/07/16
# HDMI HIDL
type mtk_hal_hdmi_hwservice, hwservice_manager_type;
# Date: 2019/09/06
# BGService HIDL
type mtk_hal_bgs_hwservice, hwservice_manager_type;

View File

@ -62,7 +62,7 @@ vendor.mediatek.hardware.modemdbfilter::ICopyDBFilter u:object_r:mtk_hal_md_dbfi
# Date: 2019/07/04
vendor.mediatek.hardware.camera.lomoeffect::ILomoEffect u:object_r:hal_camera_hwservice:s0
vendor.mediatek.hardware.camera.ccap::ICCAPControl u:object_r:hal_camera_hwservice:s0
vendor.mediatek.hardware.camera.bgservice::IBGService u:object_r:hal_camera_hwservice:s0
vendor.mediatek.hardware.camera.bgservice::IBGService u:object_r:mtk_hal_bgs_hwservice:s0
# Date : 2019/07/16
# HDMI HIDL

6
non_plat/mtk_hal_bgs.te Normal file
View File

@ -0,0 +1,6 @@
# HwBinder IPC from client to server, and callbacks
binder_call(mtk_hal_bgs_client, mtk_hal_bgs_server)
binder_call(mtk_hal_bgs_server, mtk_hal_bgs_client)
add_hwservice(mtk_hal_bgs_server, mtk_hal_bgs_hwservice)
allow mtk_hal_bgs_client mtk_hal_bgs_hwservice:hwservice_manager find;

View File

@ -23,6 +23,8 @@ init_daemon_domain(mtk_hal_camera)
# HAL implementation of the specified type over HwBinder.
hal_server_domain(mtk_hal_camera, hal_camera)
hal_server_domain(mtk_hal_camera, mtk_hal_bgs)
# Allow camerahalserver to use HwBinder and vendor binder IPC.
hwbinder_use(mtk_hal_camera)
vndbinder_use(mtk_hal_camera)

View File

@ -119,5 +119,9 @@ allow platform_app sw_sync_device:chr_file rw_file_perms;
# Date: 2019/07/04
# Purpose: Allow platform app to use BGService HIDL and access mtk_hal_camera
hal_client_domain(platform_app, mtk_hal_bgs)
allow platform_app mtk_hal_bgs_hwservice:hwservice_manager find;
binder_call(platform_app, mtk_hal_bgs)
binder_call(mtk_hal_bgs, platform_app)
binder_call(platform_app, mtk_hal_camera)
binder_call(mtk_hal_camera, platform_app)

View File

@ -62,7 +62,7 @@ vendor.mediatek.hardware.modemdbfilter::ICopyDBFilter u:object_r:mtk_hal_md_dbfi
# Date: 2019/07/04
vendor.mediatek.hardware.camera.lomoeffect::ILomoEffect u:object_r:hal_camera_hwservice:s0
vendor.mediatek.hardware.camera.ccap::ICCAPControl u:object_r:hal_camera_hwservice:s0
vendor.mediatek.hardware.camera.bgservice::IBGService u:object_r:hal_camera_hwservice:s0
vendor.mediatek.hardware.camera.bgservice::IBGService u:object_r:mtk_hal_bgs_hwservice:s0
# Date : 2019/07/16
# HDMI HIDL