From f948ea58c7e6b03928892ba88a263826e866e068 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Wed, 13 Mar 2019 17:08:43 +0000 Subject: [PATCH] Allow traced_probes to access power rail data. Allows power rail data to be logged in the trace, allowing high fidelity attribution of battery power use. Matching feature CL: aosp/891533 SELinux denials that lead to this: avc: denied { call } for scontext=u:r:traced_probes:s0 tcontext=u:r:hal_power_stats_default:s0 tclass=binder Test: checked data in a trace Bug: 122584217 Change-Id: I7e0f4e825be3f54bc78d91da1cb85c2f61465a44 --- private/traced_probes.te | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/private/traced_probes.te b/private/traced_probes.te index 8aa475e65..689ff5c61 100644 --- a/private/traced_probes.te +++ b/private/traced_probes.te @@ -66,8 +66,9 @@ allow traced_probes { proc_stat }:file r_file_perms; -# Allow access to the IHealth HAL service for tracing battery counters. +# Allow access to the IHealth and IPowerStats HAL service for tracing battery counters. hal_client_domain(traced_probes, hal_health) +hal_client_domain(traced_probes, hal_power_stats) # On debug builds allow to ingest system logs into the trace. userdebug_or_eng(`read_logd(traced_probes)')