Switch > System Save > 8000000000000040
This archive is mounted to apprecdb:/ by the ns sysmodule.
The following files can be found in this archive:
All fields are encoded in little-endian byte order.
signature
This file is checked by the ns process to determine whether the other files need to be created. If this file does not exist, or its content is different than expected, the signature, index and kvs files are deleted and recreated by ns.
| Offset | Size | Description |
|---|---|---|
| 0x0 | 8 | Always 0 |
| 0x8 | 4 | Magic number (ARDB) |
| 0xC | 12 | Always 0 |
index
The size of this file is always 0x30010 bytes.
This file contains one entry for every application that is displayed on the home menu, ordered by most recently played. The sequence id is incremented whenever an entry is added or updated. The sequence id of that entry is then set to the incremented value.
| Offset | Size | Description |
|---|---|---|
| 0x0 | 8 | Sequence id |
| 0x8 | 4 | Number of entries |
| 0xC | 4 | Padding (always 0) |
| 0x10 | 24 * 8192 | Index entries |
Every entry is encoded as follows:
| Offset | Size | Description |
|---|---|---|
| 0x0 | 8 | Title id |
| 0x8 | 1 | Unknown |
| 0x9 | 1 | Flags (see below) |
| 0xA | 6 | Padding (always 0) |
| 0x10 | 8 | Sequence id |
The following table describes the flag values:
| Flag | Description |
|---|---|
| 1 | ? |
| 2 | ? |
| 4 | Is preomia application |
| 8 | ? |
kvs/<title id>.val
Note: The title id is encoded in little-endian byte order. For example, the filename for Super Mario Maker 2 is
00c06d00909b0001.val.
This file contains a content entry for the base game, for the update title, and for DLCs. At most 2048 entries can be stored in a file. Therefore, the maximum file size is 0x208 + 24 * 2048 = 0xC208 bytes.
| Offset | Size | Description |
|---|---|---|
| 0x0 | 4 | Number of contents (N) |
| 0x4 | 4 | Padding (always 0) |
| 0x8 | 4 | Corruption error code |
| 0xC | 2 | Unknown |
| 0xE | 1 | Is corrupted |
| 0xF | 1 | Unknown |
| 0x8 | 96 | Unknown |
| 0x68 | 8 | Last timestamp at which content was added |
| 0x70 | 408 | Unknown |
| 0x208 | 24 * N | Contents |
Every content entry is encoded as follows:
| Offset | Size | Description |
|---|---|---|
| 0x0 | 16 | Content meta key |
| 0x10 | 1 | Unknown |
| 0x11 | 7 | Padding (always 0) |
nn::ncm::ContentMetaKey
| Offset | Size | Description |
|---|---|---|
| 0x0 | 8 | Title id |
| 0x8 | 4 | Title version |
| 0xC | 1 | Content meta type |
| 0xD | 1 | Content install type |
| 0xE | 2 | Padding |
nn::ncm::ContentMetaType
| Value | Description |
|---|---|
| 0 | Invalid |
| 1 | System program |
| 2 | System data |
| 3 | System update |
| 4 | Boot image package |
| 5 | Boot image package safe |
| 128 | Application |
| 129 | Patch |
| 130 | Add-on content |
| 131 | Delta |
| 132 | Data patch |
nn::ncm::ContentInstallType
| Value | Description |
|---|---|
| 0 | Full |
| 1 | Fragment only |
| 7 | Invalid |