Title Database: Difference between revisions
Effect of removing ticket.db |
→Title Info Entry: tickets may be larger than 0x350 |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 4: | Line 4: | ||
* sdmc/Nintendo 3DS/<ID0>/<ID1>/dbs | * sdmc/Nintendo 3DS/<ID0>/<ID1>/dbs | ||
ID0 is the first 0x10-bytes from a SHA256 [[nand/private/movable.sed|hash]]. The installation of [[SD Filesystem|SD Card]] titles was introduced in the [[2.0.0-2]] update and the SD dbs files are encrypted. These files are [[ | ID0 is the first 0x10-bytes from a SHA256 [[nand/private/movable.sed|hash]]. The installation of [[SD Filesystem|SD Card]] titles was introduced in the [[2.0.0-2]] update and the SD dbs files are encrypted by [[SD Filesystem|the general SD filesystem encryption rule]]. These files are [[DISA and DIFF|DIFF containers]]. These DIFF files do not use external IVFC level 4, so all database data is duplicated in the container. In this page only the inner content of the container is described. | ||
These files are only created on SD (via [[Application_Manager_Services|AM]]) if they don't exist when the [[eShop]] application is starting up, during network init etc (prior to showing the "system update required" dialog). | These files are only created on SD (via [[Application_Manager_Services|AM]]) if they don't exist when the [[eShop]] application is starting up, during network init etc (prior to showing the "system update required" dialog). | ||
Line 14: | Line 14: | ||
! Stored in CTR-NAND | ! Stored in CTR-NAND | ||
! Filename | ! Filename | ||
! [[ | ! [[DISA and DIFF#CTR-9DB0|CTR-9DB0]] ID | ||
! Description | ! Description | ||
|- | |- | ||
Line 54: | Line 54: | ||
|} | |} | ||
The | The inner content of the container consists of a pre-header with size of 0x80 identifying the Database Type, followed by a BDRI container. The offsets in the BDRI header are usually relative to the offset to the start of the BDRI header (0x80 in the file) | ||
== Pre Header == | == Pre Header == | ||
Line 73: | Line 71: | ||
| 0x78 | | 0x78 | ||
| Reserved | | Reserved | ||
|} | |||
For ticket.db different pre header is used: | |||
{| class="wikitable" | |||
|- | |||
! Start | |||
! Length | |||
! Description | |||
|- | |||
| 0x00 | |||
| 4 | |||
| Database Type "Magic" (see below) | |||
|- | |||
| 0x04 | |||
| 0x04 | |||
| Unknown (always 0x00000001 ?) | |||
|- | |||
| 0x08 | |||
| 0x04 | |||
| Unknown | |||
|- | |||
| 0x0C | |||
| 0x04 | |||
| Unknown (0x30 smaller than previous one) | |||
|} | |} | ||
Line 81: | Line 104: | ||
! Database Type | ! Database Type | ||
! Magic | ! Magic | ||
|- | |||
| CTR-NAND ticket.db | |||
| TICK | |||
|- | |- | ||
| CTR-NAND import.db | | CTR-NAND import.db | ||
Line 103: | Line 129: | ||
== BDRI == | == BDRI == | ||
This is a variant of [[Inner FAT|FAT filesystem]]. It consists one "root" directory and multiple "files". Each "file" is one title info entry described below. | |||
This | |||
== Title Info | == Title Info Entry == | ||
An entry contains information taken from both the application NCCH file(s) and TMD. | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 315: | Line 196: | ||
| 0x2c | | 0x2c | ||
| Reserved | | Reserved | ||
|} | |||
For ticket.db title info, there is a header indicates ticket count (as a Title ID can have more than one ticket installed). Then each entry contains the size, followed by the actual ticket data. | |||
{| class="wikitable" | |||
|+ Header | |||
|- | |||
! Start | |||
! Length | |||
! Description | |||
|- | |||
| 0x0 | |||
| 4 | |||
| Amount of tickets X | |||
|- | |||
| 0x4 | |||
| X * (size of tickets + 4) | |||
| Ticket entries | |||
|} | |||
{| class="wikitable" | |||
|+ Ticket entry | |||
|- | |||
! Start | |||
! Length | |||
! Description | |||
|- | |||
| 0x0 | |||
| 4 | |||
| Ticket data size X (often 0x350 but some DLC tickets may be larger) | |||
|- | |||
| 0x4 | |||
| X | |||
| [[Ticket|Ticket]] data | |||
|} | |} | ||
Line 396: | Line 309: | ||
Removing ticket.db from a New-3DS with signature checks disabled will not result in an unbootable system, however all icons except Slot-1 will disappear from Home. Applets can however still be used. Recovery can be accomplished via [[Hardware|hardmod]] or [[arm9loaderhax]] plus a known good backup of the file (or the whole partition or disk); Gamecard exploits were not tested, and Browserhax did not work. | Removing ticket.db from a New-3DS with signature checks disabled will not result in an unbootable system, however all icons except Slot-1 will disappear from Home. Applets can however still be used. Recovery can be accomplished via [[Hardware|hardmod]] or [[arm9loaderhax]] plus a known good backup of the file (or the whole partition or disk); Gamecard exploits were not tested, and Browserhax did not work. | ||