mirror of
https://github.com/d0k3/SafeB9SInstaller.git
synced 2025-06-26 13:42:45 +00:00
Open installer can install any sighaxed FIRM
This commit is contained in:
parent
49b5b55221
commit
6c493ac132
@ -110,6 +110,7 @@ u32 SafeB9SInstaller(void) {
|
|||||||
ShowInstallerStatus();
|
ShowInstallerStatus();
|
||||||
u8 firm_sha[0x20];
|
u8 firm_sha[0x20];
|
||||||
UINT firm_size;
|
UINT firm_size;
|
||||||
|
bool unknown_payload = false;
|
||||||
if ((f_qread(NAME_SIGHAXFIRM, FIRM_BUFFER, 0, FIRM_BUFFER_SIZE, &firm_size) != FR_OK) ||
|
if ((f_qread(NAME_SIGHAXFIRM, FIRM_BUFFER, 0, FIRM_BUFFER_SIZE, &firm_size) != FR_OK) ||
|
||||||
(firm_size < 0x200)) {
|
(firm_size < 0x200)) {
|
||||||
snprintf(msgFirm, 64, "file not found");
|
snprintf(msgFirm, 64, "file not found");
|
||||||
@ -132,11 +133,14 @@ u32 SafeB9SInstaller(void) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (CheckFirmPayload(FIRM_BUFFER, msgFirm) != 0) {
|
if (CheckFirmPayload(FIRM_BUFFER, msgFirm) != 0) {
|
||||||
|
#ifndef OPEN_INSTALLER
|
||||||
statusFirm = STATUS_RED;
|
statusFirm = STATUS_RED;
|
||||||
return 1;
|
return 1;
|
||||||
|
#else
|
||||||
|
unknown_payload = true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
// snprintf(msgFirm, 64, "loaded & verified");
|
statusFirm = unknown_payload ? STATUS_YELLOW : STATUS_GREEN;
|
||||||
statusFirm = STATUS_GREEN;
|
|
||||||
ShowInstallerStatus();
|
ShowInstallerStatus();
|
||||||
// provided FIRM is okay!
|
// provided FIRM is okay!
|
||||||
|
|
||||||
@ -164,7 +168,7 @@ u32 SafeB9SInstaller(void) {
|
|||||||
// secret_sector.bin okay or not required!
|
// secret_sector.bin okay or not required!
|
||||||
|
|
||||||
|
|
||||||
// step #3 - check NAND crypto
|
// step #4 - check NAND crypto
|
||||||
snprintf(msgCrypto, 64, "checking...");
|
snprintf(msgCrypto, 64, "checking...");
|
||||||
statusCrypto = STATUS_YELLOW;
|
statusCrypto = STATUS_YELLOW;
|
||||||
ShowInstallerStatus();
|
ShowInstallerStatus();
|
||||||
@ -198,7 +202,9 @@ u32 SafeB9SInstaller(void) {
|
|||||||
|
|
||||||
|
|
||||||
// step #X - point of no return
|
// step #X - point of no return
|
||||||
if (!ShowUnlockSequence(1, "All input files verified.\n \nTo install FIRM, enter the sequence\nbelow or press B to cancel.")) {
|
if (!ShowUnlockSequence(unknown_payload ? 6 : 1, unknown_payload ?
|
||||||
|
"!!! FIRM NOT RECOGNIZED !!!\nProceeding may lead to a BRICK!\n \nTo proceed, enter the sequence\nbelow or press B to cancel." :
|
||||||
|
"All input files verified.\n \nTo install FIRM, enter the sequence\nbelow or press B to cancel.")) {
|
||||||
snprintf(msgBackup, 64, "cancelled by user");
|
snprintf(msgBackup, 64, "cancelled by user");
|
||||||
snprintf(msgInstall, 64, "cancelled by user");
|
snprintf(msgInstall, 64, "cancelled by user");
|
||||||
statusBackup = STATUS_YELLOW;
|
statusBackup = STATUS_YELLOW;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user