Moving from SX OS SD-emunand to SD-hidden_emunand

Greetings, here's some instructions to move your emunand from <=2.3 to >=2.4 SX OS. You will need to fill in your own info.

Code:
dd if=/dev/rdisk* of=first1024.bin bs=1024 count=1
Code:
cat first1024.bin boot0.bin boot1.bin 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
Write the backup with pv:
Code:
sudo dd if=/Volumes/WhereYouStoredIt/emunand.bin | pv -s 29G | sudo dd of=/dev/rdisk* bs=2m conv=noerror,notrunc
Without pv:
Code:
sudo dd if=/Volumes/WhereYouStoredIt/emunand.bin of=/dev/rdisk* bs=2m conv=noerror,notrunc

Let me know if you have any questions. This is for mac but should work on linux, with minor adjustments.
 

massijay

Member
Newcomer
Joined
Dec 15, 2011
Messages
20
Trophies
1
XP
1,114
Country
Italy
Thank you for the guide, I was looking to do the same, however I'm not familiar with dd.
I want to flash the emunand.bin file (~29GB) to a 128GB microSD, If I flash that as you wrote in the OP, what will happen to the remaining space in the microSD?
 

thaikhoa

Well-Known Member
Member
Joined
Sep 16, 2008
Messages
2,236
Trophies
1
XP
2,590
Country
Australia
Thank you for the guide, I was looking to do the same, however I'm not familiar with dd.
I want to flash the emunand.bin file (~29GB) to a 128GB microSD, If I flash that as you wrote in the OP, what will happen to the remaining space in the microSD?

Will leave all the remaining space untouched.
 

massijay

Member
Newcomer
Joined
Dec 15, 2011
Messages
20
Trophies
1
XP
1,114
Country
Italy
I tried to do this with dd for Windows, but if I try to flash the emunand image when the SD is already formatted it gives me an access denied error. If I remove the partition form the SD (leaving it as unallocated space) I can flash the image, but after the flash Windows just see the SD as raw partition and I can't do anything with the remaining space.
 

Kikolasi3D

Member
Newcomer
Joined
Jan 10, 2014
Messages
18
Trophies
0
Age
27
XP
993
Country
I can get it to work a few times but suddenly the FAT32 partition with the emutendo folder and all my files loses its format. But it's still there with all my files, only without the format. Does someone know why is this happening?

Edit with more details: Suddenly when I enter the sd again in the pc for transfering a file, it tells me to format the sd, and when I watch it with Diskpart or EaseUS Partition Master, the partition with all the files doesnt have his format anymore.
 
Last edited by Kikolasi3D,

josete2k

Well-Known Member
Member
Joined
Apr 24, 2009
Messages
678
Trophies
1
Age
43
Location
Spain
XP
1,602
Country
Spain
I tried to do this with dd for Windows, but if I try to flash the emunand image when the SD is already formatted it gives me an access denied error. If I remove the partition form the SD (leaving it as unallocated space) I can flash the image, but after the flash Windows just see the SD as raw partition and I can't do anything with the remaining space.

You have to create your hidden emunand from SXOS menu.

Once finished you can flash your own files in it.

I'm doing some research about this, I don't understand why we dump the first 1024 bytes, isn't the MBR long only 512 bytes? @GraFfiX420

boot0.bin starts after the first 1kb.

The first 1k MUST BE dumped from destination device.
 
Last edited by josete2k,
  • Like
Reactions: massijay

massijay

Member
Newcomer
Joined
Dec 15, 2011
Messages
20
Trophies
1
XP
1,114
Country
Italy
You have to create your hidden emunand from SXOS menu.

Once finished you can flash your own files in it.

Yeah, I discovered that after a few tries, but it's a big waste of time.
I saw with fdisk that in my SD with emunand there are 29.13GB (exactly 61087746 sectors, 61087746*512=31276925952 bytes) of unallcated space before the fat32 partition. That's exactly 1024 bytes more than the raw emunand files size.
Instead of creating a new emunand from sx os and then flashing our previous files, why can't we just create those partitions (actually unallocated space + fat32 partition), then dump the first 1024 bytes and finally flash the files as the OP said?
I'll try this when I have some free time.

boot0.bin starts after the first 1kb.

The first 1k MUST BE dumped from destination device.

What's inside the first 1k?
 

GraFfiX420

Well-Known Member
OP
Member
Joined
Oct 14, 2009
Messages
465
Trophies
1
XP
1,603
Country
United States
Yeah, I discovered that after a few tries, but it's a big waste of time.
I saw with fdisk that in my SD with emunand there are 29.13GB (exactly 61087746 sectors, 61087746*512=31276925952 bytes) of unallcated space before the fat32 partition. That's exactly 1024 bytes more than the raw emunand files size.
Instead of creating a new emunand from sx os and then flashing our previous files, why can't we just create those partitions (actually unallocated space + fat32 partition), then dump the first 1024 bytes and finally flash the files as the OP said?
I'll try this when I have some free time.



What's inside the first 1k?

The mbr, and there's a line with reference to TX in plaintext, and I'm guessing some sort of trickery to hide the space.
 

massijay

Member
Newcomer
Joined
Dec 15, 2011
Messages
20
Trophies
1
XP
1,114
Country
Italy
I managed to create the correct partition table manually and after flashing the emunand files, I think that I've understood well what's inside the first 1024 bytes, but I'm unsure about a few bytes in the second half of them.
Can you post or PM me your first1024.bin? I'll write what I know after I fully understood that
 

