Help:Dumping games: Difference between revisions

→‎Switch: change instructions for nxdumptool
m (Change from LockPick -> LockPick RCM (Once the bug with nxdumptool is resolved I'll rewrite the Switch portion to something far easier for users))
imported>Leoetlino
(→‎Switch: change instructions for nxdumptool)
Line 15: Line 15:
* [https://github.com/SciresM/hactool hactool]
* [https://github.com/SciresM/hactool hactool]
* Keys (see below)
* Keys (see below)
* [https://github.com/DarkMatterCore/nxdumptool nxdumptool]
*# Run [https://github.com/shchmue/Lockpick_RCM LockpickRCM] on your console in order to dump keys that are required to decrypt contents (or get a copy of the keys manually).
*# Run [https://github.com/shchmue/Lockpick_RCM LockpickRCM] on your console in order to dump keys that are required to decrypt contents (or get a copy of the keys manually).
*# Copy the keys file from your SD to <code>$HOME/.switch/prod.keys</code>.
*# Copy the keys file from your SD to <code>$HOME/.switch/prod.keys</code>.
'''In the instructions below, every time you are dumping a NSP, turn on the "Remove console specific data" and "Generate ticket-less dump" options (to make extraction easier).'''


=== Dumping the base NCA ===
=== Dumping the base NCA ===
Because of how updates work on Switch, the base NCA must be dumped even if you're only interested in 1.6.0.
Because of how updates work on Switch, the base NCA must be dumped even if you're only interested in 1.6.0.


* If your base game is on a '''cartridge''', dump it with [https://github.com/DarkMatterCore/gcdumptool gcdumptool]. You'll get an XCI. Extract the secure partition &mdash; in which the main NCA can be found &mdash; with <code>hactool -t xci -i image.xci --securedir=secure/</code>. The main NCA is the largest NCA in the secure partition.
* On your Switch, open nxdumptool.
* If your base game is stored on the '''NAND''', copy it to the SD card and follow this [https://gist.github.com/khang06/84aabeac507fa99a676d22bb6120cea8 guide]. (You could also extract the NCA from the NAND but that is sensibly more complicated.)
* '''If you have the game card''': Select "Dump gamecard content".
* If your base game is stored on the '''SD card''', follow this [https://gist.github.com/khang06/84aabeac507fa99a676d22bb6120cea8 guide].
* '''If you have the eShop version''': Select "Dump SD card / eMMC content". Select BotW.
 
* Select "NSP dump". If asked to, select "Dump base application NSP".
At this point, you now have the base NCA (~10GB). Its SHA256 hash is efecb2d6befccddc928e44416dbdee38.
* Copy the NSP to a computer, then extract it by running the command <code>hactool -t pfs0 [path to the NSP] --outdir [folder where to place the NCAs]</code> {{CLI help}}. The main NCA will be found in the folder you've told hactool to extract the files to, called <code>efecb2d6befccddc928e44416dbdee38.nca</code>.


=== Dumping the update ===
=== Dumping the update ===
* If your update is stored on the '''NAND''', copy it to the SD card and follow this [https://gist.github.com/khang06/84aabeac507fa99a676d22bb6120cea8 guide]. (Again, you could also extract from the NAND but it's much more complicated.)
* On your Switch, open nxdumptool again.
* If your update is stored on the '''SD card''', follow this [https://gist.github.com/khang06/84aabeac507fa99a676d22bb6120cea8 guide].
* '''If you have a <1.6.0 game card''':
 
** Select "Dump SD card / eMMC content".
You now have the update NCA (see [[Versions]] for NCA hashes).
** Press Y to "dump installed content with missing base application".
** Select 01007EF00011E800 (this is the BotW update title).
** Select "Start NSP dump process".
* '''If you have a 1.6.0 game card''':
** Select "Dump gamecard content".
** Select "NSP dump", then select "Dump installed update NSP".
* '''If you have the eShop version''':
** Select "Dump SD card / eMMC content". Select BotW.
** Select "NSP dump", then select "Dump installed update NSP".
* Copy the NSP to a computer, then extract it by running the command <code>hactool -t pfs0 [path to the NSP] --outdir [folder where to place the NCAs]</code> {{CLI help}}. You now have the update NCA (see [[Versions]] for NCA hashes).


=== Extracting the romfs ===
=== Extracting the romfs ===
Now that you have the base NCA, the update NCA and associated title keys, you can extract the romfs (which contains all [[content]] files):
Now that you have the base NCA and the update NCA, you can extract the romfs (which contains all [[content]] files) by running the command {{CLI help}}:


  hactool -x -t nca path/to/update.nca  --basenca path/to/base.nca --titlekey TITLE_KEY --romfsdir where/to/extract/the/romfs
  hactool -x -t nca path/to/update.nca  --basenca path/to/base.nca --romfsdir where/to/extract/the/romfs
 
where TITLE_KEY is the title key for the update (not the base title!)


To extract the exefs (which contains the [[executable]] and SDK libraries):
To extract the exefs (which contains the [[executable]] and SDK libraries):


  hactool -x -t nca path/to/update.nca  --basenca path/to/base.nca --titlekey TITLE_KEY --exefsdir where/to/extract/the/exefs
  hactool -x -t nca path/to/update.nca  --basenca path/to/base.nca --exefsdir where/to/extract/the/exefs


=== Dumping the DLC ===
=== Dumping the DLC ===
The [[DLC]] can be dumped by following the same procedure. Note that the title key is different.
The [[DLC]] can be dumped by following the same procedure.
 
* '''If you have a game card''':
** Select "Dump SD card / eMMC content".
** Press Y to "dump installed content with missing base application".
** Select 01007EF00011F001 (this is the main BotW DLC title).
** Select "NSP dump".
* '''If you have the eShop version''':
** Select "Dump SD card / eMMC content". Select BotW.
** Select "Dump installed DLC NSP".
* Copy the NSP to a computer, then extract it by running the command <code>hactool -t pfs0 [path to the NSP] --outdir [folder where to place the NCAs]</code> {{CLI help}}. You now have the DLC NCA.
* Extract the exefs and the romfs by following the instructions in the previous section.


[[Category:Guides]]
[[Category:Guides]]
Anonymous user