How to disable SELinux competely in android

3k Views Asked by At

For some really unavoidable circumstances, I want to completely disable SEAndroid from my Android builds and not just making it permissive. Any help would be greatly appreaciated. But please dont answer in a way that "Instead you can make it permissive", because I know that but I simply want to disable it in my case. I have already read this post, but it was not what I was looking for!

1

There are 1 best solutions below

1
On

You might want to try editing the default AOSP SE-policy to allow access to all for all. Start by deleting all the "neverallow" rules from all the '.te' files, and work your way by finding all the various domains on the system, and granting each and every one of them permissions to all resources on the device (files, dirs, sockets, etc).

This might take some work, but you will eventually get an enforced SE-Policy that permits everything.