use gs-common gps dump
Bug: 273380509 Test: adb bugreport Change-Id: I97ac88eb9b5ade2d5bfa262b00a2818bbbb789bb
This commit is contained in:
parent
77b78a9857
commit
a3c81a57ad
3 changed files with 1 additions and 27 deletions
|
@ -27,6 +27,7 @@ include device/google/gs-common/performance/perf.mk
|
||||||
include device/google/gs-common/display/dump.mk
|
include device/google/gs-common/display/dump.mk
|
||||||
include device/google/gs-common/camera/dump.mk
|
include device/google/gs-common/camera/dump.mk
|
||||||
include device/google/gs-common/gxp/dump.mk
|
include device/google/gs-common/gxp/dump.mk
|
||||||
|
include device/google/gs-common/gps/dump/log.mk
|
||||||
include device/google/gs-common/umfw_stat/umfw_stat.mk
|
include device/google/gs-common/umfw_stat/umfw_stat.mk
|
||||||
|
|
||||||
TARGET_BOARD_PLATFORM := gs201
|
TARGET_BOARD_PLATFORM := gs201
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
#define RIL_LOG_DIRECTORY "/data/vendor/radio"
|
#define RIL_LOG_DIRECTORY "/data/vendor/radio"
|
||||||
#define RIL_LOG_DIRECTORY_PROPERTY "persist.vendor.ril.log.base_dir"
|
#define RIL_LOG_DIRECTORY_PROPERTY "persist.vendor.ril.log.base_dir"
|
||||||
#define RIL_LOG_NUMBER_PROPERTY "persist.vendor.ril.log.num_file"
|
#define RIL_LOG_NUMBER_PROPERTY "persist.vendor.ril.log.num_file"
|
||||||
#define GPS_LOG_DIRECTORY "/data/vendor/gps/logs"
|
|
||||||
#define GPS_LOG_NUMBER_PROPERTY "persist.vendor.gps.aol.log_num"
|
|
||||||
#define GPS_LOGGING_STATUS_PROPERTY "vendor.gps.aol.enabled"
|
|
||||||
|
|
||||||
#define TCPDUMP_LOG_DIRECTORY "/data/vendor/tcpdump_logger/logs"
|
#define TCPDUMP_LOG_DIRECTORY "/data/vendor/tcpdump_logger/logs"
|
||||||
#define TCPDUMP_NUMBER_BUGREPORT "persist.vendor.tcpdump.log.br_num"
|
#define TCPDUMP_NUMBER_BUGREPORT "persist.vendor.tcpdump.log.br_num"
|
||||||
|
@ -53,8 +50,6 @@ namespace android {
|
||||||
namespace hardware {
|
namespace hardware {
|
||||||
namespace dumpstate {
|
namespace dumpstate {
|
||||||
|
|
||||||
#define GPS_LOG_PREFIX "gl-"
|
|
||||||
#define GPS_MCU_LOG_PREFIX "esw-"
|
|
||||||
#define EXTENDED_LOG_PREFIX "extended_log_"
|
#define EXTENDED_LOG_PREFIX "extended_log_"
|
||||||
#define RIL_LOG_PREFIX "rild.log."
|
#define RIL_LOG_PREFIX "rild.log."
|
||||||
#define BUFSIZE 65536
|
#define BUFSIZE 65536
|
||||||
|
@ -198,7 +193,6 @@ Dumpstate::Dumpstate()
|
||||||
},
|
},
|
||||||
mLogSections{
|
mLogSections{
|
||||||
{ "radio", [this](int fd, const std::string &destDir) { dumpRadioLogs(fd, destDir); } },
|
{ "radio", [this](int fd, const std::string &destDir) { dumpRadioLogs(fd, destDir); } },
|
||||||
{ "gps", [this](int fd, const std::string &destDir) { dumpGpsLogs(fd, destDir); } },
|
|
||||||
} {
|
} {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,26 +475,6 @@ void Dumpstate::dumpRadioLogs(int fd, const std::string &destDir) {
|
||||||
dumpNetmgrLogs(destDir);
|
dumpNetmgrLogs(destDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dumpstate::dumpGpsLogs(int fd, const std::string &destDir) {
|
|
||||||
bool gpsLogEnabled = ::android::base::GetBoolProperty(GPS_LOGGING_STATUS_PROPERTY, false);
|
|
||||||
if (!gpsLogEnabled) {
|
|
||||||
ALOGD("gps logging is not running\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const std::string gpsLogDir = GPS_LOG_DIRECTORY;
|
|
||||||
const std::string gpsTmpLogDir = gpsLogDir + "/.tmp";
|
|
||||||
const std::string gpsDestDir = destDir + "/gps";
|
|
||||||
|
|
||||||
int maxFileNum = ::android::base::GetIntProperty(GPS_LOG_NUMBER_PROPERTY, 20);
|
|
||||||
|
|
||||||
RunCommandToFd(fd, "MKDIR GPS LOG", {"/vendor/bin/mkdir", "-p", gpsDestDir.c_str()},
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Dumpstate::dumpLogSection(int fd, int fd_bin)
|
void Dumpstate::dumpLogSection(int fd, int fd_bin)
|
||||||
{
|
{
|
||||||
std::string logDir = MODEM_LOG_DIRECTORY;
|
std::string logDir = MODEM_LOG_DIRECTORY;
|
||||||
|
|
|
@ -60,7 +60,6 @@ class Dumpstate : public BnDumpstateDevice {
|
||||||
|
|
||||||
// Log sections to be dumped individually into dumpstate_board.bin
|
// Log sections to be dumped individually into dumpstate_board.bin
|
||||||
void dumpRadioLogs(int fd, const std::string &destDir);
|
void dumpRadioLogs(int fd, const std::string &destDir);
|
||||||
void dumpGpsLogs(int fd, const std::string &destDir);
|
|
||||||
|
|
||||||
// Hybrid and binary sections that require an additional file descriptor
|
// Hybrid and binary sections that require an additional file descriptor
|
||||||
void dumpRilLogs(int fd, std::string destDir);
|
void dumpRilLogs(int fd, std::string destDir);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue