Hacker voice: *i'm in* (to the emmc)
This commit is contained in:
@@ -9,10 +9,12 @@
|
||||
#include <storage/nx_sd.h>
|
||||
#include "tconf.h"
|
||||
#include "../keys/keys.h"
|
||||
#include "../storage/mountmanager.h"
|
||||
|
||||
MenuEntry_t mainMenuEntries[] = {
|
||||
{.R = 255, .G = 255, .B = 255, .skip = 1, .name = "-- Main Menu --"},
|
||||
{.G = 255, .name = "SD:/"},
|
||||
{.optionUnion = COLORTORGB(COLOR_YELLOW), .name = "emmc:/SYSTEM"},
|
||||
{.B = 255, .G = 255, .name = "Test Controllers"},
|
||||
{.R = 255, .name = "Cause an exception"},
|
||||
{.optionUnion = COLORTORGB(COLOR_ORANGE), .name = "View dumped keys"},
|
||||
@@ -30,6 +32,19 @@ void HandleSD(){
|
||||
FileExplorer("sd:/");
|
||||
}
|
||||
|
||||
void HandleEMMC(){
|
||||
if (connectMMC(MMC_CONN_EMMC))
|
||||
return;
|
||||
|
||||
ErrCode_t err = mountMMCPart("SYSTEM");
|
||||
if (err.err){
|
||||
DrawError(err);
|
||||
return;
|
||||
}
|
||||
|
||||
FileExplorer("bis:/");
|
||||
}
|
||||
|
||||
void CrashTE(){
|
||||
gfx_printf("%d", *((int*)0));
|
||||
}
|
||||
@@ -48,12 +63,15 @@ void ViewKeys(){
|
||||
gfx_printf("\nSave mac key: ");
|
||||
PrintKey(dumpedKeys.save_mac_key, AES_128_KEY_SIZE);
|
||||
|
||||
gfx_printf("\n\nPkg1 ID: '%s', kb %d", TConf.pkg1ID, TConf.pkg1ver);
|
||||
|
||||
hidWait();
|
||||
}
|
||||
|
||||
menuPaths mainMenuPaths[] = {
|
||||
NULL,
|
||||
HandleSD,
|
||||
HandleEMMC,
|
||||
TestControllers,
|
||||
CrashTE,
|
||||
ViewKeys,
|
||||
@@ -62,7 +80,8 @@ menuPaths mainMenuPaths[] = {
|
||||
|
||||
void EnterMainMenu(){
|
||||
while (1){
|
||||
mainMenuEntries[4].hide = !TConf.keysDumped;
|
||||
mainMenuEntries[2].hide = !TConf.keysDumped;
|
||||
mainMenuEntries[5].hide = !TConf.keysDumped;
|
||||
FunctionMenuHandler(mainMenuEntries, ARR_LEN(mainMenuEntries), mainMenuPaths, ALWAYSREDRAW);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,26 +15,23 @@ enum {
|
||||
CMODE_Move
|
||||
};
|
||||
|
||||
enum {
|
||||
M_None = 0,
|
||||
M_EMMC,
|
||||
M_EMUMMC
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
u32 FSBuffSize;
|
||||
char *srcCopy;
|
||||
union {
|
||||
struct {
|
||||
u16 minervaEnabled:1;
|
||||
u16 keysDumped:1;
|
||||
u16 curExplorerLoc:2;
|
||||
u16 heldExplorerCopyLoc:2;
|
||||
u16 explorerCopyMode:2;
|
||||
u16 currentMMCMounted:2;
|
||||
u16 keysDumped:1;
|
||||
u16 currentMMCConnected:2;
|
||||
u16 connectedMMCMounted:1;
|
||||
};
|
||||
u16 optionUnion;
|
||||
};
|
||||
const char *pkg1ID;
|
||||
u8 pkg1ver;
|
||||
} TConf_t;
|
||||
|
||||
extern TConf_t TConf;
|
||||
|
||||
Reference in New Issue
Block a user