Tutorial  Updated

Extract and Decrypt games, NAND backups, and SD contents with ninfs

This is a tutorial that shows you how to use ninfs (formerly fuse-3ds) to extract the contents of games, NAND backups, and SD card contents. This tutorial is a work in progress; please post a reply if something is confusing or needs a correction.

This supports Windows, macOS, and Linux. This tutorial mostly focuses on the GUI on Windows. For macOS/Linux steps plus CLI/installable-module usage, see the README and latest release at the repository.

What sets ninfs apart from others like ctrtool is that it doesn't need to decrypt separately first. Instead, files are decrypted as needed. For example, if you mount a CIA, you can see all of the files in it, and you only need to copy out what you need. This makes it much faster and more efficient, especially for larger games where it can take a while (and several gigabytes of space) to decrypt!

Want to see a video demonstration? Here is one with Pokémon Ultra Moon, using fuse-3ds v1.0.
In this short video, I show that the CIA is encrypted, then I use ninfs to mount it and browse its contents in Windows/File Explorer. I can also use the decrypted.cxi file to immediately start playing it in Citra.
(Note that slowness is due to the virtual machine, speed would be faster on a normal computer!)

Getting started

Windows users simply need two things:
  • Install the latest release of WinFsp
  • Download the latest release of ninfs at GitHub or the GBAtemp Download Center
    • You should download the win64 version if you're using 64-bit Windows.
Please see the latest release notes for macOS and Linux (+ alternative steps for Windows).

You also need the ARM9 bootROM. You can use boot9strap to dump it by holding START+SELECT+X at boot, and finding it at /boot9strap/boot9.bin on the SD card. You can find boot9strap setup at 3DS Hacks Guide.

For newer digital games (2015+), you also need a SeedDB. Check out the SeedDB list.

Setting up boot9/SeedDB

You will need boot9.bin or boot9_prot.bin, and seeddb.bin. This will be placed at %APPDATA%\3ds on Windows, and `~/.3ds` on macOS/Linux.

If one of the files could not be found, an error will be displayed.
mainwindow-err-win.png

Both boot9 and SeedDB use similar steps for setup. This part shows boot9 steps, but it is the same for SeedDB.

If you click "Fix boot9", you will see a dialog allowing you to choose the boot9 file, and the searched paths.
b9-missing-win.png

Click "Select boot9 to copy..." then find the boot9.bin or boot9_prot.bin file. If it is valid, it will be copied.
b9-copied-win.png

Using the GUI

Run ninfs (either the exe, or the module if you installed it). A console window will appear, then a GUI a few seconds later.
mainwindow-win.png

First, choose the type that you want at the top:
  • CTR Cart Image (".3ds", ".cci")
  • CDN contents (directory with "cetk", "tmd", and contents)
  • CTR Importable Archive (".cia")
  • Executable Filesystem (".exefs", "exefs.bin")
  • Nintendo 3DS NAND backup ("nand.bin")
    • Using a directory instead of drive letter is highly recommended for this!
    • You need the OTP for this if the NAND backup does not have essential.exefs embedded by GodMode9. If you have essential.exefs as a separate file, you can extract it from that. If the Counter can't be automatically generated, you also need the CID.
    • You can write to the NAND. In the GUI, you need to enable this option. Otherwise, the mount will be read-only.
  • NCCH (".cxi", ".cfa", ".ncch", ".app")
  • Read-only Filesystem (".romfs", "romfs.bin")
  • SD Card Contents ("Nintendo 3DS" from an SD card)
    • You need movable.sed from the system whose SD card contents you want to browse. You can get it from essential.exefs, or by copying it from CTRNAND -> private -> movable.sed.
    • You can write to the SD contents. In the GUI, you need to enable this option. Otherwise, the mount will be read-only.
  • 3DSX Homebrew (".3dsx")
  • Titles directory ("title" from NAND or SD)
    • To browse SD card titles, the contents must be decrypted first. You can use the SD Card Contents mount first to do that, then use this one.
  • Nintendo DSi NAND backup ("nand_dsi.bin")
  • Nintendo DS ROM image (".nds", ".srl")
  • Nintendo Switch NAND backup ("rawnand.bin")
Once you choose the type, you need to choose the file (or directory) that you want to mount. This would be the game, NAND, or "Nintendo 3DS" SD card folder that you want.

Finally, click "Mount". If there are no errors, Windows Explorer/File Explorer will automatically open at the mount. Some example contents are shown below.
ciamount-win.png
ncchmount-win.png
nandmount-win.png
Now you can copy out the files you want.
  • If you mounted CCI, CDN, CIA, NCCH, or Titledir, you can see "decrypted.cxi" (or "decrypted.cfa" for non-executable contents) which acts like a decrypted version of the game. You can use it in applications that require decrypted contents like Citra.
  • For NAND, you can use a tool like OSFMount to mount partitions like CTRNAND, TWLN, and TWLP. Make sure you used directory mount, not drive letter.
    If you enabled writing, you can also write back to the partitions. They will be re-encrypted as you write.
  • For SD, you can browse the decrypted contents, and use something like the titledir mount to browse the installed games. You can also write to it, and the files you write will be re-encrypted.
    You can extract game saves and extdata with a tool like 3ds-save-tool.
