In this article, you will know about SElinux, SELinux Mode Changer and how to set SElinux Mode to Permissive.
If you are someone who likes to tweak your Smartphone from a long time Like rooting it, Flashing Custom ROMs, Patches, Modes and all that Stuff, then you might have noticed that How Hard it has become today to do that with these New Android Smartphones. Well, let’s take an example of any Old Smartphone like Samsung Galaxy S2, back then it was quite easy to Root that Smartphone as you just need to boot into the Stock Recovery and Bam, your Phone gets Root Privilege. Some Smartphones of the Past doesn’t even need to Root via Recovery; they used to get Root easily just by using Some one Tap Root Applications like Kingroot.
Google has been doing a lot of Work to make the Rooting Process Harder have a more secure Operating System Environment. ‘SELinux’ was one such thing which got introduced by Google in attempt to make their Operating System, Android even more Secure.
So, in this Post, we would learn a bit about SELinux and will see “How to Set SELinux Mode to Permissive”.
At first, let us see What SELinux is.
SELinux is a Linux Terminal which was implemented by Google in their Operating System since Android 4.2 SELinux is not a bad thing implemented by the Giant Google in any way, but yes it somehow affected those who used to Customize their Phone by Rooting, Flashing custom ROMs etc.
SELinux is embedded in the Android Operating System and is set to ‘Enforcing’ by default (the other value is ‘permissive’). What this does is that it Prevents the Apps from doing tasks for which the app don’t explicitly ask permission for. This mainly Prevents the Apps to bring some Changes in System Files/Features. The System denies any attempt made by any app and hence does not allow to make any changes to Change System Files/Functions.
WHY WOULD YOU WANT TO CHANGE SELINUX MODE?
You must have heard that you can do anything If you have got your Phone Rooted. Well, Is that True? Yes, it WAS. But now it’s not the Truth anymore, With SELinux that got changed. Now Certain Root Apps also requires the SELinux to be “Permissive” to work properly. Let’s now learn about various modes of the SELinux.
Enforcing: Any Process/Service that is not explicitly allowed by the user to change any system file/feature is logged, and the permission denial to do so is enforced. So even if you have the root access, you will not be able to make the changes.
Permissive: On the other hand, If you can set SELinux Mode to Permissive, those specific processes/services that change system files/features will only be logged, and the permission denial will not be enforced.
So now, the Question which comes in every mind is “How to Set SELinux Mode to Permissive.” You will need a SELinux Mode Changer or SELinux Toggler app.
HOW TO SET SELINUX MODE TO PERMISSIVE?
There is an app which allows you to trigger the SELinux to “Permissive”, called SELinux Toggler which helps you to do so with Root Access. There is also another app called SELinux Mode Changer that does the same thing, but it is not regularly updated now. Still, you can download it and SELinux Toggler from the buttons given below.
To trigger the SELinux to “Permissive”, you need to follow the below Steps Carefully.
- First of All, download the .apk file for the SELinux Toggler from her and save it to your Phone’s SD Card or Storage.
- Now go to your Stock File Manager or any third Party File Manager like ES and go to the Path where you saved the above .apk file.
- Now tap on the APK File, Now you’ll get two Options, One for Install and other for Cancel.
- Tap on Install.
- Now the Installation Process should get Started, in case it has not started, and you are getting Some Unknown Source Warning, then Follow these Steps
- Gop to your Device’s Settings.
- Now go to Security.
- Now you’ll see an Unknown Sources Option.
- Just Enable it.
- Tap on OK.
- Repeat the Steps.
- Once the Process gets Completed, you’ll again get two options, one for Done and Other Option for Open.
- Tap on Open.
- Now the App will ask for Root Permission.
- Tap on “Grant Permissions”.
- Now you should see Two Buttons, one for ‘PERMISSIVE’ and ‘ENFORCING’.
- Select as per your Need.
- BAM! You have got it.
WHAT DOES THE SELINUX TOGGLER DO?
This app can change the SELinux Modes without having to modify the boot script files of the device permanently.
WHAT DOES THE SELINUX TOGGLER NOT DO?
Again… This app will not make permanent changes to the boot script files!
This app will automatically boot as any app will that is part of the boot sequence. So when a device boots up, the device, by default, will be booted in its default SELinux “Enforcing” Mode. Then once the boot sequence begins launching the auto launching of the apps, this app will then automatically launch and change the devices SELinux Mode that the user last selected for the devices SELinux Mode. (SOURCE)
So that’s pretty much it Guys, that was our post for SELinux Mode Changer or Toggler and “How to Set SELinux Mode to Permissive”. In case you are facing any queries, have any questions or feedbacks, then let us know about that in the Comments Section Down Below, we would love to hear What you Guys think about this.