yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Sivabalan:
I am not getting any PSA alert as you mentioned. Also the app is working if I press the permissive button after boot. But during boot it's not working automatically. I am on OnePlus 3 open beta 25 Oreo.

Once I set it to permissive mode....viper is working fine.

---------- Post added at 11:45 AM ---------- Previous post was at 10:49 AM ----------

for Oreo devices I got a simple solution.

Download script manager from play store.

Add a script to make selinux to permissive mode

Make it to run during boot.

And it is working for me.
[Android Apps and Games] Ibuprophen:
Did you read the OP at all?

The OP clearly states:

"

What does The SELinux Switch 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."

As much as I appreciate your feedback, I would like to emphasize that you should completely read a threads OP before stating that something doesn't work for a development that it wasn't designed to do.

Thank you very much for your time and understanding with this! :)

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] Sivabalan:
Buddy I understand what you are saying. My point is after boot the app is not launching and doing the necessary things as mentioned in OP in OnePlus 3 open beta 25 Oreo.

So I moved to script manager which does exactly the same thing. Now Viper4android is running fine.
[Android Apps and Games] Ibuprophen:
I do apologize for the misunderstanding.

Your previous post wasn't exactly clear on what you had to perform for it to work out for you.

I had asked for some feedback regarding those who were using the Switch app with the Oreo and, based on some of the responses, it was working and those with V4A had stated that they got it working.

I was thrown off a bit on your other posts and I know that it's sometimes a challenge to express something via text.

I'm just glad to hear that you're now all set my friend... :)

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] DJBhardwaj:
Writing just to clarify. I believe [MENTION=4828250]Ibuprophen[/MENTION] doesn't own the OnePlus device, so he might not be aware of the issue.

It's a ROM related issue. The OP3 and 3T already have SELinux changes in Oreo Open Beta that prevent Magisk from working properly. I am using SELinux Switch on my 6P running 8.0 OPR5 and OnePlus One running 8.0 ROM, and both have V4A installed and working fine. The app automatically launches and changes the SELinux status to Permissive at every boot, which is mentioned in the OP. To conclude, it is something on OxygenOS' end that needs to be fixed. I am eagerly waiting for it too.
[Android Apps and Games] Sivabalan:
No need for apologies. Just I was saying. :) At last we are here to learn from each other.
[Android Apps and Games] Scyt:
I gave this a try (both the apk and flashed version) however still didn't seem to stick after rebooting, either way I've given up for now but I can't seem to get rid of the flashed version, can you please advise how to uninstall/revert? Thanks.

Update: nevermind, using Titanium Backup worked.
[Android Apps and Games] Ibuprophen:
I apologize if this app didn't work out for you.

Also, flashing this app does the same thing as the traditional installation and performing a traditional uninstall will remove the app.

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] Ibuprophen:
***** FEEDBACK NEEDED *****

I've been looking at this app in regards to the Nougat (I don't have a device with Oreo yet) and I just wanted to get some feedback.

I had recently experienced the Switch app, on my Nougat device, a message regarding the App not being able to access the sepolicy on the device.

I'm just wondering if this issue was experienced by others and your resolution to this.

I'm just assuming that members have been using developments like V4A and Boeffla in order for the Switch App to work (I'm just taking a guess in naming those developments).

I would really appreciate your time and assistance with this.

Thank you very much! :)

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] Schrotty35:
I use on my Moto G5S Plus and working fine on Stock Rom with v4a and Dolby Atmos.
[Android Apps and Games] Ibuprophen:
I've got a feeling that V4A is one of the essentials for the Switch App to work on Nougat.

Thank you very much for your input!

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] Quantumstate:
I need an SSHd, but none work in Enforcing mode. I'd rather not turn off Enforcing, so I wish semanage came with this so I could enable 22.
[Android Apps and Games] Ibuprophen:
If the only way for you to do this is to be in a Permissive Mode, and you want to accomplish this while remaining in Enforcing Mode, then there's no other options, then the only choices you have is to either develop something yourself or to accept that you can't do it.

I wish I could help you out with that but, this thread is really specific to The SELinux Switch app.

I do wish you the best of luck!

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] Quantumstate:
Using semanage can be done in either mode, I'm not particular.

I'm sure a mount -o remount,rw of the relevant partitions would be necessary though.

Thing is, I can't do anything without the semanage executable. That's what's missing. All it would take is dropping it in your .zip, for advanced users. It's related, and needed.

I really would like to keep enforcing except when I need to modify.
[Android Apps and Games] Ibuprophen:
Okay...

