I have Samsung Galaxy J7 Core (SM-J701F), I'm running Magisk on my device and I ran the SafteyNet test and it failed. While trying to solve this I tried to change selinux state to enforced by editing /etc/selinux.config. But when I opened the folder there was no such file!

When I run getenforce command it gives me "permissive". Is this a problem and how can I fix it?


1 Answer 1


Yes, permissive SELinux could be one of the reasons of failed SafetyNET test (1). So you need to set it enforcing. However Android uses a modified version of libselinux, not dependent on /etc/selinux/config (2). On Android SELinux is configured when building ROM, and enforced by init when booting ROM. However if you have root, you can use setenforce command (located under /system/bin) or write directly to Kernel Configuration File (/sys/fs/selinux/enforce). But make sure you have a working SE policy before enforcing, or you may get stuck.

  • 1
    Thank you for your answer, unfortunately I did a factory reset to solve this and then install everything as it was before and it's solved May 9, 2019 at 19:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .