Disabling SELinux in Android 5.0.1

你说的曾经没有我的故事 提交于 2019-12-03 08:41:43

There are two ways that enforcing mode is set. On user builds, it will always be in enforcing. On eng or userdebug, you can control it. You can control it in the standard selinux way, by setting enforcing=1/0 on the kernel command line as outlined in Dan Walsh's blog:

http://danwalsh.livejournal.com/10972.html

The Android centric way is to set the kernel command line to androidboot.selinux=permissive

You can control the kernel command line by editing your BoardConfig.mk and adding this:

BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive

The Android centric way is enforced by init, if you look in system/core/init/init.cpp look at the selinux_initialize() routine that is called from main().

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!