ROM Hack ninfs - FUSE filesystem Python scripts for Nintendo console files

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,848
Country
United States
ninfs (formerly fuse-3ds) is a collection of scripts that create virtual filesystems using FUSE (Filesystem in Userspace) for Unix-like operating systems, with Windows support through WinFsp.

This enables you to read decrypted contents directly from the source files without extracting (especially useful with large files), and write back data which is automatically re-encrypted. Since it is a virtual filesystem, you can browse it with your file manager (Windows/File Explorer, Finder, some Linux file browser) and use any tools to read from them as if they were normal files (e.g. mount ctrnand/twln/twlp, browse and edit all from/to the raw NAND). All crypto is done by the script transparently to the program.

mainwindow-win.png

Simple GUI to easily use ninfs. Can also be used via a command line.

Some possible use cases:
  • Mount NAND and browse CTRNAND, TWLNAND, TWLPHOTO. Dump, read, and modify files inside these partitions without dumping the full partition first.
  • Browse decrypted SD contents. Dump installed games and saves, or copy contents between two systems SD files by just copying files.
  • Extract decrypted files out of the contents of a CIA without extracting the initial contents first (i.e. don't need to extract large contents to then extract the RomFS/ExeFS, mount the CIA then extract the RomFS/ExeFS directly).
  • Recursive mounting means you only need to mount a CIA, or CCI (".3ds"), or CDN directory, and you will automatically be able to see the NCCH mount, and RomFS/ExeFS mounts inside.
  • NCCH has a virtual decrypted file, allowing you to use it in applications that require decrypted files, like Citra!
  • More will be here when more file types can be mounted!
Requires Python 3.6.1+ and pycryptodomex. appJar is required for the GUI. See repository README for more details.
Windows, macOS and Linux are fully supported.

More details on usage can be found at the source repository:
https://github.com/ihaveamac/ninfs

Get the releases at:
GitHub (Windows & Mac) or GBAtemp Download Center (Windows)

See a Windows tutorial at:
Extract and Decrypt games, NAND backups, and SD contents with ninfs

See example screenshots:
ciamount-win.png
ncchmount-win.png
nandmount-win.png
 
Last edited by ihaveahax,

zoogie

playing around in the end of life
Developer
Joined
Nov 30, 2014
Messages
8,560
Trophies
2
XP
15,000
Country
Micronesia, Federated States of
Nice! I currently use OSFmount and will be glad to replace it with something more convenient.
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,848
Country
United States
Nice! I currently use OSFmount and will be glad to replace it with something more convenient.
OSFMount or something would still be needed to mount decrypted FAT partitions, and even then I couldn't get Windows to work properly when writing back to the NAND. hence why mounting is read-only on Windows.
 
  • Like
Reactions: zoogie

Shadowhand

Slim, Alternative Dev.
Member
Joined
Feb 27, 2016
Messages
522
Trophies
0
Age
31
XP
1,958
Country
United Kingdom
Looks very nice, I like FUSE, but I don't get this. Is this only PC?
As in, do I have to dump my NAND image and to be able to use this?
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,848
Country
United States
Looks very nice, I like FUSE, but I don't get this. Is this only PC?
As in, do I have to dump my NAND image and to be able to use this?
well yes, it's a PC tool. and for NAND, you would have to dump it (create the essentials backup with gm9 to make this easier!). or if you have a hardmod, you can probably read directly from the NAND when plugged in.
 

Shadowhand

Slim, Alternative Dev.
Member
Joined
Feb 27, 2016
Messages
522
Trophies
0
Age
31
XP
1,958
Country
United Kingdom
well yes, it's a PC tool. and for NAND, you would have to dump it (create the essentials backup with gm9 to make this easier!). or if you have a hardmod, you can probably read directly from the NAND when plugged in.
I see. But as far as I can understand, I can use this to manage my save games without having to use JKSM to export them first?
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,848
Country
United States
I see. But as far as I can understand, I can use this to manage my save games without having to use JKSM to export them first?
raw saves are stored in a really annoying format (DISA) which needs a separate tool. the only one I know of is 3dsfuse, and I'm not sure how well it works with digital saves. I think some others are currently being worked on though.
 

TheMCNerd2017

Well-Known Member
Member
Joined
Jun 21, 2017
Messages
200
Trophies
0
XP
514
Country
United States
You should have also stated that we need "pip" installed as well, to get some of the requirements, especially since the Python installer does not install pip by default.
 
Last edited by TheMCNerd2017,

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,848
Country
United States
You should have also stated that we need "pip" installed as well, to get some of the requirements, especially since the Python installer does not install pip by default.
py 3.4+ should have it installed by default. I figured that most people who would be using this would already have pip.
 

TheMCNerd2017

Well-Known Member
Member
Joined
Jun 21, 2017
Messages
200
Trophies
0
XP
514
Country
United States
py 3.4+ should have it installed by default. I figured that most people who would be using this would already have pip.
Well it was not installed when I installed Python 3.6 on my PC. I had to re-download the installer(because I delete installers to save disk space), run it, click on modify, and have it install pip from there.
 

TheMCNerd2017

Well-Known Member
Member
Joined
Jun 21, 2017
Messages
200
Trophies
0
XP
514
Country
United States
OK, sorry for bugging you again, but I managed to get everything working, except for actually mounting the NAND image. Gives me an error saying the mouse point is in use, even though no running applications are using the folder, and nothing is mounted using the folder.

Do you have any idea why it's doing this?
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,848
Country
United States
OK, sorry for bugging you again, but I managed to get everything working, except for actually mounting the NAND image. Gives me an error saying the mouse point is in use, even though no running applications are using the folder, and nothing is mounted using the folder.

Do you have any idea why it's doing this?
make sure the directory is empty. if you're on windows, make sure the folder is on an NTFS drive. or use a drive letter as a mount point.
 

TheMCNerd2017

Well-Known Member
Member
Joined
Jun 21, 2017
Messages
200
Trophies
0
XP
514
Country
United States
make sure the directory is empty. if you're on windows, make sure the folder is on an NTFS drive. or use a drive letter as a mount point.
The folder is empty and on an NTFS drive. I'll try using a drive letter and see if that works. I use Avast Antivirus if that matters.
EDIT: Tried using a drive letter, and it seemed to work. My open Explorer window locked up when attempting to right-click though, and the mounted image does not appear in My Computer with my other drives.
 
Last edited by TheMCNerd2017,

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,848
Country
United States
The folder is empty and on an NTFS drive. I'll try using a drive letter and see if that works. I use Avast Antivirus if that matters.
EDIT: Tried using a drive letter, and it seemed to work. My open Explorer window locked up when attempting to right-click though, and the mounted image does not appear in My Computer with my other drives.
this is really weird. what windows version? 32-/64-bit?

try saving the output. do something like "py -3 mount_nand.py nand.bin F: --do 2>err.log".
 

TheMCNerd2017

Well-Known Member
Member
Joined
Jun 21, 2017
Messages
200
Trophies
0
XP
514
Country
United States
this is really weird. what windows version? 32-/64-bit?

try saving the output. do something like "py -3 mount_nand.py nand.bin F: --do 2>err.log".
Sorry for the late reply, I went out to eat. Either way, here is the info that you probably want.

My OS is 64-bit. I added the --do flag to the end of the command, and the command did not complete. It never said that the service started like it should. Also, a log file was produced and windows keeps spamming "Windows Explorer has stopped working" popups. I have included the contents of the log below.

DEBUG:fuse.log-mixin:-> init / ()
DEBUG:fuse.log-mixin:<- init None
DEBUG:fuse.log-mixin:-> statfs / ()
DEBUG:fuse.log-mixin:<- statfs {'f_bsize': 4096, 'f_blocks': 241408, 'f_bavail': 0, 'f_bfree': 0, 'f_files': 12}
DEBUG:fuse.log-mixin:-> getattr / (None,)
DEBUG:fuse.log-mixin:<- getattr {'st_mode': 16749, 'st_nlink': 2, 'st_ctime': 1507067022, 'st_mtime': 1507067120, 'st_atime': 1507067166, 'st_uid': 4294967295, 'st_gid': 4294967295}
The service python has been started.
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /autorun.inf (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /## aswSnx private storage (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /AutoRun.inf (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /## aswSnx private storage (None,)
DEBUG:fuse.log-mixin:-> getattr / (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:<- getattr {'st_mode': 16749, 'st_nlink': 2, 'st_ctime': 1507067022, 'st_mtime': 1507067120, 'st_atime': 1507067166, 'st_uid': 197608, 'st_gid': 197121}
DEBUG:fuse.log-mixin:-> getattr /## aswSnx private storage (None,)
DEBUG:fuse.log-mixin:-> getattr / (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:<- getattr {'st_mode': 16749, 'st_nlink': 2, 'st_ctime': 1507067022, 'st_mtime': 1507067120, 'st_atime': 1507067166, 'st_uid': 197608, 'st_gid': 197121}
DEBUG:fuse.log-mixin:-> getattr /## aswSnx private storage (None,)
DEBUG:fuse.log-mixin:-> opendir / ()
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:<- opendir 0
DEBUG:fuse.log-mixin:-> statfs / ()
DEBUG:fuse.log-mixin:-> statfs / ()
DEBUG:fuse.log-mixin:<- statfs {'f_bsize': 4096, 'f_blocks': 241408, 'f_bavail': 0, 'f_bfree': 0, 'f_files': 12}
DEBUG:fuse.log-mixin:<- statfs {'f_bsize': 4096, 'f_blocks': 241408, 'f_bavail': 0, 'f_bfree': 0, 'f_files': 12}
DEBUG:fuse.log-mixin:-> releasedir / (0,)
DEBUG:fuse.log-mixin:<- releasedir None
DEBUG:fuse.log-mixin:-> getattr / (None,)
DEBUG:fuse.log-mixin:<- getattr {'st_mode': 16749, 'st_nlink': 2, 'st_ctime': 1507067022, 'st_mtime': 1507067120, 'st_atime': 1507067166, 'st_uid': 197608, 'st_gid': 197121}
DEBUG:fuse.log-mixin:-> getattr / (None,)
DEBUG:fuse.log-mixin:<- getattr {'st_mode': 16749, 'st_nlink': 2, 'st_ctime': 1507067022, 'st_mtime': 1507067120, 'st_atime': 1507067166, 'st_uid': 197608, 'st_gid': 197121}
DEBUG:fuse.log-mixin:-> opendir / ()
DEBUG:fuse.log-mixin:<- opendir 0
DEBUG:fuse.log-mixin:-> releasedir / (0,)
DEBUG:fuse.log-mixin:<- releasedir None
 

ihaveahax

Well-Known Member
OP
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,848
Country
United States
Sorry for the late reply, I went out to eat. Either way, here is the info that you probably want.

My OS is 64-bit. I added the --do flag to the end of the command, and the command did not complete. It never said that the service started like it should. Also, a log file was produced and windows keeps spamming "Windows Explorer has stopped working" popups. I have included the contents of the log below.

<log>
it did start, the message just got saved to the log instead.

avast (and something else?) seems to try and be using getattr on a nonexistent item:
Code:
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /autorun.inf (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /## aswSnx private storage (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /AutoRun.inf (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /## aswSnx private storage (None,)
DEBUG:fuse.log-mixin:-> getattr / (None,)
I'm not sure if this is causing the system to freeze.

maybe try the same thing with a folder as a mount point. I want to see the error here.
 

TheMCNerd2017

Well-Known Member
Member
Joined
Jun 21, 2017
Messages
200
Trophies
0
XP
514
Country
United States
it did start, the message just got saved to the log instead.

avast (and something else?) seems to try and be using getattr on a nonexistent item:
Code:
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /avast! sandbox (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /autorun.inf (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /## aswSnx private storage (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /AutoRun.inf (None,)
DEBUG:fuse.log-mixin:<- getattr '[Errno 2] No such file or directory'
DEBUG:fuse.log-mixin:-> getattr /## aswSnx private storage (None,)
DEBUG:fuse.log-mixin:-> getattr / (None,)
I'm not sure if this is causing the system to freeze.

maybe try the same thing with a folder as a mount point. I want to see the error here.
OK, I will attempt to use a folder as the mouse point. By the way, the system itself isn't freezing as I can still open applications from Task Manager and restart explorer through there.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • AncientBoi @ AncientBoi:
    ooowwww a new way for me to beat NFS 510 :D @SylverReZ
    +1
  • SylverReZ @ SylverReZ:
    @AncientBoi, Yeah, believe you can do PSP games as well. But a Pi5 is much powerful in comparison.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Not sure about other models of Pi4 but the Pi 4 B with 8GBs OCed to 2Ghz handles PSP really great except like 1 game I found and it is playable it just looks bad lol Motor Storm Arctic something or other.
  • Psionic Roshambo @ Psionic Roshambo:
    Other games I can have turned up to like 2X and all kinds of enhancements, Motorstorm hmmm nope 1X and no enhancements lol
  • Veho @ Veho:
    Waiting for Anbernic's rg[whatever]SP price announcement, gimme.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I will admit that one does seem more interesting than the usual Ambernic ones, and I already liked those.
  • Veho @ Veho:
    I dread the price point.
    +1
  • Veho @ Veho:
    This looks like one of their premium models, so... $150 :glare:
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    To me that seems reasonable.
  • Psionic Roshambo @ Psionic Roshambo:
    I mean since basically all the games are errmmm free lol
  • Veho @ Veho:
    I mean yeah sure but the specs are the same as a $50 model, it's just those pesky "quality of life" things driving up the price, like an actually working speaker, or buttons that don't melt, and stuff like that.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I think all in my Pi 4 was well north of 200 bucks 150ish for the Pi 4 the case the fancy cooler, then like 70 for the 500GB MicroSD then like 70 for the Xbox controller. But honestly it's a nice set up I really enjoy and to me was worth every penny. (even bought more controllers for 2 or 4 player games.) hmmm have never played any 2 player games yet :(
  • Veho @ Veho:
    Yeah that's what I hate about the RPi, it's supposedly $30 or something but it takes an additional $200 of accessories to actually turn it into a working something.
  • Psionic Roshambo @ Psionic Roshambo:
    yes that's the expensive part lol
  • Veho @ Veho:
    I mean sure it's flexible and stuff but so is uremum but it's fiddly.
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah a lot of it I consider a hobby, using Batocera I am constantly adjusting the collection adding and removing stuff, scraping the artwork. Haven't even started on some music for the theme... Also way down the road I am considering attempting to do a WiiFlow knock off lol
  • Veho @ Veho:
    I want everything served on a plate plz ktnx, "work" is too much work for me.
  • Veho @ Veho:
    Hmm, with that in mind, maybe a complete out-the-box solution with all the games collected, pacthed and optimized for me would be worth $150 :unsure:
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah it's all choice and that's a good thing :)
  • Bunjolio @ Bunjolio:
    animal crossing new leaf 11pm music
  • Bunjolio @ Bunjolio:
    avatars-kKKZnC8XiW7HEUw0-KdJMsw-t1080x1080.jpg
    wokey d pronouns
  • SylverReZ @ SylverReZ:
    What its like to do online shopping in 1998: https://www.youtube.com/watch?v=vwag5XE8oJo
    SylverReZ @ SylverReZ: What its like to do online shopping in 1998: https://www.youtube.com/watch?v=vwag5XE8oJo