From fb6e5cf647a131d82886be15eed8ceb065c6b931 Mon Sep 17 00:00:00 2001 From: George Lee Date: Wed, 25 May 2022 14:37:31 -0700 Subject: [PATCH] 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 Change-Id: Ia735e46fc1b86b1971e8838d43f8733c73793ef8 --- dumpstate/Dumpstate.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp index e434f25d..4950337e 100644 --- a/dumpstate/Dumpstate.cpp +++ b/dumpstate/Dumpstate.cpp @@ -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`; "