搜索

244

主题

289

帖子

2158

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
2158
发表于 2020-8-22 10:10:36 6756 浏览 0 回复

MTK6737打开selinux权限

本帖最后由 longrz 于 2020-8-22 17:55 编辑


diff --git a/device/lentek/len6737t_66_sh_n/init.project.rc b/device/lentek/len6737t_66_sh_n/init.project.rc
index a115d9d..fec38b1 100755
--- a/device/lentek/len6737t_66_sh_n/init.project.rc
+++ b/device/lentek/len6737t_66_sh_n/init.project.rc
@@ -62,7 +62,12 @@ on post-fs-data

#   insmod /vendor/lib/modules/wlan_mt.ko

-
+#add by LRZ
+        chmod 777 /dev/ttyMT0
+        chmod 777 /dev/ttyMT1
+        chmod 777 /dev/ttyMT2
+        chmod 777 /dev/ttyMT3
+#add end


on init
diff --git a/device/mediatek/common/sepolicy/basic/device.te b/device/mediatek/common/sepolicy/basic/device.te
old mode 100644
new mode 100755
index 8781657..2db84ca
--- a/device/mediatek/common/sepolicy/basic/device.te
+++ b/device/mediatek/common/sepolicy/basic/device.te
@@ -3,7 +3,8 @@
# ==============================================

type devmap_device, dev_type;
-type ttyMT_device, dev_type;
+#type ttyMT_device, dev_type;
+type ttyMT_device, dev_type, mlstrustedobject;
type ttySDIO_device, dev_type;
type vmodem_device, dev_type;
type stpwmt_device, dev_type;
diff --git a/device/mediatek/common/sepolicy/basic/untrusted_app.te b/device/mediatek/common/sepolicy/basic/untrusted_app.te
old mode 100644
new mode 100755
index 16cb627..c8213c3
--- a/device/mediatek/common/sepolicy/basic/untrusted_app.te
+++ b/device/mediatek/common/sepolicy/basic/untrusted_app.te
@@ -13,3 +13,4 @@
#                                         from MTK kernel modules for thermal tests at OEM/ODM.
allow untrusted_app proc_mtktz:dir search;
allow untrusted_app proc_mtktz:file r_file_perms;
+allow untrusted_app ttyMT_device:chr_file rw_file_perms;
\ No newline at end of file

回复

使用道具 举报

返回列表
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则


登录或注册
快速回复 返回顶部 返回列表