This app provides that choice to change the SELinux State, to Permissive Mode, when needed and change it back when done.

My SELinux State is Enforcing most of the time and i use this app to change it when needed. This is why the app doesn't make any permanent changes to any of the system files.

If your intention is to temporarily change your SELinux State to Permissive when needed and, change it back when your done, then this app allows you to do this.

Am I correct in my assumption of what you're looking for?

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] Quantumstate:
Sorry, no. I want to run an SSH server on my phone so I can transfer files, give commends in the phone shell, etc. This necessitates the SSH daemon opening port 22, which is a privileged port.

But unless selinux is specifically told that it's Ok for the SSH daemon to open port 22, it will not allow it. To tell selinux to allow it I must first remount /system rw, which is easy.

But then I have to give selinux a special command to allow port 22. That special command is given with the semanage executable. But there exists no semanage command in any firmwares. Since your app is the only one that has anything to do with selinux, I was hoping that you would bundle semanage with it, for more advanced users.
[Android Apps and Games] Ibuprophen:
I see...

I'm sorry that I can't be of any help with that.

I do wish you the best of luck!

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] sharkie405:
Just wanted to let whoever know that this is working on my Pixel 2 XL running Android 8.1.0.

Thanks Ibuprophen! This was a must have now that I'm forced to use Magisk.
[Android Apps and Games] Ibuprophen:
Thank you very much for providing this confirmation.

I see that your using Magisk but, did you also need to use V4A?

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] sharkie405:
No, I didn't have to use V4A. Honestly, I don't even know what that is. I'll search around for it. You never know, I may need it in the future.

My particular problem with Magisk was that some of my Automate flows wouldn't work with it, but they would work with Supersu. Llama, from automate, suggested that the problem was probably due to SELinux enforcing. Once I found your app, all is good with my flows again!
[Android Apps and Games] Ibuprophen:
Thank you very much!

The input from members are extremely valuable to me.

I've never used V4A but, I'm familiar with it only to a point. :)

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] Zerikwan:
I got some feedback here

testing v.603 .apk version on my Xperia Z with LOS 14.1 nougat 7.1.2 AND V4A.

The result is.. working

The SELinux status stay on permissive even after reboot

and V4A is working too :D
[Android Apps and Games] sharkie405:
I tried V4A on my Pixel 2 XL running 8.1.0, but flashing through Magisk 14.4 kept failing. Don't know if it's an SELinux thing or not though. Just bringing it up because Ibuprophen mentioned and now so have you.
[Android Apps and Games] aminmigo88:
hi friend , i have a problem : my phone reboot a few seconds after i click to switch to permessive plz help

my phone is micromax canvas unite 4 pro (q465) OS: android 6.0
[Android Apps and Games] Zerikwan:
I wish I have oreo device just to make sure of it. I hope Ibuprophen investigate this.
[Android Apps and Games] Ibuprophen:
I apologize for the delay...

This app requires that you have a custom ROM/Kernel that allows for the sepolicy of your device for permitting the device to be able to change its SELinux Mode.

Even if you have Root doesn't always mean that the sepolicy is able to allow the SELinux State change. They're two separate items within the device.

I hope i explained it okay via text.

Your best bet is to search/post this topic within the dedicated area of the forum for your device.

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] Ibuprophen:
The flashable installer installs the Switch app the same way as the traditional apk does.

[Q] Why is it available as a flashable zip if it installs the app the same way as the apk?

[A] This method goes back months before I had released the Switch app.

There's 2 reasons why it's still available...

1) There's a few instances where, for one reason or another (depending on the device, firmware, etc...), this method is the only real way to install it because some members have difficulty installing it traditionally via the apk.

2) Simply as a preferred method for others. The results of a previous poll had kept it available by popular demand.

Also the flashable installer does not install as system app.

This is because, I feel, that unless an app will only work (or intended to work) as a system app, it would be intrusive of me to force the installation as a system app.

I feel that, if the member wants it to be installed as a system app, then the member will have to do so as their own option and not forced upon by myself.

I've, personally, used it as a system app before and it worked the same way for me as if it were a non system app.

I'm not sure if it works any better for some members as a system app instead but, I guess it all depends on what they have and need to get the app to work.

