From 5ef48cf831f8a50f5056af17ec223bf5b58b4ffb Mon Sep 17 00:00:00 2001 From: Yifan Hong <elsk@google.com> Date: Thu, 5 Apr 2018 18:27:49 -0700 Subject: [PATCH] hal_health: allow to write kernel logs. This is originally allowed in healthd but the permission was not transfered to health HAL. A typical health HAL implementation is likely to write battery info to kernel logs. Test: device has battery kernel logs with health HAL but without healthd Bug: 77661605 Change-Id: Ib3b5d3fe6bdb3df2a240c85f9d27b863153805d2 --- public/hal_health.te | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/hal_health.te b/public/hal_health.te index 068f23bf7..c0a0f804c 100644 --- a/public/hal_health.te +++ b/public/hal_health.te @@ -25,3 +25,6 @@ r_dir_file(hal_health_server, sysfs_batteryinfo) # Allow to wake up to send periodic events wakelock_use(hal_health_server) + +# Write to /dev/kmsg +allow hal_health_server kmsg_device:chr_file w_file_perms; -- GitLab