Loading twrp-functions.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ #ifndef TW_EXCLUDE_ENCRYPTED_BACKUPS #include "openaes/inc/oaes_lib.h" #endif #include "cutils/android_reboot.h" extern "C" { #include "libcrecovery/common.h" Loading Loading @@ -524,10 +525,14 @@ int TWFunc::tw_reboot(RebootCommand command) return reboot(RB_AUTOBOOT); case rb_recovery: check_and_run_script("/sbin/rebootrecovery.sh", "reboot recovery"); return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, (void*) "recovery"); property_set(ANDROID_RB_PROPERTY, "reboot,recovery"); sleep(5); return 0; case rb_bootloader: check_and_run_script("/sbin/rebootbootloader.sh", "reboot bootloader"); return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, (void*) "bootloader"); property_set(ANDROID_RB_PROPERTY, "reboot,bootloader"); sleep(5); return 0; case rb_poweroff: check_and_run_script("/sbin/poweroff.sh", "power off"); #ifdef ANDROID_RB_POWEROFF Loading @@ -536,7 +541,9 @@ int TWFunc::tw_reboot(RebootCommand command) return reboot(RB_POWER_OFF); case rb_download: check_and_run_script("/sbin/rebootdownload.sh", "reboot download"); return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, (void*) "download"); property_set(ANDROID_RB_PROPERTY, "reboot,download"); sleep(5); return 0; default: return -1; } Loading Loading
twrp-functions.cpp +10 −3 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ #ifndef TW_EXCLUDE_ENCRYPTED_BACKUPS #include "openaes/inc/oaes_lib.h" #endif #include "cutils/android_reboot.h" extern "C" { #include "libcrecovery/common.h" Loading Loading @@ -524,10 +525,14 @@ int TWFunc::tw_reboot(RebootCommand command) return reboot(RB_AUTOBOOT); case rb_recovery: check_and_run_script("/sbin/rebootrecovery.sh", "reboot recovery"); return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, (void*) "recovery"); property_set(ANDROID_RB_PROPERTY, "reboot,recovery"); sleep(5); return 0; case rb_bootloader: check_and_run_script("/sbin/rebootbootloader.sh", "reboot bootloader"); return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, (void*) "bootloader"); property_set(ANDROID_RB_PROPERTY, "reboot,bootloader"); sleep(5); return 0; case rb_poweroff: check_and_run_script("/sbin/poweroff.sh", "power off"); #ifdef ANDROID_RB_POWEROFF Loading @@ -536,7 +541,9 @@ int TWFunc::tw_reboot(RebootCommand command) return reboot(RB_POWER_OFF); case rb_download: check_and_run_script("/sbin/rebootdownload.sh", "reboot download"); return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, (void*) "download"); property_set(ANDROID_RB_PROPERTY, "reboot,download"); sleep(5); return 0; default: return -1; } Loading