gs-common: wlc: add tx update permission for hal_googlebattery

Bug: 391056983
Test: trigger tx fwupdate
Flag: vendor.google.wireless_charger.service.flags.enable_service
Change-Id: I66e5fe88d43b8e33e3548d642f7ba89d63c96051
Signed-off-by: YiKai Peng <kenpeng@google.com>
This commit is contained in:
YiKai Peng 2025-01-19 23:05:11 -08:00
parent 6cda4c1c19
commit 9b6b7e35b9
4 changed files with 8 additions and 3 deletions

View file

@ -1,2 +1,4 @@
# wlc permission for googlebattery
r_dir_file(hal_googlebattery, sysfs_wlc) r_dir_file(hal_googlebattery, sysfs_wlc)
allow hal_googlebattery sysfs_wlc:file rw_file_perms; allow hal_googlebattery sysfs_wlc:file rw_file_perms;
set_prop(hal_googlebattery, vendor_wlcservice_prop)

View file

@ -1,3 +1,4 @@
# wlcservice hal type and permission
type hal_wlcservice, domain; type hal_wlcservice, domain;
type hal_wlcservice_exec, exec_type, vendor_file_type, file_type; type hal_wlcservice_exec, exec_type, vendor_file_type, file_type;
@ -8,7 +9,7 @@ allow hal_wlcservice vendor_wlc_file:file create_file_perms;
allow hal_wlcservice hal_wireless_charger_service:service_manager find; allow hal_wlcservice hal_wireless_charger_service:service_manager find;
allow hal_wlcservice kmsg_device:chr_file { getattr w_file_perms }; allow hal_wlcservice kmsg_device:chr_file { getattr w_file_perms };
get_prop(hal_wlcservice, vendor_wlcservice_test_prop) set_prop(hal_wlcservice, vendor_wlcservice_prop)
binder_call(hal_wlcservice, servicemanager) binder_call(hal_wlcservice, servicemanager)
add_service(hal_wlcservice, hal_wlcservice_service) add_service(hal_wlcservice, hal_wlcservice_service)

View file

@ -1 +1,2 @@
vendor_internal_prop(vendor_wlcservice_test_prop) # wlcservice property
vendor_internal_prop(vendor_wlcservice_prop)

View file

@ -1 +1,2 @@
vendor.wlcservice.test.authentication u:object_r:vendor_wlcservice_test_prop:s0 exact bool vendor.wlcservice.test.authentication u:object_r:vendor_wlcservice_prop:s0 exact bool
vendor.wlcservice.fwupdate.tx u:object_r:vendor_wlcservice_prop:s0 exact enum 0 1 2 3