nstool/README.md

83 lines
3.4 KiB
Markdown
Raw Normal View History

2019-01-31 09:10:19 +00:00
# Nintendo Switch Tool (NSTool) ![DeviceTag](https://img.shields.io/badge/Device-SWITCH-e60012.svg)
General purpose reading/extraction tool for Nintendo Switch file formats.
2017-07-18 14:23:37 +00:00
2019-01-31 09:10:19 +00:00
## Supported File Formats
* Meta (.npdm)
2021-10-16 08:01:09 +00:00
* PartitionFS (and Sha256PartitionFS) (includes raw .nsp)
* RomFS
2021-10-23 03:38:44 +00:00
* N**X** Game**C**ard **I**mage (.xci)
* **N**intendo **C**ontent **A**rchive (.nca)
* **C**o**n**tent **M**e**t**adata (.cnmt)
* **N**intendo **S**hared **O**bject (.nso)
* **N**intendo **R**elocatable **O**bject (.nro)
* **Ini**tial Process List (.ini)
* **K**ernel **I**nitial **P**rocess (.kip)
* **N**intendo **A**pplication **C**ontrol **P**roperty (.nacp)
* ES **Cert**ificate (.cert)
* ES **Ti**c**k**et (v2 only) (.tik)
2017-07-18 14:23:37 +00:00
2019-01-31 09:10:19 +00:00
# Usage
```
Usage: nstool [options... ] <file>
2019-01-31 09:10:19 +00:00
General Options:
-d, --dev Use devkit keyset.
-k, --keyset Specify keyset file.
-t, --type Specify input file type. [xci, pfs, romfs, nca, meta, cnmt, nso, nro, ini, kip, nacp, aset, cert, tik]
-y, --verify Verify file.
2019-01-31 09:10:19 +00:00
Output Options:
--showkeys Show keys generated.
--showlayout Show layout metadata.
-v, --verbose Verbose output.
2018-08-07 05:39:55 +00:00
2019-01-31 09:10:19 +00:00
XCI (GameCard Image)
nstool [--listfs] [--update <dir> --logo <dir> --normal <dir> --secure <dir>] <.xci file>
--listfs Print file system in embedded partitions.
--update Extract "update" partition to directory.
--logo Extract "logo" partition to directory.
--normal Extract "normal" partition to directory.
--secure Extract "secure" partition to directory.
2019-01-31 09:10:19 +00:00
PFS0/HFS0 (PartitionFs), RomFs, NSP (Ninendo Submission Package)
nstool [--listfs] [--fsdir <dir>] <file>
--listfs Print file system.
--fsdir Extract file system to directory.
2019-01-31 09:10:19 +00:00
NCA (Nintendo Content Archive)
nstool [--listfs] [--bodykey <key> --titlekey <key>] [--part0 <dir> ...] <.nca file>
--listfs Print file system in embedded partitions.
--titlekey Specify title key extracted from ticket.
--bodykey Specify body encryption key.
--tik Specify ticket to source title key.
--cert Specify certificate chain to verify ticket.
--part0 Extract "partition 0" to directory.
--part1 Extract "partition 1" to directory.
--part2 Extract "partition 2" to directory.
--part3 Extract "partition 3" to directory.
2021-10-23 03:43:07 +00:00
NSO (Nintendo Shared Object), NRO (Nintendo Relocatable Object)
2019-01-31 09:10:19 +00:00
nstool [--listapi --listsym] [--insttype <inst. type>] <file>
--listapi Print SDK API List.
--listsym Print Code Symbols.
--insttype Specify instruction type [64bit|32bit] (64bit is assumed).
2021-10-23 03:43:07 +00:00
INI (Initial Process List)
2019-01-31 09:10:19 +00:00
nstool [--kipdir <dir>] <file>
--kipdir Extract embedded KIPs to directory.
ASET (Homebrew Asset Blob)
nstool [--listfs] [--icon <file> --nacp <file> --fsdir <dir>] <file>
--listfs Print filesystem in embedded RomFS partition.
--icon Extract icon partition to file.
--nacp Extract NACP partition to file.
--fsdir Extract RomFS partition to directory.
```
2018-04-25 04:59:42 +00:00
2019-01-31 09:10:19 +00:00
# External Keys
NSTool doesn't embed any keys that are copyright protected. However keys can be imported via various keyset files.
See [SWITCH_KEYS.md](/SWITCH_KEYS.md) for more info.
# Building
See [BUILDING.md](/BUILDING.md).