You still need to comment hostapd.te, or it will not compile. You set the kernel parameter in the kernel commandline (look in your android device tree… /device/linaro/hikey/{something}/BoardConfig.mk).
Setting selinux to permissive means that it will NOTIFY you (via dmesg/logcat) when selinux policy is violated, but it WILL NOT BLOCK THE ACTION as it does when it is enforcing.
By default, selinux blocks EVERYTHING. Your selinux policy is a complex set of rules about what is allowed. Think of it as a whitelist. The whitelist has to be compiled into a binary form that selinux can deal with. In the compilation process, other rules are also considered in deciding whether a whitelist is valid – a “blacklist”, written as “neverallow” rules. These rules aren’t actually added to the policy, they’re just used to VALIDATE it.
So when you see in that error log that a neverallow rule was violated, what that means is that some rule is in the whitelist that is now considered inappropriate and has been denied. It therefore will refuse to compile.
So now instead of actually fixing the policy, the policy is being deleted (as you say, “commented”). But the policy was originally added for some reason – it was NEEDED in order to get the device to work as intended. So while the compiler warning is silenced, the action being requested is now being denied by selinux since it is not on the whitelist of allowed actions. That is why selinux needs to be (temporarily) set to permissive, because it MUST do something that selinux WILL DENY.
But you also have to be aware that having selinux set to permissive is not a correct way to run anything – all the protection that it is there to provide you with, will be turned off. It is a development option that allows you to see what WILL be denied when the policy is set to enforce, so that you can write policy (whitelist) that will allow your operations to complete.