Android 8.0 添加一个可以让phone进程访问的hal service需要修改的sepolicy文件

1) device/qcom/sepolicy/common/file_contexts

/(vendor|system/vendor)/bin/hw/android\.hardware\.extphone@1\.0-service u:object_r:hal_extphone_xl_exec:s0

2) device/qcom/sepolicy/common/radio.te

allow radio default_android_hwservice:hwservice_manager find;
allow radio hal_extphone_xl:binder call;

3) device/qcom/sepolicy/msm8909/attributes

attribute hal_extphone;
attribute hal_extphone_server;

4) device/qcom/sepolicy/msm8909/hwservice.te

type hal_extphone_hwservice, hwservice_manager_type;

5) device/qcom/sepolicy/common/hal_extphone_xl.te

# hal_extphone_ti

type hal_extphone_xl, domain;
type hal_extphone_xl_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_extphone_xl)
hal_server_domain(hal_extphone_xl, hal_extphone)add_hwservice(hal_extphone_server, hal_extphone_hwservice)allow hal_extphone_xl default_android_hwservice:hwservice_manager { add find };

6) system/sepolicy/public/domain.te

#neverallow * default_android_hwservice:hwservice_manager { add find };

你可能感兴趣的:(安卓开发)