diff --git a/README.md b/README.md index 8dd0ef6..1735652 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,13 @@ Navigate around the menu's using the vol+, vol- and power buttons ## Functions - Navigate the SD card -- Navigate the System partition of your sysnand +- Navigate the System partition of your sysnand/sysmmc - Interact with files - Deleting, copying or moving files - Launching payloads files - Viewing the hex data of a file +- Interacting with folders + - Deleting or copying folders - Dumping your current firmware to sd - Formatting the sd card @@ -24,7 +26,7 @@ For general CFW support, go to the [Nintendo Homebrew](https://discord.gg/C29hYv For question specifically for TegraExplorer, go to [my discord](https://discord.gg/aH9rsuP) # 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 also based on [Hekate](https://github.com/CTCaer/hekate) Lots of help from: - shchmue diff --git a/source/tegraexplorer/te.c b/source/tegraexplorer/te.c index 1459cca..7d77f37 100644 --- a/source/tegraexplorer/te.c +++ b/source/tegraexplorer/te.c @@ -36,12 +36,13 @@ menu_item shutdownmenu[7] = { {"Reboot to Atmosphere", COLOR_GREEN, AMS, -1} }; -menu_item toolsmenu[5] = { +menu_item toolsmenu[6] = { {"-- TOOLS --\n", COLOR_VIOLET, -1, 0}, {"Back", COLOR_WHITE, -1, 1}, {"\nDisplay Console Info", COLOR_GREEN, DISPLAY_INFO, 1}, {"Display GPIO pins", COLOR_VIOLET, DISPLAY_GPIO, 1}, - {"Dump Firmware", COLOR_BLUE, DUMPFIRMWARE, 1} + {"Dump Firmware", COLOR_BLUE, DUMPFIRMWARE, 1}, + {"Dump User Saves", COLOR_YELLOW, DUMPUSERSAVE, 1} }; menu_item formatmenu[4] = { @@ -125,7 +126,7 @@ void te_main(){ break; case TOOLS: - res = makemenu(toolsmenu, 5); + res = makemenu(toolsmenu, 6); switch(res){ case DISPLAY_INFO: @@ -137,6 +138,9 @@ void te_main(){ case DUMPFIRMWARE: dumpfirmware(); break; + case DUMPUSERSAVE: + dumpusersaves(); + break; } break; diff --git a/source/tegraexplorer/te.h b/source/tegraexplorer/te.h index 39fc92b..d54dadd 100644 --- a/source/tegraexplorer/te.h +++ b/source/tegraexplorer/te.h @@ -34,7 +34,8 @@ enum shutdownmenu_return { enum toolsmenu_return { DISPLAY_INFO = 1, DISPLAY_GPIO, - DUMPFIRMWARE + DUMPFIRMWARE, + DUMPUSERSAVE }; enum formatmenu_return { diff --git a/source/tegraexplorer/tools.c b/source/tegraexplorer/tools.c index 6581c8d..a2be6a0 100644 --- a/source/tegraexplorer/tools.c +++ b/source/tegraexplorer/tools.c @@ -141,6 +141,33 @@ int dumpfirmware(){ return fail; } +void dumpusersaves(){ + int res; + + mount_emmc("USER", 2); + clearscreen(); + + res = f_mkdir("sd:/tegraexplorer"); + gfx_printf("Creating sd:/tegraexplorer, res: %d\nCopying:\n", res); + + SWAPCOLOR(COLOR_GREEN); + + res = copy_recursive("emmc:/save", "sd:/tegraexplorer"); + + SWAPCOLOR(COLOR_ORANGE); + gfx_printf("\rResult copy_recursive() %d\n\n", res); + + if (res){ + SWAPCOLOR(COLOR_RED); + gfx_printf("Dump failed!\n"); + } + else + gfx_printf("Saves are located in SD:/tegraexplorer/save\n"); + + gfx_printf("Press any key to continue"); + btn_wait(); +} + int format(int mode){ clearscreen(); int res; diff --git a/source/tegraexplorer/tools.h b/source/tegraexplorer/tools.h index 5b8678b..275c76c 100644 --- a/source/tegraexplorer/tools.h +++ b/source/tegraexplorer/tools.h @@ -3,4 +3,5 @@ void displayinfo(); void displaygpio(); int format(int mode); -int dumpfirmware(); \ No newline at end of file +int dumpfirmware(); +void dumpusersaves(); \ No newline at end of file