如何设置SELINUX为0或许可模式的Andr​​oid 4.4.4及以上? [英] How to set SeLinux to 0 or permissive mode in android 4.4.4 and above?

查看:1306
本文介绍了如何设置SELINUX为0或许可模式的Andr​​oid 4.4.4及以上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置SELinux的模式来娇纵或(0)在Android 4.4.4(及以上如果可能的话)。我用下面的命令:setenforce 0,setenforce宽容和setenforce根下娇纵(我的设备是植根)。但getenforce的输出总是强制。现在我筋疲力尽这个问题。 任何一个可以给我一个解决方案吗?先谢谢了。

I want to set the SeLinux mode to Permissive or (0) on android 4.4.4 (and above if possible). I use the following command: setenforce 0, setenforce permissive and setenforce Permissive under root (my device is rooted). But the output of getenforce is always Enforcing. Now I am exhausted with this problem. Can any one give me a solution? Thanks in advance.

推荐答案

显然谷歌已经从许多他们的库存的内核去掉了 CONFIG_SECURITY_SELINUX_DEVELOP 内核标志。因此,由威廉提到的标准招(下)可能无法正常工作。这些设备的一个例子是所述的三星注4(SM-N910F)的运行AOS 4.4.4。

Apparently Google has removed the CONFIG_SECURITY_SELINUX_DEVELOP kernel flag from many of their Stock kernels. Thus the standard trick mentioned by William (below) probably doesn't work. An example of these devices is the Samsung Note 4 (SM-N910F) running AOS 4.4.4.

上述各国链接:

CONFIG_SECURITY_SELINUX_DEVELOP又名全球许可模式的,是有用的   当你第一次开发电路板设备特定的政策(加   androidboot.selinux =宽容来BOARD_KERNEL_CMDLINE)。它也是   允许短暂的 setenforce 0 的在 -userdebug -eng 版本,从而可以   对开发者有所帮助。

CONFIG_SECURITY_SELINUX_DEVELOP aka global permissive mode, is useful for when you are first developing device-specific policy for a board (add 'androidboot.selinux=permissive' to BOARD_KERNEL_CMDLINE). It also permits transient setenforce 0 in -userdebug or -eng builds, which can be helpful for developers.

如果引导程序被锁定,那么你就不能修改内核CMDLINE

If the bootloader is locked, then you can't modify the kernel cmdline

此外,code在加工的init程序 androidboot.selinux = 选项只编译 -userdebug -eng 建立,所以即使除了引导程序锁定,您不能使用 androidboot.selinux =宽容上的 -user 构建。

"Also, the code in the init program for processing the androidboot.selinux= option is only compiled in -userdebug and -eng builds, so even aside from bootloader locking, you cannot use androidboot.selinux=permissive on a -user build."

这篇关于如何设置SELINUX为0或许可模式的Andr​​oid 4.4.4及以上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