Once you are done, click "Unmount". The mount will be removed.

Add to context/right-click menu

You can add "Mount with ninfs" to the context menu when you right-click on files. It will try to automatically detect the file type and show it in the GUI, so you can just click Mount.

Open ninfs, click "Help & Extras", then click "Add to menu". Read the dialog, then click "Add entry" or "Remove entry" to add or remove the context menu entry.

If you move or rename the EXE, you will need to re-add it.

Troubleshooting

  • I am using Windows 7, 8, or 8.1 and am getting "The procedure entry point ucrtbase.terminate could not be located in the dynamic link library api-ms-win-crt-runtime-l1-1-0.dll.".
  • I am on Windows 7 and am getting an error saying the driver is not signed when trying to install WinFsp.
    I am on Windows 7 and am getting "Cannot create WinFsp-FUSE file system: unspecified error."
 
Last edited by ihaveahax,

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,822
Country
United States
Safe mode same error, and yes it's all the way down, because the UAC prompts pissed me off.
it seems UAC being off is what is breaking it since I see it happening for me. I'm not sure if I want to support this, and I don't know yet how to tell if it's being run as admin directly or if it's because UAC is disabled.
 
  • Like
Reactions: Player-1

tomx86

Well-Known Member
Member
Joined
Jun 3, 2015
Messages
778
Trophies
0
Age
38
XP
2,183
Country
Poland
it seems UAC being off is what is breaking it since I see it happening for me. I'm not sure if I want to support this, and I don't know yet how to tell if it's being run as admin directly or if it's because UAC is disabled.
OK I'll try.
 

tomx86

Well-Known Member
Member
Joined
Jun 3, 2015
Messages
778
Trophies
0
Age
38
XP
2,183
Country
Poland
OK I'll try.
OK it worked but I got a new error
upload_2018-4-29_23-58-51.png

It looks like DS and DSi titles don't have ExeFS and RomFS folders in .ncch, so how to access the content, I want to find .msbt files (or other files that DS uses for their display content) to translate them to Polish.
 
Last edited by tomx86,

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,822
Country
United States
OK it worked but I got a new error
View attachment 121775
It looks like DS and DSi titles don't have ExeFS and RomFS folders in .ncch, so how to access the content, I want to find .msbt files (or other files that DS uses for their display content) to translate them to Polish.
NDS/DSi titles are special, they are not NCCH files (which is a 3DS-specific format). at the moment you'll need another tool to extract those.
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,822
Country
United States
How when I mount the cia or ncch their is no extract option?
choose the CIA, then go to "CIA image options..." -> "Mount image to drive". in G: you will see the CIA contents. the nds file is the first one (0000.xxxxxxxx), and is already mounted, so you can browse it there. if you have an nds file on its own you can do this a similar way.
 

tomx86

Well-Known Member
Member
Joined
Jun 3, 2015
Messages
778
Trophies
0
Age
38
XP
2,183
Country
Poland
choose the CIA, then go to "CIA image options..." -> "Mount image to drive". in G: you will see the CIA contents. the nds file is the first one (0000.xxxxxxxx), and is already mounted, so you can browse it there. if you have an nds file on its own you can do this a similar way.
In NDS image options I only get:
Show title info
Rename file
No extract option.
 

toxic9

Well-Known Member
Member
Joined
Dec 13, 2016
Messages
819
Trophies
0
Age
44
XP
1,297
Country
Hi people,

I'm getting the error:
popup:
Failed to mount....

cmd:
Cannot create WinFsp-FUSE File system
The service fuse-3ds has failed to start (Status=c0000002)

I'm on Windows 7 x64
I have installed the Update fix and enabled the UAC.
What am I missing now?
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,822
Country
United States
Hi people,

I'm getting the error:
popup:
Failed to mount....

cmd:
Cannot create WinFsp-FUSE File system
The service fuse-3ds has failed to start (Status=c0000002)

I'm on Windows 7 x64
I have installed the Update fix and enabled the UAC.
What am I missing now?
make sure you have all the latest updates, especially at least the two listed in "Troubleshooting".
also make sure you have the latest WinFsp release (2017.2 as of this writing): https://github.com/billziss-gh/winfsp/releases/latest
 
Last edited by ihaveahax,

toxic9

Well-Known Member
Member
Joined
Dec 13, 2016
Messages
819
Trophies
0
Age
44
XP
1,297
Country
Thanks for helping.
I'm testing it on a virtual machine to prevent damage to my main system.
I will test it tomorrow with more time and post he results.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    realtimesave @ realtimesave: I have it in my hands