DISCLAIMER:
I am not responsible to anything going wrong with your device.
You are responsible to what you are doing with your phone, not me.
If you blame me, I will laugh in your face and I'll go grab a beer.
SELinux is set to Enforcing by default on CM 13. Using an app to change the policy one is able to change it to Permissive, but on reboot, it is changed back to Enforcing. Permissive SELinux policy is need if one wants to install ViPER4Android for example.
I am not responsible to anything going wrong with your device.
You are responsible to what you are doing with your phone, not me.
If you blame me, I will laugh in your face and I'll go grab a beer.
SELinux is set to Enforcing by default on CM 13. Using an app to change the policy one is able to change it to Permissive, but on reboot, it is changed back to Enforcing. Permissive SELinux policy is need if one wants to install ViPER4Android for example.
With a few simple steps, we are able to change it so on boot the policy will be set to Permissive:
Step 1:
SuperSU needs to be installed in order for this to work. This means replacing the stock root that comes with CM 13.
1. Download and the latest systemless SuperSU from HERE.
2. Flash the ZIP file from your recovery and reboot to system. Booting might take a while.
3. Remember to disable the built in root in developers options.
Step 2:
Use a terminal emulator or ADB to type these commands:
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
NOTE: each line needs to be entered separately by pressing enter after each line.
Step 3:
REBOOT
Now that you have completed the above steps, the SELinux policy should be set to Permissive and stay like that after any reboots.
Thank you @Chainfire for the amazing SuperSU app.
Last edited: