How to set SELinux to Permissive Since installing XtreStoLite 3.1.1, SELinux is set to Enforcing (when I try to boot into TWRP recovery). I tried setting it to permissive (Enforcing = 0) using a terminal emulator (the phone is rooted), but to no effect. It would appear that this is preventing me from booting to TWRP to install Aroma.

Any ideas?

(FYI, SELinux Mode Changer didn't work)
If SELinux Mode Changer doesn't work, and you are properly rooted, then your kernel likely isn't compiled with permissive mode and was compiled with the flag EXTRA_CFLAGS += -DCONFIG_ALWAYS_ENFORCE=true which doesn't allow permissive mode to be set in anyway. 

You will need to get the kernel source from the manufacturer, which should be available if they are honoring the GPL license, and in the file ~/android/kernel/security/selinux/Makefile

Find the line of code that says:

EXTRA_CFLAGS += -DCONFIG_ALWAYS_ENFORCE=true

and change the value of it to false and recompile the kernel and make a zImage and flash it to boot. 


Example Source for reference


That being said, TWRP should support SELinux Enforce, just never EVER run a fix permissions