Remove All Ads from XDA

[How to] Set Selinux to permissive on boot

806 posts
Thanks Meter: 451
 
By padhu1989, Senior Member on 18th February 2015, 05:13 PM
Post Reply Email Thread
23rd February 2015, 01:23 AM |#11  
Zwulf's Avatar
Senior Member
Thanks Meter: 315
 
More
Quote:
Originally Posted by aalupatti

Using the commands below should get permissive even after reboot
per http://forum.xda-developers.com/show...&postcount=230

su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "echo 0 > /sys/fs/selinux/enforce" >> /system/su.d/permissive.sh
chmod 755 > /system/su.d/permissive.sh

Doesn't work this way. You should have read following posts.

Solution:
Quote:

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

Works!
Finally got a permissive system on reboot.

Edit: Doesn't help to get XPosed working on my Z3C though.
The Following 29 Users Say Thank You to Zwulf For This Useful Post: [ View ] Gift Zwulf Ad-Free
 
 
23rd February 2015, 06:28 AM |#12  
Senior Member
Thanks Meter: 151
 
More
Another z3c here on the latest nightly, none of these methods even give me permissive status on boot...

EDIT: I lied I just had to install SuperSu
23rd February 2015, 09:56 PM |#13  
JSIN3L33T's Avatar
Senior Member
Flag So Cali
Thanks Meter: 38
 
Donate to Me
More
Quote:

Solution:

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

This method worked for me also thank you sir
The Following 3 Users Say Thank You to JSIN3L33T For This Useful Post: [ View ] Gift JSIN3L33T Ad-Free
24th February 2015, 12:15 AM |#14  
DualJoe's Avatar
Senior Member
DE
Thanks Meter: 711
 
More
Just dd the kernel partition and hex-edit the kernel command line (androidboot.selinux=permissive).
24th February 2015, 07:20 AM |#15  
Senior Member
Flag INDIA
Thanks Meter: 118
 
More
So i am using Xperia Z2 with CM12.

Now, the issue with this particular CM12 is that, in case if we do a soft reboot then xposed starts working but networks vanishes. The Network comes back upon a normal restart but with soft reboot the issue comes back.

I have used these steps to
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

Make permissive survive a normal reboot but it doesnt work till i do a soft reboot. any help?
27th February 2015, 10:42 AM |#16  
Junior Member
Thanks Meter: 36
 
More
Exact same issue for me
I have same phone with CM12, when I soft reboot
1st soft reboot: no network
2nd soft reboot: screen goes black after unlocking the device

in last 2 days of multiple soft reboots, i got one soft reboot where xposed and network everything worked.

Quote:
Originally Posted by manu44

So i am using Xperia Z2 with CM12.

Now, the issue with this particular CM12 is that, in case if we do a soft reboot then xposed starts working but networks vanishes. The Network comes back upon a normal restart but with soft reboot the issue comes back.

I have used these steps to
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

Make permissive survive a normal reboot but it doesnt work till i do a soft reboot. any help?

28th February 2015, 01:31 PM |#17  
Senior Member
Thanks Meter: 16
 
More
Ok, so..
I want script who started on boot(set permissive), because i do not have soft reboot after every normal reboot to working Xposed. How to do it? I have CM12 Nightly on Xperia Z1.

If i wrote in terminal this script:
Quote:

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

It's work on every boot phone or once?
28th February 2015, 03:07 PM |#18  
Alexey71's Avatar
Senior Member
Thanks Meter: 498
 
Donate to Me
More
Code:
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
Work cm12. No need soft reboot
The Following 2 Users Say Thank You to Alexey71 For This Useful Post: [ View ] Gift Alexey71 Ad-Free
28th February 2015, 06:42 PM |#19  
Senior Member
Thanks Meter: 16
 
More
@UP:
Only wrote this in Terminal and all is it?
28th February 2015, 09:05 PM |#20  
Alexey71's Avatar
Senior Member
Thanks Meter: 498
 
Donate to Me
More
Quote:
Originally Posted by Rygiel98

@UP:
Only wrote this in Terminal and all is it?

SuperSu + android terminal or adb shell
The Following User Says Thank You to Alexey71 For This Useful Post: [ View ] Gift Alexey71 Ad-Free
1st March 2015, 03:48 PM |#21  
Senior Member
Thanks Meter: 16
 
More
You forgotten about init.d, because when i wrote in terminal "mkdir ..." i get error.
I install init.d enabler from GP and i get info "Your kernel is not support init.d". What the ..?
I have CM12 ofcourse.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes