sepolicy: allow dumpstate to call battery_mitigation

Bug: 322141931
Change-Id: I5a6d013df754d3f6d6e9d1ee3ea335176450069b
Signed-off-by: samou <samou@google.com>
This commit is contained in:
samou 2024-04-15 13:27:11 +00:00
parent 4055216656
commit d7c33cef92
3 changed files with 7 additions and 1 deletions

View File

@ -24,6 +24,8 @@ allow battery_mitigation sysfs_bcl:lnk_file r_file_perms;
allow battery_mitigation sysfs_thermal:lnk_file r_file_perms;
allow battery_mitigation mitigation_vendor_data_file:dir rw_dir_perms;
allow battery_mitigation mitigation_vendor_data_file:file create_file_perms;
allow battery_mitigation dumpstate:fd use;
allow battery_mitigation dumpstate:fifo_file rw_file_perms;
# Allow battery_mitigation to use Binder IPC so that service manager can notify it for callbacks
binder_use(battery_mitigation)
@ -33,3 +35,4 @@ wakelock_use(battery_mitigation)
add_service(battery_mitigation, hal_battery_mitigation_service)
# Allow battery_mitigation to run audio mitigation callback
binder_call(battery_mitigation, hal_audio_default)
binder_call(battery_mitigation, servicemanager)

View File

@ -0,0 +1,3 @@
# To call battery_mitigation hal
allow dumpstate hal_battery_mitigation_service:service_manager find;
binder_call(dumpstate, battery_mitigation);

View File

@ -1 +1 @@
type hal_battery_mitigation_service, protected_service, hal_service_type, service_manager_type;
type hal_battery_mitigation_service, hal_service_type, service_manager_type;