void romfs_visit_file(romfs_context* ctx, u32 fileoffset, u32 depth, u32 actions, filepath* rootpath)
{
u32 siblingoffset = 0;
filepath currentpath;
romfs_fileentry* entry = &ctx->fileentry;
do {
if (!romfs_fileblock_readentry(ctx, fileoffset, entry))
return; // need breakall?
// fprintf(stdout, "%08X %08X %016llX %016llX %08X ",
// getle32(entry->parentdiroffset), getle32(entry->siblingoffset), ctx->datablockoffset+getle64(entry->dataoffset),
// getle64(entry->datasize), getle32(entry->unknown));
// fwprintf(stdout, L"%ls\n", entry->name);
if (rootpath && rootpath->valid)
{
filepath_copy(¤tpath, rootpath);
filepath_append_utf16(¤tpath, entry->name);
if (currentpath.valid)
{
fprintf(stdout, "Saving %s...\n", currentpath.pathname);
romfs_extract_datafile(ctx, getle64(entry->dataoffset), getle64(entry->datasize), ¤tpath);
}
else
{
fprintf(stderr, "Error creating directory in root %s\n", rootpath->pathname);
return; // <- need add a &break in argument
}
}
else
{
filepath_init(¤tpath);
if (settings_get_list_romfs_files(ctx->usersettings))
{
u32 i;
for(i=0; i<depth; i++)
printf(" ");
fwprintf(stdout, L"%ls\n", entry->name);
}
}
fileoffset = getle32(entry->siblingoffset);
} while (fileoffset != (~0));
}
ctrtool crashed on extract romfs of Monster hunter 4G.
here is a quick fix on romfs.c for this bug.
-snip-
original code is a recursion call with only fileoffset upate. always carshed on folder contains lots of file.
if depth is untouched, recursion must be prevent.
With SD_Decryptor can I extract DLC/updates of my gateway console sd card, rebuild them in via then install them in another GW console?
yes i'm pretty sure, but i have no idea how to actually do it
what?Is it possible to get the NSMB2 DLC RomFS somehow with these new developments?
yes i'm pretty sure, but i have no idea how to actually do it
Yeah it gives you CFA files (the .app ones)The decryptor gives you everything to rebuild into a .cia except the header and metadata.
No, it gives you a CXI and, if the app has a manual, a CFA. These contain the ExeFS, exheader and RomFS. CFA files don't have the exheader.Yeah it gives you CFA files (the .app ones)
They CAN have exheader. It's just not mandatory.No, it gives you a CXI and, if the app has a manual, a CFA. These contain the ExeFS, exheader and RomFS. CFA files don't have the exheader.
http://3dbrew.org/wiki/NCCH#CFAThey CAN have exheader. It's just not mandatory.
if its a dlc/addon pack...i think its used for the manuals too on games, basically anything that is read but doesn't contain any sort of running code its just read by something elsehttp://3dbrew.org/wiki/NCCH#CFA
"The CFA (CTR File Archive) specialisation of the NCCH container, is not executable, but are used in conjunction with CXI files."
How can an installed title not be executable?
http://3dbrew.org/wiki/NCCH#CFA
"The CFA (CTR File Archive) specialisation of the NCCH container, is not executable, but are used in conjunction with CXI files."
How can an installed title not be executable?
So are any of the current public tools capable of building the header and metadata to remake into a .cia, or is that still a manual process?
Well, I sucessfully installed a repacked pokemon Y update.Has anyone given the SD decryptor a shot with DLC and sharing it with others?