本文共 965 字,大约阅读时间需要 3 分钟。
SOC: Rk3399, Platform: Android 8.0.
一: 文件不可写,未获取到write属性。
在打印错误log中获取主要信息 denied -->需要获取的权限,name-->需要获取权限的文件,scontext-->需要配置的文件,tcontext-->文件所在路径,tclass-->文件类型。
type=1400 audit(0.0:49): avc: denied { write } for name="dwc3_mode" dev="sysfs" ino=20703 scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_usb0:s0 tclass=file permissive=0
SELinux 的三种模式:
模式切换
1)getenforce
得到当前的SELinux值
[root@python bin]# getenforce
Permissive
2)setenforce
更改当前的SELINUX值 ,后面可以跟 enforcing,permissive 或者 1, 0。
[root@python bin]# setenforce permissive
3)sestatus
显示当前的 SELinux的信息
转载地址:http://txxzi.baihongyu.com/