Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a6aa6b2 authored by Andreas Blaesius's avatar Andreas Blaesius Committed by Tom Marshall
Browse files

recovery: Allow devices to reboot to download mode

Change-Id: Ib6ccf98ed68efacbb3b8c8238945da60b23a20d7
parent a9c227a4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -254,6 +254,10 @@ ifeq ($(AB_OTA_UPDATER),true)
    LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
endif

ifeq ($(BOARD_HAS_DOWNLOAD_MODE), true)
    LOCAL_CFLAGS += -DDOWNLOAD_MODE
endif

LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin

LOCAL_CFLAGS += -DMINIVOLD
+4 −0
Original line number Diff line number Diff line
@@ -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",
#ifndef AB_OTA_UPDATER
+5 −0
Original line number Diff line number Diff line
@@ -1840,8 +1840,13 @@ int main(int argc, char **argv) {
            break;

        case Device::REBOOT_BOOTLOADER:
#ifdef DOWNLOAD_MODE
            ui->Print("Rebooting to download mode...\n");
            android::base::SetProperty(ANDROID_RB_PROPERTY, "reboot,download");
#else
            ui->Print("Rebooting to bootloader...\n");
            android::base::SetProperty(ANDROID_RB_PROPERTY, "reboot,bootloader");
#endif
            break;

        default: