Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

NXDumpTool Switch: Difference between revisions

From GameBrew
(Created page with "{{Infobox Switch Homebrews |title=nxdumptool |image=nxdumptoolswitch.png |description=Generates XCI/NSP/HFS0/ExeFS/RomFS/Certificate/Ticket dumps from Nintendo Switch gamecards and installed SD/eMMC titles. |author=DarkMatterCore |lastupdated=2022/02/25 |type=Utilities |version=1.1.15 |license=GPL-2.0 |download=https://dlhb.gamebrew.org/switchhomebrews/nxdumptoolswitch.7z |website=https://gbatemp.net/threads/nxdumptool-nintendo-switch-dump-tool.508343/ |source=https://gi...")
 
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox Switch Homebrews
{{Infobox Switch Homebrews
|title=nxdumptool
|title=nxdumptool
|image=nxdumptoolswitch.png
|image=nxdumptool.png
|description=Generates XCI/NSP/HFS0/ExeFS/RomFS/Certificate/Ticket dumps from Nintendo Switch gamecards and installed SD/eMMC titles.
|description=Generates XCI/NSP/HFS0/ExeFS/RomFS/Certificate/Ticket dumps from Nintendo Switch gamecards and installed SD/eMMC titles.
|author=DarkMatterCore
|author=DarkMatterCore
Line 8: Line 8:
|version=1.1.15
|version=1.1.15
|license=GPL-2.0
|license=GPL-2.0
|download=https://dlhb.gamebrew.org/switchhomebrews/nxdumptoolswitch.7z
|downloadraw=[https://dlhb.gamebrew.org/switchhomebrews/nxdumptool.7z?k33p0fil35 NXDumpTool] - [https://dlhb.gamebrew.org/switchhomebrews/mergescripts.7z Scripts Download] - [https://github.com/DarkMatterCore/nxdumptool/releases/tag/rewrite-prerelease PreRelease]
|website=https://gbatemp.net/threads/nxdumptool-nintendo-switch-dump-tool.508343/
|website=https://gbatemp.net/threads/nxdumptool-nintendo-switch-dump-tool.508343/
|source=https://github.com/DarkMatterCore/nxdumptool
|source=https://github.com/DarkMatterCore/nxdumptool
|donation=
|donation=https://ko-fi.com/DarkMatterCore
}}
}}
{{#seo:
|title=Switch Homebrew Apps (Utilities) - GameBrew
|title_mode=append
|image=nxdumptoolswitch.png
|image_alt=nxdumptool
}}
{{cleanup|article|Needs cleanup}}
Generates XCI/NSP/HFS0/ExeFS/RomFS/Certificate/Ticket dumps from Nintendo Switch gamecards and installed SD/eMMC titles.
Generates XCI/NSP/HFS0/ExeFS/RomFS/Certificate/Ticket dumps from Nintendo Switch gamecards and installed SD/eMMC titles.


==Media==
==Features==
<youtube></youtube>
*Generates full Cartridge Image dumps (XCI) with optional certificate removal and/or trimming.
*Generates installable Nintendo Submission Packages (NSP) from base applications, updates and DLCs stored in the inserted gamecard, SD card and eMMC storage devices.
**The generated dumps follow the AuditingTool format from Scene releases.
**Capable of generating dumps without console specific information (common ticket).
**Capable of generating ticket-less (standard crypto) dumps.
**Capable of generating dumps from installed updates/DLCs with missing base applications (orphan titles).
**Compatible with game pre-installs.
**Batch mode available, with customizable dump settings.
*Manual gamecard certificate dump.
*Manual ticket dump from installed SD/eMMC titles + optional removal of console specific data.
*Compatible with multigame carts.
*CRC32 checksum calculation for XCI/NSP dumps.
*XCI/NSP dump verification through CRC32 checksum lookup.
**Using offline XML database from NSWDB.COM (NSWreleases.xml) (XCI only).
**Performing an online lookup against the No-Intro database.
*Bundled-in update capabilities via libcurl.
**Update to the latest version by downloading it right from GitHub.
**Update the NSWDB.COM XML database.
*Precise HFS0 raw partition dumping, using the root HFS0 header from the gamecard.
*HFS0 partition file data dumping + browser with manual file dump support.
*Program NCA ExeFS/RomFS section & Data NCA RomFS section file data dumping + browser with manual file dump support.
**Compatible with base applications, updates and DLCs (if available).
**Supports manual RomFS directory dumping.
*Free SD card space checks in place.
*File splitting support for all operations.
**Capable of storing split XCI/NSP dumps in directories with the archive bit set.
*Sequential (multi-session) dump support, in case there's not enough storage space available for a XCI/NSP full dump.
*Metadata retrieval using NCM and NS services.
*Dump speed calculation, ETA calculation and progress bar.
 
