mirror of
https://github.com/jakcron/nstool.git
synced 2024-12-22 02:35:28 +00:00
Update readmes.
This commit is contained in:
parent
af94654a2d
commit
00081c6542
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
|||
NXTools
|
||||
NNTools
|
||||
Copyright (c) 2017-2018 Jack
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
|
25
README.md
25
README.md
|
@ -1,35 +1,22 @@
|
|||
# NXTools
|
||||
# NNTools
|
||||
|
||||
Tools & Libraries for NX (Nintendo Switch).
|
||||
Tools & Libraries for Nintendo devices.
|
||||
|
||||
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)
|
||||
|
||||
# Tools
|
||||
|
||||
* __nstool__ - read *.npdm, read/extract PartitionFS (PFS0|HFS0) blobs (including *.nsp), read/extract RomFS blobs, read/extract *.xci, read/extract *.nca, read *.cnmt, read *.nso, read *.nro, read *.nacp
|
||||
* [__nstool__](/programs/nstool/README.md) - General purpose reading/extraction tool for Nintendo Switch file formats.
|
||||
|
||||
# Libraries
|
||||
|
||||
* __libfnd__ - Foundation library.
|
||||
* __libcrypto__ - Cryptographic functions (AES,SHA,RSA). Wrapper for [mbedTLS](https://github.com/ARMmbed/mbedtls)
|
||||
* __libcompress__ - Compression algorithms (LZ4). Wrapper for [lz4](https://github.com/lz4/lz4)
|
||||
* __libpki__ - Processes Nintendo's proprietary PKI.
|
||||
* __libes__ - Processes Nintendo's eShop file types.
|
||||
* __libnx__ - Processes NX file types.
|
||||
* __libnx-hb__ - Processes NX file types (homebrew extensions).
|
||||
* __libhac__ - Processes Nintendo Switch file types.
|
||||
* __libhac-hb__ - Processes Nintendo Switch file types (homebrew extensions).
|
||||
|
||||
# Building
|
||||
|
||||
On MacOS/Linux/WSL run `make`.
|
||||
|
||||
For Windows, Visual Studio 2017 is supported.
|
||||
|
||||
# External Keys
|
||||
|
||||
Programs/libraries don't embed any keys that are copyright protected. However keys can be imported via a keyset file.
|
||||
|
||||
For programs that support it, the keyset file can be provided via the command line (see program usage for details). Alternatively a keyset file located in ___$HOME/.switch/prod.keys___ (or ___$HOME/.switch/dev.keys___ for dev) will be imported automatically if one is not provided at the command line.
|
||||
|
||||
Keyset files are ASCII text files containing one key per line, in the form "__key_name = HEXADECIMALKEY__". Case and whitespace do not matter, ';' character can be used to insert comments.
|
||||
|
||||
See [KEYS.md](/KEYS.md) for more details.
|
||||
For Windows, Visual Studio 2017 is supported.
|
|
@ -1,5 +1,19 @@
|
|||
# Format
|
||||
Programs in NXTools currently recognise the following keys (## represents a hexadecimal number between 00 and 1F):
|
||||
|
||||
# About
|
||||
Keyset files are ASCII text files containing one key per line, in the form "__key_name = HEXADECIMALKEY__". Case and whitespace do not matter, ';' character can be used to insert comments.
|
||||
|
||||
# Loading keyset files automatically
|
||||
If a keyset file is located in ___$HOME/.switch/___ it will be loaded automatically.
|
||||
|
||||
# General Keys (prod.keys and dev.keys)
|
||||
Some switch files formats feature encryption and or cryptographic signatures. In order to process these file formats, some keys are required. These keys can be supplied via a keyfile: ___prod.keys___ (or ___dev.keys___ for devkit variants).
|
||||
|
||||
This keyset file can be provided via the command line (refer to usage for details).
|
||||
|
||||
|
||||
|
||||
## Format
|
||||
The following keys are recognised (## represents a hexadecimal number between 00 and 1F):
|
||||
|
||||
```
|
||||
; Key Sources
|
||||
|
@ -47,8 +61,8 @@ acid_sign_key_modulus : RSA2048 Modulus (0x100 bytes)
|
|||
acid_sign_key_private : RSA2048 Private Exponent (0x100 bytes)
|
||||
```
|
||||
|
||||
# Compatibility with hactool keyset files
|
||||
NXTools keyset files share the same keyset file format as [hactool](https://github.com/SciresM/hactool/blob/master/KEYS.md), but names of keys may differ. For compatibility, hactool names for equivalent keys are accepted.
|
||||
## Compatibility with hactool keyset files
|
||||
`prod.keys` (and `dev.keys`) keyset files share the same keyset file format as [hactool](https://github.com/SciresM/hactool/blob/master/KEYS.md), but names of keys may differ. For compatibility, hactool names for equivalent keys are accepted.
|
||||
```
|
||||
titlekek_source : hactool alias for ticket_commonkey_source
|
||||
header_key_source : hactool alias for nca_header_key_source
|
73
programs/nstool/README.md
Normal file
73
programs/nstool/README.md
Normal file
|
@ -0,0 +1,73 @@
|
|||
# Nintendo Switch Tool (NSTool) ![DeviceTag](https://img.shields.io/badge/Device-SWITCH-e60012.svg)
|
||||
General purpose reading/extration tool for Nintendo Switch file formats.
|
||||
|
||||
## Supported File Formats
|
||||
* NPDM (.npdm)
|
||||
* PartitionFS (and HashedPartitionFS) (includes raw .nsp)
|
||||
* RomFS
|
||||
* GameCard Image (.xci)
|
||||
* Nintendo Content Archive (.nca)
|
||||
* Content Metadata (.cnmt)
|
||||
* Nintendo Software Object (.nso)
|
||||
* Nintendo Relocatable Software Object (.nro)
|
||||
* Nintendo Application Control Property (.nacp)
|
||||
* ES Ticket (v2 only) (.tik)
|
||||
* PKI Certificate (.cert)
|
||||
|
||||
# Usage
|
||||
```
|
||||
Usage: nstool [options... ] <file>
|
||||
|
||||
General Options:
|
||||
-d, --dev Use devkit keyset.
|
||||
-k, --keyset Specify keyset file.
|
||||
-t, --type Specify input file type. [xci, pfs, romfs, nca, npdm, cnmt, nso, nro, nacp, aset, cert, tik]
|
||||
-y, --verify Verify file.
|
||||
|
||||
Output Options:
|
||||
--showkeys Show keys generated.
|
||||
--showlayout Show layout metadata.
|
||||
-v, --verbose Verbose output.
|
||||
|
||||
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.
|
||||
|
||||
PFS0/HFS0 (PartitionFs), RomFs, NSP (Ninendo Submission Package)
|
||||
nstool [--listfs] [--fsdir <dir>] <file>
|
||||
--listfs Print file system.
|
||||
--fsdir Extract file system to directory.
|
||||
|
||||
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.
|
||||
--part0 Extract "partition 0" to directory.
|
||||
--part1 Extract "partition 1" to directory.
|
||||
--part2 Extract "partition 2" to directory.
|
||||
--part3 Extract "partition 3" to directory.
|
||||
|
||||
NSO (Nintendo Software Object), NRO (Nintendo Relocatable Object)
|
||||
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).
|
||||
|
||||
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.
|
||||
```
|
||||
|
||||
# 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.
|
Loading…
Reference in a new issue