9. juli 2017

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 :)

0 kommentarer:

Send en kommentar