Skip to content
Snippets Groups Projects
Commit ee9c88f9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic 'health-hal'

* changes:
  health: add sepolicy for health hal service
  health: allow rules for passthrough health HAL
parents 9f89a1f4 ef62fd91
No related branches found
No related tags found
No related merge requests found
...@@ -226,6 +226,7 @@ ...@@ -226,6 +226,7 @@
/system/lib(64)?/libart.* u:object_r:libart_file:s0 /system/lib(64)?/libart.* u:object_r:libart_file:s0
/system/bin/hw/android\.hardware\.audio@2\.0-service u:object_r:hal_audio_exec:s0 /system/bin/hw/android\.hardware\.audio@2\.0-service u:object_r:hal_audio_exec:s0
/system/bin/hw/android\.hardware\.boot@1\.0-service u:object_r:hal_boot_exec:s0 /system/bin/hw/android\.hardware\.boot@1\.0-service u:object_r:hal_boot_exec:s0
/system/bin/hw/android\.hardware\.health@1\.0-service u:object_r:hal_health_exec:s0
/system/bin/hw/android\.hardware\.light@2\.0-service u:object_r:hal_light_exec:s0 /system/bin/hw/android\.hardware\.light@2\.0-service u:object_r:hal_light_exec:s0
/system/bin/hw/android\.hardware\.memtrack@1\.0-service u:object_r:hal_memtrack_exec:s0 /system/bin/hw/android\.hardware\.memtrack@1\.0-service u:object_r:hal_memtrack_exec:s0
/system/bin/hw/android\.hardware\.nfc@1\.0-service u:object_r:hal_nfc_exec:s0 /system/bin/hw/android\.hardware\.nfc@1\.0-service u:object_r:hal_nfc_exec:s0
......
# may be started by init
init_daemon_domain(hal_health)
# health info abstraction
type hal_health, domain;
type hal_health_exec, exec_type, file_type;
# hwbinder access
hwbinder_use(hal_health)
# call into healthd for callbacks
binder_call(hal_health, healthd)
# Read access to system files for HALs in
# /{system,vendor,odm}/lib[64]/hw/ in order
# to be able to open the hal implementation .so files
r_dir_file(hal_health, system_file)
...@@ -10,6 +10,10 @@ r_dir_file(healthd, sysfs_type) ...@@ -10,6 +10,10 @@ r_dir_file(healthd, sysfs_type)
r_dir_file(healthd, rootfs) r_dir_file(healthd, rootfs)
r_dir_file(healthd, cgroup) r_dir_file(healthd, cgroup)
# Read access to system files for passthrough HALs in
# /{system,vendor,odm}/lib[64]/hw/
r_dir_file(healthd, system_file)
allow healthd self:capability { net_admin sys_tty_config }; allow healthd self:capability { net_admin sys_tty_config };
wakelock_use(healthd) wakelock_use(healthd)
...@@ -19,6 +23,8 @@ allow healthd self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl; ...@@ -19,6 +23,8 @@ allow healthd self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
binder_use(healthd) binder_use(healthd)
binder_service(healthd) binder_service(healthd)
binder_call(healthd, system_server) binder_call(healthd, system_server)
binder_call(healthd, hwservicemanager)
binder_call(healthd, hal_health)
allow healthd sysfs_batteryinfo:file r_file_perms; allow healthd sysfs_batteryinfo:file r_file_perms;
allow healthd batteryproperties_service:service_manager { add find }; allow healthd batteryproperties_service:service_manager { add find };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment