android te avc 权限

本文详细解析了SELinux环境下,HAL蓝牙进程遇到的ctl_stop_prop权限问题,具体表现为对property_service类型设置权限缺失。文章提供了修改selinux策略的具体步骤,包括在hal_bluetooth_qti.te中增加权限设置,以及如何通过禁用SELinux验证问题根源。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

01-14 16:14:45.867 E/selinux (    0): avc:  denied  { set } for property=ctl.stop$vendor.fm pid=543 uid=1002 gid=1002 scontext=u:r:hal_bluetooth_qti:s0 tcontext=u:object_r:ctl_stop_prop:s0 tclass=property_service permissive=0

缺少什么权限:{ set }
谁缺少权限:scontext=u:r:hal_bluetooth_qti:s0
对那些文件缺少权限:tcontext=u:object_r:ctl_stop_prop:s0
什么类型的权限:tclass=property_service

总结:hal_bluetooth_qti进程对property_service类型的ctl_stop_prop缺少set权限
修改:
device/qcom/sepolicy/vendor/common/hal_bluetooth_qti.te
添加
allow hal_bluetooth_qti ctl_stop_prop:property_service set;

make installclean后重新编译,刷boot.img才会生效。

为了澄清是否因为SELinux导致的问题,可先执行:
setenforce 0 (临时禁用掉SELinux)
getenforce  (得到结果为Permissive)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值