gps: Add MCU crash dump in bugreport am: fd3d41ae0a

Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/14762970

Change-Id: I1c31072686c7dce7fec0bc5ed3660a1792eed757
This commit is contained in:
Shinru Han 2021-06-02 03:27:29 +00:00 committed by Automerger Merge Worker
commit f68a33df7c
2 changed files with 9 additions and 3 deletions

View file

@ -63,6 +63,7 @@ namespace V1_1 {
namespace implementation { namespace implementation {
#define GPS_LOG_PREFIX "gl-" #define GPS_LOG_PREFIX "gl-"
#define GPS_MCU_LOG_PREFIX "esw-"
#define MODEM_LOG_PREFIX "sbuff_" #define MODEM_LOG_PREFIX "sbuff_"
#define EXTENDED_LOG_PREFIX "extended_log_" #define EXTENDED_LOG_PREFIX "extended_log_"
#define RIL_LOG_PREFIX "rild.log." #define RIL_LOG_PREFIX "rild.log."
@ -193,10 +194,15 @@ void dumpModemEFS(std::string destDir) {
void DumpstateDevice::dumpGpsLogs(int fd, std::string destDir) { void DumpstateDevice::dumpGpsLogs(int fd, std::string destDir) {
const std::string gpsLogDir = GPS_LOG_DIRECTORY; const std::string gpsLogDir = GPS_LOG_DIRECTORY;
const std::string gpsTmpLogDir = gpsLogDir + "/.tmp"; const std::string gpsTmpLogDir = gpsLogDir + "/.tmp";
const std::string gpsDestDir = destDir + "/gps";
int maxFileNum = android::base::GetIntProperty(GPS_LOG_NUMBER_PROPERTY, 30); int maxFileNum = android::base::GetIntProperty(GPS_LOG_NUMBER_PROPERTY, 30);
dumpLogs(fd, gpsTmpLogDir, destDir, 1, GPS_LOG_PREFIX); RunCommandToFd(fd, "MKDIR GPS LOG", {"/vendor/bin/mkdir", "-p", gpsDestDir.c_str()},
dumpLogs(fd, gpsLogDir, destDir, maxFileNum, GPS_LOG_PREFIX); CommandOptions::WithTimeout(2).Build());
dumpLogs(fd, gpsTmpLogDir, gpsDestDir, 1, GPS_LOG_PREFIX);
dumpLogs(fd, gpsLogDir, gpsDestDir, 3, GPS_MCU_LOG_PREFIX);
dumpLogs(fd, gpsLogDir, gpsDestDir, maxFileNum, GPS_LOG_PREFIX);
} }
timepoint_t startSection(int fd, const std::string &sectionName) { timepoint_t startSection(int fd, const std::string &sectionName) {

View file

@ -1,5 +1,5 @@
LheConsole=/data/vendor/gps/LheConsole LheConsole=/data/vendor/gps/LheConsole
LogEnabled=true LogEnabled=true
Log=JAVA Log=JAVA
LheFailSafe=/data/vendor/gps/esw-crash-dump.txt LheFailSafe=/data/vendor/gps/logs/esw-crash-dump.txt