Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1678be654 | ||
|
|
2a78d3c924 | ||
|
|
d4010ba04d | ||
|
|
7b6c19f820 | ||
|
|
3274d18b83 | ||
|
|
472c0e293a | ||
|
|
2e61413627 | ||
|
|
ebe9815b7b | ||
|
|
7f85f00db8 | ||
|
|
8151afb446 | ||
|
|
c0f930e75d |
14
README.md
14
README.md
@@ -10,12 +10,18 @@ Navigate around the menu's using the vol+, vol- and power buttons
|
|||||||
## Functions
|
## Functions
|
||||||
- Navigate the SD card
|
- Navigate the SD card
|
||||||
- Navigate the System partition of your sysnand
|
- Navigate the System partition of your sysnand
|
||||||
- Deleting, copying or moving files
|
- Interact with files
|
||||||
- Launching payloads
|
- Deleting, copying or moving files
|
||||||
|
- Launching payloads files
|
||||||
|
- Viewing the hex data of a file
|
||||||
- Dumping your current firmware to sd
|
- Dumping your current firmware to sd
|
||||||
|
- Formatting the sd card
|
||||||
|
|
||||||
## Screenshot
|
## Support
|
||||||

|
|
||||||
|
For general CFW support, go to the [Nintendo Homebrew](https://discord.gg/C29hYvh) discord
|
||||||
|
|
||||||
|
For question specifically for TegraExplorer, go to [my discord](https://discord.gg/aH9rsuP)
|
||||||
|
|
||||||
# Credits
|
# Credits
|
||||||
Based on [Lockpick_RCM](https://github.com/shchmue/Lockpick_RCM), and thus based on [Hekate](https://github.com/CTCaer/hekate)
|
Based on [Lockpick_RCM](https://github.com/shchmue/Lockpick_RCM), and thus based on [Hekate](https://github.com/CTCaer/hekate)
|
||||||
|
|||||||
BIN
example.png
BIN
example.png
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB |
@@ -28,7 +28,7 @@ __attribute__ ((aligned (16))) FATFS emmc;
|
|||||||
LIST_INIT(gpt);
|
LIST_INIT(gpt);
|
||||||
|
|
||||||
u8 bis_key[4][32];
|
u8 bis_key[4][32];
|
||||||
short pkg1ver;
|
short pkg1ver = -1;
|
||||||
|
|
||||||
static bool _key_exists(const void *data) { return memcmp(data, zeros, 0x10); };
|
static bool _key_exists(const void *data) { return memcmp(data, zeros, 0x10); };
|
||||||
|
|
||||||
@@ -44,9 +44,11 @@ static void _generate_kek(u32 ks, const void *key_source, void *master_key, cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
void print_biskeys(){
|
void print_biskeys(){
|
||||||
gfx_printf("\n");
|
gfx_printf("Bis_Key_00\n");
|
||||||
gfx_hexdump(0, bis_key[0], 32);
|
gfx_hexdump(0, bis_key[0], 32);
|
||||||
|
gfx_printf("Bis_Key_01\n");
|
||||||
gfx_hexdump(0, bis_key[1], 32);
|
gfx_hexdump(0, bis_key[1], 32);
|
||||||
|
gfx_printf("Bis_Key_02 & 03\n");
|
||||||
gfx_hexdump(0, bis_key[2], 32);
|
gfx_hexdump(0, bis_key[2], 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -363,8 +363,9 @@ void filemenu(const char *startpath){
|
|||||||
sprintf(temp, "\nSize: %d %s", fileobjects[res - 1].size, sizevalues[tempint - 4]);
|
sprintf(temp, "\nSize: %d %s", fileobjects[res - 1].size, sizevalues[tempint - 4]);
|
||||||
strcpy(explfilemenu[2].name, temp);
|
strcpy(explfilemenu[2].name, temp);
|
||||||
|
|
||||||
if (strstr(fileobjects[res - 1].name, ".bin") != NULL)
|
if (strstr(fileobjects[res - 1].name, ".bin") != NULL && fileobjects[res - 1].size & ISKB){
|
||||||
explfilemenu[7].property = 1;
|
explfilemenu[7].property = 1;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
explfilemenu[7].property = -1;
|
explfilemenu[7].property = -1;
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ void clearscreen(){
|
|||||||
gfx_clear_grey(0x1B);
|
gfx_clear_grey(0x1B);
|
||||||
gfx_box(0, 0, 719, 15, COLOR_WHITE);
|
gfx_box(0, 0, 719, 15, COLOR_WHITE);
|
||||||
gfx_con_setpos(0, 0);
|
gfx_con_setpos(0, 0);
|
||||||
gfx_printf("%k%KTegraexplorer%k%K\n", COLOR_DEFAULT, COLOR_WHITE, COLOR_WHITE, COLOR_DEFAULT);
|
gfx_printf("%k%KTegraexplorer v1.0.2%k%K\n", COLOR_DEFAULT, COLOR_WHITE, COLOR_WHITE, COLOR_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
int message(char* message, u32 color){
|
int message(char* message, u32 color){
|
||||||
@@ -127,26 +127,33 @@ void printfsentry(fs_entry file, bool highlight, bool refresh){
|
|||||||
if (highlight)
|
if (highlight)
|
||||||
gfx_printf("%K%k", COLOR_WHITE, COLOR_DEFAULT);
|
gfx_printf("%K%k", COLOR_WHITE, COLOR_DEFAULT);
|
||||||
else
|
else
|
||||||
gfx_printf("%K%k", COLOR_DEFAULT, COLOR_WHITE);
|
RESETCOLOR;
|
||||||
|
|
||||||
if (file.property & ISDIR)
|
if (file.property & ISDIR)
|
||||||
gfx_printf("%s\n", display);
|
gfx_printf("%s", display);
|
||||||
else {
|
else {
|
||||||
for (size = 4; size < 8; size++)
|
for (size = 4; size < 8; size++)
|
||||||
if ((file.property & (1 << size)))
|
if ((file.property & (1 << size)))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
gfx_printf("%k%s%K", COLOR_VIOLET, display, COLOR_DEFAULT);
|
SWAPCOLOR(COLOR_VIOLET);
|
||||||
|
gfx_printf("%s", display);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RESETCOLOR;
|
||||||
|
|
||||||
if (refresh){
|
if (refresh){
|
||||||
length = strlen(display);
|
length = strlen(display);
|
||||||
for (int i = 0; i < (42 - length); i++)
|
for (int i = 0; i < (42 - length); i++)
|
||||||
gfx_printf(" ");
|
gfx_printf(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(file.property & ISDIR))
|
if (file.property & ISDIR)
|
||||||
|
gfx_printf("\n");
|
||||||
|
else {
|
||||||
|
SWAPCOLOR(COLOR_BLUE);
|
||||||
gfx_printf("\a%d\e%s", file.size, sizevalues[size - 4]);
|
gfx_printf("\a%d\e%s", file.size, sizevalues[size - 4]);
|
||||||
|
}
|
||||||
|
|
||||||
free(display);
|
free(display);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
#include "te.h"
|
#include "te.h"
|
||||||
#include "fs.h"
|
#include "fs.h"
|
||||||
|
|
||||||
|
#define SWAPCOLOR(color) gfx_printf("%k", color)
|
||||||
|
#define RESETCOLOR gfx_printf("%k%K", COLOR_WHITE, COLOR_DEFAULT)
|
||||||
|
|
||||||
int makemenu(menu_item menu[], int menuamount);
|
int makemenu(menu_item menu[], int menuamount);
|
||||||
int message(char* message, u32 color);
|
int message(char* message, u32 color);
|
||||||
void clearscreen();
|
void clearscreen();
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ menu_item toolsmenu[5] = {
|
|||||||
menu_item formatmenu[4] = {
|
menu_item formatmenu[4] = {
|
||||||
{"-- FORMAT SD --\n", COLOR_RED, -1, 0},
|
{"-- FORMAT SD --\n", COLOR_RED, -1, 0},
|
||||||
{"Back\n", COLOR_WHITE, -1, 1},
|
{"Back\n", COLOR_WHITE, -1, 1},
|
||||||
{"Format to FAT32", COLOR_RED, FORMAT_ALL_FAT32, 1},
|
{"Format entire SD to FAT32", COLOR_RED, FORMAT_ALL_FAT32, 1},
|
||||||
{"Format for EmuMMC setup", COLOR_RED, FORMAT_EMUMMC, 1}
|
{"Format for EmuMMC setup (FAT32/RAW)", COLOR_RED, FORMAT_EMUMMC, 1}
|
||||||
};
|
};
|
||||||
|
|
||||||
void fillmainmenu(){
|
void fillmainmenu(){
|
||||||
@@ -54,6 +54,7 @@ void fillmainmenu(){
|
|||||||
for (i = 0; i < MAINMENU_AMOUNT; i++){
|
for (i = 0; i < MAINMENU_AMOUNT; i++){
|
||||||
switch (i + 1) {
|
switch (i + 1) {
|
||||||
case 1:
|
case 1:
|
||||||
|
case 5:
|
||||||
if (sd_mounted)
|
if (sd_mounted)
|
||||||
mainmenu[i].property = 1;
|
mainmenu[i].property = 1;
|
||||||
else
|
else
|
||||||
@@ -69,12 +70,6 @@ void fillmainmenu(){
|
|||||||
strcpy(mainmenu[i].name, "\nMount SD");
|
strcpy(mainmenu[i].name, "\nMount SD");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
|
||||||
if (sd_mounted)
|
|
||||||
mainmenu[i].property = 1;
|
|
||||||
else
|
|
||||||
mainmenu[i].property = -1;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -82,9 +77,14 @@ void fillmainmenu(){
|
|||||||
void te_main(){
|
void te_main(){
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
dump_biskeys();
|
if (dump_biskeys() == -1){
|
||||||
mount_emmc("SYSTEM", 2);
|
message("Biskeys failed to dump!\nEmmc will not be mounted!", COLOR_RED);
|
||||||
|
mainmenu[1].property = -1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mount_emmc("SYSTEM", 2);
|
||||||
|
}
|
||||||
|
|
||||||
sd_mounted = sd_mount();
|
sd_mounted = sd_mount();
|
||||||
|
|
||||||
while (1){
|
while (1){
|
||||||
@@ -134,16 +134,15 @@ void te_main(){
|
|||||||
case SD_FORMAT:
|
case SD_FORMAT:
|
||||||
res = makemenu(formatmenu, 4);
|
res = makemenu(formatmenu, 4);
|
||||||
|
|
||||||
switch(res){
|
if (res >= 0){
|
||||||
case FORMAT_ALL_FAT32:
|
if(makewaitmenu("Are you sure you want to format your sd?\nThis will delete everything on your SD card\nThis action is irreversible!\n\nPress Vol+/- to cancel\n", "Press Power to continue", 10)){
|
||||||
if (makewaitmenu("Are you sure you want to format your sd?\nThis action is irreversible!\n\nPress Vol+/- to cancel\n", "Press Power to continue", 10))
|
if (format(res)){
|
||||||
format(1);
|
sd_unmount();
|
||||||
break;
|
sd_mounted = false;
|
||||||
case FORMAT_EMUMMC:
|
}
|
||||||
if (makewaitmenu("Are you sure you want to format your sd?\nThis action is irreversible!\n\nPress Vol+/- to cancel\n", "Press Power to continue", 10))
|
}
|
||||||
format(0);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CREDITS:
|
case CREDITS:
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ enum toolsmenu_return {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum formatmenu_return {
|
enum formatmenu_return {
|
||||||
FORMAT_ALL_FAT32,
|
FORMAT_EMUMMC = 0,
|
||||||
FORMAT_EMUMMC
|
FORMAT_ALL_FAT32
|
||||||
};
|
};
|
||||||
|
|
||||||
//menu_item mainmenu[MAINMENU_AMOUNT];
|
//menu_item mainmenu[MAINMENU_AMOUNT];
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#include "../libs/fatfs/diskio.h"
|
#include "../libs/fatfs/diskio.h"
|
||||||
#include "../storage/sdmmc.h"
|
#include "../storage/sdmmc.h"
|
||||||
#include "../utils/sprintf.h"
|
#include "../utils/sprintf.h"
|
||||||
|
#include "../soc/fuse.h"
|
||||||
#include "emmc.h"
|
#include "emmc.h"
|
||||||
#include "fs.h"
|
#include "fs.h"
|
||||||
|
|
||||||
@@ -22,11 +23,24 @@ void displayinfo(){
|
|||||||
FATFS *fs;
|
FATFS *fs;
|
||||||
DWORD fre_clust, fre_sect, tot_sect;
|
DWORD fre_clust, fre_sect, tot_sect;
|
||||||
u32 capacity;
|
u32 capacity;
|
||||||
|
u8 fuse_count = 0;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
gfx_printf("Biskeys:\n");
|
for (u32 i = 0; i < 32; i++){
|
||||||
|
if ((fuse_read_odm(7) >> i) & 1)
|
||||||
|
fuse_count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
SWAPCOLOR(COLOR_ORANGE);
|
||||||
|
|
||||||
|
gfx_printf("Fuse count: %d\nPKG1 version: %d\n\n", fuse_count, returnpkg1ver());
|
||||||
print_biskeys();
|
print_biskeys();
|
||||||
|
|
||||||
|
RESETCOLOR;
|
||||||
|
gfx_printf("\n-----\n\n");
|
||||||
|
|
||||||
|
SWAPCOLOR(COLOR_BLUE);
|
||||||
|
|
||||||
if (!sd_mount()){
|
if (!sd_mount()){
|
||||||
gfx_printf("SD mount failed!\nFailed to display SD info\n");
|
gfx_printf("SD mount failed!\nFailed to display SD info\n");
|
||||||
}
|
}
|
||||||
@@ -44,6 +58,7 @@ void displayinfo(){
|
|||||||
gfx_printf("First partition on SD:\nSectors: %d\nSpace total: %d MB\nSpace free: %d MB\n\n", tot_sect, tot_sect / 2048, fre_sect / 2048);
|
gfx_printf("First partition on SD:\nSectors: %d\nSpace total: %d MB\nSpace free: %d MB\n\n", tot_sect, tot_sect / 2048, fre_sect / 2048);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RESETCOLOR;
|
||||||
gfx_printf("Press any key to continue");
|
gfx_printf("Press any key to continue");
|
||||||
btn_wait();
|
btn_wait();
|
||||||
}
|
}
|
||||||
@@ -51,7 +66,7 @@ void displayinfo(){
|
|||||||
void displaygpio(){
|
void displaygpio(){
|
||||||
int res;
|
int res;
|
||||||
clearscreen();
|
clearscreen();
|
||||||
gfx_printf("Updates gpio pins ever 50ms:\nPress power to exit");
|
gfx_printf("Updates gpio pins every 50ms:\nPress power to exit");
|
||||||
msleep(200);
|
msleep(200);
|
||||||
while (1){
|
while (1){
|
||||||
msleep(10);
|
msleep(10);
|
||||||
@@ -86,7 +101,7 @@ int dumpfirmware(){
|
|||||||
gfx_printf("PKG1 version: %d\n", pkg1ver);
|
gfx_printf("PKG1 version: %d\n", pkg1ver);
|
||||||
|
|
||||||
ret = f_mkdir("sd:/tegraexplorer");
|
ret = f_mkdir("sd:/tegraexplorer");
|
||||||
gfx_printf("Creating making sd:/tegraexplorer %d\n", ret);
|
gfx_printf("Creating sd:/tegraexplorer %d\n", ret);
|
||||||
|
|
||||||
ret = f_mkdir("sd:/tegraexplorer/Firmware");
|
ret = f_mkdir("sd:/tegraexplorer/Firmware");
|
||||||
gfx_printf("Creating sd:/tegraexplorer/Firmware %d\n", ret);
|
gfx_printf("Creating sd:/tegraexplorer/Firmware %d\n", ret);
|
||||||
@@ -124,14 +139,14 @@ int dumpfirmware(){
|
|||||||
return fail;
|
return fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
void format(int mode){
|
int format(int mode){
|
||||||
clearscreen();
|
clearscreen();
|
||||||
int res;
|
int res;
|
||||||
bool fatalerror = false;
|
bool fatalerror = false;
|
||||||
DWORD plist[] = {666, 61145088};
|
DWORD plist[] = {666, 61145088};
|
||||||
u32 timer, totalsectors;
|
u32 timer, totalsectors;
|
||||||
BYTE work[FF_MAX_SS];
|
BYTE work[FF_MAX_SS];
|
||||||
DWORD clustsize = 16 * 512;
|
DWORD clustsize = 32768;
|
||||||
BYTE formatoptions = 0;
|
BYTE formatoptions = 0;
|
||||||
formatoptions |= (FM_FAT32);
|
formatoptions |= (FM_FAT32);
|
||||||
//formatoptions |= (FM_SFD);
|
//formatoptions |= (FM_SFD);
|
||||||
@@ -142,12 +157,11 @@ void format(int mode){
|
|||||||
totalsectors = sd_storage.csd.capacity;
|
totalsectors = sd_storage.csd.capacity;
|
||||||
|
|
||||||
if (mode == 0){
|
if (mode == 0){
|
||||||
if (totalsectors < 61145088){
|
if (totalsectors < 83886080){
|
||||||
gfx_printf("%k\nNot enough free space for emummc!", COLOR_RED);
|
gfx_printf("%kYou seem to be running this on a <=32GB SD\nNot enough free space for emummc!", COLOR_RED);
|
||||||
fatalerror = true;
|
fatalerror = true;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
if (!fatalerror){
|
|
||||||
plist[0] = totalsectors - 61145088;
|
plist[0] = totalsectors - 61145088;
|
||||||
gfx_printf("\nStarting SD partitioning:\nTotalSectors: %d\nPartition1 (SD): %d\nPartition2 (EMUMMC): %d\n", totalsectors, plist[0], plist[1]);
|
gfx_printf("\nStarting SD partitioning:\nTotalSectors: %d\nPartition1 (SD): %d\nPartition2 (EMUMMC): %d\n", totalsectors, plist[0], plist[1]);
|
||||||
}
|
}
|
||||||
@@ -196,4 +210,5 @@ void format(int mode){
|
|||||||
|
|
||||||
gfx_printf("\nPress any button to return%k\nTotal time taken: %ds", COLOR_WHITE, (get_tmr_s() - timer));
|
gfx_printf("\nPress any button to return%k\nTotal time taken: %ds", COLOR_WHITE, (get_tmr_s() - timer));
|
||||||
btn_wait();
|
btn_wait();
|
||||||
|
return fatalerror;
|
||||||
}
|
}
|
||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
void displayinfo();
|
void displayinfo();
|
||||||
void displaygpio();
|
void displaygpio();
|
||||||
void format(int mode);
|
int format(int mode);
|
||||||
int dumpfirmware();
|
int dumpfirmware();
|
||||||
Reference in New Issue
Block a user