Changes

998 bytes added ,  08:16, 19 July 2012
no edit summary
Line 16: Line 16:     
== import.db and title.db ==
 
== import.db and title.db ==
With the introduction of the June update the folder structure changed slightly. You will now find "dbs" and "title" folders located in  /Nintendo 3DS/<SomeID>/<SomeID>/ along with the extdata folder. "dbs" contains two files, import.db and title.db. The purpose of the files in the "dbs" is to archive the list of titles installed on the SD card. And perhaps has some SRL data
+
With the introduction of the June update the folder structure changed slightly. You will now find "dbs" and "title" folders located in  /Nintendo 3DS/<SomeID>/<SomeID>/ along with the extdata folder. "dbs" contains two files, import.db and title.db. The purpose of the files in the "dbs" is to archive the list of titles installed on the SD card. These two files are only used for the management of SDMC installed 3DS Titles. The "title.db" file, archives the installed titles aswell as their, names, icons and size. The "import.db" also changes when a title is installed or deleted, but doesn't appear to contain info that the titles "title.db" does. Old and new of the "import.db" and "title.db" can be interchanged without any issues. Essentially the "title.db" acts as the DRM or access rights for downloaded SD card titles.
 
  −
The data at the beginning of the file is encrypted, but the rest is cleartext. This file is always 3.1MB, thus this doesn't contain the whole SRL for most DSiWare. The data stored here is not ordered the same way as the src SRL: ARM7 code, ARM9 code, and data are mixed together. The file can contain data from DSiWare that wasn't installed, only listed on the src DSi for DSiWare transfer. (This file is likely some temporary data storage used for DSiWare install etc).
      
title.db seems to be encrypted.
 
title.db seems to be encrypted.
Line 25: Line 23:     
== title ==
 
== title ==
  /title/00040000/ Contains eshop downloads (can someone verify these and add for different regions?):
+
  /title/ Contains eShop title downloads
  00032600 - Pokedex 3D - EUR (verified)
+
  00040000/00032600 - Pokedex 3D - EUR  
  00042a00 - Legend of Zelda - Link's Awakening - EUR
+
  00040000/00042a00 - Legend of Zelda - Link's Awakening - EUR
  0004ab00 - Nintendo Video - EUR
+
  00040000/0004ab00 - Nintendo Video - EUR
  00052000 - Let's Golf 3D - EUR
+
  00040000/00052000 - Let's Golf 3D - EUR
  00054300 - 3D Classics Excitebike - USA
+
  00040000/00054300 - 3D Classics Excitebike - USA
  00054e00 - 3D Classics Excitebike - EUR (verified)
+
  00040000/00054e00 - 3D Classics Excitebike - EUR
  00045C00 - 3D Classics Excitebike - JPN
+
  00040000/00045C00 - 3D Classics Excitebike - JPN
 
  For more IDs, see the 00040000 titles on the [[Title_list]].
 
  For more IDs, see the 00040000 titles on the [[Title_list]].
   −
The above title directories contain two dirs: content and data. content contains 00000000.tmd, .app files, and some cmd dir containing 00000001.cmd, all of which are encrypted with a console-unique key. The data dir contains 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.
+
Standard Directory Structure for SDMC Installed Titles:
 +
 
 +
/title/0004XXXX/XXXXXXXX/Content/00000000.tmd
 +
                                /XXXXXXXX.app
 +
                                /cmd/00000001.cmd
 +
/title/0004XXXX/XXXXXXXX/Data/00000001.sav
 +
   
 +
                                               
 +
"'''00000000.tmd'''" - 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 title installation, the important information in TMD is likely stored somewhere, as modifying/deleteing the TMD file, doesn't usually have any effect.
 +
 
 +
 
 +
"'''XXXXXXXX.app'''" - These files are [[NCCH]] files, where the entire file is encrypted with a per-console key. There can be more than one NCCH in this directory, as seen with .[[CCI]] files, the game executable ([[CXI]]) can be accompanied with additionally non-executable NCCH files ([[NCCH#CFA|CFA]]) such as the game manual and DLP Child containers. Determining the contents 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"
 +
|-
 +
!  Index
 +
!  Content Type
 +
|-
 +
|  0000
 +
|  Main Executable (.[[NCCH#CXI|CXI]])
 +
|-
 +
|  0001
 +
|  Home Menu Manual (.[[NCCH#CFA|CFA]])
 +
|-
 +
|  0002
 +
|  DLP Child Container (.[[NCCH#CFA|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).
 +
 
   −
When renaming ''any'' of these files/dir under content, the icon in home-menu is still displayed. Modifying any of these files has same result as renaming them. When renaming the cmd dir/cmd file, or 00000000.app, the 3D banner isn't displayed. When renaming the cmd dir or the file contained in that dir, home-menu will refuse to run the title, and the manual will not work.(will display the black screen saying sdcard isn't inserted) Manual won't load when 00000001.app is renamed, so that .app might be the manual? When the main 00000000.app binary is renamed, the title will not launch and in the manual placeholder text is used for the title name/icon. Home-menu doesn't care at all when tmd is renamed.
+
"'''00000001.cmd'''" - (in some case the file is called "00000002.cmd") May contain hashes, or some other kind of file authentication, as the size of the "00000001.cmd" varies with the number of files in the 'Content' directory. Also, if the "00000001.cmd" cannot be found or is edited, the title is completely non-functional.
   −
The "00000000.tmd" (when decrypted) is identical to the application's tmd found at http://nus.cdn.c.shop.nintendowifi.net/ccs/download/TitleIDhere/tmd except it has the certificate chain removed
     −
The ".app" files are encrypted [[NCCH]] files. The only way to be certain of the function of the encrypted NCCH file(s), is the view the application's TMD on Nintendo's CDN server at http://nus.cdn.c.shop.nintendowifi.net/ccs/download/TitleIDhere/tmd (for title IDs see the [[Title list]]). See [[TMD#Content Index|TMD]] for interpretation of the 'Content Index':
+
'''"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.
     
839

edits