mirror of
https://github.com/Evolution-X-Devices/device_google_redfin
synced 2026-02-01 11:26:33 +00:00
dumpstate: adjust timing of disable and enable mdlog
Bug: 169662280 The timing of dumpstate to enable diag_mdlog is too marginal to diag_mdlog process exiting. The starting of diag_mdlog would fail if diag_mdlog process still exists. Change is to leave some time for diag_mdlog process to exit before it is enabled again by modifying the system property vendor.sys.modem.diag.mdlog to true. Change-Id: I825cd77e3f6e8fe6ce395cbe2c21974f1cb29d02
This commit is contained in:
@@ -391,22 +391,10 @@ static void *dumpModemThread(void *data)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
ALOGD("Waited modem for 1 second to flush logs");
|
||||
|
||||
const std::string modemLogCombined = modemLogDir + "/" + filePrefix + "all.tar";
|
||||
const std::string modemLogAllDir = modemLogDir + "/modem_log";
|
||||
|
||||
RunCommandToFd(STDOUT_FILENO, "MKDIR MODEM LOG", {"/vendor/bin/mkdir", "-p", modemLogAllDir.c_str()}, CommandOptions::WithTimeout(2).Build());
|
||||
|
||||
const std::string diagLogDir = "/data/vendor/radio/diag_logs/logs";
|
||||
const std::string diagPoweronLogPath = "/data/vendor/radio/diag_logs/logs/diag_poweron_log.qmdl";
|
||||
|
||||
bool diagLogEnabled = android::base::GetBoolProperty(DIAG_MDLOG_PERSIST_PROPERTY, false);
|
||||
bool diagLogStarted = android::base::GetBoolProperty(DIAG_MDLOG_STATUS_PROPERTY, false);
|
||||
|
||||
if (diagLogEnabled) {
|
||||
bool diagLogStarted = android::base::GetBoolProperty( DIAG_MDLOG_STATUS_PROPERTY, false);
|
||||
|
||||
if (diagLogStarted) {
|
||||
android::base::SetProperty(DIAG_MDLOG_PROPERTY, "false");
|
||||
ALOGD("Stopping diag_mdlog...\n");
|
||||
@@ -418,7 +406,20 @@ static void *dumpModemThread(void *data)
|
||||
} else {
|
||||
ALOGD("diag_mdlog is not running");
|
||||
}
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
ALOGD("Waited modem for 1 second to flush logs");
|
||||
|
||||
const std::string modemLogCombined = modemLogDir + "/" + filePrefix + "all.tar";
|
||||
const std::string modemLogAllDir = modemLogDir + "/modem_log";
|
||||
|
||||
RunCommandToFd(STDOUT_FILENO, "MKDIR MODEM LOG", {"/vendor/bin/mkdir", "-p", modemLogAllDir.c_str()}, CommandOptions::WithTimeout(2).Build());
|
||||
|
||||
const std::string diagLogDir = "/data/vendor/radio/diag_logs/logs";
|
||||
const std::string diagPoweronLogPath = "/data/vendor/radio/diag_logs/logs/diag_poweron_log.qmdl";
|
||||
|
||||
if (diagLogEnabled) {
|
||||
dumpLogs(STDOUT_FILENO, diagLogDir, modemLogAllDir, android::base::GetIntProperty(DIAG_MDLOG_NUMBER_BUGREPORT, 100), DIAG_LOG_PREFIX);
|
||||
|
||||
if (diagLogStarted) {
|
||||
|
||||
Reference in New Issue
Block a user