Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 769babbb authored by Kelly Rossmoyer's avatar Kelly Rossmoyer Committed by Nandana Dutt
Browse files

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 within and without the change on a
device, manually verified that the checkin format data was
present with the code change in place, and loaded the bugreport into
Historian successfully.

Merged-In: Iba434bfd219c627cd3c058e549a627947d9ce501
Change-Id: Iba434bfd219c627cd3c058e549a627947d9ce501
(cherry picked from commit bbd6fdb6)
parent f3cf54a2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1465,6 +1465,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");