Move modem dump log to gs-common

Bug: 240530709
Test: adb bugreport
and the following file got to dumpstate_board.bin:
extended_log_uim.txt
extended_log_os.txt
nv_normal.bin
nv_protected.bin

Change-Id: I4994cdef97805aa54dbf54b218beea796a6b7969
This commit is contained in:
Adam Shih 2023-03-02 14:10:49 +08:00
parent a759a55943
commit e305d69c78
2 changed files with 0 additions and 24 deletions

View file

@ -29,7 +29,6 @@
#include "DumpstateUtil.h"
#define MODEM_EXTENDED_LOG_DIRECTORY "/data/vendor/radio/extended_logs"
#define RIL_LOG_DIRECTORY "/data/vendor/radio"
#define RIL_LOG_DIRECTORY_PROPERTY "persist.vendor.ril.log.base_dir"
#define RIL_LOG_NUMBER_PROPERTY "persist.vendor.ril.log.num_file"
@ -56,7 +55,6 @@ namespace hardware {
namespace dumpstate {
#define MODEM_LOG_PREFIX "sbuff_"
#define EXTENDED_LOG_PREFIX "extended_log_"
#define RIL_LOG_PREFIX "rild.log."
#define BUFSIZE 65536
#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) {
::android::base::WriteStringToFd(
"\n"
@ -207,7 +192,6 @@ Dumpstate::Dumpstate()
{ "display", [this](int fd) { dumpDisplaySection(fd); } },
},
mLogSections{
{ "modem", [this](int fd, const std::string &destDir) { dumpModemLogs(fd, destDir); } },
{ "radio", [this](int fd, const std::string &destDir) { dumpRadioLogs(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");
}
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) {
std::string tcpdumpLogDir = TCPDUMP_LOG_DIRECTORY;
bool tcpdumpEnabled = ::android::base::GetBoolProperty(TCPDUMP_PERSIST_PROPERTY, false);