topjohnwu / Magisk

The Magic Mask for Android
GNU General Public License v3.0
47.59k stars 12.08k forks source link

Pseudo SELinux Enforce Mode not working on Samsung Note 4 #93

Closed adroidnote4 closed 7 years ago

adroidnote4 commented 7 years ago

Hi,

I am unable to pass SafteyNet with a permissive kernel (CTS profile mismatch), although permissive is detected by MagiskHide and shows switching to Pseudo enforced in the logs. However, it seems that MagiskHide cannot hide permissive SELinux.

Please see below a workaround posted by @Wesley_NL which allows me to pass SafetyNet:

Adding the following lines to a file in the init.d folder allows me to successfully pass SafetyNet:

!/system/bin/sh

chmod 640 /sys/fs/selinux/enforce chmod 440 /sys/fs/selinux/policy

Note that executing the command "getenforce" in Terminal emulator shows "Permissive" for both cases i.e. with and without the above script in inid.d

Thanks in advance for looking into the above issue and supporting the Samsung devices. logs.zip

topjohnwu commented 7 years ago

Samsung issues are all fixed