Hi all so I have bootloader unlocked,TWRP flashed, Rooted, busyboxed, enabled init.d support,NJ6 4.4.4 KK I just want SELINUX set to permissive but it won't set what can I do what are my options to achieve this?
Related
Hi
Xposed is here. if you are wondering it does not work for you its because the SELinux status is set as Enforcing which doesnt allow xposed framework to modify at system level. though some modules are not compatible yet
Bonus : Also if you are using Viper4Android it wont work unless the SELinux is Permissive
there is a workaround for this. 3rd being the easiest and permanent fix
1. Terminal method
Code:
Su
Setenforce permissive
soft reboot to make xposed to work
OR
2. Using SELinux Mode Changer APP
Use this app SELinux Mode Changer
change it to Permissive and soft reboot to make xposed to work
Else
3. With a modified Kernel(CM12 only) easiest method
Here is the modified Kernel which is set to permissive by default.
it is a boot.img not flashable.zip
How to flash
1. Flash this using TWRP(TWRP can flash img files now ) or apps like RASHR can be used to flash boot.img
for more info check this https://source.android.com/devices/tech/security/selinux/validate.html#switching_to_permissive
Tested with BlissPop 13th release works as intended
i have used BlissPop kernel. it is as good as CM12 Kernel
Better to have a backup(Not mandatory its upto you)
All credits to original developers
reversegear said:
Hi
Xposed is here. if you are wondering it does not work for you its because the SELinux status is set as Enforcing which doesnt allow xposed framework to modify at system level. though some modules are not compatible yet
Bonus : Also if you are using Viper4Android it wont work unless the SELinux is Permissive
there is a workaround for this. 3rd being the easiest and permanent fix
1. Terminal method
Code:
Su
Setenforce permissive
soft reboot to make xposed to work
OR
2. Using SELinux Mode Changer APP
Use this app SELinux Mode Changer
change it to Permissive and soft reboot to make xposed to work
Else
3. With a modified Kernel(CM12 only) easiest method
Here is the modified Kernel which is set to permissive by default.
it is a boot.img not flashable.zip
How to flash
1. Flash this using TWRP(TWRP can flash img files now ) or apps like RASHR can be used to flash boot.img
for more info check this https://source.android.com/devices/tech/security/selinux/validate.html#switching_to_permissive
Tested with BlissPop 13th release works as intended
i have used BlissPop kernel. it is as good as CM12 Kernel
Better to have a backup(Not mandatory its upto you)
All credits to original developers
Click to expand...
Click to collapse
Hi,
great post, thanks!
I have two questions:
- Can you provide more information about this kernel please?. Is stock cm12 kernel, only with SeLinux changed?
I don´t use cm12 because SeLinux is set to enforcing and have problems restoring nandroid backup with TWRP (no problems with philz recovery).
- I don´t have tested, but i think that if you make init.d script that change SeLinux, you would´t have to make soft reboot.
Regards.
SergioSanchezR said:
Hi,
great post, thanks!
I have two questions:
- Can you provide more information about this kernel please?. Is stock cm12 kernel, only with SeLinux changed?
I don´t use cm12 because SeLinux is set to enforcing and have problems restoring nandroid backup with TWRP (no problems with philz recovery).
- I don´t have tested, but i think that if you make init.d script that change SeLinux, you would´t have to make soft reboot.
Regards.
Click to expand...
Click to collapse
1. as i said kernel i used is from BLISSPOP rom from 13th experimental build. i dont think Bliss Team made any changes to the kernel. i guess you can flash custom kernel like optimus / Attacked on top of the modded kernel because both provide only Zimage. so that SELinux status is retained to Permissive
2. i Tried init.d script unfortunately it wont work on CM based rom so i thought of modifying in boot.img itself
Hope this helps
Cool !!
wow!, the terminal method is vv easy method. Works perfectly!!
SELinux-Status: Moderat
Hi!
I used the Terminal method.
However, the SELinux-Status is now: Moderat (see screenshot).
Can you please instruct?
THX
So I'm running -
Unlocked Bootloader
Stock Rooted Rom (w/ Chainfire modified boot image)
Stock Kernel
TWRP
Xposed
Is SELinux in Enforcing Mode or Permissive Mode on my phone? How do I find out? And if I'm in Permissive, is there a way for me to change it to Enforcing?
Thanks!
byproxy said:
So I'm running -
Unlocked Bootloader
Stock Rooted Rom (w/ Chainfire modified boot image)
Stock Kernel
TWRP
Xposed
Is SELinux in Enforcing Mode or Permissive Mode on my phone? How do I find out? And if I'm in Permissive, is there a way for me to change it to Enforcing?
Thanks!
Click to expand...
Click to collapse
You can check in Settings --> About Phone.
SELinux is in Enforcing mode by default, so unless you changed it, it will still be in Enforcing.
how can I set selinux to enforcing I have a custom kernel PhoeniX tried SELinux Mode changer but didn't work, I need it to use root switch so if the method is an app most likely it won't work I need a manual and permanent method if possible
As the title says I need to set Permissive mode instead of Enforcing. I am already rooted using geohot method (so Knox is sleeping for now, it can't detect the root as long as I don't flash a custom kernel).
I need to set Permissive mode without flashing a custom kernel.
Please help,
BJ
What is the difference between permissive and enforcing ?
cfsr4 said:
What is the difference between permissive and enforcing ?
Click to expand...
Click to collapse
Permissive is required for some apps like Viper4Android to function properly. Selinux (in enforcing mode) is designed to protect your data from many different unknown exploits, but people like to switch it to permissive (essentially selinux disabled with logging) for these apps.
---------- Post added at 04:14 PM ---------- Previous post was at 04:12 PM ----------
blackjack4it said:
As the title says I need to set Permissive mode instead of Enforcing. I am already rooted using geohot method (so Knox is sleeping for now, it can't detect the root as long as I don't flash a custom kernel).
I need to set Permissive mode without flashing a custom kernel.
Please help,
BJ
Click to expand...
Click to collapse
AFAIK, custom kernel is required to switch the selinux mode. Just a samsung limitation that only mods can resolve (correct me if I'm wrong).
Saber said:
Permissive is required for some apps like Viper4Android to function properly. Selinux (in enforcing mode) is designed to protect your data from many different unknown exploits, but people like to switch it to permissive (essentially selinux disabled with logging) for these apps.
AFAIK, custom kernel is required to switch the selinux mode. Just a samsung limitation that only mods can resolve (correct me if I'm wrong).
Click to expand...
Click to collapse
Thanks for answering my question. I do not know exactly the difference
I think only with custon kernel. But why not what to install a custon?
Hi,
I searched tons of info about SeLinux state change in google and other sites(XDA too), but did not resolve problem,when i try to set permissive - su setenforce 0 - after type getenforce it still shows "enforcing" , I think my kernel do not have ability to change selinux state or turn off it(I prefer), I think I need to install custom kernel, can anyone tell me how to install permissive kernel and which kernel? Will I need to reinstall entire ROM?
S7 edge SM-G935FD, exynos, Magisk 20.3, Oreo stock rom 8.0