fuse-3ds - FUSE Filesystem Python scripts for Nintendo 3DS files

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by ihaveamac, Sep 7, 2017.

  1. ihaveamac
    OP

    ihaveamac GBAtemp Guru

    Member
    14
    Apr 20, 2015
    United States
    Tigard, OR
    For the past few weeks I've been working on a thing called fuse-3ds. This 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.png
    Simple GUI to easily use fuse-3ds. 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!
    This is still in development, and is currently in the beta stage. All of the common formats are supported now.

    Requires Python 3.5.2+, fusepy, and pycryptodomex. 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/fuse-3ds

    Get the releases at:
    https://github.com/ihaveamac/fuse-3ds/releases

    See a Windows tutorial at:
    https://gbatemp.net/threads/499994/
    Screenshot (old-ish)
     
    Last edited by ihaveamac, Apr 16, 2018
  2. zoogie

    zoogie playing around in the dsiware

    Member
    19
    Nov 30, 2014
    Micronesia, Federated States of
    Nice! I currently use OSFmount and will be glad to replace it with something more convenient.
     
  3. Carnelian

    Carnelian GBAtemp Regular

    Member
    2
    Aug 10, 2015
    Canada
    Edit: Nevermind
     
    Last edited by Carnelian, Sep 7, 2017
  4. ihaveamac
    OP

    ihaveamac GBAtemp Guru

    Member
    14
    Apr 20, 2015
    United States
    Tigard, OR
    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.
     
    zoogie likes this.
  5. ihaveamac
    OP

    ihaveamac GBAtemp Guru

    Member
    14
    Apr 20, 2015
    United States
    Tigard, OR
    proflayton123 likes this.
  6. Shadowhand

    Shadowhand Slim, Alternative Dev.

    Member
    5
    Feb 27, 2016
    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?
     
  7. ihaveamac
    OP

    ihaveamac GBAtemp Guru

    Member
    14
    Apr 20, 2015
    United States
    Tigard, OR
    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.
     
  8. Shadowhand

    Shadowhand Slim, Alternative Dev.

    Member
    5
    Feb 27, 2016
    United Kingdom
    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?
     
  9. ihaveamac
    OP

    ihaveamac GBAtemp Guru

    Member
    14
    Apr 20, 2015
    United States
    Tigard, OR
    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.
     
  10. TheMCNerd2017

    TheMCNerd2017 Advanced Member

    Newcomer
    1
    Jun 21, 2017
    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, Oct 3, 2017
  11. ihaveamac
    OP

    ihaveamac GBAtemp Guru

    Member
    14
    Apr 20, 2015
    United States
    Tigard, OR
    py 3.4+ should have it installed by default. I figured that most people who would be using this would already have pip.
     
  12. TheMCNerd2017

    TheMCNerd2017 Advanced Member

    Newcomer
    1
    Jun 21, 2017
    United States
    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.
     
  13. TheMCNerd2017

    TheMCNerd2017 Advanced Member

    Newcomer
    1
    Jun 21, 2017
    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?
     
  14. ihaveamac
    OP

    ihaveamac GBAtemp Guru

    Member
    14
    Apr 20, 2015
    United States
    Tigard, OR
    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.
     
  15. TheMCNerd2017

    TheMCNerd2017 Advanced Member

    Newcomer
    1
    Jun 21, 2017
    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.
     
    Last edited by TheMCNerd2017, Oct 3, 2017
  16. ihaveamac
    OP

    ihaveamac GBAtemp Guru

    Member
    14
    Apr 20, 2015
    United States
    Tigard, OR
    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".
     
  17. TheMCNerd2017

    TheMCNerd2017 Advanced Member

    Newcomer
    1
    Jun 21, 2017
    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 File
     
  18. ihaveamac
    OP

    ihaveamac GBAtemp Guru

    Member
    14
    Apr 20, 2015
    United States
    Tigard, OR
    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.
     
  19. TheMCNerd2017

    TheMCNerd2017 Advanced Member

    Newcomer
    1
    Jun 21, 2017
    United States
    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.
     
  20. Beerus

    Beerus Gbatemp's God Of Destruction

    Member
    4
    May 3, 2017
    Canada
    Universe 7
    ah thanks bud
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice