Want to change SELinux mode to permissive on your Android device?. In this guide, we will show you how to easily set SELinux Permissive on your Android device using ‘The SELinux Switch‘ app.
How to Change SELinux Mode to Permissive on Android
In order to set SELinux Mode to Permissive, we are going to make use of a neat little app called “The SELinux Switch”. The app is developed and maintained by XDA Senior Member Ibuprophen.
The SELinux Switch app comes with a clean and minimal UI. There are no unnecessary and confusing options. Upon opening the app, you get the option to set the SELinux mode to permissive. Please be noted that you need a rooted Android device for this to work.
Step 1. Download and Install “The SELinux Switch” App
The first thing we are going to do is to download and install the ‘The SELinux Switch’ app on your rooted Android device. Please note that the app is not available on Google Play Store and has to downloaded from 3rd party websites and installed as an APK file on your Android device.
You can download the latest version of the SELinux Switch app by clicking below:
The above download link has both “zip” and “apk” files. We recommed you to download the “apk” file for this step.
Once you have downloaded the APK, you can install it just like you install any other APK file on your Android device. Note: You may want to enable “allow install from 3rd party sources” setting on your Android. It is pretty straight forward. Simply click on the downloaded APK file from a file manager or the browser downloads sections, Android will guide you through the process.
Alternatively, if the APK installation fails for you for some reason can also download the “zip” file from the same download link we had provided earlier and then flash it via TWRP recovery just like you would flash any other zip file.
- Reboot into TWRP recovery.
- Tap on ‘Install’.
- Choose the zip file you had downloaded.
- Swipe at the bottom to flash the zip file.
Step 2. Set SELinux Permissive Using the App
- Open the SELinux Switch app on your Android device.
- As soon as you open it for the first time, you will be asked to grant root permission to it. Grant the same.
- After the above step, you should now be on the app home screen.
- On the homescreen, simply tap the ‘PERMISSIVE‘ button once to set SELinux Permissive on your Android device.
Done! Now you have successfully enabled PERMISSIVE SELinux mode on your Android device. You can change it back to ENFORCING any time you want by simply going to the app and tapping on the ENFORCING button. For convenience, you may also select the “Select For SELinux Mode Change Notification” option.
You may want to follow the official XDA thread of the app if you have any questions or want to keep track of the updates or just want to thank the developer for his efforts.
Now that you have successfully set SELinux Permissive on Android, here’s a little more information on it so that you can understand it better.
What is SELinux?
SELinux, short for Security-Enhanced Linux, is a security module in the Linux kernel. It provides a safe way to regulate access-control security policies. In layman terms, it is a security mechanism that limits the amount and type of information that could be accessed by user programs/apps in Linux systems, which in our case is Android. SELinux was introduced to the Android ecosystem in Android 4.3. When it was originally introduced, you could easily toggle between different SELinux mode easily from the Settings. Starting with Android 4.4 KitKat, SELinux status was permanently set to ‘Enforcing’ on Android.
Why Set SELinux Mode to Permissive?
As we have said above, when SELinux is set to ENFORCING, it puts a lot of restrictions on the Android apps. Because of the strict security measures in the ENFORCING mode, you may not have all the privileges of having a rooted Android device. Simply put, it enforces a lot of security mechanisms on the Android OS to keep it safe. That, in turn, spoils all the fun of new development and tinkering around. Many apps for rooted Android devices, such as ViPER4Android, require SELinux Mode set to be permissive in order to work properly.
1 thought on “Set SELinux Permissive on Android | Guide”