Collect modem always on log

Bug: 36820568
Test: Trigger bugreport when always on is enabled
Change-Id: I6d61a7284b5a5035c68398fad629628e4ad3216c
This commit is contained in:
Jie Song
2017-04-05 20:56:52 -07:00
parent 21ec03152e
commit a8cc3ddf43

View File

@@ -58,6 +58,7 @@ static void getModemLogs(int fd)
CommandOptions options = CommandOptions::WithTimeout(120).Build();
std::string modemLogAllDir = modemLogDir + "/modem_log";
std::string qdbFile = "/firmware/image/qdsp6m.qdb";
std::string alwaysOnLogs = "/data/vendor/radio/diag_logs/always_on";
std::vector<std::string> rilAndNetmgrLogs
{
"/data/misc/radio/ril_log",
@@ -76,6 +77,10 @@ static void getModemLogs(int fd)
RunCommandToFd(fd, "CP QDB FILE", { "/system/bin/sh", "-c", copyCmd.c_str()}, options);
}
// Get always on logs
std::string copyCmd= "/system/bin/cp -rf " + alwaysOnLogs + " " + modemLogAllDir;
RunCommandToFd(fd, "CP ALWAYS ON LOGS", { "/system/bin/sh", "-c", copyCmd.c_str()}, options);
for (std::string logFile : rilAndNetmgrLogs)
{
std::string copyCmd= "/system/bin/cp " + logFile + " " + modemLogAllDir;