If you want to completely disable SElinux, you need to change the selinux.cpp functions placed at `system/core/init`. Two functions `StatusFromProperty()` and `IsEnforcing()` set the status of the SElinux which are called in different units. If you change the value of return for both as `SELINUX_PERMISSIVE` and `false`, the SElinux status always will be permissive. Please see this answer related to this post [here][1].
[1]: https://stackoverflow.com/questions/77497503/producing-a-user-build-of-aosp-with-permissive-selinux-policy
If you want to disable SElinux and make the entire system `permissive`, you need to change the `selinux.cpp` functions located at `system/core/init`. Two functions `StatusFromProperty()` and `IsEnforcing()` set the status of the SElinux which are called in different units. If you change the value of return for both as `SELINUX_PERMISSIVE` and `false`, the SElinux status always will be permissive. You can find more details [here][1].
[1]: https://stackoverflow.com/questions/77497503/producing-a-user-build-of-aosp-with-permissive-selinux-policy