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,828
Country
United States
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.
I tried on a virtual machine and these are the bare requirements:
  • Windows 7 SP1
  • WinFsp
  • Update for Universal C Runtime in Windows (needed for fuse-3ds executable)
  • Microsoft Security Advisory 3033929 (needed for WinFsp driver)
you should already have the last two if you have automatic updates enabled, or use Windows Update regularly. Windows 8.1 should not need the security advisory. Windows 10 should not need either.
 

toxic9

Well-Known Member
Member
Joined
Dec 13, 2016
Messages
819
Trophies
0
Age
44
XP
1,297
Country
I tried on a virtual machine and these are the bare requirements:
  • Windows 7 SP1
  • WinFsp
  • Update for Universal C Runtime in Windows (needed for fuse-3ds executable)
  • Microsoft Security Advisory 3033929 (needed for WinFsp driver)
you should already have the last two if you have automatic updates enabled, or use Windows Update regularly. Windows 8.1 should not need the security advisory. Windows 10 should not need either.

Hi,

I never use Windows update. It's a personal choice. I always install only the real needed updates for correcting something I really need at one point.

I have Win7 SP1
WinFSP (complete with all features installed)
SSHFS (from the same site) I installed it for testing purposes since nothing is working.
I enabled UAC, since it doesn't work with it disabled.
I don't have Python. I don't think it is required anymore.
I installed tha security update.

I think I'm missing the Universal C Runtime in Windows.
I will try that.
 

ihaveahax

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

I never use Windows update. It's a personal choice. I always install only the real needed updates for correcting something I really need at one point.

I have Win7 SP1
WinFSP (complete with all features installed)
SSHFS (from the same site) I installed it for testing purposes since nothing is working.
I enabled UAC, since it doesn't work with it disabled.
I don't have Python. I don't think it is required anymore.
I installed tha security update.

I think I'm missing the Universal C Runtime in Windows.
I will try that.
outdated systems are not supported. the listed updates are required to use this.

Python is not an extra requirement, it is included in the executable.

UAC being disabled on Windows 7 causes something that might be a bug in determining if something is running as Administrator. it doesn't happen with Windows 10, and maybe not 8.1. it is "fixed" in the latest master (not ideally).
 
Last edited by ihaveahax,

toxic9

Well-Known Member
Member
Joined
Dec 13, 2016
Messages
819
Trophies
0
Age
44
XP
1,297
Country
I installed the updates but the same error occurs =/

btw, I have net framework 4.7.1
and visual c++ 2008
if it matters.

I don't know what to do more.
Can I send my nand backup to you, so you can extrat just one file to me?

EDIT:
IS there any possibility to start the service that refuses to start (fuse-3ds) manually??
I think the service cannot start because the UAC is enabled (and has to be! ironic!)
 
Last edited by toxic9,

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,828
Country
United States
I installed the updates but the same error occurs =/

btw, I have net framework 4.7.1
and visual c++ 2008
if it matters.

I don't know what to do more.
Can I send my nand backup to you, so you can extrat just one file to me?

EDIT:
IS there any possibility to start the service that refuses to start (fuse-3ds) manually??
I think the service cannot start because the UAC is enabled (and has to be! ironic!)
fuse-3ds checks if it's running as admin so it can show you a dialog saying you shouldn't do this (running as admin can cause unexpected results if you mount to a drive letter). disabling UAC on Windows 7 means it will always assume it is admin, even when not run explicitly as such. this didn't happen on Windows 10 when I tried it. the next release will check if UAC is disabledand not show the "don't-run-as-admin" error (though I have not extensively tested this mode).

I don't know what else could be causing this error, c0000002 means STATUS_NOT_IMPLEMENTED. have you tried choosing both drive letter and directory mounts? if you're doing this in a virtual machine you could get a Windows 8.1 or Windows 10 ISO from Microsoft, a pre-made virtual machine, and try it from there.
 
Last edited by ihaveahax,

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
4,323
Trophies
1
XP
4,454
Country
Canada
So, I understand that you can use fuse-3ds (with a moveable.sed) to decrypt a .sav file on an SD card, and that you can use 3ds-save-util (specifically disa-extract.py) on the command line to extract the content of the resulting .sav - but is there presently any way to repack the .sav and put it back on the SD card (for example, after editing the content) ? The obvious solution would be just to run JKSM on the 3DS to import the data, but what if that's not an option?

The 3Dbrew page suggests that 3dsfuse-ex will be capable of this task, but that's still WIP and has no releases. Is there some other tool?

(Mad props to M. ihaveamac for such fine work.)
 
Last edited by Kwyjor,

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,828
Country
United States
So, I understand that you can use fuse-3ds (with a moveable.sed) to decrypt a .sav file on an SD card, and that you can use 3ds-save-util (specifically disa-extract.py) on the command line to extract the content of the resulting .sav - but is there presently any way to repack the .sav and put it back on the SD card (for example, after editing the content) ? The obvious solution would be just to run JKSM on the 3DS to import the data, but what if that's not an option?

The 3Dbrew page suggests that 3dsfuse-ex will be capable of this task, but that's still WIP and has no releases. Is there some other tool?

(Mad props to M. ihaveamac for such fine work.)
I don't know of any other PC tools to do this at the moment. 3dsfuse-ex has to be manually compiled and I haven't tried it on Windows yet.
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,828
Country
United States
Tutorial updated with new steps on setting up boot9 and SeedDB. It can be done via the GUI now as of v1.0b9, directories don't have to be manually set up now.
 

Balallax

