|
发表于 2021-12-1 10:15:43
3168 浏览 0 回复
Android 11 第三方APP串口工具找不到串口添加SELinux权限
1.在/device/mediatek/sepolicy/basic/non_plat/untrusted_app.te添加权限
allow untrusted_app proc_tty_drivers:file { read write ioctl open getattr };
allow untrusted_app ttyS_device:chr_file { read write open ioctl getattr };
allow untrusted_app device:dir { read write open ioctl getattr };
2.在/device/mediatek/sepolicy/basic/non_plat/mnld.te添加权限
allow mnld ttyS_device:chr_file { read write open ioctl getattr };
3.在/device/mediatek/sepolicy/basic/neverallows/non_plat/neverallows.te
/device/mediatek/sepolicy/basic/neverallows/plat_private/neverallows.te
/device/mediatek/sepolicy/basic/neverallows/plat_public/neverallows.te 添加
-vendor_init
-vold
-ueventd
+ -untrusted_app
} device:dir ~{ search getattr };
4.在/system/sepolicy/prebuilts/api/30.0/private/app_neverallows.te
/system/sepolicy/private/app_neverallows.te b/system/sepolicy/private/app_neverallows.te屏蔽
+#neverallow { all_untrusted_apps -untrusted_app_25 } proc_tty_drivers:file r_file_perms;
+#neverallow all_untrusted_apps proc_tty_drivers:file ~r_file_perms;
|
|
|
|
|
|
|
登录或注册
|