Difference between revisions of "Extdata"

From 3dbrew
Jump to navigation Jump to search
Line 38: Line 38:
 
|}
 
|}
  
==== Directories ====
+
==== Filesystem structure ====
  
When extdata is created, these directories are *always* created regardless of whether the title actually uses them.
+
When extdata is created, these are *always* created regardless of whether the title actually uses them.
 +
User extdata and SpotPass extdata use separate mount points at /user and /boss. Therefore one mount can't access the other directory, and also can't access /icon.(The title's SpotPass extdata can be mounted by the title itself, if it uses SpotPass)
  
* /icon Presumably contains the icon displayed in data management.
+
* /icon This file contains the extdata icon displayed in data management. This icon can only be written to by titles when creating extdata, titles would have to recreate extdata to change the icon. Reading this icon isn't done by directly reading the file, this is done by other means.
* /user Presumably contains the title's actual files for "extra data".
+
* /user Contains the title's actual extdata files.
* /boss Presumably contains content downloaded/transferred via [[SpotPass]] in SD extdata, and in some cases [[StreetPass]] data in NAND extdata possibly.(SD extdata can store StreetPass data but usually NAND extdata is used for that)
+
* /boss Can contain [[SpotPass]] and possibly [[StreetPass]] content. SpotPass content is *always* stored in SD extdata, while StreetPass content is usually but not always stored in NAND extdata.
  
 
=== Info on titles extdata ===
 
=== Info on titles extdata ===

Revision as of 06:42, 9 March 2012

This page describes the format and encryption of extdata, "extra data" stored on SD card and NAND. At /Nintendo 3DS/<SomeID>/<SomeID>/extdata/00000000 on SD is directories for each title. Some titles have Quota.dat stored in these directories, not all titles use it. Then there's a sub-directory 00000000, which contains the actual extdata. Size and number of files in this dir varies per title.

Encryption

These files are encrypted with AES-CTR. The key is unknown, this is console-unique. The CTR includes the titleID and filename. The base CTR is fixed: the CTR never changes after each write. Thus it is possible to obtain some cleartext by XORing one file(like newly created extdata) with a newer file, where the newer file overwrote zeros in the original file with non-zero data.

Filesystem

Most extdata uses the same FS as savegames, except extdata uses DIFF instead of DISA. However some extdata files are raw, without any FS. Quota.dat uses the same encryption as extdata, and seems to use the same FS as the actual extdata. Modifying various bytes in Quota.dat didn't cause any errors to be thrown, likewise for deleting Quota.dat on the latest system version. Titles that used to create Quota.dat on old sys versions, no longer create Quota.dat on the latest sys version. Therefore it's unknown whether Quota.dat is even used any-more on the latest system version at all.

QUOT

  • This seems to be stored in Quota.dat FS somewhere?
Start Length Description
0x0 4 Magic ("QUOT")
0x4 4 Magic Number (0x30000)
0x8 8 Unknown
0x10 0x38 Unknown

Filesystem structure

When extdata is created, these are *always* created regardless of whether the title actually uses them. User extdata and SpotPass extdata use separate mount points at /user and /boss. Therefore one mount can't access the other directory, and also can't access /icon.(The title's SpotPass extdata can be mounted by the title itself, if it uses SpotPass)

  • /icon This file contains the extdata icon displayed in data management. This icon can only be written to by titles when creating extdata, titles would have to recreate extdata to change the icon. Reading this icon isn't done by directly reading the file, this is done by other means.
  • /user Contains the title's actual extdata files.
  • /boss Can contain SpotPass and possibly StreetPass content. SpotPass content is *always* stored in SD extdata, while StreetPass content is usually but not always stored in NAND extdata.

Info on titles extdata

TitleID Low Region Description Versions
000004aa USA Nintendo Video Extra Data

This is where the video files are stored, and includes the thumbnail, the description, and possibly some checksum info in each video file stored in the extdata images. There are always 9 files within the subdirectory "00000000" of this folder, even without any videos downloaded. The files are "00000001" - "00000009", and "00000003" - "00000008" have the same filesize of 50.7 MB. It is possible to restore the older videos by overwriting all the files within this directory. Provided of course you have made a backup of the files before hand, by copying all the files within this directory to your computer. As far I'm aware its not possible to mix and match the files in order to get certain videos in one grouping, ie. having all 3 Zelda orchestral recordings in one group of 4 Nintendo videos.

v0
000004ab EUR Nintendo Video Extra Data

Not checked too much, but looks at first glance like USA variant, 9 files total, files 3-8 are 50MBs.

v0