device/qcom/sepolicy/vendor/msm8953/file.te
+type sysfs_leds, sysfs_type, fs_type;
+type sysfs_brightness, sysfs_type, fs_type;
device/qcom/sepolicy/vendor/msm8953/file_contexts
+/sys/devices/platform/soc/78b7000.i2c/i2c-3/3-005b/leds/aw9106_led u:object_r:sysfs_leds:s0
+/sys/devices/platform/soc/1a00000.qcom,mdss_mdp/1a00000.qcom,mdss_mdp:qcom,mdss_fb_primary/leds/lcd-backlight/brightness u:object_r:sysfs_brightness:s0
device/qcom/sepolicy/vendor/msm8953/platform_app.te
+allow platform_app sysfs_leds:file rw_file_perms;
+allow platform_app sysfs_brightness:file rw_file_perms;
+allow platform_app sysfs_leds:file {open read write ioctl};
+allow platform_app sysfs_brightness:file {open read write ioctl};
更新,最近在写一个mtk的selinux权限,按上面写了没生效
allow untrusted_app sysfs_mtgpio:file { write }
te一般都是在device/和/system目录下,然后在这篇上面找到答案
https://www.jianshu.com/p/8b0e72776118
------------------------
以前倒是没太注意,生效的问题,只是照葫芦画瓢放在响应的目录下。然后这个写了,配置目录是在BoardConfig.mk里面
|