YiKai Peng 3eb5f527cf WLC: service: add configuration and contexts for sepolicy
binder setting is for callback by and access to hal_wireless_charger

Bug: 311315038
Test: authentication
Change-Id: Ieaf93c4736b7381be35bfcf12e83977762a3de5d
Signed-off-by: YiKai Peng <kenpeng@google.com>
2024-05-06 10:11:44 +00:00

19 lines
631 B
Plaintext

type hal_wlcservice, domain;
type hal_wlcservice_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_wlcservice)
allow hal_wlcservice vendor_wlc_file:dir create_dir_perms;
allow hal_wlcservice vendor_wlc_file:file create_file_perms;
allow hal_wlcservice hal_wireless_charger_service:service_manager find;
allow hal_wlcservice kmsg_device:chr_file { getattr w_file_perms };
binder_call(hal_wlcservice, servicemanager)
add_service(hal_wlcservice, hal_wlcservice_service)
userdebug_or_eng(`
domain_auto_trans(shell, hal_wlcservice_exec, hal_wlcservice)
')
binder_call(hal_wlcservice, hal_wireless_charger)