FORUMS
Remove All Ads from XDA
Post Reply Email Thread
SELinuxToggler-New

What and why is SELinux Mode Important?

Since the release of Android 4.2 (KitKat) a new security enhancement called SELinux was interlaced within the system and then the Mode was defaulted to “Enforcing”.

Weather this new security measure was good or bad, it resulted in allot of challenges with many Apps that required Root access. So from then on, there have been many workarounds that developers were forced to overcome and adapt to this new security measure for their current and future developments.

Since the SELinux security measure was placed, there also have been many tools and utilities had changed the default SELinux Mode “Enforcing” to “Permissive” and one of those noted (and clever) Developers was an individual who is known as MrBIMC had created the “SELinuxModeChanger”. This app allowed the individual to change the SELinux Mode to and from its “Enforcing” and “Permissive” states.

Unfortunately, the “SELinuxModeChanger” had depreciated and it appears the Developer MrBIMC is no longer providing support and was last successfully working on the Android Lollipop (though has worked sporadically for many individuals using the Android Marshmallow) and now that the Android version has made it to the Nougat version, changing the SELinux Mode has become an increasingly more of a quest for individuals to be able to change the SELinux Mode with only a few options.

So I decided to take on the next generation of the “SELinuxModeChanger” and make the necessary modifications and changes needed to allow the app to operate on the Android Nougat. After a long journey using modified Flashable zip files along with allot of (EXTREMELY helpful) member feedback, I had finally released the The SELinux Toggler.


What does The SELinux Toggler do?
Basically, this app can change the SELinux Modes without having to permanently modify the boot script files of the device.

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.

What do I do to use this app?
Just download, install, open the app, and then select which mode you want the devices SELinux Mode to be (Permissive or Enforcing). And that's it! Now every time you reboot your device app will execute the script to change SELinux to the mode you've last selected.

Primary Download Links

The SELinux Toggler Apk Installer

The SELinux Toggler Zip Installer (OPTIONAL)

Alternative Download Links

The SELinux Toggler Apk Installer

The SELinux Toggler Zip Installer (OPTIONAL)

Some Issues that may/may not be present
- [THEORETICALLY] Doesn't work with Samsung KNOX.
- [POSSIBILITY] Root access may be denied for some (though this should not happen).
- [POSSIBILITY] Doesn't work with MAGISK.

Special Mentions/Credits
MrBIMC - SELinuxModeChanger

***The SELinux Toggler Recognized by DROID ORGIN***
The SELinux Toggler and I was just recently recognized by DroidOrgin.com.
Please take a look and i hope you enjoy this (extremely) unexpected highlight!
Set SELinux to Permissive with The SELinux Toggler [Android 4.2+]

XDA:DevDB Information
The Selinux Toggler, Tool/Utility for all devices (see above for details)

Contributors
Ibuprophen

Version Information
Status: Stable
Current Stable Version: 4.3.7
Stable Release Date: 2017-05-06

Created 2017-03-17
Last Updated 2017-06-06
The Following 91 Users Say Thank You to Ibuprophen For This Useful Post: [ View ] Gift Ibuprophen Ad-Free
 
 
17th March 2017, 08:40 PM |#2  
Ibuprophen's Avatar
OP Senior Member
Flag Upstate New York
Thanks Meter: 1,518
 
Donate to Me
More
Reserved
**********************************
****UPDATES/CHANGELOG*****
**********************************

********************
DATE: 05-06-2017
********************
- New Release: The SELinux Toggler Version 4.3.7 Build 60
- App Installer & Flashable Zip Updated.
- Applied NEW NAME.
- Changes to Toolbar Notification Verbiage.
- Minor Fixes to Launch Speed.
- Other Minor Fixes.
- Applied Some Compatibility Enhancements.

********************
DATE: 04-15-2017
********************
- New Release: SELinuxToggler Version 4.3.5 Build 58
- App Installer & Flashable Zip Updated.
- Applied NEW APP ICON.
- Minor Changes to Toolbar Notification.
- Minor Fixes to Launch Speed.
- Other Minor Enhancements.
- Changed the Logo to the OP Header.

********************
DATE: 04-13-2017
********************
- Applied the appropriate Logo to the OP Header.

********************
DATE: 04-12-2017
********************
- New Release: SELinuxToggler Version 4.3.4 Build 57
- App Installer & Flashable Zip Updated.
- Minor Fixes to Aid with Device Compatibility.
- Minor Fixes to Aid with Launch Speed.
- Other Minor Bug Fixes.
- Applied the Logo to the OP Header.

