diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 5d835fff..231ad50b 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1169,6 +1169,9 @@ bool CPhoneDevice::Reboot(int resetType, bool manually, const std::string& reaso { if (resetType == REBOOT_TYPE_DEVICE) { + std::string fileName = (manually ? "0_" : "1_") + std::to_string(GetMicroTimeStamp()); + fileName = m_appPath + (APP_PATH_TMP DIR_SEP_STR "reboot_") + fileName + std::string(".txt"); + writeFile(fileName, (const unsigned char*)reason.c_str(), reason.size()); // reboot the device if (!manually) { @@ -1183,6 +1186,7 @@ bool CPhoneDevice::Reboot(int resetType, bool manually, const std::string& reaso if (manually) { #ifdef USING_N938 + GpioControl::reboot(); #else RestartApp(resetType, timeout, reason);