diff options
author | Tao Bao <tbao@google.com> | 2019-04-19 15:22:15 -0700 |
---|---|---|
committer | xunchang <xunchang@google.com> | 2019-04-23 23:50:12 -0700 |
commit | 10f441a9dbb91be3124f455439631abcf8e96cde (patch) | |
tree | 0ec415f456c6cd2812cd59a52f1261e5f4e1ca49 /recovery_main.cpp | |
parent | c92f412b8da1fe0887e9ed435897169a6804c1ac (diff) |
minadbd: Support `adb reboot` under sideload/rescue modes.
Bug: 128415917
Test: Run the following commands under sideload and rescue modes
respectively.
$ adb reboot
$ adb reboot bootloader
$ adb reboot recovery
$ adb reboot rescue
$ adb reboot invalid
Change-Id: I84daf63e3360b7b4a0af5e055149a4f54e10ba90
Diffstat (limited to 'recovery_main.cpp')
-rw-r--r-- | recovery_main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/recovery_main.cpp b/recovery_main.cpp index 37d9da0d..0eb2962e 100644 --- a/recovery_main.cpp +++ b/recovery_main.cpp @@ -477,6 +477,11 @@ int main(int argc, char** argv) { android::base::SetProperty(ANDROID_RB_PROPERTY, "reboot,bootloader"); break; + case Device::REBOOT_RESCUE: + ui->Print("Rebooting to rescue...\n"); + android::base::SetProperty(ANDROID_RB_PROPERTY, "reboot,rescue"); + break; + case Device::ENTER_FASTBOOT: if (logical_partitions_mapped()) { ui->Print("Partitions may be mounted - rebooting to enter fastboot."); |