********************
DATE: 03-28-2017
********************
- New Release: SELinuxToggler Version 4.3.3 Build 56
- App Installer & Flashable Zip Updated.
- Minor Fixes to Aid with Device Compatibility.
- Minor Fixes to Aid with Launch Speed.
- Other Minor Bug Fixes.

********************
DATE: 03-21-2017
********************
- New Release: SELinuxToggler Version 4.3.2 Build 55
- App Installer & Flashable Zip Updated.
- Implemented Minor Fixes.

********************
DATE: 03-18-2017
********************
- Uploaded the Flashable Zip installer. This is purely as an optional installation instead of using the apk installer.
- Provided alternative links to my File Host account for both the Apk and Flashable Zip.
The same File Host links has a folder for any previous releases (though there are none as of yet).
- Provided tweak/clarification to the OP within various locations of the text.

**SPECIAL INSTRUCTIONS**
- For both the App Installer and the Flashable Zip Installer:
There is no need to uninstall either installer's...
All you need to do is perform a conventional install of the App Installer.
For the Flashable Zip Installer, all you need to do is flash the updated Zip Installer to update the app.

More work still on my to-do list...

.
The Following 11 Users Say Thank You to Ibuprophen For This Useful Post: [ View ] Gift Ibuprophen Ad-Free
17th March 2017, 08:40 PM |#3  
Ibuprophen's Avatar
OP Senior Member
Flag Upstate New York
Thanks Meter: 1,518
 
Donate to Me
More
Reserved
***************************
*****ANNOUNCEMENT*****
***************************

1) As i had outlined in the OP, I can't guarantee that it will work for everyone but, i want it to. So I'll need some more help from those of you who have been experiencing issues by providing additional information as to your device specs and, importantly, a Logcat.

2) I also want to let everyone know that I'm aware of individuals who have experienced some issues with the app that also use Magisk and a few other similar ones like it.

I'm going to be honest with you... I've never used Magisk before. I've got nothing against it but, never really felt the need to use it.

I've got a general idea about how it works but, I'm not 100% on what/how it works.

I'm going to need some time to figure out what makes Magisk tick and may need some help with those who does use it to help me understand it better.

3) Please keep in mind that there is just 1 release version of the app. With more to come as i can work things out with various fixes and other items on the agenda.

4) If anyone is not familiar with Logcat in general as well as how to obtain a Logcat file to submit then please let me know so I can provide you with some guidance regarding it.

5) Lastly, Just making a statement similar to "it won't work on my Galaxy S3 d2vzw SCH-I535 with CM13" doesn't tell me anything that I could use to pin down what and why it's not working. It could be anywhere from "user error" to "application error".

Please be patient as i may not be online all the time. I do have other responsibilities offline and try to get online as much as I can, as well as working on the apps next version update, etc...

Thank You All for your Time Understanding and Consideration with this.
The Following 7 Users Say Thank You to Ibuprophen For This Useful Post: [ View ] Gift Ibuprophen Ad-Free
17th March 2017, 08:57 PM |#4  
mauam's Avatar
Senior Member
Thanks Meter: 8,670
 
More
Awesome

Edited: tested on S3 mini & Honor 5 X. Working perfectly.
The Following User Says Thank You to mauam For This Useful Post: [ View ] Gift mauam Ad-Free
17th March 2017, 10:09 PM |#5  
Ibuprophen's Avatar
OP Senior Member
Flag Upstate New York
Thanks Meter: 1,518
 
Donate to Me
More
Quote:
Originally Posted by mauam

Awesome

Edited: tested on S3 mini & Honor 5 X. Working perfectly.

Thank You!

The verbiage of this post may be tweaked a bit but, I believe that it looks pretty good to me.

The app is still being worked on for 1 or 2 minor changes but this release is pretty much good to go.


Sent on my Communicator [SCH-I535] from the Bridge of the U.S.S. Enterprise...

***PLZ THANK ME WITH A THUMBS UP***
The Following 10 Users Say Thank You to Ibuprophen For This Useful Post: [ View ] Gift Ibuprophen Ad-Free
17th March 2017, 10:17 PM |#6  
Senior Member
Flag Montpellier
Thanks Meter: 288
 
More
Hi,
Tested on my Galaxy S2 running Resurrection Remix based on Lineage 7.1.1 and it works perfectly.
Notification after reboot working as well Awesome job
The Following User Says Thank You to Tilagoon For This Useful Post: [ View ] Gift Tilagoon Ad-Free
17th March 2017, 10:30 PM |#7  
Senior Member
Flag Hershey Highway
Thanks Meter: 48
 
