dumpstate: Mitigation logger readout

Mitigation Logger logs battery related information for 1 second when it
is triggered by under voltage or over current interrupts.  Information
collected is to help debug system brownout.  This change is to enable
bugreport reading out the mitigation log.

Bug: 228383769
Test: Boot and Test
Signed-off-by: George Lee <geolee@google.com>
Change-Id: Ia735e46fc1b86b1971e8838d43f8733c73793ef8
This commit is contained in:
George Lee 2022-05-25 14:37:31 -07:00
parent 65990a9bf0
commit fb6e5cf647

View file

@ -453,6 +453,7 @@ void Dumpstate::dumpPowerSection(int fd) {
if (!PropertiesHelper::IsUserBuild()) {
RunCommandToFd(fd, "gvotables", {"/vendor/bin/sh", "-c", "cat /sys/kernel/debug/gvotables/*/status"});
}
DumpFileToFd(fd, "Lastmeal", "/data/vendor/mitigation/lastmeal.txt");
RunCommandToFd(fd, "Mitigation Stats", {"/vendor/bin/sh", "-c", "echo \"Source\\t\\tCount\\tSOC\\tTime\\tVoltage\"; "
"for f in `ls /sys/devices/virtual/pmic/mitigation/last_triggered_count/*` ; "
"do count=`cat $f`; "