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

Would You Like The Flashable Zip Files To Continue For "The SELinux Switch"?

  • [B]YES[/B] (I Do Use The Flashable Zips)

    Votes: 15 78.9%
  • [B]NO[/B] (I Don't Use The Flashable Zips)

    Votes: 4 21.1%

  • Total voters
    19
  • Poll closed .
Status
Not open for further replies.
Search This thread
https%3A%2F%2Fimg.xda-cdn.com%2FyZ8S-X1P9bt3qf4EVTr9sOmhiHM%3D%2Fhttps%253A%252F%252Flh4.googleusercontent.com%252F-YNHOoBiHkZPT_thhgiciUcsbrvX24slEis2fhZ71VM7xAg27n-oMAofZpZF38a0b_NsTQ48zj2eKr_m0FEHbQ%253Dw1572-h683


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.

Download Links {REMOVED}

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 @DJBhardwaj {March 19, 2017}

XDA:DevDB Information
[APP][TOOL][4.2+][OFFICIAL]The SELinux Toggler[DISCONTINUED], Tool/Utility for all devices (see above for details)

Contributors
Ibuprophen
Source Code: https://github.com/Ibuprophen/SELinuxModeChanger


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

Created 2017-03-17
Last Updated 2019-09-12
 

Attachments

  • 01-App-Drawer.jpg
    01-App-Drawer.jpg
    157.7 KB · Views: 31,044
  • 02-First-Launch.jpg
    02-First-Launch.jpg
    92.1 KB · Views: 30,902
  • 03-About-App.jpg
    03-About-App.jpg
    114.5 KB · Views: 30,782
  • 04-Setting-Permissive.jpg
    04-Setting-Permissive.jpg
    146.5 KB · Views: 30,541
  • 05-Permissive-Notification.jpg
    05-Permissive-Notification.jpg
    185.4 KB · Views: 30,353
  • 06-System-Example-Permissive.jpg
    06-System-Example-Permissive.jpg
    166 KB · Views: 30,303
  • 07-Setting-Enforcing.jpg
    07-Setting-Enforcing.jpg
    149 KB · Views: 29,916
  • 08-Enforcing-Notification.jpg
    08-Enforcing-Notification.jpg
    189.4 KB · Views: 29,646
  • 09-System-EXAMPLE-Enforcing.jpg
    09-System-EXAMPLE-Enforcing.jpg
    166.6 KB · Views: 29,488
Last edited:
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 *
----->(Poll Will Close In 1 Week)
 
Last edited:
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.
 
Last edited:

mauam

Senior Member
Jan 26, 2011
7,315
12,823
Awesome:cool:

Edited: tested on S3 mini & Honor 5 X. Working perfectly.
 
Last edited:
  • Like
Reactions: Ibuprophen
Awesome:cool:

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***
 

Tilagoon

Senior Member
Jan 20, 2012
1,102
525
Montpellier
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 :good: Awesome job :good::good:
 
  • Like
Reactions: Ibuprophen

Dixon Butz

Senior Member
Mar 25, 2011
453
183
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?
 
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 :good: Awesome job :good::good:

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***
 
Last edited:
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***
 
  • Like
Reactions: RBEmerson

Dixon Butz

Senior Member
Mar 25, 2011
453
183
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.
 
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***
 
  • Like
Reactions: RBEmerson

andaleeb

Senior Member
Aug 31, 2016
52
6
Dubai
Redmi K20 Pro
What and why is SELinux Mode Important?
.


PREREQUISITES
It is IMPORTANT that before installing the SELinuxToggler app, be sure to have the following has been accomplished:
1) Your device is PROPERLY rooted AND an up to date root management app (like SuperSU) is installed as well as the Superuser Binaries also installed and up to date.
2) Your device has an up to date BusyBox app installed AND that the BusyBox Binaries are up to date and Symlinked.
***NOTE: The SELinuxToggler does require root access AND one or more of the Symlinked BusyBox Binaries in order to function properly!***


DOWNLOAD LINKS

SELinuxToggler (App)

{TBA-->} SELinuxToggler (Flashable Zip Installer - OPTIONAL)
.....

Its working. good job!!
 
Last edited:
  • Like
Reactions: Ibuprophen

rbradmag

Senior Member
May 9, 2009
64
25
Works great on my LG-G5. Verified mode change in both TWRP Manager and in Terminal.

Thanks for the great work!
 
  • Like
Reactions: Ibuprophen

arjunarora

Senior Member
Feb 13, 2017
756
457
Hi.. Thank you for the release.. I am using a oneplus 3t..app works like a charm.. Installation failed as i had a previous version installed, removed it and installed this version.
I use magisk so the superuser request prompt came up a bit late.. Rest all. Works.. Thumbs up given..!
 
  • Like
Reactions: Ibuprophen
Thank you ALL for your input!

It's really valuable to me so I can take the information and note it.

It wasn't an easy task and am still working on future updates to address some minor items on my to do list.

Sometime, down the road, the app will be overhauled with a different structure to the installation location. It currently uses my predecessors installation labels i plan to revamp. But, that's a much larger task in revamping that while maintaining its function.

As for what a few of you had mentioned about the correct KitKat version, thank you very much for pointing this out. My memory was a bit off... LOL! I'm going to be correcting it soon.


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

***PLZ THANK ME WITH A THUMBS UP***
 
Last edited:
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 102
    https%3A%2F%2Fimg.xda-cdn.com%2FyZ8S-X1P9bt3qf4EVTr9sOmhiHM%3D%2Fhttps%253A%252F%252Flh4.googleusercontent.com%252F-YNHOoBiHkZPT_thhgiciUcsbrvX24slEis2fhZ71VM7xAg27n-oMAofZpZF38a0b_NsTQ48zj2eKr_m0FEHbQ%253Dw1572-h683


    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.

    Download Links {REMOVED}

    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 @DJBhardwaj {March 19, 2017}

    XDA:DevDB Information
    [APP][TOOL][4.2+][OFFICIAL]The SELinux Toggler[DISCONTINUED], Tool/Utility for all devices (see above for details)

    Contributors
    Ibuprophen
    Source Code: https://github.com/Ibuprophen/SELinuxModeChanger


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

    Created 2017-03-17
    Last Updated 2019-09-12
    14
    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 *
    ----->(Poll Will Close In 1 Week)
    12
    Awesome:cool:

    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***
    12
    ***** HEAR YE! HEAR YE! *****

    It's now OFFICIAL!!!

    The SELinux Toggler has now been discounted and is now reflected on the Title and the top of the OP of this thread to make way for...

    Drumroll Please...

    [APP][TOOL][4.2+][OFFICIAL]The SELinux Switch by Ibuprophen

    It's NOW up and running!

    ***PLEASE READ the OP of The SELinux Switch thread BEFORE installing the new app. It has the instructions for members who currently has The SELinux Toggler installed.***

    Just an FYI... I'll be tweaking the OP of The SELinux Switch thread for the next few days to touch it up. I'm sure that I missed something... LMAO!!! :)

    Thank you ALL very much for your time and patience for the new app.

    I'll see you all there!!!

    ______________
    PLEASE NOTE: I welcome any member to help with further valuable information/clarification for any of my posts.
    10
    ***** ANNOUNCEMENT *****

    I just wanted to let you all know that The SELinux Toggler is now available on the XDA Labs Store!

    The SELinux Toggler - XDA Labs Store

    How EXCITING is that... LOL!!! :)


    ***Please Note: As always, I welcome any member to help with further valuable information/clarification for any of my posts.

    Sent via Communicator [d2vzw] from the Bridge of the U.S.S. Enterprise.