From 67351dca6670d3566405cb8e610f73a1550d282b Mon Sep 17 00:00:00 2001 From: Vojtech Bocek Date: Thu, 3 Jul 2014 15:22:41 +0200 Subject: Check the crash counter instead of date in TWFunc::Fixup_Time_On_Boot() * Some devices (Sony) have RTC counting up from year 2009, Change-Id: I2cf1928e1b05c7e8b184963f8130582e0319ddc4 Signed-off-by: Vojtech Bocek --- twrp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'twrp.cpp') diff --git a/twrp.cpp b/twrp.cpp index b67631ea8..3e0fc9b9a 100644 --- a/twrp.cpp +++ b/twrp.cpp @@ -273,7 +273,8 @@ int main(int argc, char **argv) { DataManager::ReadSettingsFile(); // Fixup the RTC clock on devices which require it - TWFunc::Fixup_Time_On_Boot(); + if(crash_counter == 0) + TWFunc::Fixup_Time_On_Boot(); // Run any outstanding OpenRecoveryScript if (DataManager::GetIntValue(TW_IS_ENCRYPTED) == 0 && (TWFunc::Path_Exists(SCRIPT_FILE_TMP) || TWFunc::Path_Exists(SCRIPT_FILE_CACHE))) { -- cgit v1.2.3