Question Moving from SX OS 2.3 SD Emunand to 2.4 SD/Hidden Partition Emunand

Discussion in 'Switch - Exploits, Custom Firmwares & Soft Mods' started by GraFfiX420, Dec 14, 2018.

  1. GraFfiX420
    OP

    GraFfiX420 GBAtemp Fan

    Member
    7
    Oct 14, 2009
    United States
    Greetings, with the release of SX OS 2.4 I would like to upgrade my emunand to 6.2, and create the hidden partition, then move my current emunand there. This is what I'm thinking the process will go like.

    1. Boot switch, use choidujournx to update my current emunand from 6.1 to 6.2.
    2. Backup contents of SD card.
    3. Boot SX menu and create the hidden partition/new emunand (will be 5.1, as this is what my sysnand is on.)
    4. Restore my files to the console, copying my emunand backup to the hidden emunand partition.

    So, a few questions.

    How do I access the hidden partition? Is it readily visible in windows/macos?
    Will this method work?
    I assume the hidden partition is exactly the size needed for the emunand, is this true?
    Any problems with exfat?
    Has anyone done this successfully yet?
     
  2. json

    json MUSCLEMAN

    Member
    9
    Aug 9, 2013
    Burkina Faso
    Yes it will work, if you know how to use a hex editor.

    Insert the SD card in Windows and you can use HxD to open up a 'raw' view of the SD the SD card you inserted.

    The first sector is the MBR, and TX put some header at the second sector. You can ignore those.
    And at about the 3rd or 4th sector (don't have it infront of me) the same data as in the emunand files appears: these are boot0.bin, boot1.bin, full01.bin, full02.bin, etc.

    You can just copy paste these files one by one after eachother in the 'raw' SD view in HxD.
    Note that some versions of Windows don't support writing to a raw drive unless it is unmounted. You can use something like this to temporarily force drive dismount:
    http://reboot.pro/topic/12413-lockdismount-v0300-update/


    If you dont have HxD or windows, you can use dd which is available on most *nixes.

    If you wait I'm sure someone will make a PC tool to do this for you

    Now as for you other questions:
    - Windows / Nintendo don't see the hidden partition, that's why it is called hidden
    - The hidden partition is exactly the same size as the eMMC chip
    - I don't see why there would be any problems with exfat. If your exfat fs gets screwed, the hidden partition will remain intact. This is the reason why it's the best option IMO
     
    Last edited by json, Dec 14, 2018
    JJTapia19 and GraFfiX420 like this.
  3. GraFfiX420
    OP

    GraFfiX420 GBAtemp Fan

    Member
    7
    Oct 14, 2009
    United States
    Damn, I would have thought there would be a way to attach it. Maybe it can be mounted under linux?
     
  4. GraFfiX420
    OP

    GraFfiX420 GBAtemp Fan

    Member
    7
    Oct 14, 2009
    United States
    DD may be the best option here, I'm unsure if I would be able to just concat the files and DD the resulting file to the drive, though.
     
  5. Frank1905

    Frank1905 GBAtemp Regular

    Member
    3
    Aug 13, 2018
    Italy
    I did the same you want to do, except for creating this hidden partition (I feel good with SD Emunand)
    The only problem I had was after the Choidujour update to 6.2.0. In fact I chose the option to activate Auto RCM in order not to burn any efuse.
    I had already burned efuse with sysnand update to 6.2.0 and I thought that updating Emunand could cause another fuse to get burned (stupid me). So, my Emunand didn't work anymore (I think my swtich tried to boot RCM whenever I tried to load Emunand) so I only had to replace Emuandn BOOT0 with an original one from my sysnand and everything worked like a charm.

    Inviato dal mio Nexus 5X utilizzando Tapatalk
     
  6. GraFfiX420
    OP

    GraFfiX420 GBAtemp Fan

    Member
    7
    Oct 14, 2009
    United States
    I haven't got to moving the emunand yet, still creating the emunand on the hidden partition. Encountered my first issue, could not create emunand with a 64gb SD formatted to exfat, no matter what I tried. Had to format my card to FAT32 to get it to start creation, we will see what the effects of that on my installed NSP's after I'm done.
     
  7. GraFfiX420
    OP

    GraFfiX420 GBAtemp Fan

    Member
    7
    Oct 14, 2009
    United States
    It looks like at this point FAT32 is required, at least with my setup. I was able to create the emunand and update it to 6.2 using choidujournx. I haven't looked at locating the hidden partition yet, it might just require manually dd with offsets etc. It's late, will re-approach this tomorrow.
     
    thaikhoa likes this.
  8. zenriko

    zenriko Member

    Newcomer
    2
    Dec 14, 2013
    Forgive my ignorance, but why would you bother with step 1 based on step 3?
     
  9. GraFfiX420
    OP

    GraFfiX420 GBAtemp Fan

    Member
    7
    Oct 14, 2009
    United States
    So that when I restore the NAND later, it's already on 6.2, but not absolutely necessary at all, these were just a loose outline. I've looked at it tonight and am testing a solution to transferring an emunand from sd/standard to sd/hidden.
     
  10. GraFfiX420
    OP

    GraFfiX420 GBAtemp Fan

    Member
    7
    Oct 14, 2009
    United States
    OK, managed to get this done. A couple things, firstly, after creating the hidden emunand, I think it would be possible to format the portion of the card that is still able to be used to exfat, but I did not try it, I stuck with fat32, as I heard exfat can cause problems.

    I did it like this, first I created a hidden emunand.
    I then took the backup of my emunand directory from sxos 2.3, and concatenated those into one nand dump, like so:
    Code:
    cat full.00.bin full.01.bin full.02.bin full.03.bin full.04.bin full.05.bin full.06.bin full.07.bin > /Volumes/WhereYouWantToStoreIt/emunand.bin
    Using that, and boot0/1, I had most everything I needed.
    I then used Hex Fiend (MacOS) to examine the raw data from the SD with the hidden emunand on it, so I could find out what goes where.
    Found that the first 1023 bytes are odds and ends, skipped that.
    boot0 resides at 1024-4195327
    boot1 resides immediately after, 4195328-8389631
    fullnand resides immediately after, 8389632-31276925952
    I fought with dd for a while working with seek, but it was very restrictive since I could only a max block size of 1k, so I decided to create the full image, and forego the skipping of the initial 1023 bytes.
    I opened Hex Fiend and, then opened the disk again, and took a dump of the first 1023 bytes, saving it to a file called "completeemunand.bin"
    I then pasted in immediately after that 1023 bytes, boot0, boot1, and finally the contents of the emunand.bin, the file created by concatenating the contents of the old emunand files created by sx os 2.3.
    Save the file you created here to your computer, then go back to terminal
    Run this to restore the backup you just created to your SD card, keep in mind you will have to replace some values, this is not for novice users:
    Code:
    sudo dd if=/Volumes/YourVolumeName/completeemunand.bin | pv -s 29G | sudo dd of=/dev/rdisk3 bs=2m conv=noerror,notrunc
    A couple caveats here, I use pv to monitor the progress of the copy, you will need to use brew to install it, the command 'brew install pv' should be enough if you have brew installed. If you do not want to use pv, you can remove the pipes that encapsulate it and the pv command itself to use it without monitoring progress, like so:
    Code:
    sudo dd if=/Volumes/1TB/completeemunand.bin of=/dev/rdisk3 bs=2m conv=noerror,notrunc
    Another thing to be sure of, use /dev/rdisk*, instead of /dev/disk*, this will increase your write speeds dramatically, as this is the raw device for that disk.
    Once DD, is done, again this will take a while, mine took around 22 minutes, then I copied everything back to my TXNAND partition that I had backed up before creating the hidden emunand.
    That's it, you should be all set, all your save games etc will be there again, and everything will be as before you upgraded to 2.4, except you have a hidden emunand now.
     
  11. thaikhoa

    thaikhoa GBAtemp Advanced Maniac

    Member
    8
    Sep 16, 2008
    Thanks for the heads up.

    Could you mind to write exact dd commands to export and import boot0.bin/boot1.bin and rawnand.bin from the emunand hidden partition?

    Again, thanks heaps!
     
  12. GraFfiX420
    OP

    GraFfiX420 GBAtemp Fan

    Member
    7
    Oct 14, 2009
    United States
    Since there seems to be at least a little interest, I'll try to do a proper tutorial tonight, I'll post the link here.
     
    thaikhoa and chest0r like this.
  13. Zap2000

    Zap2000 GBAtemp Fan

    Member
    3
    Oct 19, 2018
    United Kingdom
    Wat speed of sd card do u need to run emuNAND on sd card at same speed as internal?
     
  14. GraFfiX420
    OP

    GraFfiX420 GBAtemp Fan

    Member
    7
    Oct 14, 2009
    United States
    I'm not 100% sure. I'm running a class10, I haven't noticed any speed difference. NAND is just emmc, probably runs at similar or identical speeds.
     
  15. Scitzo

    Scitzo Member

    Newcomer
    2
    Sep 1, 2018
    United States
    I run a U3 V30 card, which means a minimum write speed of 30mb/s with emunand, and it works with no issues. Most high quality brand name Class 10 cards will probably be just fine.
     
  16. stick267

    stick267 GBAtemp Fan

    Member
    3
    Dec 17, 2018
    United States
    Thanks for the writeup. I'll have to see if I can do it tonight. But would this be possible?:

    1. Dump first 1023 bytes of the hidden partition to a file.
    2. Concatenate that file, boot0/1, full00-07 into one file with the "cat" command.
    3. Use the "dd" command to write that complete file to the hidden partition.

    Seems a bit simpler but maybe I'm missing something.
     
    Last edited by stick267, Dec 17, 2018
    GraFfiX420 likes this.
  17. GraFfiX420
    OP

    GraFfiX420 GBAtemp Fan

    Member
    7
    Oct 14, 2009
    United States
    Yeah that was how I was planning on writing the tutorial. Definitely easier.
     
    stick267 likes this.
  18. stick267

    stick267 GBAtemp Fan

    Member
    3
    Dec 17, 2018
    United States
    Awesome, I'll give it a try after work. Thanks again.
     
  19. Zap2000

    Zap2000 GBAtemp Fan

    Member
    3
    Oct 19, 2018
    United Kingdom
    If using hidden partition and u got corruption on sd card how would u recover or use emuNAND again?
     
  20. stick267

    stick267 GBAtemp Fan

    Member
    3
    Dec 17, 2018
    United States
    You would probably need to create a backup image of your SD card with something like win32diskimager or Apple Pi Baker (before the corruption, obviously). And then reflash that image if your data got corrupted. But that would be very time (and storage) consuming if you have a larger SD card. Since I have a 256GB SD card and limited storage space, I'm using FAT32 and crossing my fingers.
     
    Last edited by stick267, Dec 17, 2018
Loading...