==Installation==
===Disclaimer===
*Doesn't work under 1.0.0, and probably never will. The application needs IPC calls that are only available from 2.0.0 onwards.
*Doesn't work under FW > 1.0.0 and < 4.0.0 if the application is launched using PegaSwitch. This is because PegaSwitch doesn't give full access permissions to the application. Please use PegaScape to reboot your console into a full fledged CFW if you wish to use the application.
*NSP/ExeFS/RomFS features require the "sdmc:/switch/prod.keys" file. Use [[Lockpick RCM Switch|Lockpick RCM]] to generate it.
*If you go back to Horizon and get an error or black screen when trying to launch the inserted gamecard, just pull it out and re-insert it. No reboot needed. Any help on fixing this bug will be greatly appreciated.
 
===How to setup===
*Place the .nro to the /switch/ folder on the SD card.
*Operations related to installed SD/eMMC titles require a keys file located at "sdmc:/switch/prod.keys". Use [[Lockpick RCM Switch|Lockpick RCM]] to generate it.
*Please launch the application through title override (hold R while launching a game) whenever possible to avoid memory allocation problems.


==User guide==
How to merge parts under Windows:
copy /b game.xc0+game.xc1 game.xci
How to merge parts under Linux:
cat game.xc0 game.xc1 > game.xci
Make sure to replace the "game" prefix with the actual filename.
If you don't want to deal with this manual process yourself, you can also use [https://gbatemp.net/attachments/windows-merge-nxdumptool-parts-7z.183375/ this] Windows CMD script or [https://gbatemp.net/attachments/linux-merge-gcdumptool-parts-7z.165959/ this] Linux Bash script, depending on the OS you're using. Both scripts are courtesy of [https://gbatemp.net/members/381237/ 8BitWonder]. Make sure to take a look at the README.txt for instructions.


==Screenshots==
==Screenshots==
https://dlhb.gamebrew.org/switchhomebrews/nxdumptoolswitch-01.png
{| style="max-width:80%; margin-left:0em;"
https://dlhb.gamebrew.org/switchhomebrews/nxdumptoolswitch-02.png
|
https://dlhb.gamebrew.org/switchhomebrews/nxdumptoolswitch-03.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptoolswitch-04.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool2.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptoolswitch-05.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool3.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptoolswitch-06.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool4.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptoolswitch-07.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool5.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptoolswitch-08.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool6.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool7.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool8.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool9.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool10.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool11.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool12.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool13.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool14.png
https://dlhb.gamebrew.org/switchhomebrews/nxdumptool15.png
|}


==Changelog==
==Changelog==
'''v.1.0'''
'''v1.1.15 2022/02/26'''
* First Release.
*Built with latest devkitA64 and libnx.
*Removed AuthoringTool XML generation code to make it possible to dump NSPs from games that use NCAs with sparse / compressed FS sections. Bear in mind ExeFS / RomFS dumping won't still be possible -- using PC tools such as <code>hactoolnet</code> to retrieve data from these dumps is encouraged in the meantime.
*The NPDM ACID signature/private key patch option is now disabled by default.
*Updated <code>removeConsoleDataFromTicket()</code> to make it wipe other fields that weren't not being cleared.
 
'''v1.1.14 2021/04/21'''
*Fixed support for HOS 12.0.x / AMS 0.19.x. If needed, TIPC serialization is now used to dispatch the AtmosphereHasService IPC request.
 
'''v1.1.13 2021/02/25'''
*Fixed compatibility with latest libnx release.
*Now using the <code>AtmosphereHasService</code> SM API extension to check if a service is running. More than a year and a half has passed since this feature was introduced in Atmosphère, and it is now part of both SX OS and ReiNX, so it's a justified change. Fixes issues related to sysmodules and SM port exhaustion.
 
'''v1.1.12 2020/09/26'''
*UPDATE: If you downloaded the NRO binary before 2020-11-10 01:25 AM (UTC-4), please re-download it again. Hotfixes for RomFS-related features, Atmosphère 0.15.0 support and the ability to go back from the ID Offset selection screen were introduced. Not worthy of bumping the version number.
*Fixed RomFS dumping/browsing support for games with base Program NCAs without a RomFS section (e.g. Fortnite, World of Tanks Blitz, etc.). Big thanks to [https://github.com/bigkahuna666 bigkahuna666] for reporting the issue and providing with testing.
 
'''v1.1.11 2020/9/23'''
*Built using libnx <code>f01fb21</code>.
*The application will now only attempt to decrypt the eTicket device RSA keypair if the target title uses a ticket with personalized titlekey crypto, instead of always decrypting it regardless of the ticket crypto type.
*Fixed a NSP dumping issue where the decrypted titlekey wasn't being set for the current NCA if both the ticket and the decrypted titlekey were retrieved while parsing a previous NCA. Big thanks to [https://github.com/sadboys2001 sadboys2001] for reporting it.
 
'''v1.1.10 2020/04/19'''
*UPDATE: If you downloaded the NRO binary before 2020-04-30 10:25 PM (UTC-4), please re-download it again. A quick UI fix was applied to display the "Batch mode" message at the top when no orphan titles are available.
*Built using libnx v3.1.0.
*Updated save.c/h to reflect changes made by shchmue in Lockpick_RCM. Fixes crashes under HOS 10.0.0.
*Fixed a nasty stack corruption issue caused by improper handling of FatFs objects. Fixes ES savefile mounting errors throughout the application (e.g. batch mode, ticket dumping).
 
[https://github.com/DarkMatterCore/nxdumptool/releases Release notes.]
 
==Credits==
Thanks to:
*[https://github.com/MCMrARM MCMrARM], for creating the original application.
*[https://github.com/RSDuck RSDuck], for vba-next-switch port. It's UI menu code was taken as a basis for this application.
*[https://github.com/foen foen], for giving me some pretty good hints about how to use the NCM service.
*[https://github.com/yellows8 yellows8], for helping me fix a silly bug in my implementation of some NCM service IPC calls.
*[https://github.com/SciresM SciresM], for [https://github.com/SciresM/hactool hactool] (licensed under [https://github.com/SciresM/hactool/blob/master/LICENSE ISC]). It's NCA content handling procedures are reproduced in many parts of the application.
*[https://github.com/The-4n The-4n], for [https://github.com/The-4n/4NXCI 4NXCI] (licensed under [https://github.com/The-4n/4NXCI/blob/master/LICENSE ISC]) and [https://github.com/The-4n/hacPack hacPack] (licensed under [https://github.com/The-4n/hacPack/blob/master/LICENSE GPLv2]). The NCA content patching procedure used in 4NXCI is replicated in the application, as well as the NACP XML generation from hacPack.
*[https://github.com/shchmue shchmue], for [https://github.com/shchmue/Lockpick Lockpick] (licensed under [https://github.com/shchmue/Lockpick/blob/master/LICENSE GPLv2]). It is used as a reference for the runtime key-collection algorithm needed for the NSP dump, ExeFS dump/browse and RomFS dump/browse procedures.
*Björn Samuelsson, for his [http://home.thep.lu.se/~bjorn/crc public domain CRC32 checksum calculation C-code].
*[https://github.com/Adubbz Adubbz], for [https://github.com/Adubbz/Tinfoil Tinfoil] (licensed under [https://github.com/Adubbz/Tinfoil/blob/master/LICENSE MIT]). Its wrappers for ES service IPC calls are used in the application.
*[https://github.com/WerWolv WerWolv], for the SX OS detection procedure used in [https://github.com/WerWolv/EdiZon EdiZon] (licensed under [https://github.com/WerWolv/EdiZon/blob/master/LICENSE GPLv2]).
*ChaN, for the [http://elm-chan.org/fsw/ff/00index_e.html FatFs module] (licensed under [http://elm-chan.org/fsw/ff/doc/appnote.html#license FatFs license]). It is used to read ES savedata files from the BIS System partition.
*[https://github.com/hthh hthh], for his [https://github.com/hthh/switch-reversing switch-reversing repository], which was very helpful to understand how to parse and read information from NSO binaries.
*The [http://www.lz4.org/ LZ4 project], for the LZ4 C-code implementation (licensed under [https://github.com/lz4/lz4/blob/master/lib/LICENSE BSD 2-Clause]).
*[https://github.com/AnalogMan151 AnalogMan] and [https://github.com/0Liam 0Liam], for their constant support and ideas.
*[https://github.com/RattletraPM RattletraPM], for the awesome icon used in the application.
*[https://github.com/fennectech FennecTECH], for testing / breaking stuff inside the application on a regular basis.
*The folks from NSWDB.COM and No-Intro.org, for being kind enough to put up a HTTP(S) endpoint(s) to perform CRC32 checksum lookups.
*The GNOME project, from which the [https://commons.wikimedia.org/wiki/GNOME_High_contrast_icons high contrast icons] were retrieved.
*The folks from ReSwitched, for working towards the creation of a good homebrew ecosystem.
*The Comfy Boyes, for being both awesome and supportive. You know who you are.
*My girlfriend, for putting up with me even though I dedicate most of my free time to this little project, and for doing her best to cheer me up and keep me going. I love you.


== External links ==
== External links ==
* Gbatemp - https://gbatemp.net/threads/nxdumptool-nintendo-switch-dump-tool.508343/
* GitHub - https://github.com/DarkMatterCore/nxdumptool
* Github - https://github.com/DarkMatterCore/nxdumptool
* GBAtemp - https://gbatemp.net/threads/nxdumptool-nintendo-switch-dump-tool.508343/
* Reddit -
* ForTheUsers - https://apps.fortheusers.org/switch/gcdumptool
* Discord - https://discord.gg/SCbbcQx

Latest revision as of 13:03, 10 February 2024

nxdumptool
Nxdumptool.png
General
AuthorDarkMatterCore
TypeUtilities
Version1.1.15
LicenseGPL-2.0
Last Updated2022/02/25
Links
NXDumpTool - Scripts Download - PreRelease
Website
Source
Support Author

Generates XCI/NSP/HFS0/ExeFS/RomFS/Certificate/Ticket dumps from Nintendo Switch gamecards and installed SD/eMMC titles.

Features

  • Generates full Cartridge Image dumps (XCI) with optional certificate removal and/or trimming.
  • Generates installable Nintendo Submission Packages (NSP) from base applications, updates and DLCs stored in the inserted gamecard, SD card and eMMC storage devices.
    • The generated dumps follow the AuditingTool format from Scene releases.
    • Capable of generating dumps without console specific information (common ticket).
    • Capable of generating ticket-less (standard crypto) dumps.
    • Capable of generating dumps from installed updates/DLCs with missing base applications (orphan titles).
    • Compatible with game pre-installs.
    • Batch mode available, with customizable dump settings.
  • Manual gamecard certificate dump.
  • Manual ticket dump from installed SD/eMMC titles + optional removal of console specific data.
  • Compatible with multigame carts.
  • CRC32 checksum calculation for XCI/NSP dumps.
  • XCI/NSP dump verification through CRC32 checksum lookup.
    • Using offline XML database from NSWDB.COM (NSWreleases.xml) (XCI only).
    • Performing an online lookup against the No-Intro database.
  • Bundled-in update capabilities via libcurl.
    • Update to the latest version by downloading it right from GitHub.
    • Update the NSWDB.COM XML database.
  • Precise HFS0 raw partition dumping, using the root HFS0 header from the gamecard.
  • HFS0 partition file data dumping + browser with manual file dump support.
  • Program NCA ExeFS/RomFS section & Data NCA RomFS section file data dumping + browser with manual file dump support.
    • Compatible with base applications, updates and DLCs (if available).
    • Supports manual RomFS directory dumping.
  • Free SD card space checks in place.
  • File splitting support for all operations.
    • Capable of storing split XCI/NSP dumps in directories with the archive bit set.
  • Sequential (multi-session) dump support, in case there's not enough storage space available for a XCI/NSP full dump.
  • Metadata retrieval using NCM and NS services.
  • Dump speed calculation, ETA calculation and progress bar.

Installation

Disclaimer

  • Doesn't work under 1.0.0, and probably never will. The application needs IPC calls that are only available from 2.0.0 onwards.
  • Doesn't work under FW > 1.0.0 and < 4.0.0 if the application is launched using PegaSwitch. This is because PegaSwitch doesn't give full access permissions to the application. Please use PegaScape to reboot your console into a full fledged CFW if you wish to use the application.
  • NSP/ExeFS/RomFS features require the "sdmc:/switch/prod.keys" file. Use Lockpick RCM to generate it.
  • If you go back to Horizon and get an error or black screen when trying to launch the inserted gamecard, just pull it out and re-insert it. No reboot needed. Any help on fixing this bug will be greatly appreciated.

How to setup

  • Place the .nro to the /switch/ folder on the SD card.
  • Operations related to installed SD/eMMC titles require a keys file located at "sdmc:/switch/prod.keys". Use Lockpick RCM to generate it.
  • Please launch the application through title override (hold R while launching a game) whenever possible to avoid memory allocation problems.

User guide

How to merge parts under Windows:

copy /b game.xc0+game.xc1 game.xci

How to merge parts under Linux:

cat game.xc0 game.xc1 > game.xci

Make sure to replace the "game" prefix with the actual filename.

If you don't want to deal with this manual process yourself, you can also use this Windows CMD script or this Linux Bash script, depending on the OS you're using. Both scripts are courtesy of 8BitWonder. Make sure to take a look at the README.txt for instructions.

Screenshots

nxdumptool.png nxdumptool2.png nxdumptool3.png nxdumptool4.png nxdumptool5.png nxdumptool6.png nxdumptool7.png nxdumptool8.png nxdumptool9.png nxdumptool10.png nxdumptool11.png nxdumptool12.png nxdumptool13.png nxdumptool14.png nxdumptool15.png

Changelog

v1.1.15 2022/02/26

  • Built with latest devkitA64 and libnx.
  • Removed AuthoringTool XML generation code to make it possible to dump NSPs from games that use NCAs with sparse / compressed FS sections. Bear in mind ExeFS / RomFS dumping won't still be possible -- using PC tools such as hactoolnet to retrieve data from these dumps is encouraged in the meantime.
  • The NPDM ACID signature/private key patch option is now disabled by default.
  • Updated removeConsoleDataFromTicket() to make it wipe other fields that weren't not being cleared.

v1.1.14 2021/04/21

  • Fixed support for HOS 12.0.x / AMS 0.19.x. If needed, TIPC serialization is now used to dispatch the AtmosphereHasService IPC request.

v1.1.13 2021/02/25

  • Fixed compatibility with latest libnx release.
  • Now using the AtmosphereHasService SM API extension to check if a service is running. More than a year and a half has passed since this feature was introduced in Atmosphère, and it is now part of both SX OS and ReiNX, so it's a justified change. Fixes issues related to sysmodules and SM port exhaustion.

v1.1.12 2020/09/26

  • UPDATE: If you downloaded the NRO binary before 2020-11-10 01:25 AM (UTC-4), please re-download it again. Hotfixes for RomFS-related features, Atmosphère 0.15.0 support and the ability to go back from the ID Offset selection screen were introduced. Not worthy of bumping the version number.
  • Fixed RomFS dumping/browsing support for games with base Program NCAs without a RomFS section (e.g. Fortnite, World of Tanks Blitz, etc.). Big thanks to bigkahuna666 for reporting the issue and providing with testing.

v1.1.11 2020/9/23

  • Built using libnx f01fb21.
  • The application will now only attempt to decrypt the eTicket device RSA keypair if the target title uses a ticket with personalized titlekey crypto, instead of always decrypting it regardless of the ticket crypto type.
  • Fixed a NSP dumping issue where the decrypted titlekey wasn't being set for the current NCA if both the ticket and the decrypted titlekey were retrieved while parsing a previous NCA. Big thanks to sadboys2001 for reporting it.

v1.1.10 2020/04/19

  • UPDATE: If you downloaded the NRO binary before 2020-04-30 10:25 PM (UTC-4), please re-download it again. A quick UI fix was applied to display the "Batch mode" message at the top when no orphan titles are available.
  • Built using libnx v3.1.0.
  • Updated save.c/h to reflect changes made by shchmue in Lockpick_RCM. Fixes crashes under HOS 10.0.0.
  • Fixed a nasty stack corruption issue caused by improper handling of FatFs objects. Fixes ES savefile mounting errors throughout the application (e.g. batch mode, ticket dumping).

Release notes.

Credits

Thanks to:

  • MCMrARM, for creating the original application.
  • RSDuck, for vba-next-switch port. It's UI menu code was taken as a basis for this application.
  • foen, for giving me some pretty good hints about how to use the NCM service.
  • yellows8, for helping me fix a silly bug in my implementation of some NCM service IPC calls.
  • SciresM, for hactool (licensed under ISC). It's NCA content handling procedures are reproduced in many parts of the application.
  • The-4n, for 4NXCI (licensed under ISC) and hacPack (licensed under GPLv2). The NCA content patching procedure used in 4NXCI is replicated in the application, as well as the NACP XML generation from hacPack.
  • shchmue, for Lockpick (licensed under GPLv2). It is used as a reference for the runtime key-collection algorithm needed for the NSP dump, ExeFS dump/browse and RomFS dump/browse procedures.
  • Björn Samuelsson, for his public domain CRC32 checksum calculation C-code.
  • Adubbz, for Tinfoil (licensed under MIT). Its wrappers for ES service IPC calls are used in the application.
  • WerWolv, for the SX OS detection procedure used in EdiZon (licensed under GPLv2).
  • ChaN, for the FatFs module (licensed under FatFs license). It is used to read ES savedata files from the BIS System partition.
  • hthh, for his switch-reversing repository, which was very helpful to understand how to parse and read information from NSO binaries.
  • The LZ4 project, for the LZ4 C-code implementation (licensed under BSD 2-Clause).
  • AnalogMan and 0Liam, for their constant support and ideas.
  • RattletraPM, for the awesome icon used in the application.
  • FennecTECH, for testing / breaking stuff inside the application on a regular basis.
  • The folks from NSWDB.COM and No-Intro.org, for being kind enough to put up a HTTP(S) endpoint(s) to perform CRC32 checksum lookups.
  • The GNOME project, from which the high contrast icons were retrieved.
  • The folks from ReSwitched, for working towards the creation of a good homebrew ecosystem.
  • The Comfy Boyes, for being both awesome and supportive. You know who you are.
  • My girlfriend, for putting up with me even though I dedicate most of my free time to this little project, and for doing her best to cheer me up and keep me going. I love you.

External links

Advertising: