From e9a49efe75918183a32164fea91ddddf65ce7964 Mon Sep 17 00:00:00 2001 From: mauronofrio Date: Wed, 3 Oct 2018 13:38:16 +0200 Subject: Adding Edl button in reboot menu Edl mode is available only on qualcomm devices and it used to fully restore the bricked devices. I made the button available only if TW_HAS_EDL_MODE := true like the download button. I set the edl button to the right of the download button, so devices can support edl button and download button. I also added the translation for all languages. Change-Id: I69d1058b8c050b722395c7b3da6dce1ccfbe7a91 --- twrp-functions.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'twrp-functions.cpp') diff --git a/twrp-functions.cpp b/twrp-functions.cpp index 37dd0df48..ff34828e2 100755 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -625,6 +625,13 @@ int TWFunc::tw_reboot(RebootCommand command) return property_set(ANDROID_RB_PROPERTY, "reboot,download"); #else return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, (void*) "download"); +#endif + case rb_edl: + check_and_run_script("/sbin/rebootedl.sh", "reboot edl"); +#ifdef ANDROID_RB_PROPERTY + return property_set(ANDROID_RB_PROPERTY, "reboot,edl"); +#else + return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, (void*) "edl"); #endif default: return -1; -- cgit v1.2.3