diff options
Diffstat (limited to 'fastboot/fastboot.cpp')
-rw-r--r-- | fastboot/fastboot.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp index 321e6bad7..fb06d19ee 100644 --- a/fastboot/fastboot.cpp +++ b/fastboot/fastboot.cpp @@ -1333,6 +1333,8 @@ int FastBootTool::Main(int argc, char* argv[]) { bool wants_wipe = false; bool wants_reboot = false; bool wants_reboot_bootloader = false; + bool wants_reboot_recovery = false; + bool wants_reboot_fastboot = false; bool skip_reboot = false; bool wants_set_active = false; bool skip_secondary = false; @@ -1555,6 +1557,12 @@ int FastBootTool::Main(int argc, char* argv[]) { if (what == "bootloader") { wants_reboot = false; wants_reboot_bootloader = true; + } else if (what == "recovery") { + wants_reboot = false; + wants_reboot_recovery = true; + } else if (what == "fastboot") { + wants_reboot = false; + wants_reboot_fastboot = true; } else { syntax_error("unknown reboot target %s", what.c_str()); } @@ -1563,6 +1571,10 @@ int FastBootTool::Main(int argc, char* argv[]) { if (!args.empty()) syntax_error("junk after reboot command"); } else if (command == "reboot-bootloader") { wants_reboot_bootloader = true; + } else if (command == "reboot-recovery") { + wants_reboot_recovery = true; + } else if (command == "reboot-fastboot") { + wants_reboot_fastboot = true; } else if (command == "continue") { fb_queue_command("continue", "resuming boot"); } else if (command == "boot") { @@ -1680,6 +1692,12 @@ int FastBootTool::Main(int argc, char* argv[]) { } else if (wants_reboot_bootloader) { fb_queue_command("reboot-bootloader", "rebooting into bootloader"); fb_queue_wait_for_disconnect(); + } else if (wants_reboot_recovery) { + fb_queue_command("reboot-recovery", "rebooting into recovery"); + fb_queue_wait_for_disconnect(); + } else if (wants_reboot_fastboot) { + fb_queue_command("reboot-fastboot", "rebooting into fastboot"); + fb_queue_wait_for_disconnect(); } int status = fb_execute_queue() ? EXIT_FAILURE : EXIT_SUCCESS; |