Titles installed to the 3DS are installed to either to the NAND(System and Application) or SD Card(Application only), and their respective directory locations are:
- nand/title
- sdmc/Nintendo 3DS/<ID0>/<ID1>/titles
(where ID0 is the first 0x10-bytes from a SHA256 hash)
Note: While all title data found on the SD Card is encrypted, it is not known whether title data on the NAND is encrypted.
And the title data is contained in this directory structure:
/<Title ID High>/<Title ID Low>/Content/XXXXXXXX.tmd /XXXXXXXX.app /cmd/XXXXXXXX.cmd /<Title ID High>/<Title ID Low>/Data/00000001.sav /<Title ID High>/<Title ID Low>/00000000.ctx
For a list of 3DS titles see the Title list.
"XXXXXXXX.tmd" - (file name starts with 00000000.tmd and increases with an increment of "1" for each title version the 3DS is introduced to) This is the Title Metadata associated with the title, it is encrypted with a per-console key. The decrypted TMD is available on Nintendo's CDN server at "http://nus.cdn.c.shop.nintendowifi.net/ccs/download/TitleIDhere/tmd". Though CDN version of the title TMD has a certificate chain attached at the end of the TMD, so removing it will give you the 1:1 decrypted TMD. After installation the "00000000.tmd" is redundant, because important title data is extracted and imported into the title.db and ".cmd" files.
"XXXXXXXX.app" - (There is no pattern to the file name, however for a given title, ".app" file names are not reused) These files are NCCH files, where the entire file is encrypted with a per-console key(this is on top of the encryption of the NCCH contents). There can be more than one NCCH in this directory, as seen with .CCI files, the game executable (CXI) can be accompanied with additional non-executable NCCH files (CFA) such as the electronic manual and DLP Child containers. Determining the function of the encrypted NCCH, is done by finding the Content Index of the "XXXXXXXX.app" file in the title's TMD(see above for retrieving decrypted TMD), interpreting the Content Index is as follows:
Index | Content Type |
---|---|
0000 | Main Executable (.CXI)(In the case of System Data Archives, this is a CFA file) |
0001 | Home Menu Manual (.CFA) |
0002 | DLP Child Container (.CFA) |
Unlike the TMD, a decrypted version of the NCCH files cannot be retrieved from Nintendo's CDN, the NCCH files do exist on Nintendo's CDN but are encrypted. Of course editing/deleting ".app" files will have an effect. Deleting/renaming the manual ".app' will cause the manual not to load when clicked on. And deleting/renaming the executable ".app" will cause the application to not load, and the 3D Banner does not show(The banner is loaded each time from the game's executable NCCH when the home menu loads, it is not cached like the icon and name).
"XXXXXXXX.cmd" - (file name starts with 00000001.cmd and increases with an increment of "1" for each title version the 3DS is introduced to) This file contains data taken from the title's TMD during install. The data includes the title ID, file names and hashes (possibly sizes aswell) of the .app files to prevent tampering. This file appears to be signed(or contains a hash of itself), and keeps a record of its true file name(alternatively it could store the title version, which can be used to determine its true file name). In addition it is also encrypted with a per-console key. This acts as part of the DRM for installed titles, along with the import.db and title.db
"00000001.sav" - This is the title's encrypted savegame. Although these saves look similar to FLASH savegames, these savegames use proper unique CTR for each AES block in the file, and the CTR properly changes for each savegame write. Renaming these savegames causes home-menu to hang while launching titles, modifying saves throws the usual checksum/hash corruption like gamecard flash saves.
"00000000.ctx" - This file is used only while a title is being downloaded from the eShop, it is deleted after the download is completed.(Might be moved to NAND after installation is completed?)