Modified the flashing feedback text to include suggest steps

This commit is contained in:
iceman1001 2021-02-21 10:46:39 +01:00
parent 98e9ec6e54
commit 0073fc1a71
2 changed files with 14 additions and 1 deletions

View file

@ -403,9 +403,19 @@ static int wait_for_ack(PacketResponseNG *ack) {
return PM3_SUCCESS;
}
static bool g_printed_msg = false;
static void flash_suggest_update_bootloader(void) {
if (g_printed_msg)
return;
PrintAndLogEx(ERR, _RED_("It is recommended that you first" _YELLOW_(" update your bootloader") _RED_(" alone,")));
PrintAndLogEx(ERR, _RED_("reboot the Proxmark3 then only update the main firmware") "\n");
PrintAndLogEx(ERR, "Follow these steps :");
PrintAndLogEx(ERR, " 1) ./pm3-flash-bootrom");
PrintAndLogEx(ERR, " 2) ./pm3-flash-flash-all");
PrintAndLogEx(ERR, " 3) ./pm3");
PrintAndLogEx(INFO, "--------------------------------------------------------");
g_printed_msg = true;
}
static void flash_suggest_update_flasher(void) {
@ -532,6 +542,7 @@ const char ice[] =
" !!: :!! !!: !!: !!: !!: !!! !!: !!!\n : :: :: : : :: ::: : : : : : :: : \n"
_RED_(" . .. .. . . .. ... . . . . . .. . ")
"\n...................................................................\n"
"...................................................................\n"
;
// Write a file's segments to Flash

View file

@ -673,6 +673,8 @@ static int flash_pm3(char *serial_port_name, uint8_t num_files, char *filenames[
}
finish:
if (ret != PM3_SUCCESS)
PrintAndLogEx(INFO, "The flashing procedure failed, follow the suggested steps!");
ret = flash_stop_flashing();
CloseProxmark(session.current_device);
finish2:
@ -684,7 +686,7 @@ finish2:
PrintAndLogEx(SUCCESS, _CYAN_("All done"));
else
PrintAndLogEx(ERR, "Aborted on error");
PrintAndLogEx(NORMAL, "\nHave a nice day!");
PrintAndLogEx(INFO, "\nHave a nice day!");
return ret;
}
#endif //LIBPM3