add key dumping

This commit is contained in:
SuchMemeManySkill
2020-12-26 22:24:41 +01:00
parent ab5c5e799e
commit 07540b4651
13 changed files with 655 additions and 13 deletions

View File

@@ -49,6 +49,8 @@
#include "tegraexplorer/tconf.h"
#include "err.h"
#include <soc/pmc.h>
#include "keys/keys.h"
#include "keys/keyfile.h"
hekate_config h_cfg;
@@ -266,6 +268,7 @@ void ipl_main()
// Ignore whether emummc is enabled.
h_cfg.emummc_force_disable = emu_cfg.sector == 0 && !emu_cfg.path;
emu_cfg.enabled = !h_cfg.emummc_force_disable;
h_cfg.emummc_force_disable = 1;
hidInit();
@@ -281,6 +284,21 @@ void ipl_main()
_show_errors();
gfx_clearscreen();
int res = -1;
if (DumpKeys() || btn_read() & BTN_VOL_DOWN)
res = GetKeysFromFile("sd:/switch/prod.keys");
TConf.keysDumped = (res > 0) ? 0 : 1;
if (res > 0)
DrawError(newErrCode(TE_ERR_KEYDUMP_FAIL));
if (res == 0)
hidWait();
EnterMainMenu();
// Halt BPMP if we managed to get out of execution.