ihaveamac / ninfs

FUSE filesystem Python scripts for Nintendo console files
MIT License
436 stars 18 forks source link
3ds fuse fuse-filesystem fusepy mit nintendo-3ds nintendo-switch python python-3

ninfs

ninfs (formerly fuse-3ds) is a FUSE program to extract data from Nintendo game consoles. It works by presenting a virtual filesystem with the contents of your games, NAND, or SD card contents, and you can browse and copy out just the files that you need.

Windows, macOS, and Linux are supported.

Supported types

Example uses

Setup

For 3DS types, The ARM9 BootROM is required. You can dump it using boot9strap, which can be set up by 3DS Hacks Guide. To dump Boot9, follow the steps on wiki.hacks.guide.

Boot9 is checked in order of:

boot9_prot.bin can also be used in all of these locations.

"~" means the user's home directory. "~/3ds" would mean /Users/username/3ds on macOS and C:\Users\username\3ds on Windows.

CDN, CIA, and NCCH mounting may need SeedDB for mounting NCCH containers of newer games (2015+) that use seeds.
SeedDB is checked in order of:

Python 3.8.0 or later is required.

Windows

Windows 10 or later is recommended. Windows 7 and 8.1 may continue to work until ninfs's dependencies stop working on it.

Installer

An installer is provided in releases. It includes both ninfs and WinFsp, which is installed if required.

Standalone release

A standalone zip is also provided in releases. WinFsp must be installed separately.

Install with existing Python

Windows on ARM

Official support for Windows on ARM will come eventually. In the meantime, running the x86 version has been tested and seems to work properly. Make sure to install the latest WinFSP version with ARM64 support.

macOS

Versions of macOS supported by Apple are highly recommended. macOS Sierra is the oldest version that should work. macFUSE or fuse-t is required.

Standalone application

A standalone build is provided in releases. macFUSE or fuse-t must still be installed separately. Releases are built for Intel and Apple Silicon, signed and notarized by Apple.

Install with existing Python

Linux

Arch Linux

ninfs is available in the AUR: normal, with gui, git, git with gui

Other distributions

Usage

Graphical user interface

A GUI can be used by specifying the type to be gui (e.g. Windows: py -3 -mninfs gui, Linux/macOS: python3 -mninfs gui). The GUI controls mounting and unmounting.

Command line

Run a mount script by using "mount_<type>" (e.g. mount_cci game.3ds mountpoint). Use -h to view arguments for a script.

If it doesn't work, the other way is to use <python-cmd> -mninfs <type> (e.g. Windows: py -3 -mninfs cci game.3ds mountpoint, Linux/macOS: python3 -mninfs cci game.3ds mountpoint).

Windows users can use a drive letter like F: as a mountpoint, or use * and a drive letter will be automatically chosen.

Developer-unit contents are encrypted with different keys, which can be used with --dev with CCI, CDN, CIA, NANDCTR, NCCH, and SD. These are less tested and may have bugs due to unknown differences between retail and dev files.

Unmounting

Examples

Useful tools

Related tools

License/Credits

Special thanks to @Jhynjhiruu for adding support for iQue Player NAND backups.

Special thanks to @Stary2001 for help with NAND crypto (especially TWL), and @d0k3 for SD crypto.

OTP code is from Stary2001/3ds_tools, and is under the MIT license.