Line 10: |
Line 10: |
| /title.db | | /title.db |
| | | |
− | "'''title.db'''" - This file (among other things perhaps), archives data about titles installed on the 3DS which includes their [[Serials#Product Code|Product Code]], whether the title uses an [[NCCH#CFA|electronic manual]], Title ID, Title size and Title Version(the title version determines the name of the [[Title Data Structure|.cmd]] file which contains data from the title TMD used for anti-tampering purposes). | + | "'''title.db'''" - With a fixed size of 0x31E400 bytes, this [[Extdata]] image embeds two almost identical copies(the latter is probably an older backup) of the Title Database. For each installed title, the following information is known to be stored: |
| + | |
| + | * Title ID - Taken from the main [[NCCH#CXI|CXI]]/[[TMD]] |
| + | * Product Code - Taken from the main [[NCCH#CXI|CXI]] |
| + | * [[TMD|Title Size]] - This is generally larger than the total size of the Content. |
| + | * [[TMD|Title Type]] |
| + | * [[TMD|Title Version]] |
| + | * [[Title Data Structure|.tmd]] Content ID |
| + | * [[Title Data Structure|.cmd]] Content ID |
| + | * [[Extdata#SD Extdata|ExtdataID low]] (if the title uses ExtData) |
| + | * Whether or not a [[NCCH#CFA|Electronic Manual]] is used |
| + | |
| + | It is important to note the database doesn't contain a hash of the [[Title Data Structure|.cmd]]. So if a user has more than one valid set of [[Title Data Structure|application data]] for a given .cmd Content ID they can be manually interchanged without issue. Though renaming a .cmd file to match the Content ID which the title.db is expecting will result in an error, as the CTR for the per-console encryption layer changes depending on the file path, and the MAC of the .cmd is probably generated with the .cmd Content ID in mind. |
| | | |
− | *This data is taken from the title's [[Title Data Structure|TMD]] and [[NCCH#CXI|executable NCCH]] during install, this is also partly why the encrypted TMD found in each title directory is redundant, as the important information is moved to the ".db" and ".cmd" files during title installation.
| |
− | *This file '''does not''' store a hash of the [[Title Data Structure|.cmd]] file for each given title, but the title.db expects to find a [[Title Data Structure|.cmd]] with a name specific to the title version, and the nature of the [[Title Data Structure|.cmd]] file makes re-naming/editing or using under a different title ID(by the end user) detectable (users of retail consoles are not going to have more than one .cmd file for a given titleID/title version).
| |
− | *Since this file controls what titles are accessible to the 3DS, it is possible to move between different versions of a title if you have the title.db and title data for each version of that specific title.
| |
− | *This file isn't updated when downloading a title, until installation is complete. So if the download is un-expectedly interrupted/canceled this prevents title rights from being written to the title.db. If the title rights are erroneously written, the [[Application Manager Services PXI|AM]] would mistake the title for being installed, and not allow the title to be re-downloaded(of course erroneous title rights can be deleted from system settings, however this is only possible with titles installed to the SD Card). Also in the case of title updates, this has the added benefit of allowing the user to revert to the version of the title before the update, if the download of the update is canceled before completion.
| |
− | * IMPORTANT - turning off power while the title.db is edited(the final stage of installing titles), will most likely corrupt your 3DS' title.db. Which will make installed titles inaccessible. While this creates no permanent damage for SD Card titles and can be easily fixed using a backup title.db, or just re-downloading titles from the [[eShop]]. Corrupting the NAND title.db, will most likely result in a brick.
| |
| | | |
| "'''import.db'''" - The function of the file is not well understood. It appears to be related to the download/install of titles, as in the progress of downloading titles this file will have changed but the title.db will not be modified until the title has been properly downloaded. | | "'''import.db'''" - The function of the file is not well understood. It appears to be related to the download/install of titles, as in the progress of downloading titles this file will have changed but the title.db will not be modified until the title has been properly downloaded. |