diff options
-rw-r--r-- | Android.mk | 4 | ||||
-rw-r--r-- | device.cpp | 4 | ||||
-rw-r--r-- | recovery.cpp | 5 |
3 files changed, 13 insertions, 0 deletions
@@ -124,6 +124,10 @@ ifeq ($(TARGET_USE_MDTP), true) LOCAL_CFLAGS += -DUSE_MDTP endif +ifeq ($(BOARD_HAS_DOWNLOAD_MODE), true) + LOCAL_CFLAGS += -DDOWNLOAD_MODE +endif + ifneq ($(BOARD_RECOVERY_BLDRMSG_OFFSET),) LOCAL_CFLAGS += -DBOARD_RECOVERY_BLDRMSG_OFFSET=$(BOARD_RECOVERY_BLDRMSG_OFFSET) endif @@ -18,7 +18,11 @@ static const char* MENU_ITEMS[] = { "Reboot system now", +#ifdef DOWNLOAD_MODE + "Reboot to download mode", +#else "Reboot to bootloader", +#endif "Apply update", "Wipe data/factory reset", "Wipe cache partition", diff --git a/recovery.cpp b/recovery.cpp index cdf1de3..e36e7d9 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -1521,8 +1521,13 @@ main(int argc, char **argv) { break; case Device::REBOOT_BOOTLOADER: +#ifdef DOWNLOAD_MODE + ui->Print("Rebooting to download mode...\n"); + property_set(ANDROID_RB_PROPERTY, "reboot,download"); +#else ui->Print("Rebooting to bootloader...\n"); property_set(ANDROID_RB_PROPERTY, "reboot,bootloader"); +#endif break; default: |