问题描述
我想在启动时为Android L或5禁用SELinux.原因是因为我的守护进程在启动时由于SELinux问题而没有在启动时开始执行.我的 init.rc 文件中包含以下内容:
I want to disable SELinux at boot time for Android L or 5. The reason is because my daemon is not begin executed on boot when it should due to SELinux problems. I have the following in my init.rc file:
su 0 setenforce 0
service my_daemon /system/bin/my_daemon
class main # Also tried: class core (but it didn't make a difference)
user root
group root
但是,在启动时,我使用adb shell检查SELinux是否已禁用(使用getenforce
),并返回Enforcing
.我希望SELinux在启动时被完全禁用.如果未完全禁用,则至少为Permissive
.
However, on boot, I use adb shell to check if SELinux is disabled (using getenforce
) and it returns Enforcing
. I want SELinux to be completely disabled on boot. If not completely disabled then at least Permissive
.
有什么建议吗?
推荐答案
之后
forcely属性将立即变为Permissive.
the enforce attribute will be Permissive imeddiately.
这篇关于如何完全禁用init.rc文件中的Android L中的SELinux?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!