diff options
31 files changed, 97 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk index df18d7a7a..12b07699e 100755 --- a/Android.mk +++ b/Android.mk @@ -281,6 +281,9 @@ endif ifeq ($(TW_HAS_DOWNLOAD_MODE), true) LOCAL_CFLAGS += -DTW_HAS_DOWNLOAD_MODE endif +ifeq ($(TW_HAS_EDL_MODE), true) + LOCAL_CFLAGS += -DTW_HAS_EDL_MODE +endif ifeq ($(TW_NO_SCREEN_BLANK), true) LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK endif @@ -722,6 +722,10 @@ void DataManager::SetDefaultValues() printf("TW_HAS_DOWNLOAD_MODE := true\n"); mConst.SetValue(TW_DOWNLOAD_MODE, "1"); #endif +#ifdef TW_HAS_EDL_MODE + printf("TW_HAS_EDL_MODE := true\n"); + mConst.SetValue(TW_EDL_MODE, "1"); +#endif #ifdef TW_INCLUDE_CRYPTO mConst.SetValue(TW_HAS_CRYPTO, "1"); printf("TW_INCLUDE_CRYPTO := true\n"); diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml index d1bce168d..6df886256 100755 --- a/gui/theme/common/landscape.xml +++ b/gui/theme/common/landscape.xml @@ -2705,6 +2705,25 @@ </actions> </button> + <button style="main_button"> + <condition var1="tw_edl_mode" var2="1"/> + <placement x="%center_x%" y="%row11_y%"/> + <text>{@rb_edl_btn=Edl}</text> + <actions> + <action function="set">tw_back=reboot</action> + <action function="set">tw_action=reboot</action> + <action function="set">tw_action_param=edl</action> + <action function="set">tw_reboot_param=edl</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action> + <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action> + <action function="set">tw_action_text1={@rebooting=Rebooting...}</action> + <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action> + <action function="set">tw_slider_text={@swipe_reboot=Swipe to Reboot}</action> + <action function="page">rebootcheck</action> + </actions> + </button> + <action> <touch key="home"/> <action function="page">main</action> diff --git a/gui/theme/common/languages/cz.xml b/gui/theme/common/languages/cz.xml index 4ba5c2cf9..7f7fc3cb6 100644 --- a/gui/theme/common/languages/cz.xml +++ b/gui/theme/common/languages/cz.xml @@ -262,6 +262,7 @@ <string name="rb_recovery_btn">Recovery</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Stáhnout</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Vypínání...</string> <string name="swipe_power_off">Potáhnout pro vypnutí</string> <string name="swipe_power_off_s">Vypnout</string> diff --git a/gui/theme/common/languages/de.xml b/gui/theme/common/languages/de.xml index 6ff801457..56f7ebd92 100644 --- a/gui/theme/common/languages/de.xml +++ b/gui/theme/common/languages/de.xml @@ -283,6 +283,7 @@ <string name="rb_recovery_btn">Recovery</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Download</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Ausschalten...</string> <string name="swipe_power_off">Gerät ausschalten</string> <string name="swipe_power_off_s">Ausschalten</string> diff --git a/gui/theme/common/languages/el.xml b/gui/theme/common/languages/el.xml index ffb960f5f..8ac681d2d 100644 --- a/gui/theme/common/languages/el.xml +++ b/gui/theme/common/languages/el.xml @@ -273,6 +273,7 @@ <string name="rb_recovery_btn">Recovery</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Λήψη</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Απενεργοποίηση...</string> <string name="swipe_power_off">Σύρετε για Απενεργοποίηση</string> <string name="swipe_power_off_s">Απενεργοποίηση</string> diff --git a/gui/theme/common/languages/en.xml b/gui/theme/common/languages/en.xml index f8de66221..e61f6c0a8 100755 --- a/gui/theme/common/languages/en.xml +++ b/gui/theme/common/languages/en.xml @@ -288,6 +288,7 @@ <string name="rb_recovery_btn">Recovery</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Download</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Turning Off...</string> <string name="swipe_power_off">Swipe to Power Off</string> <string name="swipe_power_off_s">Power Off</string> diff --git a/gui/theme/common/languages/es.xml b/gui/theme/common/languages/es.xml index 1f200618e..e096e660f 100644 --- a/gui/theme/common/languages/es.xml +++ b/gui/theme/common/languages/es.xml @@ -263,6 +263,7 @@ <string name="rb_recovery_btn">Recovery</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Descarga</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Apagando...</string> <string name="swipe_power_off">Deslice para Apagar</string> <string name="swipe_power_off_s">Apagar</string> diff --git a/gui/theme/common/languages/fr.xml b/gui/theme/common/languages/fr.xml index 61516a8db..6ae3298ef 100644 --- a/gui/theme/common/languages/fr.xml +++ b/gui/theme/common/languages/fr.xml @@ -260,6 +260,7 @@ <string name="rb_recovery_btn">Récupération</string> <string name="rb_bootloader_btn">Amorçage</string> <string name="rb_download_btn">Télécharger</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Arrêt en cours...</string> <string name="swipe_power_off">Glisser pour éteindre</string> <string name="swipe_power_off_s">Éteindre</string> diff --git a/gui/theme/common/languages/hu.xml b/gui/theme/common/languages/hu.xml index 6141cdeea..96557ac7c 100644 --- a/gui/theme/common/languages/hu.xml +++ b/gui/theme/common/languages/hu.xml @@ -283,6 +283,7 @@ <string name="rb_recovery_btn">Recovery</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Download mód</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Kikapcsolás...</string> <string name="swipe_power_off">Csúsztasson a kikapcsoláshoz</string> <string name="swipe_power_off_s">Kikapcsolás</string> diff --git a/gui/theme/common/languages/it.xml b/gui/theme/common/languages/it.xml index 6d56e80c7..ec74d59a5 100644 --- a/gui/theme/common/languages/it.xml +++ b/gui/theme/common/languages/it.xml @@ -283,6 +283,7 @@ <string name="rb_recovery_btn">Recovery</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Download</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Spegnimento in corso...</string> <string name="swipe_power_off">Scorri per spegnere</string> <string name="swipe_power_off_s">Spegni</string> diff --git a/gui/theme/common/languages/nl.xml b/gui/theme/common/languages/nl.xml index f5ec9bb5a..8dadd40ac 100644 --- a/gui/theme/common/languages/nl.xml +++ b/gui/theme/common/languages/nl.xml @@ -270,6 +270,7 @@ <string name="rb_recovery_btn">Recovery</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Download</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Uitschakelen...</string> <string name="swipe_power_off">Veeg om uit te schakelen</string> <string name="swipe_power_off_s">Uitschakelen</string> diff --git a/gui/theme/common/languages/pl.xml b/gui/theme/common/languages/pl.xml index a67de0694..e337455a7 100644 --- a/gui/theme/common/languages/pl.xml +++ b/gui/theme/common/languages/pl.xml @@ -270,6 +270,7 @@ <string name="rb_recovery_btn">Recovery</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Download</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Wyłączanie...</string> <string name="swipe_power_off">Przesuń, aby wyłączyć</string> <string name="swipe_power_off_s">Wyłącz</string> diff --git a/gui/theme/common/languages/pt_BR.xml b/gui/theme/common/languages/pt_BR.xml index 88deb0c23..f540e4c45 100644 --- a/gui/theme/common/languages/pt_BR.xml +++ b/gui/theme/common/languages/pt_BR.xml @@ -262,6 +262,7 @@ <string name="rb_recovery_btn">Recuperação</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Baixar</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Desligar...</string> <string name="swipe_power_off">Deslize para desligar</string> <string name="swipe_power_off_s">Desligar</string> diff --git a/gui/theme/common/languages/pt_PT.xml b/gui/theme/common/languages/pt_PT.xml index 6b5bc6c18..40ef41f8b 100644 --- a/gui/theme/common/languages/pt_PT.xml +++ b/gui/theme/common/languages/pt_PT.xml @@ -284,6 +284,7 @@ <string name="rb_recovery_btn">Recovery</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Descarregar</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">A desligar...</string> <string name="swipe_power_off"> Deslize para desligar</string> <string name="swipe_power_off_s">Desligar</string> diff --git a/gui/theme/common/languages/ru.xml b/gui/theme/common/languages/ru.xml index ba4d93012..95fd3718a 100644 --- a/gui/theme/common/languages/ru.xml +++ b/gui/theme/common/languages/ru.xml @@ -280,6 +280,7 @@ <string name="rb_recovery_btn">Рекавери</string> <string name="rb_bootloader_btn">Загрузчик</string> <string name="rb_download_btn">Режим загрузки</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Выключение...</string> <string name="swipe_power_off">Свайп для выключения</string> <string name="swipe_power_off_s">Выключение</string> diff --git a/gui/theme/common/languages/sk.xml b/gui/theme/common/languages/sk.xml index b8e2fc52c..f4e56ef99 100644 --- a/gui/theme/common/languages/sk.xml +++ b/gui/theme/common/languages/sk.xml @@ -262,6 +262,7 @@ <string name="rb_recovery_btn">Recovery</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Stiahnuť</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Vypínanie...</string> <string name="swipe_power_off">Potiahnite pre vypnutie</string> <string name="swipe_power_off_s">Vypnúť</string> diff --git a/gui/theme/common/languages/sl.xml b/gui/theme/common/languages/sl.xml index 5b0853e9e..4259e625d 100644 --- a/gui/theme/common/languages/sl.xml +++ b/gui/theme/common/languages/sl.xml @@ -262,6 +262,7 @@ <string name="rb_recovery_btn">Obnovitev</string> <string name="rb_bootloader_btn">Zagonski nalagalnik</string> <string name="rb_download_btn">Prejmi</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Izklapljanje …</string> <string name="swipe_power_off">Povlecite za izklop</string> <string name="swipe_power_off_s">Izklopi</string> diff --git a/gui/theme/common/languages/sv.xml b/gui/theme/common/languages/sv.xml index eadc18d8c..c89895778 100644 --- a/gui/theme/common/languages/sv.xml +++ b/gui/theme/common/languages/sv.xml @@ -101,6 +101,7 @@ <string name="rb_system_btn">System</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Ladda ner</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Stänger av...</string> <string name="settings_hdr">Inställningar</string> <string name="settings_gen_s_hdr">Allmänt</string> diff --git a/gui/theme/common/languages/tr.xml b/gui/theme/common/languages/tr.xml index 4c10fdf47..8e924cb57 100644 --- a/gui/theme/common/languages/tr.xml +++ b/gui/theme/common/languages/tr.xml @@ -284,6 +284,7 @@ <string name="rb_recovery_btn">Recovery</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Download</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Kapatılıyor...</string> <string name="swipe_power_off">Kapatmak için Kaydır</string> <string name="swipe_power_off_s">Kapat</string> diff --git a/gui/theme/common/languages/uk.xml b/gui/theme/common/languages/uk.xml index a3ea7ddd8..9b267d26e 100644 --- a/gui/theme/common/languages/uk.xml +++ b/gui/theme/common/languages/uk.xml @@ -266,6 +266,7 @@ <string name="rb_recovery_btn">Рекавері</string> <string name="rb_bootloader_btn">Завантажувач</string> <string name="rb_download_btn">Режим завантаження</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">Вимкнення...</string> <string name="swipe_power_off">Вимкнути</string> <string name="swipe_power_off_s">Вимкнення</string> diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml index 1cf4d8980..c2d32dd3e 100755 --- a/gui/theme/common/portrait.xml +++ b/gui/theme/common/portrait.xml @@ -2862,6 +2862,25 @@ </actions> </button> + <button style="main_button"> + <condition var1="tw_edl_mode" var2="1"/> + <placement x="%center_x%" y="%row13a_y%"/> + <text>{@rb_edl_btn=Edl}</text> + <actions> + <action function="set">tw_back=reboot</action> + <action function="set">tw_action=reboot</action> + <action function="set">tw_action_param=edl</action> + <action function="set">tw_reboot_param=edl</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action> + <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action> + <action function="set">tw_action_text1={@rebooting=Rebooting...}</action> + <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action> + <action function="set">tw_slider_text={@swipe_reboot=Swipe to Reboot}</action> + <action function="page">rebootcheck</action> + </actions> + </button> + <text style="text_m"> <condition var1="tw_has_boot_slots" var2="1"/> <placement x="%center_x%" y="%row17_y%" placement="5"/> diff --git a/gui/theme/common/watch.xml b/gui/theme/common/watch.xml index 56bdc5534..0c30a3499 100755 --- a/gui/theme/common/watch.xml +++ b/gui/theme/common/watch.xml @@ -3359,6 +3359,24 @@ <action function="page">rebootcheck</action> </actions> </button> + <button style="main_button"> + <condition var1="tw_edl_mode" var2="1"/> + <placement x="%col1_x_right%" y="%row11_y%"/> + <text>{@rb_edl_btn=Edl}</text> + <actions> + <action function="set">tw_back=reboot</action> + <action function="set">tw_action=reboot</action> + <action function="set">tw_action_param=edl</action> + <action function="set">tw_reboot_param=edl</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1={@no_os1=No OS Installed! Are you}</action> + <action function="set">tw_text2={@no_osrb=sure you wish to reboot?}</action> + <action function="set">tw_action_text1={@rebooting=Rebooting...}</action> + <action function="set">tw_complete_text1={@rebooting=Rebooting...}</action> + <action function="set">tw_slider_text={@swipe_reboot_s= Reboot}</action> + <action function="page">rebootcheck</action> + </actions> + </button> <action> <touch key="home"/> diff --git a/gui/theme/extra-languages/languages/ja.xml b/gui/theme/extra-languages/languages/ja.xml index 37d3e7c7d..977b1708b 100644 --- a/gui/theme/extra-languages/languages/ja.xml +++ b/gui/theme/extra-languages/languages/ja.xml @@ -265,6 +265,7 @@ <string name="rb_recovery_btn">リカバリ</string> <string name="rb_bootloader_btn">ブートローダー</string> <string name="rb_download_btn">ダウンロード</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">電源を切っています...</string> <string name="swipe_power_off">スワイプで電源を切る</string> <string name="swipe_power_off_s">電源を切る</string> diff --git a/gui/theme/extra-languages/languages/zh_CN.xml b/gui/theme/extra-languages/languages/zh_CN.xml index 5c214a569..944be48b2 100644 --- a/gui/theme/extra-languages/languages/zh_CN.xml +++ b/gui/theme/extra-languages/languages/zh_CN.xml @@ -283,6 +283,7 @@ <string name="rb_recovery_btn">Recovery</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Download</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">正在关机…</string> <string name="swipe_power_off">滑动按钮确认关机</string> <string name="swipe_power_off_s">关机</string> diff --git a/gui/theme/extra-languages/languages/zh_TW.xml b/gui/theme/extra-languages/languages/zh_TW.xml index 75c717ac4..fc80862c6 100644 --- a/gui/theme/extra-languages/languages/zh_TW.xml +++ b/gui/theme/extra-languages/languages/zh_TW.xml @@ -283,6 +283,7 @@ <string name="rb_recovery_btn">Recovery</string> <string name="rb_bootloader_btn">Bootloader</string> <string name="rb_download_btn">Download</string> + <string name="rb_edl_btn">Edl</string> <string name="turning_off">正在關機…</string> <string name="swipe_power_off">滑動按鈕確認關機</string> <string name="swipe_power_off_s">關機</string> diff --git a/openrecoveryscript.cpp b/openrecoveryscript.cpp index d4d4da514..9478cd751 100755 --- a/openrecoveryscript.cpp +++ b/openrecoveryscript.cpp @@ -343,6 +343,8 @@ int OpenRecoveryScript::run_script_file(void) { TWFunc::tw_reboot(rb_bootloader); else if (strlen(value) && strcmp(value, "download") == 0) TWFunc::tw_reboot(rb_download); + else if (strlen(value) && strcmp(value, "edl") == 0) + TWFunc::tw_reboot(rb_edl); else TWFunc::tw_reboot(rb_system); } else if (strcmp(command, "cmd") == 0) { diff --git a/twrp-functions.cpp b/twrp-functions.cpp index 37dd0df48..ff34828e2 100755 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -626,6 +626,13 @@ int TWFunc::tw_reboot(RebootCommand command) #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; } diff --git a/twrp-functions.hpp b/twrp-functions.hpp index 7847aed4a..efaa460d9 100755 --- a/twrp-functions.hpp +++ b/twrp-functions.hpp @@ -37,6 +37,7 @@ typedef enum rb_poweroff, rb_bootloader, // May also be fastboot rb_download, + rb_edl, } RebootCommand; enum Archive_Type { @@ -345,6 +345,8 @@ int main(int argc, char **argv) { TWFunc::tw_reboot(rb_bootloader); else if (Reboot_Arg == "download") TWFunc::tw_reboot(rb_download); + else if (Reboot_Arg == "edl") + TWFunc::tw_reboot(rb_edl); else TWFunc::tw_reboot(rb_system); diff --git a/variables.h b/variables.h index 22eb5c94d..3b614326a 100644 --- a/variables.h +++ b/variables.h @@ -129,6 +129,7 @@ #define TW_MIN_SYSTEM_SIZE "50" // minimum system size to allow a reboot #define TW_MIN_SYSTEM_VAR "tw_min_system" #define TW_DOWNLOAD_MODE "tw_download_mode" +#define TW_EDL_MODE "tw_edl_mode" #define TW_IS_ENCRYPTED "tw_is_encrypted" #define TW_IS_DECRYPTED "tw_is_decrypted" #define TW_CRYPTO_PWTYPE "tw_crypto_pwtype" |