From 7aafb36f77650a5d52d92f8867e4dba5649ebd65 Mon Sep 17 00:00:00 2001 From: Qinchen Gu Date: Mon, 10 May 2021 17:04:27 -0700 Subject: [PATCH] Dump GSC info Bug: 185939493 Test: adb bugreport. Look for GSC-related info. Change-Id: I17fd4d7ef4c16661312d594c99818233cd0ee76a --- dumpstate/DumpstateDevice.cpp | 7 +++++++ dumpstate/DumpstateDevice.h | 1 + 2 files changed, 8 insertions(+) diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index cf3e1f2e..725e34b9 100644 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -245,6 +245,7 @@ DumpstateDevice::DumpstateDevice() { "sensors-usf", [this](int fd) { dumpSensorsUSFSection(fd); } }, { "ramdump", [this](int fd) { dumpRamdumpSection(fd); } }, { "misc", [this](int fd) { dumpMiscSection(fd); } }, + { "gsc", [this](int fd) { dumpGscSection(fd); } }, } { } @@ -831,6 +832,12 @@ void DumpstateDevice::dumpMiscSection(int fd) { RunCommandToFd(fd, "VENDOR PROPERTIES", {"/vendor/bin/getprop"}); } +// Dump items related to GSC +void DumpstateDevice::dumpGscSection(int fd) { + RunCommandToFd(fd, "Citadel VERSION", {"vendor/bin/hw/citadel_updater", "-lv"}); + RunCommandToFd(fd, "Citadel STATS", {"vendor/bin/hw/citadel_updater", "--stats"}); +} + void DumpstateDevice::dumpModem(int fd, int fdModem) { std::string modemLogDir = MODEM_LOG_DIRECTORY; diff --git a/dumpstate/DumpstateDevice.h b/dumpstate/DumpstateDevice.h index b86873cf..d229eacf 100644 --- a/dumpstate/DumpstateDevice.h +++ b/dumpstate/DumpstateDevice.h @@ -80,6 +80,7 @@ struct DumpstateDevice : public IDumpstateDevice { void dumpSensorsUSFSection(int fd); void dumpRamdumpSection(int fd); void dumpMiscSection(int fd); + void dumpGscSection(int fd); // Hybrid and binary sections that require an additional file descriptor void dumpModem(int fd, int fdModem);