Hacking [Release] 3DSFAT16tool - dump/inject the fat16 partition from nand dumps

  • Thread starter Thread starter cearp
  • Start date Start date
  • Views Views 38,496
  • Replies Replies 116
  • Likes Likes 13

cearp

瓜老外
Developer
Joined
May 26, 2008
Messages
9,301
Solutions
2
Reaction score
7,286
Trophies
4
XP
10,531
Country
Korea, North
I wanted a better/faster way to extract the fat16 partition from the nand dump, so I made a python tool to do it. Opening up a hex editor and doing it like that is possible, but some hex editors are better than others and difficult to use for some people, but this tool I made is nice and easy to use.
It supports dumping and injecting it, and supports the 'normal' 3ds nand and new3ds nand.
I'm sure I could detect it automatically, but for new3ds you need to add '-n3ds' as an argument. (although this is not useful for n3ds right now because we don't have public nand access, but later it will be useful)

Naturally you need to xor the fat16 partition to make it readable, so xor is after dumping, and re-xor it before injecting.

For browsing/editing the fat16 file, instead of relying on something weird like 'WinImage' - just rename the fat16 file as '.iso', then I simply double click it and it mounts just like any other drive/volume on my computer - easy editing! I'm on mac so it is very easy for me to do. I'm not sure how easy it is to mount disks on windows...
 

Attachments

For Windows users, WinCDEmu is a great tool that simply adds the functionality directly into Windows to mount ISOs and a few other formats by simply right clicking and mounting.
Or you can just open the ISO with 7Zip or Winrar, they both browse ISO files fine and can modify them.
 
  • Like
Reactions: cearp
For Windows users, WinCDEmu is a great tool that simply adds the functionality directly into Windows to mount ISOs and a few other formats by simply right clicking and mounting.
Or you can just open the ISO with 7Zip or Winrar, they both browse ISO files fine and can modify them.

i thought i read windows 7 had 'iso' support, or something like that? not sure if it does, or 8, etc. (even so it might not make it writeable etc, on mac at least it treats it just like a flash drive/etc)
i remember when i used to use daemon tools etc, but that many many years ago :)
 
i thought i read windows 7 had 'iso' support, or something like that? not sure if it does, or 8, etc. (even so it might not make it writeable etc, on mac at least it treats it just like a flash drive/etc)
i remember when i used to use daemon tools etc, but that many many years ago :)

Yeah that would be Windows 8 hehe. And I am glad to be rid of Daemon Tools... it funked with system files too much and took up active resources.
 
  • Like
Reactions: Margen67 and cearp
using Python 2.7.9 for windows I get one error:

\3DSFAT16tool>python 3DSFAT16tool.py -d emuNAND_94_Based_on_4.5.bin emuNAND_94_Based_on_4.5_FAT16.bin
*******
3DSFAT16tool
*******

Dumping... please wait
Traceback (most recent call last):
File "3DSFAT16tool.py", line 57, in <module>
fat16 = nand[start:end]
MemoryError

\3DSFAT16tool>
 
using Python 2.7.9 for windows I get one error:

\3DSFAT16tool>python 3DSFAT16tool.py -d emuNAND_94_Based_on_4.5.bin emuNAND_94_Based_on_4.5_FAT16.bin
*******
3DSFAT16tool
*******

Dumping... please wait
Traceback (most recent call last):
File "3DSFAT16tool.py", line 57, in <module>
fat16 = nand[start:end]
MemoryError

\3DSFAT16tool>

MemoryError usually means you lack RAM.
 
So the step of the another tutorial where I need to copy and paste the content of test.bin to emuNAND.bin with the hex editor, is basically this? I[f so, it should be replaced in the tutorial as well, that copy/paste was a pain in the ass for me.
 
It should be, for me it works with my 2gb (I'm on linux tho).
Try running it again, MemoryError is a weird error.
BTW: Are you running python 64bit?

Hmmm, nope...
It's 32bits... That's probably the issue here.

Changed to Python 2.7.9 64bits and it worked.
 
yeah, i was wondering about there being any issues, i was not sure if the whole file would be loaded into ram, and if i should do it in chunks, but, i think it is ok how it is.
there is probably a nicer way to do it, but as you can see from the python code, it is simple and basic :) -- and it works :)

So the step of the another tutorial where I need to copy and paste the content of test.bin to emuNAND.bin with the hex editor, is basically this? I[f so, it should be replaced in the tutorial as well, that copy/paste was a pain in the ass for me.
yes, i hated that part too :) this does it for you.
i could have added the xor process to this too, but, at least for now i will keep it separate.
 
  • Like
Reactions: DSoryu
This looks interesting... I suppose it could be used to modify the EmuNAND filesystem? Could we do that without having an actual 3DS flashcart? I'm using 4.2 SysNAND, which I downgraded to using Gateway's downgrading files, and 9.4 EmuNAND using the MT-Card Launcher. What exactly could I modify with this tool?
 
This looks interesting... I suppose it could be used to modify the EmuNAND filesystem? Could we do that without having an actual 3DS flashcart? I'm using 4.2 SysNAND, which I downgraded to using Gateway's downgrading files, and 9.4 EmuNAND using the MT-Card Launcher. What exactly could I modify with this tool?

this tool just gets out the fat16 parition from the nand. if you can xor it to unencrypt it (and re-xor it to re-encrypt it when you want to write it back) - you can edit your nand.
yes you can do this without gw. sysnand or emunand, it doesn't matter.
 
  • Like
Reactions: Codename
Just wondering, my fat16 partition is 757 mb out of my 943 mb EmuNAND partition. What's the other ~200 mb of EmuNAND partition? Anything interesting?
 

Site & Scene News

Popular threads in this forum