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,

T0biasCZe

Well-Known Member
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
936
Country
Czech Republic
> This is discussed in the post above.

i downloaded the 3ds-save-tool, decrypted the save of the sd card with ninfs, copied it to the same directory, ran the command in cmd, and it outputted this error
upload_2021-9-6_7-38-49.png
 

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
4,323
Trophies
1
XP
4,451
Country
Canada
Either something went wrong with the decryption, or there is something wrong with the .sav file to begin with.

How big is the file lostworld.sav ? Is it the same size on your SD card? What is the path of the folder on the SD card from which you copied it?
 

T0biasCZe

Well-Known Member
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
936
Country
Czech Republic
I copied it from E:\Nintendo 3DS\5c884e88e15e8cc20c2b08800e4db1b7\55c8011a54303cdc45443451001b534d\title\00040000\000cb400\data
on both sd card, and after decrypt, its 131,072 bytes large
 

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
4,323
Trophies
1
XP
4,451
Country
Canada
I copied it from E:\Nintendo 3DS\5c884e88e15e8cc20c2b08800e4db1b7\55c8011a54303cdc45443451001b534d\title\00040000\000cb400\data
on both sd card, and after decrypt, its 131,072 bytes large
You probably copied the file directly from your SD card rather than from the path mounted with ninfs.

Maybe you can post a screenshot of your ninfs settings?
 

T0biasCZe

Well-Known Member
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
936
Country
Czech Republic
You probably copied the file directly from your SD card rather than from the path mounted with ninfs.
nope it wasnt directly copied, it was from the ninfs (i checked the SHA256, it wasnt the same, thus there was some decryption)
also, i am idiot and i somewhere lost the extracted movable.sed from the gm9 folder 🤦
But, i have found the seedminered movable.sed in old folder. Can that one work with ninfs ?
Maybe you can post a screenshot of your ninfs settings?
What setting ? The only setting in the app is check for updates on github. And i used the standard mount 3DS SD Card
1635023880499.png
 

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
4,323
Trophies
1
XP
4,451
Country
Canada
(i checked the SHA256, it wasnt the same, thus there was some decryption)
Well, that's a good thing to establish.

also, i am idiot and i somewhere lost the extracted movable.sed from the gm9 folder 🤦
So, how were you decrypting it without a movable.sed?

But, i have found the seedminered movable.sed in old folder. Can that one work with ninfs ?
I think so? You should also be able to use ninfs to extract it from a NAND backup or from essential.exefs.
 
  • Like
Reactions: KleinesSinchen

T0biasCZe

Well-Known Member
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
936
Country
Czech Republic
So, how were you decrypting it without a movable.sed?
When i was decrypting it two months back, i had the movable.sed on the sd card, but it disapeared somewhere
I think so? You should also be able to use ninfs to extract it from a NAND backup or from essential.exefs.
They have movable.bin, not movable.sed
 

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
4,323
Trophies
1
XP
4,451
Country
Canada
Ok decrypted the file again with NINFS, does the exactly same thing
I don't know what else to tell you. If you go into great detail about exactly what steps you are doing, I might be able to suggest what you are doing wrong. Maybe you're still using the wrong movable.sed / movable.bin.

You can easily verify if a file has been decrypted correctly by opening it in a hex editor; you should see the word "DISA" close to the start of the file. (If you don't have a hex editor, then Notepad will work just as well in this case.)

Could I use this to modify the Virtual Console full-screen frame (the one you press start to use) of a VC game?
Is this regarding https://gbatemp.net/threads/how-to-...ame-of-a-particular-title.602239/post-9644570 ? If you are using godmode9 to dump files, then ninfs will not provide any additional benefit.
 
Last edited by Kwyjor,

T0biasCZe

Well-Known Member
Member
Joined
Oct 4, 2019
Messages
219
Trophies
0
Age
18
XP
936
Country
Czech Republic
I don't know what else to tell you. If you go into great detail about exactly what steps you are doing, I might be able to suggest what you are doing wrong. Maybe you're still using the wrong movable.sed / movable.bin.
I open NINFS, click new mount, select 3ds sd card, click next, select J:\Nintendo 3DS in first field, J:\gm9\out\boot9.bin in second field, and J:\gm9\out\movable.bin in last field, click next, select drive A, click mount, in the automatically opened explorer window with the mounted drive i go to some save folder, for example A:\55c8011a54303cdc45443451001b534d\title\00040000\000cb400\data, copy the sav file and paste it in the folder with the converter
 

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,418
Trophies
2
XP
14,853
Country
Germany
  • Like
Reactions: Alexander1970

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
4,323
Trophies
1
XP
4,451
Country
Canada
copy the sav file and paste it in the folder with the converter
Okay, did you try opening the sav file in Notepad to see if you can see the word "DISA" ?
Try this:

python disa-extract.py something.sav SomeOutputName -sd -id 0004000012345678
An interesting idea, and it's not like there are a lot of other options at this point, but I kind of doubt it will help.

And to be clear, the title id in this case would be 00040000000cb400, as per the path.

ETA:
click next, select drive A, click mount
I can't imagine why this would help either, but what if you make a folder like C:\Users\user\desktop\mount , and use that as a mount point instead?
 
Last edited by Kwyjor,
  • Like
Reactions: KleinesSinchen

KleinesSinchen

GBAtemp's Backup Reminder + Fearless Testing Sina
Member
GBAtemp Patron
Joined
Mar 28, 2018
Messages
4,418
Trophies
2
XP
14,853
Country
Germany
An interesting idea, and it's not like there are a lot of other options at this point, but I kind of doubt it will help.

And to be clear, the title id in this case would be 00040000000cb400, as per the path.
It was a while ago… and I extracted some saves to the format JKSM/Checkpoint create as well. Pulled the command line arguments -sd -id right from the my bash history. I didn't pay attention to any paths or given title IDs so just typed 12345678.

Have to verify this again… but not today.
 
  • Like
Reactions: Alexander1970

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
4,323
Trophies
1
XP
4,451
Country
Canada
You cant do that, you can only mount the virtual drive as Letter:\ drive
Oh. I have a much older version that lets you select a directory as a mount type. I guess that must have been removed for the sake of simplicity.

ETA: I should emphasize: movable.bin / movable.sed changes whenever a 3DS undergoes a System Format. So if you backed up your SD card, formatted your system, and then backed up your movable.bin / movable.sed (or the other way around) then this definitely won't work.
 
Last edited by Kwyjor,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    RedColoredStars @ RedColoredStars: https://gbatemp.net/threads/videos-not-working-on-certain-sites-w-ms-edge-browser.645937/