SeAndroid 策略文件更改以便访问 persist分区下文件

shuangge603 2016-08-08 05:52:42
如题,我做了如下更改,但还是不能访问persist分区下的文件,请大神帮忙看看问题在哪,多谢!

diff --git a/sepolicy/common/file.te b/sepolicy/common/file.te
index 301f56b..c0670e4 100644
--- a/sepolicy/common/file.te
+++ b/sepolicy/common/file.te
@@ -29,6 +29,7 @@ type persist_file, file_type;
type persist_data_file, file_type;
type persist_drm_file, file_type;
type data_qsee_file, file_type;
+type persist_test_file, file_type,persist_file;

type diag_data_file, file_type, data_file_type;

diff --git a/sepolicy/common/file_contexts b/sepolicy/common/file_contexts
index de8d024..b51f41c 100644
--- a/sepolicy/common/file_contexts
+++ b/sepolicy/common/file_contexts
@@ -239,6 +239,7 @@
/persist/data(/.*)? u:object_r:persist_drm_file:s0
/persist/data/tz(/.*)? u:object_r:persist_drm_file:s0
/persist/data/sfs(/.*)? u:object_r:persist_drm_file:s0
+/persist/test u:object_r:persist_test_file:s0

###################################
# oem files
diff --git a/sepolicy/common/system_app.te b/sepolicy/common/system_app.te
index 226b1b1..f7711d2 100644
--- a/sepolicy/common/system_app.te
+++ b/sepolicy/common/system_app.te
@@ -44,3 +44,6 @@ allow system_app color_service:service_manager add;
userdebug_or_eng(`
r_dir_file(system_app, firmware_file);
')
+
+# access to persist/test
+allow system_app persist_test_file:file rw_file_perms;
...全文
1079 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Jayrong1028 2017-09-29
  • 打赏
  • 举报
回复
大神。可否给个你的联系方式
shuangge603 2016-08-10
  • 打赏
  • 举报
回复
已解决
shuangge603 2016-08-09
  • 打赏
  • 举报
回复
大神呢

18,773

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 专题技术讨论区
社区管理员
  • 专题技术讨论区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