-
Notifications
You must be signed in to change notification settings - Fork 11
11.Bug修复
dabao1955 edited this page Dec 12, 2023
·
1 revision
此文本旨在ksu核心工作正常后对其不工作的地方(例如模块)进行修复,文章部分内容节选自此
修改security/selinux/hooks.c
参考此提交
KernelSU不兼容安卓10以下设备,所以无法正确处理低于安卓10的init。那么结果即使就会遭到SELinux的拦截。
1.修改selinux(不推荐)
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
length = -EINVAL;
if (sscanf(page, "%d", &new_value) != 1)
goto out;
+ new_value = 0;
if (new_value != selinux_enforcing) {
length = task_has_security(current, SECURITY__SETENFORCE);
2.修改init变量
需要手动修改KernelSU源码,参考此提交
N:此PR可能解决了这个问题