dumpstate: dump SRAM & power supply properties

Bug: 74954924
Change-Id: I4e2ba0efaf453d0f713d8859945e61e5f5d9ed8d
Signed-off-by: Thierry Strudel <tstrudel@google.com>
This commit is contained in:
Thierry Strudel
2018-03-15 18:42:55 -07:00
parent c8280badd7
commit ab8d91f947
6 changed files with 24 additions and 11 deletions

View File

@@ -255,13 +255,16 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
DumpFileToFd(fd, "PD Engine", "/d/pd_engine/usbpd0");
DumpFileToFd(fd, "smblib-usb logs", "/d/ipc_logging/smblib/log");
DumpFileToFd(fd, "ipc-local-ports", "/d/msm_ipc_router/dump_local_ports");
DumpFileToFd(fd, "WLAN FW Log Symbol Table", "/vendor/firmware/Data.msc");
DumpTouch(fd);
RunCommandToFd(fd, "USB Device Descriptors", {"/vendor/bin/sh", "-c", "cd /sys/bus/usb/devices/1-1 && cat product && cat bcdDevice; cat descriptors | od -t x1 -w16 -N96"});
RunCommandToFd(fd, "QSEE logs", {"/vendor/bin/sh", "-c", "cat /d/tzdbg/qsee_log"});
DumpFileToFd(fd, "Battery type", "/sys/class/power_supply/bms/battery_type");
RunCommandToFd(fd, "Power supply properties", {"/vendor/bin/sh", "-c", "for f in /sys/class/power_supply/*/uevent ; do echo \"\n------ $f\" ; cat $f ; done"});
RunCommandToFd(fd, "Battery cycle count", {"/vendor/bin/sh", "-c", "for f in 1 2 3 4 5 6 7 8 ; do echo $f > /sys/class/power_supply/bms/cycle_count_id; count=`cat /sys/class/power_supply/bms/cycle_count`; echo \"$f: $count\"; done"});
RunCommandToFd(fd, "QCOM FG SRAM", {"/vendor/bin/sh", "-c", "echo 0 > /d/fg/sram/address ; echo 500 > /d/fg/sram/count ; cat /d/fg/sram/data"});
DumpFileToFd(fd, "WLAN FW Log Symbol Table", "/vendor/firmware/Data.msc");
return Void();
};