From 98fc399c2660727a6bde66e1a51e8460aaf3c7e7 Mon Sep 17 00:00:00 2001 From: nkk71 Date: Sat, 16 Dec 2017 16:26:42 +0200 Subject: Use /persist as Qualcomm time fix source during early boot * /persist can be mounted early while TWRP is parsing the fstab so as soon as the partition is parsed, mount and adjust the time accordingly. * Store a backup settings file on /persist. Having a 2nd copy of the settings file in the /persist partition allows for early reading of the file and adjust timezone and brightness to user preference while still on TWRP splash. * Add the qcom ats time offset in TWRP settings file and use it if no better ats file is found. This will also allow devices with a persist partition, but no ats files in it, to adjust the time offset during early boot. * Use /persist/time/ as Qualcomm time fix source, based on Xuefer patch: https://gerrit.omnirom.org/c/27265/ https://gerrit.omnirom.org/c/24384/ Change-Id: I6c21538eec58d87edfb639d9ce3871f33b886c1d --- twrp-functions.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'twrp-functions.hpp') diff --git a/twrp-functions.hpp b/twrp-functions.hpp index 9c149ea18..a1f67f237 100644 --- a/twrp-functions.hpp +++ b/twrp-functions.hpp @@ -88,7 +88,7 @@ public: static string System_Property_Get(string Prop_Name); // Returns value of Prop_Name from reading /system/build.prop static string Get_Current_Date(void); // Returns the current date in ccyy-m-dd--hh-nn-ss format static void Auto_Generate_Backup_Name(); // Populates TW_BACKUP_NAME with a backup name based on current date and ro.build.display.id from /system/build.prop - static void Fixup_Time_On_Boot(); // Fixes time on devices which need it + static void Fixup_Time_On_Boot(const string& time_paths = ""); // Fixes time on devices which need it (time_paths is a space separated list of paths to check for ats_* files) static std::vector Split_String(const std::string& str, const std::string& delimiter, bool removeEmpty = true); // Splits string by delimiter static bool Create_Dir_Recursive(const std::string& path, mode_t mode = 0755, uid_t uid = -1, gid_t gid = -1); // Create directory and it's parents, if they don't exist. mode, uid and gid are set to all _newly_ created folders. If whole path exists, do nothing. static int Set_Brightness(std::string brightness_value); // Well, you can read, it does what it says, passing return int from TWFunc::Write_File ;) -- cgit v1.2.3