Well-Known Member
Newcomer
Joined
Jul 27, 2017
Messages
45
Trophies
0
XP
167
Country
Brazil
Hi, sorry if I'm asking something that has been already answered but, is it possible to extract saves files to import then to a new old 3ds if I only have the NAND.Bin from a broken old 3ds?

I read the guide and saw info about the need of boot9 from GodMod or OTP and CID files, But I dont have these, I just have the nand dump.

Thanks!
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,828
Country
United States
Hi, sorry if I'm asking something that has been already answered but, is it possible to extract saves files to import then to a new old 3ds if I only have the NAND.Bin from a broken old 3ds?

I read the guide and saw info about the need of boot9 from GodMod or OTP and CID files, But I dont have these, I just have the nand dump.

Thanks!
boot9 is needed for general encryption keys and can be obtained from any console. OTP is needed from the system that the NAND dump was created for. CID is also needed for crypto but may not be in the future for 99% of users.

if you used GodMode9 before making this NAND dump, it might have the essentials backup, which contains otp+nand_cid. otherwise you're out of luck.
 

Balallax

Well-Known Member
Newcomer
Joined
Jul 27, 2017
Messages
45
Trophies
0
XP
167
Country
Brazil
boot9 is needed for general encryption keys and can be obtained from any console. OTP is needed from the system that the NAND dump was created for. CID is also needed for crypto but may not be in the future for 99% of users.

if you used GodMode9 before making this NAND dump, it might have the essentials backup, which contains otp+nand_cid. otherwise you're out of luck.
hmm...

I think I have the CTRNand Dump from the godmode after I've made the hard mode...
This one contains the save files? Can I extract then using this guide? Thanks!

--------------------- MERGED ---------------------------

nvm, I dont have the ctrnand dump from godmode,

Theres no way I can extract this first hardmod nand dump?
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,828
Country
United States
hmm...

I think I have the CTRNand Dump from the godmode after I've made the hard mode...
This one contains the save files? Can I extract then using this guide? Thanks!
how was the CTRNAND dump made? it contains some system saves, plus movable.sed which can be used to decrypt SD contents.

--------------------- MERGED ---------------------------

nvm, I dont have the ctrnand dump from godmode,

Theres no way I can extract this first hardmod nand dump?
you need boot9 (dump it from any system) and OTP to decrypt a NAND. CID as well for now.
 

Balallax

Well-Known Member
Newcomer
Joined
Jul 27, 2017
Messages
45
Trophies
0
XP
167
Country
Brazil
how was the CTRNAND dump made? it contains some system saves, plus movable.sed which can be used to decrypt SD contents.

--------------------- MERGED ---------------------------


you need boot9 (dump it from any system) and OTP to decrypt a NAND. CID as well for now.

I made a search on my computer, apparently I've deleted the crtnand dump and left only the first system nand dump, so... Theres no way I can retrieve the save files on this one, right?
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,828
Country
United States
I made a search on my computer, apparently I've deleted the crtnand dump and left only the first system nand dump, so... Theres no way I can retrieve the save files on this one, right?
have you ever used GodMode9 on this system? if it was done before making this nand backup, it could have the essentials backup. you could also look for "essential.exefs" under /gm9/out on the SD card.
 

kemonologic

New Member
Newbie
Joined
Jun 11, 2018
Messages
1
Trophies
0
Age
34
XP
54
Country
United States
Just to be clear since the OP is a little vague ("extract game saves") - something like 3ds-save-tool is really only necessary if I want to crack open the save files themselves, and isn't necessary for transferring save files intact from a console to another console, right?

I ask because I need to restore some saves from a dead 3DS, which I thankfully have otp.bin and movable.sed and all sorts of other stuff from. From what I can ascertain, digital game saves are stored on the SD card and not NAND. Would the process then be to mount the SD card, copy everything out of /Nintendo 3DS (in its newly decrypted form), then switch to the new 3DS's movable.sed and write the folder back to re-encrypt it for that console?
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,828
Country
United States
Just to be clear since the OP is a little vague ("extract game saves") - something like 3ds-save-tool is really only necessary if I want to crack open the save files themselves, and isn't necessary for transferring save files intact from a console to another console, right?

I ask because I need to restore some saves from a dead 3DS, which I thankfully have otp.bin and movable.sed and all sorts of other stuff from. From what I can ascertain, digital game saves are stored on the SD card and not NAND. Would the process then be to mount the SD card, copy everything out of /Nintendo 3DS (in its newly decrypted form), then switch to the new 3DS's movable.sed and write the folder back to re-encrypt it for that console?
You can copy the raw save files this way to another system, but digital games must be re-installed if you change the movable.sed used, due to certain files that we don't know how to fix yet. Don't forget to fix CMACs with GodMode9.

Another way you could possibly do this is using the old movable.sed on the new system, and just using the current files on it.
 

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
4,323
Trophies
1
XP
4,454
Country
Canada
You can copy the raw save files this way to another system. [...] Don't forget to fix CMACs with GodMode9.
To be clear, does that mean you can't just copy the save files unless you use GodMode9 on them afterwards?

I notice there's a script linked from this early discussion of SteelMiner which can supposedly allow a save to be copied; it uses disa-extract.py from 3ds-save-tool.
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,069
Trophies
2
XP
7,828
Country
United States
To be clear, does that mean you can't just copy the save files unless you use GodMode9 on them afterwards?

I notice there's a script linked from this early discussion of SteelMiner which can supposedly allow a save to be copied; it uses disa-extract.py from 3ds-save-tool.
The save files have CMACs in them, using a key that's based off the one in movable.sed. So either they need to be fixed by GodMode9 when you copy them in, or it can be done on PC. I've never used the script but it'd probably work if it's meant to be used on multiple systems.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Maximumbeans @ Maximumbeans: butte