Android - Set Selinux to premissive on boot without init.d (root)

You can set Selinux to premissive on boot without init.d and without an app. You just need to follow these steps. Thanks @Zwulf on XDA.

I'm unsure if this works on other Superusers. I only tested it on rooted device with SuperSU.

Download Terminal app if you don't have a PC, or use ADB if you have a PC

On PC, connect your device, open CMD/Powershell (Windows) or Terminal (Linux) and type:
adb shell
Wait for adb connect and it will log you in as root
Then type the following 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

Type:
reboot
To reboot your device very quickly or simply press power button and select reboot/shutdown if you want to reboot safety.

Type:
getenforce
To check selinux status. It should say premissive


That's all and enjoy using your favorite root apps :)

Comments

Popular Posts

VMOS Pro Global CN FREE Custom ROMs | Gapps, ROOT, Xposed | Android 4.4.4, 5.1.1, 7.1.2, 9.0 ROMs | NO VIP

How to activate VMOS Assistant to run VMOS on Android 12 and above