欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

android Q 添加系统服务,selinux权限配置

程序员文章站 2022-03-25 08:13:54
修改文件:blackview_q0/device/mediatek/sepolicy/bsp/plat_private/platform_app.te | 3 +++blackview_q0/device/mediatek/sepolicy/bsp/plat_private/service.te | 3 +++blackview_q0/device/mediatek/sepolicy/bsp/plat_private/service_contexts | 3 +++black......

修改文件:

 blackview_q0/device/mediatek/sepolicy/bsp/plat_private/platform_app.te  | 3 +++
 blackview_q0/device/mediatek/sepolicy/bsp/plat_private/service.te       | 3 +++
 blackview_q0/device/mediatek/sepolicy/bsp/plat_private/service_contexts | 3 +++
 blackview_q0/device/mediatek/sepolicy/bsp/plat_private/system_app.te    | 3 +++
 blackview_q0/device/mediatek/sepolicy/bsp/plat_private/system_server.te | 3 +++

 

详细patch如下:

diff --git a/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/platform_app.te b/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/platform_app.te
index 151e36c..d8bca24 100644
--- a/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/platform_app.te
+++ b/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/platform_app.te
@@ -57,3 +57,6 @@ allow platform_app freeme_pfw_service:service_manager find;
 
 #add by xuejin for apdu
 allow platform_app sc_service:service_manager find;
+
+#bv zhangyafei add for BlackviewUpdateService
+allow platform_app blackview_update_service:service_manager find;
diff --git a/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/service.te b/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/service.te
index 80333e1..d0f627e 100644
--- a/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/service.te
+++ b/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/service.te
@@ -13,3 +13,6 @@ type freeme_pfw_service, system_server_service, service_manager_type;
 
 #add by xuejin for apdu
 type sc_service, system_api_service, system_server_service, service_manager_type;
+
+#bv zhangyafei add for BlackviewUpdateService
+type blackview_update_service, system_server_service, service_manager_type;
diff --git a/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/service_contexts b/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/service_contexts
index a409685..5780bcf 100644
--- a/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/service_contexts
+++ b/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/service_contexts
@@ -65,3 +65,6 @@ FreemePfwService    u:object_r:freeme_pfw_service:s0
 
 #add by xuejin for apdu
 scservice           u:object_r:sc_service:s0
+
+#bv zhangyafei add for BlackviewUpdateService
+BlackviewUpdateService    u:object_r:blackview_update_service:s0
diff --git a/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/system_app.te b/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/system_app.te
index f907e40..69bacda 100644
--- a/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/system_app.te
+++ b/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/system_app.te
@@ -57,3 +57,6 @@ allow system_app freeme_pfw_service:service_manager find;
 
 #add by xuejin for apdu
 allow system_app sc_service:service_manager find;
+
+#bv zhangyafei add for BlackviewUpdateService
+allow system_app blackview_update_service:service_manager find;
diff --git a/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/system_server.te b/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/system_server.te
index ae13470..eb5801b 100644
--- a/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/system_server.te
+++ b/blackview_q0/device/mediatek/sepolicy/bsp/plat_private/system_server.te
@@ -38,3 +38,6 @@ allow system_server mtk_autoboot_service:service_manager add;
 
 #add by xuejin for apdu
 allow system_server sc_service:service_manager add;
+
+#bv zhangyafei add for BlackviewUpdateService
+allow system_server blackview_update_service:service_manager find;
 

本文地址:https://blog.csdn.net/zyfzhangyafei/article/details/107954213

相关标签: android