FORUMS
Remove All Ads from XDA

 View Poll Results: Would You Like The Flashable Zip Files To Continue For "The SELinux Switch"?

YES (I Do Use The Flashable Zips)
 
15 Vote(s)
78.95%
NO (I Don't Use The Flashable Zips)
 
4 Vote(s)
21.05%

[APP][TOOL][4.2+]The SELinux Toggler[DISCONTINUED]

3,165 posts
Thanks Meter: 2,183
 
Post Reply Email Thread


The SELinux Toggler Project
Has Been Discontinued
Please go to "The SELinux Switch" Thread (Below) For Continuing Development



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 - XDA Labs Store

The SELinux Toggler Apk Installer - Android File Host

The SELinux Toggler Zip Installer - Android File Host (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 The Custom Droid***
The SELinux Toggler and I was just recently recognized by thecustomdroid.com
Please take a look and i hope you enjoy this highlight!
Set SELinux to Permissive with SELinuxToggler App By Dhananjay {March 19, 2017}

***The SELinux Toggler Recognized by DROID VIEWS***
The SELinux Toggler and I was just recently recognized by droidviews.com
Please take a look and i hope you enjoy this highlight!
SELinux Toggler – Change SELinux Mode in Just One Tap! By Srivishnu Ramakrishnan {April 5, 2017}

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

Contributors
Ibuprophen
Source Code: https://github.com/ibuprophen1/The-SELinux-Toggler


Version Information
Status: No Longer Updated
Current Stable Version: 4.3.9
Stable Release Date: 2017-07-19

Created 2017-03-17
Last Updated 2017-10-09
Attached Thumbnails
Click image for larger version

Name:	01-App-Drawer.jpg
Views:	14624
Size:	157.7 KB
ID:	4210883   Click image for larger version

Name:	02-First-Launch.jpg
Views:	14592
Size:	92.1 KB
ID:	4210884   Click image for larger version

Name:	03-About-App.jpg
Views:	14524
Size:	114.5 KB
ID:	4210885   Click image for larger version

Name:	04-Setting-Permissive.jpg
Views:	14376
Size:	146.5 KB
ID:	4210886   Click image for larger version

Name:	05-Permissive-Notification.jpg
Views:	14268
Size:	185.4 KB
ID:	4210891   Click image for larger version

Name:	06-System-Example-Permissive.jpg
Views:	14240
Size:	166.0 KB
ID:	4210892   Click image for larger version

Name:	07-Setting-Enforcing.jpg
Views:	14050
Size:	149.0 KB
ID:	4210893   Click image for larger version

Name:	08-Enforcing-Notification.jpg
Views:	13852
Size:	189.4 KB
ID:	4210894   Click image for larger version

Name:	09-System-EXAMPLE-Enforcing.jpg
Views:	13688
Size:	166.6 KB
ID:	4210896  
The Following 105 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: 2,183
 
Donate to Me
More
Reserved
**********************************
****UPDATES/CHANGELOG*****
**********************************

********************
DATE: 10-09-2017
********************

- The OP of the thread was just updated for corrections, clarifications, etc...

********************
DATE: 08-14-2017
********************

- The SELinux Toggler has been discontinued for a new app called The SELinux Switch (please see the top of the OP).
- Until further notice... The SELinux Toggler Thread will remain available. All downloads will also remain available on the Thread, Android File Host and the XDA Labs Store for those who may want to continue using this app.
- The votes on the poll are complete and the Flashable Zip option for The SELinux Switch shall remain.
- THANK YOU ALL VERY MUCH FOR YOUR TIME, PATIENCE AND SUPPORT FOR THIS APP!!!

********************
DATE: 08-08-2017
********************

- Final Release: The SELinux Toggler Version 4.3.9 Build 62
- App Installer & Flashable Zip Uploaded.
- *ADDED NEW POLL - PLEASE VOTE *
[I]----->(Poll Will Close In 1 Week)
The Following 15 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: 2,183
 
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 10 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: 9,785
 
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: 2,183
 
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 13 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: 359
 
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: 2,183
 
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: 2,183
 
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: 2,183
 
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