From WiiBrew
Jump to navigation Jump to search

TypePC utility

This homebrew application makes permanent changes to the Wii's NAND, thus, this application should be used with caution.

It is recommended to have a NAND backup with either BootMii as boot2 or Priiloader with BootMii as IOS installed before proceeding with the usage of this application.

Mount Wii NAND images and SFFS dumps with FUSE. wiinandfuse supports Bootmii dumps, raw NAND dumps with ECC and without ECC. SVN checkout command: svn co http://wmb-asm.googlecode.com/svn/trunk/wiinandfuse/ wiinandfuse output when run without params:

Usage: wiinandfuse <nand.bin> <mount point> <options> Options:

-s: Dump contains only the 4MB SFFS. Reading files will do nothing, the data reading buffers will be cleared.

-k: Directory name of keys to use for raw NAND images. Default for keyname is "default". Path: $HOME/.wii/<keyname>

-p: Use NAND permissions. UID and GUI of objects will be set to the NAND UID/GID, as well as the permissions. This option only enables setting the UID/GID and permissions in stat, the open and readdir functions don't check permissions.

-g<supercluster>: Use the specified SFFS supercluster index. If no number is specified, the superclusters are listed.

-h: Disable SFFS HMAC verification. Default is enabled.

-v: Abort/EIO if HMAC verification of SFFS or file data fails. If SFFS verification fails, wiinandfuse aborts and NAND isn't mounted. If file data verification fails, read will return EIO.

-r<supercluster>: Disable round-robin SFFS updating, default is on. When disabled, only the first metadata update has the version and supercluster increased. If supercluster is specified, the specified supercluster index has the version set to the version of the oldest supercluster minus one.

-e: Ignore ECC errors, default is disabled. When disabled, when pages have invalid ECC reads return EIO.


Metadata and files are read and write. HMAC verification of SFFS is supported. Writing is disabled if HMAC verification is disabled with the -h option. ECC correction is disabled since it's broken. Thus raw dumps from flash programmers, etc, will have corruption. Reading pages that are corrupted and need ECC correction will fail when the -e option isn't used, but only for files since the SFFS init code doesn't check if there was ECC errors. Usage of the UID/GID, and permissions from NAND is supported with the -p option. This doesn't restrict file access. Listing and usage of certain SFFS supercluster versions is supported with the -g option. Dumping of nodes' raw filename is supported with the -d option.

Supported FUSE fs functions: statfs(statvfs), getattr(stat), readdir, open, release, read, rename, chown, chmod, unlink, rmdir, mknod, mkdir, truncate.



Added support for writing metadata and files, and more options.


Initial release.


Bootmii MINI and ppcskel for nandfs structures and functions from nandfs.c and nand.c nand_correct function

Mike Scott for his rijndeal.c

Segher for zestig, for SFFS node permissions format, and tools.c

fs_hmac.c by gray and bushing

Steve Reid's sha1.c