Merge "Move modem dump log to gs-common" into udc-dev

This commit is contained in:
Adam Shih 2023-03-06 07:33:19 +00:00 committed by Android (Google) Code Review
commit 5c2d07e775
2 changed files with 0 additions and 24 deletions

View file

@ -29,7 +29,6 @@
#include "DumpstateUtil.h" #include "DumpstateUtil.h"
#define MODEM_EXTENDED_LOG_DIRECTORY "/data/vendor/radio/extended_logs"
#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"
@ -56,7 +55,6 @@ namespace hardware {
namespace dumpstate { namespace dumpstate {
#define MODEM_LOG_PREFIX "sbuff_" #define MODEM_LOG_PREFIX "sbuff_"
#define EXTENDED_LOG_PREFIX "extended_log_"
#define RIL_LOG_PREFIX "rild.log." #define RIL_LOG_PREFIX "rild.log."
#define BUFSIZE 65536 #define BUFSIZE 65536
#define TCPDUMP_LOG_PREFIX "tcpdump" #define TCPDUMP_LOG_PREFIX "tcpdump"
@ -169,19 +167,6 @@ void dumpNetmgrLogs(std::string destDir) {
} }
} }
/** Dumps last synced NV data into bugreports */
void dumpModemEFS(std::string destDir) {
const std::string EFS_DIRECTORY = "/mnt/vendor/efs/";
const std::vector <std::string> nv_files
{
EFS_DIRECTORY+"nv_normal.bin",
EFS_DIRECTORY+"nv_protected.bin",
};
for (const auto& logFile : nv_files) {
copyFile(logFile, destDir + "/" + basename(logFile.c_str()));
}
}
timepoint_t startSection(int fd, const std::string &sectionName) { timepoint_t startSection(int fd, const std::string &sectionName) {
::android::base::WriteStringToFd( ::android::base::WriteStringToFd(
"\n" "\n"
@ -207,7 +192,6 @@ Dumpstate::Dumpstate()
{ "display", [this](int fd) { dumpDisplaySection(fd); } }, { "display", [this](int fd) { dumpDisplaySection(fd); } },
}, },
mLogSections{ mLogSections{
{ "modem", [this](int fd, const std::string &destDir) { dumpModemLogs(fd, destDir); } },
{ "radio", [this](int fd, const std::string &destDir) { dumpRadioLogs(fd, destDir); } }, { "radio", [this](int fd, const std::string &destDir) { dumpRadioLogs(fd, destDir); } },
{ "camera", [this](int fd, const std::string &destDir) { dumpCameraLogs(fd, destDir); } }, { "camera", [this](int fd, const std::string &destDir) { dumpCameraLogs(fd, destDir); } },
} { } {
@ -301,13 +285,6 @@ void Dumpstate::dumpDisplaySection(int fd) {
DumpFileToFd(fd, "Secondary panel extra info", "/sys/devices/platform/exynos-drm/secondary-panel/panel_extinfo"); DumpFileToFd(fd, "Secondary panel extra info", "/sys/devices/platform/exynos-drm/secondary-panel/panel_extinfo");
} }
void Dumpstate::dumpModemLogs(int fd, const std::string &destDir) {
std::string extendedLogDir = MODEM_EXTENDED_LOG_DIRECTORY;
dumpLogs(fd, extendedLogDir, destDir, 20, EXTENDED_LOG_PREFIX);
dumpModemEFS(destDir);
}
void Dumpstate::dumpRadioLogs(int fd, const std::string &destDir) { void Dumpstate::dumpRadioLogs(int fd, const std::string &destDir) {
std::string tcpdumpLogDir = TCPDUMP_LOG_DIRECTORY; std::string tcpdumpLogDir = TCPDUMP_LOG_DIRECTORY;
bool tcpdumpEnabled = ::android::base::GetBoolProperty(TCPDUMP_PERSIST_PROPERTY, false); bool tcpdumpEnabled = ::android::base::GetBoolProperty(TCPDUMP_PERSIST_PROPERTY, false);

View file

@ -57,7 +57,6 @@ class Dumpstate : public BnDumpstateDevice {
void dumpLogSection(int fd, int fdModem); void dumpLogSection(int fd, int fdModem);
// Log sections to be dumped individually into dumpstate_board.bin // Log sections to be dumped individually into dumpstate_board.bin
void dumpModemLogs(int fd, const std::string &destDir);
void dumpRadioLogs(int fd, const std::string &destDir); void dumpRadioLogs(int fd, const std::string &destDir);
void dumpCameraLogs(int fd, const std::string &destDir); void dumpCameraLogs(int fd, const std::string &destDir);