Donate to Me
More
Tested on Moto Nexus 6, stock, rooted, 7.1.1 N6F26U (Mar 5th). I think it is working. I can't see SEL status in About Phone. It is not there anymore. Did they take it out? Any other way to see SEL status? But it seems like it sticks after a reboot. When I open your app after a boot, I can only select Enforce.

On another Nexus 6 with the Pure Nexus ROM, it does not stick after a reboot. I get a notification that SEL mode was changed to permissive. But when I go to about phone, the SEL status says Enforcing. Is there something in the build.prop that can change it in a ROM?
I see this in build.prop:

ro.build.selinux=1

Does that affect it?
17th March 2017, 10:33 PM |#8  
Ibuprophen's Avatar
OP Senior Member
Flag Upstate New York
Thanks Meter: 1,518
 
Donate to Me
More
Quote:
Originally Posted by Tilagoon

Hi,
Tested on my Galaxy S2 running Resurrection Remix based on Lineage 7.1.1 and it works perfectly.
Notification after reboot working as well Awesome job

Thank You!

Though i was confident that it would work for other Nougat devices... i was nervous as well. LOL!!!

I did realize something and just added a caveat to the OP.

I also just realized that I had forgotten about a Prerequisite regarding an updated BusyBox needed... Oy Vey!


Sent on my Communicator [SCH-I535] from the Bridge of the U.S.S. Enterprise...

***PLZ THANK ME WITH A THUMBS UP***
The Following 3 Users Say Thank You to Ibuprophen For This Useful Post: [ View ] Gift Ibuprophen Ad-Free
17th March 2017, 10:36 PM |#9  
Ibuprophen's Avatar
OP Senior Member
Flag Upstate New York
Thanks Meter: 1,518
 
Donate to Me
More
Quote:
Originally Posted by Dixon Butz

Tested on Moto Nexus 6, stock, rooted, 7.1.1 N6F26U (Mar 5th). I think it is working. I can't see SEL status in About Phone. It is not there anymore. Did they take it out? Any other way to see SEL status? But it seems like it sticks after a reboot. When I open your app after a boot, I can only select Enforce.

On another Nexus 6 with the Pure Nexus ROM, it does not stick after a reboot. I get a notification that SEL mode was changed to permissive. But when I go to about phone, the SEL status says Enforcing. Is there something in the build.prop that can change it in a ROM?
I see this in build.prop:

ro.build.selinux=1

Does that affect it?

Do you have BusyBox installed and up to date?


Sent on my Communicator [SCH-I535] from the Bridge of the U.S.S. Enterprise...

***PLZ THANK ME WITH A THUMBS UP***
The Following 2 Users Say Thank You to Ibuprophen For This Useful Post: [ View ] Gift Ibuprophen Ad-Free
17th March 2017, 10:51 PM |#10  
Senior Member
Flag Hershey Highway
Thanks Meter: 48
 
Donate to Me
More
Quote:
Originally Posted by Ibuprophen

Do you have BusyBox installed and up to date?


Sent on my Communicator [SCH-I535] from the Bridge of the U.S.S. Enterprise...

***PLZ THANK ME WITH A THUMBS UP***

The stock rooted nexus has BB.

That one with Pure Nexus is rooted with Magisk. Doesn't that have BB built in or something?

---------- Post added at 05:51 PM ---------- Previous post was at 05:38 PM ----------

Installed BB on that Pure Nexus ROM phone. Still don't stick after reboot.
17th March 2017, 10:57 PM |#11  
Ibuprophen's Avatar
OP Senior Member
Flag Upstate New York
Thanks Meter: 1,518
 
Donate to Me
More
Quote:
Originally Posted by Dixon Butz

The stock rooted nexus has BB.

That one with Pure Nexus is rooted with Magisk. Doesn't that have BB built in or something?

---------- Post added at 05:51 PM ---------- Previous post was at 05:38 PM ----------

Installed BB on that Pure Nexus ROM phone. Still don't stick after reboot.

BusyBox (and its Binaries) is a separate app in itself.

If you have it installed, then you should see it in your app drawer.


Sent on my Communicator [SCH-I535] from the Bridge of the U.S.S. Enterprise...

***PLZ THANK ME WITH A THUMBS UP***
The Following User Says Thank You to Ibuprophen For This Useful Post: [ View ] Gift Ibuprophen Ad-Free
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