1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-09-18 21:13:25 +01:00
Generates XCI/NSP/HFS0/ExeFS/RomFS/Certificate/Ticket dumps from Nintendo Switch gamecards and installed SD/eMMC titles.
Go to file
Pablo Curiel e1df86fb27 Fix building with latest libnx + QoL changes.
libnx now implements fsDeviceOperatorGetGameCardIdSet(), so I got rid of my own implementation.

Other changes include:

* cnmt: add cnmtVerifyContentHash().

* defines: add SHA256_HASH_STR_SIZE.

* fs_ext: add FsCardId1MakerCode, FsCardId1MemoryType and FsCardId2CardType enums.
* fs_ext: update FsCardId* structs.

* gamecard: change all package_id definitions from u64 -> u8[0x8].
* gamecard: fix misleading struct member names in GameCardHeader.
* gamecard: rename gamecardGetIdSet() -> gamecardGetCardIdSet().

* gamecard_tab: fix Package ID printing.
* gamecard_tab: add Card ID Set printing.

* host: add executable flag to Python scripts.

* keys: detect if we're dealing with a wiped eTicket RSA device key (e.g. via set:cal blanking). If so, the application will still launch, but all operations related to personalized titlekey crypto are disabled.

* pfs: rename PartitionFileSystemFileContext -> PartitionFileSystemImageContext and propagate the change throughout the codebase.
* pfs: rename PFS_FULL_HEADER_ALIGNMENT -> PFS_HEADER_PADDING_ALIGNMENT and update pfsWriteImageContextHeaderToMemoryBuffer() accordingly.

* poc: print certain button prompts with reversed colors, in the hopes of getting the user's attention.
* poc: NSP, Ticket and NCA submenus for updates and DLC updates now display the highest available title by default.
* poc: simplified output path generation for extracted NCA FS section dumps.
* poc: handle edge cases where a specific NCA from an update has no matching equivalent by type/ID offset in its base title (e.g. Fall Guys' HtmlDocument NCA).
* poc: implement NCA checksum validation while generating NSP dumps.

* romfs: update romfsInitializeContext() to allow its base_nca_fs_ctx argument to be NULL.

* usb: use USB_BOS_SIZE only once.

* workflow: update commit hash referenced by "rewrite-prerelease" tag on update.
2023-11-03 02:22:47 +01:00
.github Fix building with latest libnx + QoL changes. 2023-11-03 02:22:47 +01:00
code_templates Fix building with latest libnx + QoL changes. 2023-11-03 02:22:47 +01:00
host nxdt_utils: add more helpers. 2023-10-23 00:44:40 +02:00
include Fix building with latest libnx + QoL changes. 2023-11-03 02:22:47 +01:00
libs Minor workflow simplifications (#144) 2023-10-31 19:13:04 +01:00
romfs Fix building with latest libnx + QoL changes. 2023-11-03 02:22:47 +01:00
source Fix building with latest libnx + QoL changes. 2023-11-03 02:22:47 +01:00
.gitignore workflow: only build nxdt_rw_poc binary 2023-07-22 00:53:56 +02:00
.gitmodules libs: update libusbhsfs. 2022-03-04 13:24:28 +01:00
build.sh workflow: only build nxdt_rw_poc binary 2023-07-22 00:53:56 +02:00
LICENSE.md Change project layout + upgrade license to GPLv3. 2021-03-25 15:26:58 -04:00
Makefile nxdt_log: use __FILE__ macro 2023-06-29 19:08:48 +02:00
README.md Update README.md [ci skip] 2023-10-25 10:32:30 +02:00
todo.txt I'm a terrible person and an even worse developer. 2023-05-24 21:05:34 +02:00

nxdumptool

Nintendo Switch Dump Tool

Official 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).
  • Full system update dumps.
  • Batch NSP dumps.
  • Partition FS / Hash FS / RomFS browser using custom devoptab wrappers.
  • 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