don't say "install complete" when it really isn't
Change the recovery UI so that when there is a hboot or radio update
pending (which the user most do a home+back reboot to actually
install), the UI tells them so, instead of saying "Install from sdcard
complete."
diff --git a/firmware.c b/firmware.c
index 34b2918..e2e4fe6 100644
--- a/firmware.c
+++ b/firmware.c
@@ -39,6 +39,10 @@
return 0;
}
+// Return true if there is a firmware update pending.
+int firmware_update_pending() {
+ return update_data != NULL && update_length > 0;
+}
/* Bootloader / Recovery Flow
*
diff --git a/firmware.h b/firmware.h
index f3f7aab..aeb8f97 100644
--- a/firmware.h
+++ b/firmware.h
@@ -23,6 +23,9 @@
*/
int remember_firmware_update(const char *type, const char *data, int length);
+/* Returns true if a firmware update has been saved. */
+int firmware_update_pending();
+
/* If an update was saved, reboot into the bootloader now to install it.
* Returns 0 if no radio image was defined, nonzero on error,
* doesn't return at all on success...
diff --git a/install.c b/install.c
index 4dcfe75..e7db2a8 100644
--- a/install.c
+++ b/install.c
@@ -105,7 +105,7 @@
return INSTALL_ERROR;
}
- ui_print("Installation complete.\n");
+ LOGI("Installation complete.\n");
return INSTALL_SUCCESS;
}
diff --git a/recovery.c b/recovery.c
index a0bae97..e329db9 100644
--- a/recovery.c
+++ b/recovery.c
@@ -375,7 +375,12 @@
} else if (!ui_text_visible()) {
return; // reboot if logs aren't visible
} else {
- ui_print("Install from sdcard complete.\n");
+ if (firmware_update_pending()) {
+ ui_print("\nReboot via home+back or menu\n"
+ "to complete installation.\n");
+ } else {
+ ui_print("\nInstall from sdcard complete.\n");
+ }
}
break;
}