Difference between revisions of "SD Filesystem"

From Nintendo Switch Brew
Jump to navigation Jump to search
 
(9 intermediate revisions by 3 users not shown)
Line 9: Line 9:
  
 
== Album ==
 
== Album ==
Contains the screenshots: "YYYY/MM/DD/<hex>.jpg". These contain some sort of MAC, the system will display an error for screenshots with invalid MACs.
+
Contains the screenshots: "YYYY/MM/DD/<[[Capture_services#AlbumFileDateTime|DateTime string]]>-<title-specific hex ID string>.jpg". These are [[Capture_services#Notes|MAC]]'d, contents with an invalid MAC will display an error on view.
 +
 
 +
When an Application recorded video via [[Applet_Manager_services#CreateMovieMaker|MovieMaker]], the "Extra" sub-directory contains the recorded Application videos: "/Extra/<title-specific hex ID string>/YYYY/MM/DD/<[[Capture_services#AlbumFileDateTime|DateTime string]]>-<ID string>.mp4".
 +
 
 +
"<title-specific hex ID string>" is the same for both screenshots and "Extra".
  
 
== save ==
 
== save ==
 
Contains system-only savedata "8000000000000000" and "8000000000000124".
 
Contains system-only savedata "8000000000000000" and "8000000000000124".
 +
 +
8000000000000000 is a [[Filesystem_services|FS module]] save describing the other system savedata on the SD card (normally only 8000000000000124).
 +
 +
8000000000000124 is the [[NCM_services|NCM module]] save describing what contents are installed to the SD card.
  
 
== Contents ==
 
== Contents ==
Contains directories "placehld" and "registered".
+
Contains directories "placehld" and "registered", which didn't exist until [[2.0.0]].
  
Also contains file "private". Modifying this file results in the system throwing the <this microSD is for another system> error.
+
Also contains file "private", which stores the 0x10 [[Filesystem_services#SetSdCardEncryptionSeed|sd card seed verification vector]].  
  
===placehld and registered ===
+
[4.0.0+] Also contains file "private1", which stores 0x20 bytes with the last 0x10 being random.
"placehld" and "registered" are the same, except that the former stores the temp data during eShop title download, while the latter is for the final title data. The contents of the former for a title("placehld/<hex>/") are moved into the latter when title download finishes.
 
  
Some of the "placehld/<hex>" directories are temp-only and don't get moved into "registered". These are deleted when the title is launched(?), at that point the directories are already empty.
+
=== placehld and registered ===
 +
"placehld" and "registered" store game contents; contents are initially downloaded temporarily into the "placehld" folder, and then [[NCM_services#IContentStorage|moved into the registered folder]] when downloading is complete.
 +
 
 +
Some of the "placehld/<hex>" directories are temp-only and don't get moved into "registered".
  
 
No titleIDs are stored in any directories/filenames here.
 
No titleIDs are stored in any directories/filenames here.
 +
 +
All hex IDs (shown below as 000000XX and [[NCM_services#NcaID|NcaId]]) used here are unique per title/content. XX is calculated as the first byte from the output of the binary SHA-256(Nca directory).
 +
 +
Game contents are stored inside [[NAX0]] archives; due to the 4 GB filesize limit on FAT32, contents that are bigger than 4 GB have additional file contents automatically split into separate files. This automatic file-splitting occurs even on exFAT SD cards where it is not necessary.
  
 
  <sub-directory under Contents>
 
  <sub-directory under Contents>
  └── <directories with upper-case hex: XXXXXXXX>
+
  └── <directories with upper-case hex: 000000XX>
     └── <lowercase hex [[Content_Manager_services|NcaId]]>.nca
+
     └── <lower-case hex Nca directory>.nca
         └── 00 (Actual file for data storage)
+
        └── 00 [[NAX0|actual file for data storage]]
 +
         └── 01 (storage for file data at +4GB in the actual NCA)
 +
        └── {etc}

Latest revision as of 19:03, 17 March 2020

Overview

sd
└── Nintendo
    ├── Album
    ├── Contents
    └── save

All files stored under the Contents sub-directories and save/ use the NAX0 format.

Album

Contains the screenshots: "YYYY/MM/DD/<DateTime string>-<title-specific hex ID string>.jpg". These are MAC'd, contents with an invalid MAC will display an error on view.

When an Application recorded video via MovieMaker, the "Extra" sub-directory contains the recorded Application videos: "/Extra/<title-specific hex ID string>/YYYY/MM/DD/<DateTime string>-<ID string>.mp4".

"<title-specific hex ID string>" is the same for both screenshots and "Extra".

save

Contains system-only savedata "8000000000000000" and "8000000000000124".

8000000000000000 is a FS module save describing the other system savedata on the SD card (normally only 8000000000000124).

8000000000000124 is the NCM module save describing what contents are installed to the SD card.

Contents

Contains directories "placehld" and "registered", which didn't exist until 2.0.0.

Also contains file "private", which stores the 0x10 sd card seed verification vector.

[4.0.0+] Also contains file "private1", which stores 0x20 bytes with the last 0x10 being random.

placehld and registered

"placehld" and "registered" store game contents; contents are initially downloaded temporarily into the "placehld" folder, and then moved into the registered folder when downloading is complete.

Some of the "placehld/<hex>" directories are temp-only and don't get moved into "registered".

No titleIDs are stored in any directories/filenames here.

All hex IDs (shown below as 000000XX and NcaId) used here are unique per title/content. XX is calculated as the first byte from the output of the binary SHA-256(Nca directory).

Game contents are stored inside NAX0 archives; due to the 4 GB filesize limit on FAT32, contents that are bigger than 4 GB have additional file contents automatically split into separate files. This automatic file-splitting occurs even on exFAT SD cards where it is not necessary.

<sub-directory under Contents>
└── <directories with upper-case hex: 000000XX>
    └── <lower-case hex Nca directory>.nca
        └── 00 actual file for data storage
        └── 01 (storage for file data at +4GB in the actual NCA)
        └── {etc}