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

GraFfiX420

Well-Known Member
OP
Member
Joined
Oct 14, 2009
Messages
465
Trophies
1
XP
1,593
Country
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?
 
D

Deleted User

Guest
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 ,

GraFfiX420

Well-Known Member
OP
Member
Joined
Oct 14, 2009
Messages
465
Trophies
1
XP
1,593
Country
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.
 

Frank1905

Well-Known Member
Member
Joined
Aug 13, 2018
Messages
255
Trophies
0
Age
24
XP
546
Country
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
 

GraFfiX420

Well-Known Member
OP
Member
Joined
Oct 14, 2009
Messages
465
Trophies
1
XP
1,593
Country
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.
 

GraFfiX420

Well-Known Member
OP
Member
Joined
Oct 14, 2009
Messages
465
Trophies
1
XP
1,593
Country
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.
 
  • Like
Reactions: thaikhoa

GraFfiX420

Well-Known Member
OP
Member
Joined
Oct 14, 2009
Messages
465
Trophies
1
XP
1,593
Country
United States
Forgive my ignorance, but why would you bother with step 1 based on step 3?

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.
 

GraFfiX420

Well-Known Member
OP
Member
Joined
Oct 14, 2009
Messages
465
Trophies
1
XP
1,593
Country
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.
 

Scitzo

Well-Known Member
Newcomer
Joined
Sep 1, 2018
Messages
50
Trophies
0
XP
284
Country
United States
Wat speed of sd card do u need to run emuNAND on sd card at same speed as internal?

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.
 

stick267

Well-Known Member
Member
Joined
Dec 17, 2018
Messages
586
Trophies
0
Age
33
XP
1,171
Country
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.
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,
  • Like
Reactions: GraFfiX420

GraFfiX420

Well-Known Member
OP
Member
Joined
Oct 14, 2009
Messages
465
Trophies
1
XP
1,593
Country
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.

Yeah that was how I was planning on writing the tutorial. Definitely easier.
 
  • Like
Reactions: stick267

Zap2000

Well-Known Member
Member
Joined
Oct 19, 2018
Messages
640
Trophies
0
Age
43
XP
808
Country
United Kingdom
Thanks for the writeup. I'll have to see if I can do it tonight because redownloading/installing all my NSPs would take forever. 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.

If using hidden partition and u got corruption on sd card how would u recover or use emuNAND again?
 

stick267

Well-Known Member
Member
Joined
Dec 17, 2018
Messages
586
Trophies
0
Age
33
XP
1,171
Country
United States
If using hidden partition and u got corruption on sd card how would u recover or use emuNAND again?
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,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    The Real Jdbye @ The Real Jdbye: sure, it can be hands free