permanently change selinux permission - ONE Q&A, Help & Troubleshooting

Is there any way to change SELinux Permissions permanently?

Related

Can't change selinux mode

Hey, I am trying to set selinux to permissive mode on my cm 12.1 phone but when I try to type setenforce 0 in the terminal it says "selinux is disabled". How can I fix this? Thanks in advance!

Changing file permissions under /sys (SELinux, file_contexts)

Hi,
I'm building a custom boot.img for GT-I9195I with some modified permissions.
I would like to change some permissions under /sys (which by default have the 'sysfs' SELinux permissions).
I edit file_contexts and change the relevant permissions from 'sysfs' to some other group (for example 'input_device').
However, when I flash and boot my Android, 'ls -Z' still displays 'sysfs' permissions for the modified files.
Editing file_contexts to change SELinux permissions seems to work for any other file outside /sys.
I tried running 'restorecon -R /sys' from init.rc with no luck.
Is there anything special about /sys? Who's enforcing 'sysfs' permissions on /sys, regardless of file_contexts?
Thanks!

GALAXY S6 ANDROİD 7.0 SELinux Permissive Problem

Hi lovers of root. I worked on change android mode to Permissive. But it didn't work. I installed selinuxmodechanger and selinux switcher . Both of them didn't work. Also I tried shell terminal emulator writing su and setenforce 0 but it replied me to as " couldn't set enforcing status to '0' ; permission denied". My device has a root(supersu). I read a lot about this. Some places are saying init.d method but i made it, too. It didn't work or I couldn't it. So I want to change mode to Permissive. Thank you for your Helps.
You need a custom kernel with SELinux disabled to be able to disable the SELinux on Samsung devices.
forumber2 said:
You need a custom kernel with SELinux disabled to be able to disable the SELinux on Samsung devices.
Click to expand...
Click to collapse
Where can i find custom kernel and how to install it?

How to disable selinux on unboot device?

Im trying to run customized app_process and got error "mprotect failed with errno = 13" on unboot device redmi6a. But it works whenMagisk installed.
I guess the problem was raised by the security limit about SELinux. isn't it?
After research i found the solution [MOD] Kernel Permissive Patcher for Android which changed enforce to permissive. I flashed it success. but still got enforcing after rebooted.
Im looking for your help.
DroolingDoggie said:
Im trying to run customized app_process and got error "mprotect failed with errno = 13" on unboot device redmi6a. But it works whenMagisk installed.
I guess the problem was raised by the security limit about SELinux. isn't it?
After research i found the solution [MOD] Kernel Permissive Patcher for Android which changed enforce to permissive. I flashed it success. but still got enforcing after rebooted.
Im looking for your help.
Click to expand...
Click to collapse
Try the Selinux Switch app that is available here at XDA.
Droidriven said:
Try the Selinux Switch app that is available here at XDA.
Click to expand...
Click to collapse
I noticed the Selinux Switch app said "So your device will still boot with SELinux in Enforcing mode, but will then automatically launch and change the devices SELinux Mode after the boot process is completed".
I need disable enforce when boot stage. because app_process can not wait the Selinux switch app start.
Unpack bootimg add `androidboot.selinux=permissive` in cmdline.
solved it
DroolingDoggie said:
I noticed the Selinux Switch app said "So your device will still boot with SELinux in Enforcing mode, but will then automatically launch and change the devices SELinux Mode after the boot process is completed".
I need disable enforce when boot stage. because app_process can not wait the Selinux switch app start.
Click to expand...
Click to collapse
Try using the Switch app and then after the device boots, you can use adb or terminal emulator to run a "pm start" command for your app to start the app after it is switched to permissive mode.

Question How to switch selinux mode to permissive on Samsung Galaxy a127f?

Things I have tried;
1. Setenforce 0(terminal)
2. Selinux mode changer
3. Magisk permissive module
4. Adb shell setenforce 0
Device: SM:A127F
ROM: CrDroid 9.2
Any help would be greatly appreciated. Thanks
Why would you want to do this? Root access is generally enough, and SELinux permissive makes your device more vulnerable to external attack.
https://twitter.com/i/web/status/1359054107592466432
V0latyle said:
Why would you want to do this? Root access is generally enough, and SELinux permissive makes your device more vulnerable to external attack.
https://twitter.com/i/web/status/1359054107592466432
Click to expand...
Click to collapse
This app can't run with selinux enforcing
[email protected] said:
This app can't run with selinux enforcing
Click to expand...
Click to collapse
Use a different app. There's no reason for an app to need SELinux permissive unless it's either badly written, or is actually a trojan.

Categories

Resources