Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)

I want to disable the SELinux at boot time for Android L or 5. The reason is that the daemon is not begin executed on boot when it should due to the SELinux problems. I have a 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

However, on the boot, I use adb shell to check if the SELinux is disabled (using getenforce) and it returns the Enforcing. I want the SELinux to be completely disabled on the boot. If not completely disabled then at least the Permissive.

1 Answer

0 votes
by (36.8k points)

After the code use sentenforce 0

setenforce 0

Enforce attribute will be Permissive immediately.

Come and join Linux training to gain great knowledge. 

Do check out the video below

Related questions

0 votes
1 answer
0 votes
1 answer
asked Jan 7, 2021 in Linux by blackindya (18.4k points)
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...