SE Linux Android 9 AOSP:在 platform_app.te 文件中添加权限导致构建失败。

问题描述 投票:0回答:1

我在Android9的AOSP上工作,当我在我的platform_app.te(位于systemsepolicypublicplatform_app.te中)添加一个权限时,我的构建失败了。system/sepolicy/public/platform_app.te:10:"ERROR 'unknown type xyz_service' at token ';' on line "

我添加的权限是 allow platform_app xyz_service:binder { call transfer };

xyz_service的背景:-它是一个由init启动的服务,它的'.te'文件位于systemsepolicyvendorxyz_service.te中。

我能想到的一个原因是,xyz_service.te位于systemsepolicyvendorxyz_service.te中。供应商 而另一个文件在systemsepolicy中。公共. 移动到 公共供应商 带来更多的问题。当然,你不能在两个位置都有文件,因为它会导致'Duplicate declaration of type'错误。谁能指导我,谢谢

build android-source android-9.0-pie selinux
1个回答
0
投票

xyz_service类型定义在systemsepolicyvendorxyz_service.te中,你试图从systemsepolicypublicplatform_app.te中访问它,但它无法访问。请检查systemsepolicypublic中可用的file.te,并在该file.te中定义xyz_service类型,以便在systemsepolicypublicplatform_app.te中访问。

© www.soinside.com 2019 - 2024. All rights reserved.