草庐IT

neverallow

全部标签

Android13 添加SELinux权限 编译的时候出现 neverallow 编译报错

背景:项目需要,需要通过init.rc启动一个服务,需要添加SELinux权限。添加SELinux权限的步骤就不在此详细说明,大致如下:修改system/sepolicy/prebuilts/api/33.0/private/file_contexts和system/sepolicy/private/file_contexts文件,在system/sepolicy/prebuilts/api/33.0/private/和system/sepolicy/private/目录下添加对应的te文件。以下是我修改的内容heartbeat.tetypeheartbeat,domain;typeheart