SEAndroid 有3中模式: enforcing,permissive以及disabled;
enforcing:强制模式,表示审计不通过,不允许执行,并记录到log中
permissive:宽容模式,表示审计不通过,只是记录到log中,但是允许执行
disabled:表示SEAndroid功能关闭
1:adb shell 方式设定
adb shell su -c setenforce 0
setenforce 可以传递2个参数0 or 1
0:permissive
1:enforcing
2:在kernel 的command line中输入
androidboot.selinux=permissive/enforcing/disabled
在系统起来很早的时候,如果对应我们的板子,应该是在uboot模式中输入这个命令;
具体的androidboot.selinux值在哪里设定,后续继续学习;
目前在android源码中,没有找到设定的位置