cleanup of mmc restores/dumps
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "../../storage/nx_emmc.h"
|
||||
#include "../common/types.h"
|
||||
#include "../utils/utils.h"
|
||||
#include "fsactions.h"
|
||||
|
||||
u32 DecodeInt(u8* data) {
|
||||
u32 out = 0;
|
||||
@@ -55,6 +56,7 @@ int extract_bis_file(char *path, char *outfolder){
|
||||
u8 args;
|
||||
u8 temp[0x4];
|
||||
u32 filesizes[4];
|
||||
char *tempPath;
|
||||
|
||||
if ((res = f_open(&in, path, FA_READ | FA_OPEN_EXISTING))){
|
||||
gfx_errDisplay("extract_bis_file", res, 0);
|
||||
@@ -71,21 +73,35 @@ int extract_bis_file(char *path, char *outfolder){
|
||||
|
||||
gfx_printf("Version: %s\n\n", version);
|
||||
|
||||
gfx_printf("\nExtracting BOOT0\n");
|
||||
if (args & BOOT0_ARG)
|
||||
if (args & BOOT0_ARG){
|
||||
gfx_printf("\nExtracting BOOT0\n");
|
||||
gen_part(filesizes[0], &in, fsutil_getnextloc(outfolder, "BOOT0.bin"));
|
||||
|
||||
gfx_printf("Extracting BOOT1\n");
|
||||
if (args & BOOT1_ARG)
|
||||
}
|
||||
|
||||
if (args & BOOT1_ARG){
|
||||
gfx_printf("Extracting BOOT1\n");
|
||||
gen_part(filesizes[1], &in, fsutil_getnextloc(outfolder, "BOOT1.bin"));
|
||||
}
|
||||
|
||||
gfx_printf("Extracting BCPKG2_1\n");
|
||||
if (args & BCPKG2_1_ARG)
|
||||
gen_part(filesizes[2], &in, fsutil_getnextloc(outfolder, "BCPKG2-1-Normal-Main"));
|
||||
if (args & BCPKG2_1_ARG){
|
||||
utils_copystring(fsutil_getnextloc(outfolder, "BCPKG2-1-Normal-Main"), &tempPath);
|
||||
gfx_printf("Extracting BCPKG2_1/2\n");
|
||||
|
||||
gfx_printf("Extracting BCPKG2_3\n");
|
||||
if (args & BCPKG2_3_ARG)
|
||||
gen_part(filesizes[3], &in, fsutil_getnextloc(outfolder, "BCPKG2-3-SafeMode-Main"));
|
||||
gen_part(filesizes[2], &in, tempPath);
|
||||
fsact_copy(tempPath, fsutil_getnextloc(outfolder, "BCPKG2-2-Normal-Sub"), COPY_MODE_PRINT);
|
||||
RESETCOLOR;
|
||||
free(tempPath);
|
||||
}
|
||||
|
||||
if (args & BCPKG2_3_ARG){
|
||||
utils_copystring(fsutil_getnextloc(outfolder, "BCPKG2-3-SafeMode-Main"), &tempPath);
|
||||
gfx_printf("Extracting BCPKG2_3/4\n");
|
||||
|
||||
gen_part(filesizes[3], &in, tempPath);
|
||||
fsact_copy(tempPath, fsutil_getnextloc(outfolder, "BCPKG2-4-SafeMode-Sub"), COPY_MODE_PRINT);
|
||||
RESETCOLOR;
|
||||
free(tempPath);
|
||||
}
|
||||
|
||||
gfx_printf("\n\nDone!\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user