From 1b92506c4d05c49eb01b9ebcd9955fe814d68148 Mon Sep 17 00:00:00 2001 From: Adam Shih Date: Tue, 21 Mar 2023 11:17:47 +0800 Subject: [PATCH] use gxp dump in gs-common The function is introduced in ag/21644929 Bug: 273380509 Test: adb bugreport;unzip *zip;tar -xvf dumpstate_board.bin And found gxp content Change-Id: Ife6e7dc1c399150b149f5fbd14c902da6cdeefcf --- device.mk | 1 + dumpstate/Dumpstate.cpp | 17 ----------------- dumpstate/Dumpstate.h | 1 - 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/device.mk b/device.mk index 8c6eb25d..624fb090 100644 --- a/device.mk +++ b/device.mk @@ -26,6 +26,7 @@ include device/google/gs-common/pixel_metrics/pixel_metrics.mk include device/google/gs-common/performance/perf.mk include device/google/gs-common/display/dump.mk include device/google/gs-common/camera/dump.mk +include device/google/gs-common/gxp/dump.mk include device/google/gs-common/umfw_stat/umfw_stat.mk TARGET_BOARD_PLATFORM := gs201 diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp index 99d752ca..c71961ee 100644 --- a/dumpstate/Dumpstate.cpp +++ b/dumpstate/Dumpstate.cpp @@ -199,7 +199,6 @@ Dumpstate::Dumpstate() mLogSections{ { "radio", [this](int fd, const std::string &destDir) { dumpRadioLogs(fd, destDir); } }, { "gps", [this](int fd, const std::string &destDir) { dumpGpsLogs(fd, destDir); } }, - { "gxp", [this](int fd, const std::string &destDir) { dumpGxpLogs(fd, destDir); } }, } { } @@ -502,22 +501,6 @@ void Dumpstate::dumpGpsLogs(int fd, const std::string &destDir) { dumpLogs(fd, gpsLogDir, gpsDestDir, maxFileNum, GPS_LOG_PREFIX); } -void Dumpstate::dumpGxpLogs(int fd, const std::string &destDir) { - bool gxpDumpEnabled = ::android::base::GetBoolProperty("vendor.gxp.attach_to_bugreport", false); - - if (gxpDumpEnabled) { - const int maxGxpDebugDumps = 8; - const std::string gxpCoredumpOutputDir = destDir + "/gxp_ssrdump"; - const std::string gxpCoredumpInputDir = "/data/vendor/ssrdump"; - - RunCommandToFd(fd, "MKDIR GXP COREDUMP", {"/vendor/bin/mkdir", "-p", gxpCoredumpOutputDir}, CommandOptions::WithTimeout(2).Build()); - - // Copy GXP coredumps and crashinfo to the output directory. - dumpLogs(fd, gxpCoredumpInputDir + "/coredump", gxpCoredumpOutputDir, maxGxpDebugDumps, "coredump_gxp_platform"); - dumpLogs(fd, gxpCoredumpInputDir, gxpCoredumpOutputDir, maxGxpDebugDumps, "crashinfo_gxp_platform"); - } -} - void Dumpstate::dumpLogSection(int fd, int fd_bin) { std::string logDir = MODEM_LOG_DIRECTORY; diff --git a/dumpstate/Dumpstate.h b/dumpstate/Dumpstate.h index 18d2b5a9..35fcd934 100644 --- a/dumpstate/Dumpstate.h +++ b/dumpstate/Dumpstate.h @@ -61,7 +61,6 @@ class Dumpstate : public BnDumpstateDevice { // Log sections to be dumped individually into dumpstate_board.bin void dumpRadioLogs(int fd, const std::string &destDir); void dumpGpsLogs(int fd, const std::string &destDir); - void dumpGxpLogs(int fd, const std::string &destDir); // Hybrid and binary sections that require an additional file descriptor void dumpRilLogs(int fd, std::string destDir);