I hope i had answered your question okay (as well as some anticipated ones too) via text. :)

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] mohand06:
[MENTION=8240249]Ibuprofen[/MENTION], thanks for your contribution. Not working though on my device : Samsung A3 2016, stock nougat 7.0. Installed the apk, selected Permissive, rebooted but system always returns to enforcing just as was the case with SelinuxModeChanger. Just wanted to test some Dolby ports from Ahrion's
[Android Apps and Games] Ibuprophen:
You need a custom kernel installed that will allow your devices sepolicy to be changed.

It won't work just installed on a Stock ROM without all the Prerequisites performed.

Thank you very much for the compliment! :)

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] eNickr:
Hello all,

On my J5 metal I tried the latest version flashing and apk file. The prompt says that is on permissive but the settings menu says enforcing..

Where can I test this status correctly?

THX
[Android Apps and Games] Ibuprophen:
First of all, when you stated that the Switch app had stated that the SELinux was in Permissive mode is false...

If you look closely at the verbiage, it states that the device was notified for Permissive. This means that the commands were submitted to the device for Permissive Mode.

If you didn't first check/perform the Prerequisites, that's outlined on the OP, then the commands for Permissive Mode were rejected by the device.

As I've stated before, this app submits the commands to the device and doesn't detect/check the devices actual SELinux State. That's up to the user to perform the check to see if the device had accepted/allowed the change.

You need to be Rooted, Have the latest BusyBox installed and also have a custom kernel installed that will allow your devices sepolicy the ability to change the devices SELinux State.

Regarding an alternative way to get the actual SELinux State of the devices...

There's a few ways to check what the status is for the SELinux State but, if i remember correctly, there's a way to manually check a devices SELinux State.

First install a decent Terminal Emulator (if you don't have one already) and then open it and type the following commands (one at a time):

su
cd /system/bin
getenforce

I hope that I had explained this okay via text... :)

Please let me know if you have any further questions or concerns.

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] Ljseegar:
This app works perfect on my new Moto e4 on lineage 14.1
[Android Apps and Games] RBEmerson:
I'm getting a PSA gripe under a rooted but otherwise stock 6.0.1 installation. I followed the link you posted. The security section has none of the options in the screen shot. Searches, at least so far, either come back to the early PSA post or some form of Public Service Announcement. [/face palm]

Is there an updated Marshmallow PSA fix?

---------- Post added at 09:35 PM ---------- Previous post was at 09:21 PM ----------

ADDED: I have an earlier version running on my phone with rooted (of course) 7.0 on an S7. I looked in the security area on the phone don't see how I got past PSA warnings. As someone else said, if V4A is working, SELinux is permissive.

With the 6.0.1 on a Nexus 7 2013 WiFi, if I do setenforce 0 it stays that way until I reboot, and V4A works. Bottom line, changing to permissive is possible, it doesn't spontaneously reset except after a boot/reboot. the switch was flashed, but the app is still flagged. HTH fill in any gaps.
[Android Apps and Games] Ibuprophen:
On Android 6+ follow this path: Settings -> Google -> Security -> Google Play Protect and Uncheck "Scan Device for Security Threats"

I've recently seen that one other setting may also be a companion to the PSA Warnings too.

Go to Settings -> Developer Options -> scroll down and turn off the "Verify apps over USB" Option.

You should be good to go but, from time to time, Google has a way for turning the Play Protect back on. I don't see it happen very often but, it does sneak up on you.

ALWAYS REMEMBER... Any time the PSA Alert happens and, you turn it off (as outlined above), you will need to open The SELinux Switch App to set it again.

I hope it works out for you and please let me know if you have any questions further questions or concerns.

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] RBEmerson:
Great thanks for the procedure. Once I saw where Google Play Protect is, I knew how I get the switch running on my S7 under 7.0. The procedure worked equally well on the Nexus 7 under 6.0.1. FWIW, at the end of the procedure, getenforce shows permissive and so does the switch. And V4A. The warning notification is present but I know everything's under control, so I'm not too troubled by it.

Again, great thanks for your help and the switch. I'm sure it brings you good dharma. [/smile]
[Android Apps and Games] The7Suggester:
Im currently on MarshMellow 6.0.1 Stock ROM,

and rooted, phone is sm-g906s.

Installed your latest APK, but OS always reports that its SE Enforcing.

Is there any possibility of your app in the future

changing the kernel so as to give permissive ?
[Android Apps and Games] RBEmerson:
Rats... I thought a reboot would clear the earlier Google notification. It didn't. The changes you recommended are still in place but Google still complains. I removed the switch and replaced it with the F-Droid version. Google is silent about that and it works. At least in my situation this isn't a hardship. NTL, I hope this update is a useful data point.
[Android Apps and Games] Daved+:
When I try to install the apk:

