From fbaa01eb4943f209da63df048a6de21fb84a00a8 Mon Sep 17 00:00:00 2001 From: Kelly Rossmoyer Date: Tue, 21 Aug 2018 18:06:38 -0700 Subject: Add batterystats -c data to telephony bugreports Telephony bugreports currently capture 'dumpsys batterystats' output, but only in its human-friendly format. While humans may enjoy that format, Historian does not, and fails to properly load telephony bugreports (including those triggered by LowPowerMonitor) as a result. This makes it essentially impossible to use Historian when triaging/ analyzing telephony-style bugreports. To enable Historian processing of telephony bugreports, this change adds the 'checkin' format ("dumpsys batterystats -c") data along with the existing entries. ABT (Android Bug Tool) still doesn't properly list dumpsys sections in its UI even with this change, but I think nothing short of a full, comprehensive dumpsys run will make ABT happy. And that's okay, because all of the text content can still be navigated manually. Bug: 111763716 Test: Triggered telephony bugreports with and without the change on an appropriate device, manually verified that the checkin format data was present with the code change in place, and loaded the bugreport into Historian successfully. Change-Id: Iba434bfd219c627cd3c058e549a627947d9ce501 --- cmds/dumpstate/dumpstate.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmds/dumpstate/dumpstate.cpp') diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp index 9d897f523d..1d951bed23 100644 --- a/cmds/dumpstate/dumpstate.cpp +++ b/cmds/dumpstate/dumpstate.cpp @@ -1536,6 +1536,12 @@ static void DumpstateTelephonyOnly() { RunDumpsys("APP SERVICES NON-PLATFORM", {"activity", "service", "all-non-platform"}, DUMPSYS_COMPONENTS_OPTIONS); + printf("========================================================\n"); + printf("== Checkins\n"); + printf("========================================================\n"); + + RunDumpsys("CHECKIN BATTERYSTATS", {"batterystats", "-c"}); + printf("========================================================\n"); printf("== dumpstate: done (id %d)\n", ds.id_); printf("========================================================\n"); -- cgit v1.2.3-59-g8ed1b