我正在尝试创建一个系统服务,它在系统启动后运行,除了sepolicy文件更新之外,我已经遵循了所需的步骤。我已经推荐了https://android.jlelse.eu/system-service-in-aosp-750007d39555。当前我的服务没有运行,因为avc拒绝错误即将到来。我正在允许模式下运行。我已经尝试在/system/sepolicy/public/service.te的service.te和conexts.te中添加所需的更改。我收到编译错误,因为6:49 PM Kumar,Rathnakaram Anil (uic40644)
下午4:03库马尔,Rathnakaram Anil (uic40644)
嗨,Ashwini,我正在尝试为我的测试服务添加selinux权限,面临错误:13%18579/140712构建out/target/product/caaf_denali_pegasus/obj/ETC/sepolicy_freeze_test_intermediates/sepolicy_freeze_test失败: out/target/product/caaf_denali_pegasus/obj/ETC/sepolicy_freeze_test_intermediates/sepolicy_freeze_test /bin/bash -c "(diff -rq -x bug_map system/sepolicy/prebuilts/api/29.0/public system/sepolicy/public ) && (diff -rq -x bug_map system/sepolicy/prebuilts/api/29.0/private system/sepolicy/private ) && (触摸out/target/product/caaf_denali_pegasus/obj/ETC/sepolicy_freeze_test_intermediates/sepolicy_freeze_test )“文件上下文和system/sepolicy/private/ system/sepolicy/prebuilts/api/29.0/private/service.te不同文件system/sepolicy/prebuilts/api/29.0/private/service_contexts和system/sepolicy/private/service_contexts不同。
我找不到任何关于如何为新服务更新sepolicy的线索,请帮助我。
发布于 2020-11-03 09:24:24
service_name u:object_r:service_name:s0
重新编译AOSP。
发布于 2020-12-03 14:53:12
给你的二进制文件一个selable,添加到"file_contexts"中,
xxx服务类型xxx,域;类型xxx_exec,exec_type,vendor_file_type,file_type;init_daemon_domain(xxx)
https://stackoverflow.com/questions/64593312
复制相似问题