GraFfiX420

Well-Known Member
OP
Member
Joined
Oct 14, 2009
Messages
465
Trophies
1
XP
1,603
Country
United States
The text I see is "TXNAND" and "Team Xecuter ñ Rocking the Switch forever and beyond", here's a first 1024, mostly zeroes.
 

Attachments

  • first1024.bin.zip
    665 bytes · Views: 252

massijay

Member
Newcomer
Joined
Dec 15, 2011
Messages
20
Trophies
1
XP
1,114
Country
Italy
The text I see is "TXNAND" and "Team Xecuter ñ Rocking the Switch forever and beyond", here's a first 1024, mostly zeroes.
Thank you

I wrote a small explaination of the first 1024 bytes' content:
first1024 explaination.png
 

kublai

Well-Known Member
Member
Joined
May 29, 2008
Messages
508
Trophies
1
XP
2,038
Country
United States
I installed EMUNAND but I forgot if its v2.3 or v2.4, is there a way to find out which version of EMUNAND is installed?
 

Kikolasi3D

Member
Newcomer
Joined
Jan 10, 2014
Messages
18
Trophies
0
Age
27
XP
993
Country
I can get it to work a few times but suddenly the FAT32 partition with the emutendo folder and all my files loses its format. But it's still there with all my files, only without the format. Does someone know why is this happening?

Edit with more details: Suddenly when I enter the sd again in the pc for transfering a file, it tells me to format the sd, and when I watch it with Diskpart or EaseUS Partition Master, the partition with all the files doesnt have his format anymore.

Any help? :cry:
 

Kikolasi3D

Member
Newcomer
Joined
Jan 10, 2014
Messages
18
Trophies
0
Age
27
XP
993
Country
What are the exact steps you're using, and are you moving to a larger SD card or just moving from SD emunand to hidden?
I'm just moving from SD emunand to hidden in the same sd card. I backed up the first 1024 bytes like in the OP, concatenated the files with HxD since it gave me errors the other way, and then used this in Windows:
dd if=F:\emunand.bin of=\\?\Device\Harddisk3\Partition0 bs=2M conv=noerror,notrunc --progress
 

massijay

Member
Newcomer
Joined
Dec 15, 2011
Messages
20
Trophies
1
XP
1,114
Country
Italy
I'm just moving from SD emunand to hidden in the same sd card. I backed up the first 1024 bytes like in the OP, concatenated the files with HxD since it gave me errors the other way, and then used this in Windows:
dd if=F:\emunand.bin of=\\?\Device\Harddisk3\Partition0 bs=2M conv=noerror,notrunc --progress
You should first verify if your sd card is not fake with h2testw.
After the software above confirmed the sd card is good you can proceed creating emunand with sx os (I haven't managed to create the partition table correctly with only Windows yet).

On Windows the commands should be:
Read the first 1024 bytes
Code:
dd if=\\?\Device\Harddisk1\Partition0 of=first1024.bin bs=1024 count=1
Concatenate emunand files
Code:
copy /b first1024.bin + boot0.bin + boot1.bin + full.00.bin + full.01.bin + full.02.bin + full.03.bin + full.04.bin + full.05.bin + full.06.bin + full.07.bin emunand.bin
Write emunand on the sd card
Code:
dd if=emunand.bin of=\\?\Device\Harddisk1\Partition0 bs=2M --progress
Obviously you have to specify the correct disk/partition and paths
 
Last edited by massijay,
  • Like
Reactions: Kikolasi3D

massijay

Member
Newcomer
Joined
Dec 15, 2011
Messages
20
Trophies
1
XP
1,114
Country
Italy
On Linux (I used Ubuntu) you can create the correct partition table this way (you are going to format the target sd card, make a backup first if needed):
(Obviously you have to specify the correct disk/partition and paths)
Code:
sudo fdisk -l
sudo umount /dev/sdc1          // Unmount disk
sudo fdisk /dev/sdc            // Select disk
d                              // delete existing partition
n                              // new partition
p                              // primary
1                              // partition 1
61087746                       // First sector
(leave empty)                  // Last sector
Y                              // Yes, remove signature
t                              // Partition type
c                              // FAT32 (LBA)
w                              // Write changes
sudo mkfs -t vfat /dev/sdc1    // Format new partition Fat32
Then, dump the first 1024 bytes
Code:
sudo dd if=/dev/sdc of=first1024.bin bs=1024 count=1
Now open the first1024.bin file with an hex editor and do the following:
  • Set to zero the first 0x1BE bytes (from 0 to 0x1BD)
  • Paste the "Team Xecuter signature" in the last 512 bytes (right after 55 AA)
The final result should be as in this picture (The red and orange areas should match the same areas in your file)
Now, the procedure is almost the same as in the original post.
Concatenate emunand files
Code:
cat first1024.bin boot0.bin boot1.bin full.00.bin full.01.bin full.02.bin full.03.bin full.04.bin full.05.bin full.06.bin full.07.bin > emunand.bin
Write emunand on the sd card
Code:
sudo dd if=emunand.bin of=/dev/sdc bs=2M conv=noerror,notrunc status=progress
Finally, copy your files in the sd card and SX OS will recognize the emunand!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Mondooooo @ Mondooooo: im fucking motivated