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

Commit 0444a8cb authored by David Anderson's avatar David Anderson
Browse files

fastboot: Check that reboot to userspace succeeded.

After rebooting to userspace fastboot, the first command issued is
"update-super". If we wound up in the bootloader by accident (as
happened to a few users with a busted vbmeta_system), the resulting
error message will be very misleading ("update-super" will be an
unrecognized command).

Instead, this patch explicitly errors if we did not successfully boot
into fastbootd.

Bug: N/A
Test: fastboot flashall
Change-Id: I7d5bd64db540978bd0bae884f40ce8c3df48f856
parent 551efd11
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1316,6 +1316,9 @@ void FlashAllTool::UpdateSuperPartition() {
    if (!is_userspace_fastboot()) {
        reboot_to_userspace_fastboot();
    }
    if (!is_userspace_fastboot()) {
        die("Failed to boot into userspace; one or more components might be unbootable.");
    }
    fb->Download("super", fd, get_file_size(fd));

    std::string command = "update-super:super";