summaryrefslogtreecommitdiffstats
path: root/fastboot
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2018-10-25 12:01:17 -0700
committerDavid Anderson <dvander@google.com>2018-10-25 12:31:49 -0700
commit0444a8cbd96c3dbb75399886b13ece5dc3d6ffa9 (patch)
treec565c3f55963492faf5b2f1bb11dda8927aa869e /fastboot
parent551efd11f7d31399a4a2c22cb19b2523be9c4d18 (diff)
downloadsystem_core-0444a8cbd96c3dbb75399886b13ece5dc3d6ffa9.tar.gz
system_core-0444a8cbd96c3dbb75399886b13ece5dc3d6ffa9.tar.bz2
system_core-0444a8cbd96c3dbb75399886b13ece5dc3d6ffa9.zip
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
Diffstat (limited to 'fastboot')
-rw-r--r--fastboot/fastboot.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index 6b6e659c6..f9dd6b5e1 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -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";