【发布时间】:2021-05-28 19:03:32
【问题描述】:
我希望女巫 /dev/i2c-1 设备不受 Android 10 上的 SELinux 安全政策的约束。
我有 Android 10 的源代码。我尝试在 /device/thales/mt8768q/sepolicy/edgelab.te 中创建一个 .te 文件
在 foo.te 中,我在网站上添加了一个类似的示例:https://source.android.com/security/selinux/customize。
allow domain i2c-1_device:chr_file rw_file_perms
但是,在编译过程中,这一行会产生错误。
更新:
我在/device/manufacturer/device-name/BoardConfig.mk 上添加新行:
BOARD_SEPOLICY_DIRS += device/thales/mt8768q/sepolicy
错误是:
#line 206
device/mediatek/mt6765/sepolicy/bsp/mnld.te:8:ERROR 'syntax error' at token 'role' on line 97225:
#line 2 "device/thales/mt8768q/sepolicy/edgelab.te"
allow domain i2c-1_device:chr_file { { getattr open read ioctl lock map } { open append write lock map } }role r;
checkpolicy: error(s) encountered while parsing configuration
可能i2c-1_device 不是有效名称,但我不知道如何在.te 文件中引用/dev/i2c-1。
【问题讨论】:
-
如果您不分享错误,就无法提供帮助
标签: android android-source selinux seandroid