Line 24: |
Line 24: |
| └── content | | └── content |
| ├── <ContentID>.app | | ├── <ContentID>.app |
− | ├── XXXXXXXX.tmd | + | ├── <ContentID>.tmd |
| └── cmd | | └── cmd |
− | └── XXXXXXXX.cmd | + | └── <ContentID>.cmd |
| | | |
| Save Data: | | Save Data: |
Line 42: |
Line 42: |
| ├── content | | ├── content |
| │ ├── <ContentID>.app | | │ ├── <ContentID>.app |
− | │ ├── XXXXXXXX.tmd | + | │ ├── <ContentID>.tmd |
| │ └── cmd | | │ └── cmd |
− | │ └── XXXXXXXX.cmd | + | │ └── <ContentID>.cmd |
| └── data | | └── data |
| └── 00000001.sav | | └── 00000001.sav |
Line 54: |
Line 54: |
| ├── 00000000.ctx | | ├── 00000000.ctx |
| └── content | | └── content |
− | ├── XXXXXXXX.tmd | + | ├── <ContentID>.tmd |
− | ├── XXXXXXXX | + | ├── 00000000 |
| │ └── <ContentID>.app | | │ └── <ContentID>.app |
| └── cmd | | └── cmd |
− | └── XXXXXXXX.cmd | + | └── <ContentID>.cmd |
| | | |
| For a list of 3DS titles see the [[Title list]]. | | 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 console-unique [[AES|keyslot]]. 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 Database|title.db]] and ".cmd" files. | + | "'''<ContentID>.tmd'''" - (The Content ID is a u32, initially: '''00000000''' when the title is first installed. Changing by an increment of +'''0x1''' for each title update the 3DS installs) This is the Title Metadata associated with the title, it is encrypted with a console-unique [[AES|keyslot]]. 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 "<ContentID>.tmd" is redundant, because important title data is extracted and imported into the [[Title Database|title.db]] and ".cmd" files, but is however kept as a reference. |
| | | |
| | | |
− | "'''<ContentID>.app'''" - (The names for these files are taken from the title's [[TMD]]) These files are [[NCCH]] files, where the entire file is encrypted with a console-unique [[AES|keyslot]](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 ([[NCCH#CFA|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*: | + | "'''<ContentID>.app'''" - (The Content ID is a u32, taken from the title's [[TMD]]) These files are [[NCCH]] files, where the entire file is encrypted with a console-unique [[AES|keyslot]](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 ([[NCCH#CFA|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*: |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 83: |
Line 83: |
| *The above table does not apply to DLC content. | | *The above table does not apply to DLC content. |
| | | |
− | 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). | + | 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 [[AES|encrypted]]. Decrypting CDN versions of content, requires the title's [[CommonETicket|ticket]], and the common key specified by an index in the [[CommonETicket|ticket]]. 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. See the below table for the format of the cleartext .cmd file. [[Title Database|Title.db]] contains the ID for the .cmd filename, but does not contain a hash of the .cmd file. In addition it is also encrypted with a console-unique [[AES|keyslot]]. This acts as part of the DRM for installed titles, along with the [[Title Database|title.db]]. | + | "'''<ContentID>.cmd'''" - (The Content ID is a u32, initially: '''00000001''' when the title is first installed. Changing by an increment of +'''0x1''' for each time the 3DS adds/removes '.app' files) This file contains data taken from the title's [[TMD]]. See the below table for the format of the cleartext .cmd file. The [[Title Database|Title.db]] contains the Content ID for the '.cmd' file, but does not contain a hash of the '.cmd' file. In addition it is also encrypted with a console-unique [[AES|keyslot]]. This acts as part of the DRM for installed titles, along with the [[Title Database|title.db]]. |
| | | |
| {| class="wikitable" border="1" | | {| class="wikitable" border="1" |
Line 121: |
Line 121: |
| The last 0x20-bytes in .cmd for SD titles seems to be a SHA-256 hash? | | The last 0x20-bytes in .cmd for SD titles seems to be a SHA-256 hash? |
| | | |
− | '''"00000001.sav"''' - This is the title's encrypted savegame. Renaming these savegames causes home-menu to hang while launching titles, modifying these saves results in the same corruption errors as other savegames. | + | '''"00000001.sav"''' - This is the title's encrypted [[Savegames|savegame]]. Renaming these savegames causes home-menu to hang while launching titles, modifying these saves results in the same corruption errors as other savegames. |
| | | |
| | | |
Line 127: |
Line 127: |
| The unknown signed data is likely an ECDSA public key. | | The unknown signed data is likely an ECDSA public key. |
| | | |
− | '''"XXXXXXXX"''' - This extra directory only found in DLC titles, contains the DLC NCCH content. | + | === DLC Titles === |
| + | |
| + | DLC titles have a different directory structure to most installed titles. This is because all DLC content for a given title is installed under the same Title ID, but DLC add-ons are usually separate purchases, hense the structure altered so any combination of DLC content can be installed. DLC titles can receive 'updates', this is usually in the form of more DLC content and/or DLC bug fixes. Individual DLC content can only be managed from with-in the application using the DLC. |
| + | |
| + | '''"00000000"''' - This extra directory only found in DLC titles, contains the DLC [[NCCH]] content. |
| + | |
| + | |
| + | "'''<ContentID>.tmd'''" - This is not modified by the 3DS, and contains the details for all DLC content(installed or not). |
| + | |
| + | |
| + | "'''<ContentID>.cmd'''" - This contains entries for all '''installed''' DLC [[NCCH]] content, and is updated(<ContentID> will change) every time DLC content is installed/removed. |