32c097c055
GameCardImageDumpTask is a derived class of DataTransferTask, and it's designed to dump a gamecard image using the options selected by the user (which must be passed from a GameCardImageDumpOptionsFrame object). It uses std::optional<std::string> as its return type -- the idea behind this is to return error strings that may later be displayed by an ErrorFrame during the dump process (views not yet implemented). FileWriter is a class that encapsulates write operations to different storage mediums (SD card, USB host and UMS devices), based on the provided input path. It is used by GameCardImageDumpTask to painlessly write data to the right output storage without explicitly having to implement multiple code paths for all storage types as part of the actual dump code. Furthermore, FileWriter also supports writing split files to FAT-formatted UMS devices if an output file is >= 4 GiB -- part file handling is completely abstracted away from any callers. Other changes include: * AsyncTask: rename all class methods to use PascalCase naming. * AsyncTask: rename get() -> GetResult(). * DataTransferTask: reflect the changes made to AsyncTask. * DataTransferTask: pause the RepeatingTask right after LoopCallback() returns true instead of pausing it in the cancel/post-execute callbacks. * DataTransferTask: add private FormatTimeString() method. * DataTransferTask: remove superfluous override for DoInBackground() -- classes derived from DataTransferTask must provide it on their own, anyway. * DataTransferTask: add public GetDurationString() method. * defines: update FAT32_FILESIZE_LIMIT macro to use UINT32_MAX. * defines: add CONCATENATION_FILE_PART_SIZE macro (used by the new FileWriter class). * DownloadTask: reflect the changes made to AsyncTask. * DumpOptionsFrame: file extension is no longer stored as a class member, nor required by the class constructor. * DumpOptionsFrame: change the return type for GetOutputFilePath() to bool. The method now saves its output to a variable passed by reference. * GameCardImageDumpOptionsFrame: reflect the changes made to DumpOptionsFrame. * i18n: update localization strings where applicable. * nxdt_utils: fix a potential buffer overflow in utilsGetFileSystemStatsByPath(). * OptionsTab: reflect the changes made to AsyncTask. * usb: add const qualifier to the input buffer required by usbSendFileData(). * usb: add const qualifier to the input buffer required by usbSendNspHeader(). |
||
---|---|---|
.github | ||
code_templates | ||
host | ||
include | ||
libs | ||
romfs | ||
source | ||
.gitignore | ||
.gitmodules | ||
build.sh | ||
LICENSE.md | ||
Makefile | ||
README.md | ||
todo.txt |
nxdumptool
Nintendo Switch Dump ToolOfficial Discord server: https://discord.gg/SCbbcQx
This branch is used for the development of the ongoing nxdumptool rewrite. Code is highly experimental and lacks a proper UI at this time, but it has been thoroughly tested and should be safe to use. Proof-of-concept (PoC) builds are provided to test different aspects of the codebase.
If a nxdumptool build from the releases page isn't working for whatever you're trying to do (e.g. RomFS dumping), odds are it will work with a PoC build from this particular branch. The old branch will not receive any further updates.
A GitHub workflow is used to automatically build each new commit -- feel free to check it out. Furthermore, the assets from the rewrite-prerelease tag are automatically updated by this workflow, so you can always find the latest NRO binary there.
This readme will be updated whenever the rewrite branch is ready for a proper release.
Currently planned changes for this branch include:
- USB ABI (dump data directly to a PC). ✅
- USB Mass Storage device support (FAT, NTFS, EXT) via libusbhsfs. ✅
- NX Card Image (XCI) gamecard dumps, with optional KeyArea prepending and certificate removal. ✅
- Gamecard header dumps. ✅
- Gamecard certificate dumps. ✅
- Plaintext gamecard CardInfo area dumps. ✅
- Gamecard InitialData area dumps. ✅
- Gamecard CardIdSet dumps. ✅
- Gamecard Hash FS partition dumps (in both extracted and raw inage forms). ✅
- Lotus ASIC firmware (LAFW) blob dumping from RAM. ✅
- Properly detect if an inserted gamecard requires a LAFW update. ✅
- Nintendo Submission Package (NSP) dumps for both digital and gamecard-based titles.
- Individual Ticket dumps from digital titles, with support for temporary/volatile tickets with AES-128-CTR crypto data kept in RAM.
- Individual Nintendo Content Archive (NCA) dumps from a specific title. ✅
- Individual NCA filesystem section (Partition FS / ExeFS, RomFS, Patch RomFS) dumps from a specific NCA belonging to a specific title, in both extracted and raw image forms. ✅
- Better support for NCA BucketTree storages (Indirect, AesCtrEx, Sparse, Compressed), as well as better handling of multi-layered reads in combination with game updates. ✅
- System title support (e.g. dump qlaunch, shared fonts and much, much more at runtime). ✅
- Better memory handling while dealing with compressed NRO binaries. ✅
- Event-driven background threads to manage gamecard insertions/ejections, gamecard application metadata parsing (e.g. the game would be properly identified even if its gamecard has never been used on your console), USB ABI sessions and USB Mass Storage devices. ✅
- Improved support for multigame gamecards and titles with more than one Program NCA (e.g. SM3DAS). ✅
- Control.nacp patching while dumping NSPs (lets you patch screenshot, video, user account and HDCP restrictions). ✅
- Partition FS / Hash FS / RomFS browser using custom devoptab wrappers. ✅
- Full system update dumps. ❌
- Batch NSP dumps. ❌
FsFileSystem
+FatFs
based eMMC browser using a custom devoptab wrapper (allows copying files protected by the FS sysmodule at runtime). ❌- New UI using a customized borealis fork. ⚠️
Legend:
- ✅ - Implemented
- ⚠️ - Partially implemented
- ❌ - Not implemented