Nintendo Switch emuMMC NAND Guide

Nintendo Switch emuMMC NAND Guide


Disclaimer

Running exploits, unsigned code (aka Homebrew Software) and shoving small metal objects into your Nintendo Switch can result in damaging the Switch beyond repair or having your online access to Nintendo's services terminated resulting the loss of software, hardware, functionality and/or both (which also includes unforeseen losses and/or damages). Scenefolks.com has given you ample warning about this and by continuing to use this "guide" you are doing so "AT YOUR OWN RISK". If you screw something up it's on you.


Introduction

emuMMC is an implementation of what is commonly referred to emuNAND in various console modification scenes. emuMMC is essentially a copy of the NAND that is stored in the MMC chip on the motherboard of the Nintendo Switch that you realocate and access using a Micro SD Card. In one usage scenario you could run the Official Nintendo Switch Firmware, on the latest version and without hacks to play your original games and go online and then have one or more emuMMC NANDs to use for homebrew purposes. You'd leave your homebrew emuMMC NAND(s) offline by not linking them to any Nintendo account and then optionally using a DNS service to block any communication between your homebrew NAND and Nintendo. The purpose of doing this would be to avoid being banned for using homebrew. While this is the goal it isn't guaranteed.






Requirements




* Nintendo Switch with the Atmosphere CFW v0.9.0 or Newer Functioning Normally (Kosmos is supported)
* Original Clean NAND Backup
* Latest Hekate Payload 
* emuMMC Drivers** (Compile Them Yourself or Grab The Precompiled One For 8.1.0 or below)
* emuMMC Config File 
* Micro SD Card With Enough Space for a NAND Backup and Homebrew (64GB Minimum, 128GB or Higher Reccomended)
* Linux (I wrote this guide using Ubuntu Linux, it's possible to do this under Windows, but as of now I have no plans to write a guide for Windows users)


m4xw who is the main delevoper behind emuMMC and along with support from the Atmopshere CFW author SciresM and the Hekate payload author CTCaer have recently made this long sought after feature a free and open source resource for anyone to use. emuMMC currently requires you are running the latest Atmosphere CFW with the most recent Hekate payload version and also requires you to find or compile the emuMMC driver.

You're also going to want to use the Clean NAND Backup you were supposed to make when you originally setup CFW on your Nintendo Switch. If you do not have a clean backup (you know, one you made before using CFW) you can perform a factory reset and manually delete your save game data as this will reduce your risk of being banned, but not to the extent using a Clean NAND backup would provide. Performing a factory reset and deleting your save data is not covered in this guide. There is no way to "clean" your NAND or make your own "Clean NAND" unless you purchase a new Switch that hasn't been previously modified to run homebrew.

** - The Atmosphere CFW is released with the required drivers for emuMMC to function included (specifically in fusee-secondary), but using the most recent increases compatibility. When a new version of Atmosphere is released you should remove the current emuMMC drivers (emummc.kip) and then replace them with the latest version based on m4xw's Github repo. While we do link to a per-compiled version, it's always advised to manually compile them yourself.

Step 1 - Prepare the Source NAND Image


The first step is to make a copy of the NAND you wish to use as your emuMMC. If you're currently using your NAND for CFW and want to keep your homebrew, settings, themes, save data and games you'll want to make a backup of your current NAND. If you would like to start fresh with a clean emuMMC you can skip this step and use your original Clean NAND backup or any other backup of your NAND you may have lying around. You have to use a backup of your own console NAND. You should never use a backup of a NAND from another Switch.


If you already have you NAND backup read you can skip to the next step otherwise you will want to inject or reboot into the Hekate payload. Remember, if you have it set to auto-boot into CFW simply hold the Volume Down (Vol -) button on the top of the Switch while launching Hekate to bring up menu. From the menu, using the Volume keys to navigate Up or Down, navigate to Tools and then press the Power Button to enter the next menu (press Power anytime like the enter key), then pick Backup and then under "Full" proceed to backup the eMMC BOOT0/1 and eMMC RAW GPP.

The NAND backup can take some time and once the NAND backup is done copy the files located on your Micro SD Card under /backup/ onto your computer. If you're Micro SD Card was formatted as exFAT when you made your NAND backup you're going to have the BOOT0, BOOT1 and rawnand.bin files. If that's the case the following command will join them into one single file (after copying them to your computer).

cat BOOT0 BOOT1 rawnand.bin > emummc.bin

If you used a FAT32 formatted Micro SD Card to backup your NAND you're going to have the BOOT0, BOOT1 and 14 different rawnand parts which you will need to join together using the following command (after copying them to your computer).

cat BOOT0 BOOT1 rawnand.bin.00 rawnand.bin.01 rawnand.bin.02 rawnand.bin.03 rawnand.bin.04 rawnand.bin.05 rawnand.bin.06 rawnand.bin.07 rawnand.bin.08 rawnand.bin.09 rawnand.bin.10 rawnand.bin.11 rawnand.bin.12 rawnand.bin.13 rawnand.bin.14 > emummc.bin

Step 2 - Setup the Micro SD Card

This guide was written using Atmosphere v0.9.1 and as of its release file based emuMMC installations are buggy and not suggested to use. Due to this I will be covering the partition based setup where you create a separate partition on the Micro SD Card to house your emuMMC installation. The first step you would want to take is to backup your current Micro SD Card. Do this even if you're going to simply resize the current FAT32 partition or if you're using exFAT because you won't be in a couple of minutes. To make a backup of your current Micro SD Card setup simply copy over all of the files and folders into a safe spot on your computer.


Load up gparted (if you don't have it then get it). You'll want to delete any partitions you currently have on the card. The easiest way to do this is to first select your Micro SD Card from the drive drop down menu in the upper right hand corner and then Choose: Device -> Create Partition Table. After you have a blank Micro SD Card with no partitions you're going to want to make a Primary FAT32 partition with 32GB of free space at the end of it. You do this by right clicking in the main window and then clicking on New, followed by selecting the file system type (fat32), specifying the “Free Space Following (MiB)” which should be set to 29828.

The screenshots dealing with the size of the emuMMC partition are not optimized. You should set the size of the emuMMC partition (the second fat32 one) to 29828 (which will save you some space compared to the original 32000 that is in the screenshots). Thanks to StevenMattera for pointing this out.


After this is done you're going to want to turn the free space you left over into another FAT32 partition. You're simply doing this to give it a mount point under Linux that you can then overright with the raw contents of the emummc.bin file you created earlier. So right click in the main window and then select New, followed by selecting the file system type (fat32) and then pick “Add”. You're also going to want to take note of the numeric value proceeding the "first sector" in the properties tab of the partition you'll be using for your emuMMC (right click on the partition and select “Information” to get the "first sector" number.

While in gparted under the Partition label you'll notice a value assigned to each partition on your Micro SD Card. In the screen shot you'll see that the second FAT32 partition on my Micro SD Card is mounted under /dev/sde2 . You will want to make sure to use this exact mount point when executing the next command (the mount point will vary depending on your own setup). A typo here could result in you writing data to a wrong drive (therefor destroying its current file system).

Execute the following command.


  • sudo dd if=/path/to/emummc.bin bs=512M of=/dev/target_device status=progress


/path/to/emummc.bin is the full path and filename of the emummc.bin you created earlier

/dev/target_device is the location that the second partition you created on your Micro SD Card is mounted under

An example, which applied to my case, is below.


  • sudo dd if=emummc.bin bs=512M of=/dev/sde2 status=progress


If everything went well you'll be presented with a line of text detailing the progress of the dd command. The dd command is being used in this case to write the raw contents of your emummc.bin file directly to the Micro SD Card and this is exactly what Atmosphere will be looking for. Writing 32GB of data is going to take some time. So grab an iced cold Coca Cola and sit back and listen your favorite song over and over again.

Once dd successfully completes writing your new emuMMC to your Micro SD Card you'll want to copy back over the contents of your original Micro SD Card back onto the first FAT32 partition on the card. After you copy the backup you made you're going to need to adjust some things with your current CFW configuration to get emuMMC to boot from Atmosphere. First and foremost, make sure you're using the latest version of Atmosphere. If you're up to date then proceed to create a new folder on your card named "emummc" and then place the emummc.ini template you downloaded in that folder. After that move the current "Nintendo" folder in the root of your card inside of the "emummc" folder you just created and rename it to "Nintendo_0001".

Step 3 - Configure The Software


Next you're going to want to edit the emummc.ini file. The one I provided simply contains the following.

[emummc]
emummc_enabled = 1
emummc_sector = 0x13031000
emummc_id = 0001


emummc_enabled can be toggled on (1) or off (0) which will inform Atmosphere whether it should boot into emuMMC or your normal NAND.

emummc_sector is the hexadecimal value created by converting the "first sector" value you wrote down from within gparted with a pre-fix of 0x added to it. In my example, I used the number 318967808 and used www.rapidtables.com to convert it into hex, which resulted in 13031000, append it to 0x and wrote that value to the emummc.ini file.

emummc_id is the identification number used to point Atmosphere to the Nintendo_XXXX folder on the Micro SD Card. Each emuMMC you have (you can have more then one) will use separate Nintendo folders based on their ID. My example is set to "0001" so the emuMMC will look for and use the "emummc/Nintendo_0001" folder. The "Nintendo" folder contains the games you've installed to your SD Card, including save data, system information and screenshots.

Once you've saved this file you'll want to place the "emummc.kip" located in th "emuMMC Drivers" links under Requirements (above) or the one you compiled yourself into the /Atmosphere folder on the SD Card. So, you should be all good to go. You created the emuMMC partition, filled it with a NAND image, configured Atmosphere to use emuMMC and then provided Atmosphere with the KIP plugin required for emuMMC to function.

Step 4 - Test emuMMC

You should now test the emuMMC. Boot up Atmosphere and if everything is okay you'll be presented with the NAND you setup on your SD Card. If you used a copy of your current system NAND and easy way to to see if you're running emuMMC is to change the color theme of the System Menu (from white to dark) and power off the Switch, edit the emummc.ini file and set "emummc_enabled = 0" and then boot into Atmosphere again. You'll see only the changes you make to emuMMC will take place in emuMMC so the Menu Theme for your consoles NAND will not be the same one you selected under your emuMMC NAND. A suggestion is to use custom themes in your emuMMC NAND to make sure you don't forget you're running CFW. It's not required, simply a suggestion.

If for some reason you get the following error when booting Atmosphere then you have set the wrong emummc_sector.

uSD: Failed to process the DMA transfer

This error will repeat a few times. Check your emummc_sector number and try again. If they are sound try removing the 0x in front of the hex value as it's reported that sometimes that will solve the error, but I couldn't confirm this myself. Can't hurt to try.

Step 5 - Restore Your Clean NAND

emuMMC is working so the next step is to restore your Clean NAND backup. Locate the backup and copy it to your Micro SD Card under the /backup/########/restore folder. If you're not sure what the 8 digital value should be then first boot into Hekate and attempt to perform a restore by navigating to Tools -> Restore and pick Restore eMMC BOOT0/1 and then instead of restoring the files you'll be presented with some small text reporting Hekate couldn't find the backup under the required folder. That's the name of the folder you need to copy your Clean NAND into on the Micro SD Card.

If you happen to have made a Clean NAND backup using an exFAT formatted Micro SD Card and need to format a new one to use for restoring purposes you can easily do so by installing some prerequisites and then running a single command (LABEL is whatever you want the Micro SD Card to be called and sdXn is the mount point for the Micro SD Card). This step isn't necessary as you can might have made a backup using multiple files therefor you can use a FAT32 formatted Micro SD Card to restore them with.


  • sudo apt-get install exfat-utils exfat-fuse
  • sudo mkfs.exfat -n LABEL /dev/sdXn


Inject the Hekate payload and then navigate to Tools -> Restore and pick Restore eMMC BOOT0/1 and restore BOOT0/1 followed by the RAW GPP by navigating to Tools -> Restore and pick Restore eMMC RAW GPP. Once this is done you need to uninstall AutoRCM (if you're using it, if not then skip this step). To disable AutoRCM go back to the main menu in Hekate and select Tools - AutoRCM and then Disable AutoRCM. We're disabling AutoRCM due to the fact that Nintendo can detect you are using it therefor it increases your ban risk. That means you'll have to use a RCM JIG device each time you cold boot your console and want to use a payload - remember to hold Volume + and tap the Power button to get into RCM mode as using AutoRCM you might have forgotten that!


Now, depending if you have a mismatched fuse count you may or may not be able to boot into OFW. If there are no problem with your fuses simply fully turn off the Switch and press the Power button to boot into OFW. If this fails you may need to boot a single time using Hekate to bypass the fuse count check and then proceed to do nothing else other than update your OFW to the latest version using the official built in System Update option. If you don't need to use Hekate you will also want to update your OFW first. Once this is done you're basically good to go.

Step 6 - Finalizing The Setup


You now have a single emuMMC partition on your Micro SD Card that you can use for homebrew. Just make sure not to link any Nintendo accounts to it and if you enable the wireless connection to use some sort of DNS filtering service such as 90dns or PegaScape (simply change your DNS settings in your Switch to the IP's provided by either service). Whenever you want to boot into CFW use your JIG and run Atmosphere and if the emummc.ini file is set to boot emuMMC you're be good to go.

If you're fond of having to manually edit the emummc.ini file each time you wish to not boot into emuMMC you can grab EmuMmcConfig which is a small homebrew application that automates the process. However, you will need to be careful not to boot your current NAND into CFW mode so it might be best to keep emuMMC always enabled. You want to avoid running your OFW under CFW mode due to Nintendo being able to detect CFW.

If for whatever reason you would like to make a backup of your emuMMC partition on your Micro SD Card you don't need to use your Switch (and of right now can't anyway) to do so. Simply execute the following dd command (where /dev/sdX is the location of your mounted Micro SD Card emuMMC partition, which you can find by using the "sudo fdisk -l" command).


  • sudo dd if=/dev/sdX conv=sync,noerror bs=64K status=progress > /path/to/emummc_backup.bin


Example


  • sudo dd if=/dev/sde2 conv=sync,noerror bs=64K status=progress > /home/john/emummc_backup.bin


Final Thoughts

While this method should reduce your ban risk please note that if you're going to run homebrew on your Nintendo Switch you should expect a ban at any given time and just be thankful that you haven't been banned if you're not banned yet. There is also an extra step you could take. While popular opinion might disagree with this precaution due to the fact Nintendo has never done it with any of their other consoles, but Nintendo could simply read from the Micro SD Card and detect the emuMMC partition or other files related to homebrew. It would be best to use your own dedicated Micro SD Card when using OFW and keep anything related to CFW off of it.

Please remember that emuMMC is currently in a beta status and is highly experimental, which I found out after trying to use the updated version of NXThemes Installer to install a custom theme. After I changed the theme and rebooted the emuMMC partition became corrupt and I had to use the dd command to copy over my original emummc.bin back to the Micro SD Card. I spoke with m4xw personally about the issue and it's just how things are currently. If you're already using a SXOS based emuNAND or would like a stable experience it is suggested that you hold off until the authors of the emuMMC driver, the Atmosphere CFW and the Hekate payload address these issues.




Post a Comment

0 Comments