类似service启动 主要分为两部分
service nxpnfc_hal_svc /vendor/bin/hw/vendor.nxp.nxpnfc@1.0-serviceclass haluser nfcgroup nfc
1.nxpnfc_hal_svc,这个一般是权限te
device/rockchip/common/sepolicy/nxp_nfc_server.te
type nfc_vendor_data_file, file_type, data_file_type;type nxpnfc_hal_svc, domain;
hal_server_domain(nxpnfc_hal_svc, hal_nfc)type nxpnfc_hal_svc_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(nxpnfc_hal_svc)allow nxpnfc_hal_svc self:process execmem;
allow nxpnfc_hal_svc system_file:dir { open read };
allow nxpnfc_hal_svc vndbinder_device:chr_file { ioctl open read write };
allow nxpnfc_hal_svc default_android_hwservice:hwservice_manager { add find };
allow nxpnfc_hal_svc nfc_vendor_data_file:dir { add_name read write search remove_name};
allow nxpnfc_hal_svc nfc_vendor_data_file:file { getattr open create read write unlink};
所以有时候提醒nxpnfc_hal_svc服务报错 说明可能是te文件权限不对,或者服务不存在
2.vendor.nxp.nxpnfc@1.0-service