11-26 01:55:14.437 2065 2287 E PackageInstaller: Commit of session 184298253 f

ailed: Failed reading classes.dex in android.util.jar.StrictJarFile@6a26043: MET

A-INF/MANIFEST.MF has invalid digest for classes.dex in classes.dex

11-26 01:55:14.468 9268 9268 D InstallAppProgress: Installation error code: 4

11-26 01:55:14.501 9268 9268 I Timeline: Timeline: Activity_idle id: android.o

s.BinderProxy@9b29a97 time:703735

I also tried flashing the zip file but nothing is showing up in the drawer.
[Android Apps and Games] Ibuprophen:
You've honestly stumped me...

I've never heard of this app reflecting any error messages like that when being installed.

I've got a feeling that you didn't confirm/perform one or more of the the Prerequisites outlined on the OP.

I've also previously had seen members attempting to use the Switch app on a stock Firmware even without flashing a modified kernel to allow the devices sepolicy to be changed.

Just rooting and installing BusyBox doesn't allow the devices ability to modify/change the sepolicy that's required to use this app.

Please let me know if you have any further questions or concerns.

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] surajloharia:
Your app is superb to toggle SE linux

before I was using on Naugat ONEPLUS 5

Recently flashd Open beta OREO

and following error is shown while i select permissive or enforcing

using magisk beta 14.5 and systemlss busybox

EDIT : and same error occur with something "navbakup" something like this

i will try to snap that too
[Android Apps and Games] Ibuprophen:
Thank you very much for the feedback!

Can you please get me a logcat reflecting this issue?

I've just been busy with a few other projects including a script for disabling/turn off the Google Play Protect all together.

Basically, after the script is entered, if the individual goes into the Settings then Google then Play Protect, it won't enter it because it will be disabled.

I'm not yet ready but, hopefully, it will be soon.

I may not implement this into the Switch App but, a separate development.

I'll keep everyone up to date with the progress.

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] surajloharia:
Sorry but could you please help me with getting logs

how to ?? coz it just came up as a splash for 2 seconds barely
[Android Apps and Games] Ibuprophen:
Obtaining a Logcat using the app method just runs in the background and then you recreate the error event within the Switch App and then afterwards you reopen the Logcat App and save the information on a txt document to provide to the developer.

The following are just 2 of the many threads that are very helpful and 1 of them may be a bit older but, the steps should still work.

https://xdaforums.com/showthread.php?t=2112010

https://xdaforums.com/showthread.php?t=1513166

It's a simple process...

After i take a quick look and, confirm that what I need is in there, then you can always uninstall the Logcat App if you would like.

I may have to compile a separate debug Switch App with the commands in it for better Logcat information but, that depends on what I can see with the provided Logcat information.

I hope i had explained it okay via text... :)

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] Ibuprophen:
*** PLAY PROTECT STATUS UPDATE ***

A friend of mine stopped by my residence and help me to wrap up the Terminal Code for disabling/stopping Play Protect.

I'm really excited to state that It looks like it worked for 2 of my devices and 3 of his.

I can't state a guarantee for everyone but, I've got confidence in it to work for most.

Now I'm at the point on how to deliver this. I'm thinking about starting out with a flashable zip for testing but, I've got to convert it appropriately from the Coding in order to place it in an updater-script file but, It's been a long time since I've done that.

I'll ask for testers as soon as I can get this accomplished.

Thank you very much for your time and understanding!

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Apps and Games] _Sherrif:
I know i'm replying early, but anything to help with your app...IM IN.:highfive:
[Android Apps and Games] sharkie405:
Ready and willing to test when you are!
[Android Apps and Games] Ibuprophen:
HA-HA!!! :D

This was a fast voluntary response... :eek:

Remember that the The Play Protect Disabler will be separate from the Switch App. I had decided this because of some very important reasons...

The SELinux Switch App is a non intrusive app and makes no permanent changes to any of the devices. I want to keep it that way as designed from the beginning.

Not all users of The SELinux Switch App will want their Play Protect disabled and prefer to handle this manually as having done so all this time.

I also feel that many users may opt out of using the Switch app if I had decided to implement anything intrusive to the device because, if this feature did not work out for their device, then I'll have an additional headache to deal with as the responsible developer to help them through it.

With that stated...

I'm hoping to have something put together within a week or two AND the testing will be handled incognito via PM with the files being on a restricted directory within my File Host Account.

Thank you very much for your interest!!! :thumbup:

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE