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?
Related
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!
Hi there!
I found a way to bypass SafetyNet on Pokemon Go. It detects root access if SeLinux is set to permissive. I am currently running Android 5.1 CM 12.1 on my Samsung Galaxy S5 DUOS .
/* Note: There are many ways to bypass root detection, this is just what worked for me on a custom ROM with root access! */
/* Requirements */
- Terminal app, you can get one from the Play Store (any terminal app)
- Access to "setenforce" for SELinux devices
- SELinux-enabled device (most Android phones from Android 5.0 to 6.0 have SELinux enforced by default)
/* WARNING: If you are running Android 4.4 or lower, this will NOT work for you. SELinux is not enabled on Android 4.4! */
/* Tip: Using a custom Superuser app may also reduce root detection */
By the way, I don't know if it can detect Xposed, I have never used Xposed
First, open your terminal emulator app, and gain root access by typing "su". A root access dialog will pop up, tap "Grant Access" or "Allow". This will enable root access in the Terminal emulator app. You'll get a root shell. Then type "setenforce 1" (this will set SELinux to permissive). Close out of your terminal app, and open Pokemon Go.
After exiting out of Pokemon Go, re-enable SELinux by re-opening the terminal, typing the "su" command. Then type "setenforce 0". This will set SELinux to permissive. Permissive is required to run root-enabled applications properly.
/* WARNING: You'll need to do this every time you want to play Pokemon GO! */
I hope you guys found this helpful!
Have a great day!
ralphdroid
Doesn't work for me
Xiaomi Redmi Note 3 Pro CM13 (unofficial)
ralphdroid said:
Hi there!
I found a way to bypass SafetyNet on Pokemon Go. It detects root access if SeLinux is set to permissive. I am currently running Android 5.1 CM 12.1 on my Samsung Galaxy S5 DUOS .
/* Note: There are many ways to bypass root detection, this is just what worked for me on a custom ROM with root access! */
/* Requirements */
- Terminal app, you can get one from the Play Store (any terminal app)
- Access to "setenforce" for SELinux devices
- SELinux-enabled device (most Android phones from Android 5.0 to 6.0 have SELinux enforced by default)
/* WARNING: If you are running Android 4.4 or lower, this will NOT work for you. SELinux is not enabled on Android 4.4! */
/* Tip: Using a custom Superuser app may also reduce root detection */
By the way, I don't know if it can detect Xposed, I have never used Xposed
First, open your terminal emulator app, and gain root access by typing "su". A root access dialog will pop up, tap "Grant Access" or "Allow". This will enable root access in the Terminal emulator app. You'll get a root shell. Then type "setenforce 1" (this will set SELinux to permissive). Close out of your terminal app, and open Pokemon Go.
After exiting out of Pokemon Go, re-enable SELinux by re-opening the terminal, typing the "su" command. Then type "setenforce 0". This will set SELinux to permissive. Permissive is required to run root-enabled applications properly.
/* WARNING: You'll need to do this every time you want to play Pokemon GO! */
I hope you guys found this helpful!
Have a great day!
ralphdroid
Click to expand...
Click to collapse
Not working on my Samsung Galaxy S4 GT-I9505 (lastest CM snapshot, no Xposed atm).
Btw, you post is a bit confusing. You say "setenforce 1" sets to permissive and later you say "setenforce 0" sets to permissiv, so... what is doing what? And what is the CM13 (marshmallow, android 6.0.1) default?
But thanks anyway for trying to find an easy way to work arround the SafetyNet fu** niantic does
€dit: maybe interesting for you, with the app "Tasker" you can run shellskripts. So you could create a task like "run this script + start app pokemon go" and shortcut it on your homescreen. Then you can set a tasker profile that triggers when po/go starts and runs a task like "run script to re-set SELinux state" as exit task for this profile (for more information about this, you may PM me )
Found a fix
Hi everyone
found another possible way to play Pokemon Go on rooted/cyanogenMod (13) devices:
http://forum.xda-developers.com/apps/supersu/suhide-t3450396
all thanks to @Chainfire
Sounds interesting! I'll try it out soon on my Nexus 5
BirthdayBrain said:
Sounds interesting! I'll try it out soon on my Nexus 5
Click to expand...
Click to collapse
Which of the 2 mentioned ways do/did you try?
I tried both, but only suhide worked for me. Would be nice to get any more feedback. in suhide-thread a lot of people report it is working for them.
suhide is NOT my work! All thanks to its creator! (Maybe a "Thanks"-button for linking it )
Steps necessary to permanently enable user root?
Let's say I have remote root access to my CID 11 G900V phone on the stock android 6.0.
What do I need to do to allow user to have root and persist through reboots/checks?
No promises yet,
only have uid=0(root) gid=0(root) context=u:r:init:s0
on the remote side accessing the phone.
R&D:
5.0 post-root performs:
Set permissive for init
Set permissive for init_shell
Set permissive for s_init_shell
type s_init_shell does not exist
Set permissive for kernel
Set permissive for shell
Set permissive for toolbox
type toolbox does not exist
Set permissive for toolbox_exec
type toolbox_exec does not exist
TOY
smokerbond said:
Steps necessary to permanently enable user root?
Let's say I have remote root access to my CID 11 G900V phone on the stock android 6.0.
What do I need to do to allow user to have root and persist through reboots/checks?
No promises yet,
only have uid=0(root) gid=0(root) context=u:r:init:s0
on the remote side accessing the phone.
Click to expand...
Click to collapse
There are essentially two ways: one requires modification of the kernel and one requires modification of the /system partition. Neither can work for Android 6.0 with a locked bootloader. The reason we don't have root available for 6.0 ROMs on locked bootloader phones is not because we can't get root, but because there is no way to keep it. Your method may still be helpful though to accomplish small tasks with temporary root.
Edit:
If you can manage to disable dm-verity like has been done in the link below, the /system partition can be modified and superSU/permanent root can be theoretically installed.
http://forum.xda-developers.com/lg-g5/how-to/guide-adb-root-rw-dm-verity-off-sprint-t3523499
Hariiiii said:
There are essentially two ways: one requires modification of the kernel and one requires modification of the /system partition. Neither can work for Android 6.0 with a locked bootloader. The reason we don't have root available for 6.0 ROMs on locked bootloader phones is not because we can't get root, but because there is no way to keep it. Your method may still be helpful though to accomplish small tasks with temporary root.
Edit:
If you can manage to disable dm-verity like has been done in the link below, the /system partition can be modified and superSU/permanent root can be theoretically installed.
http://forum.xda-developers.com/lg-g5/how-to/guide-adb-root-rw-dm-verity-off-sprint-t3523499
Click to expand...
Click to collapse
Interesting, thanks for the info.
Still working on disabling SELinux right now.
I understand why the kernel cannot be modified (the bootloader checking for specific kernel) but why can I not change /system?
smokerbond said:
Interesting, thanks for the info.
Still working on disabling SELinux right now.
I understand why the kernel cannot be modified (the bootloader checking for specific kernel) but why can I not change /system?
Click to expand...
Click to collapse
Dm-Verity. I believe it works through the kernel checking several key directories including /system for any modifications on boot.
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.
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.