Homebrew Anybody know of an on-console tool to remove emunand/rednand?

ksanislo

Well-Known Member
OP
Member
Joined
Feb 23, 2016
Messages
386
Trophies
0
Location
Seattle, WA
XP
512
Country
United States
Is there any existing tool which can remove an emunand/rednand partition from the SD card and non-destructively resize the FAT partition back up to the full size of the card?
 

gooeywreck

Member
Newcomer
Joined
Aug 23, 2016
Messages
23
Trophies
0
Age
28
XP
1,848
Country
United States
you have to copy everything from the sd to your computer , format then transfer everything back and problem solved. im glad u knew not to format you would have lost everything.
 
D

Deleted User

Guest
Decrypt9 can format (without RedNAND) meaning that it'll format it just like the computer would :D
 

ksanislo

Well-Known Member
OP
Member
Joined
Feb 23, 2016
Messages
386
Trophies
0
Location
Seattle, WA
XP
512
Country
United States
Decrypt9 can format (without RedNAND) meaning that it'll format it just like the computer would :D
Yeah, I get that, I'm wondering if anyone has bothered making a version of the tool that can rewrite the partition/FAT nondestructively instead. I've got friends who only have access to cellphones instead of PCs, and one of the few things that I can't walk them through is removing their old EmuNAND partitions without losing data.
 

nobody231

Well-Known Member
Member
Joined
Dec 8, 2014
Messages
338
Trophies
0
XP
212
Country
United States
Yeah, I get that, I'm wondering if anyone has bothered making a version of the tool that can rewrite the partition/FAT nondestructively instead. I've got friends who only have access to cellphones instead of PCs, and one of the few things that I can't walk them through is removing their old EmuNAND partitions without losing data.
I don't think that's even feasibly possible. Even if the 3DS was capable of removing partitions by itself (I don't know if it's possible), the 3DS may no longer recognize the SD card afterwards.
 

ksanislo

Well-Known Member
OP
Member
Joined
Feb 23, 2016
Messages
386
Trophies
0
Location
Seattle, WA
XP
512
Country
United States
I don't think that's even feasibly possible. Even if the 3DS was capable of removing partitions by itself (I don't know if it's possible), the 3DS may no longer recognize the SD card afterwards.

Low level IO is already utilized by Decrypt9/EmuNAND9 while formatting/partitioning, though their choice of the FatFs lib might not be capable of non-destructive operations itself. There's definitely no hardware limitation on being able to do this sort of thing, there's just no existing tools that I'm aware of so far.
 

nobody231

Well-Known Member
Member
Joined
Dec 8, 2014
Messages
338
Trophies
0
XP
212
Country
United States
Low level IO is already utilized by Decrypt9/EmuNAND9 while formatting/partitioning, though their choice of the FatFs lib might not be capable of non-destructive operations itself. There's definitely no hardware limitation on being able to do this sort of thing, there's just no existing tools that I'm aware of so far.
Maybe people just can't be bothered to do it?
 

dark_samus3

Well-Known Member
Member
Joined
May 30, 2015
Messages
2,372
Trophies
0
XP
2,042
Country
United States
the main reason the feature isn't anywhere is the 3ds is ungodly slow in terms of IO speed, it'd take forever to expand a fat32 partition in the configuration that we have redNAND set up in (you'd have to move the fat32 "to the left" (which means closer to sector 0)) therefore, there aren't any tools to do it with... it might be practical for low GB cards, but for anything over... I'd say 8 GB, you're looking at quite some time
 
  • Like
Reactions: Wolfvak

nobody231

Well-Known Member
Member
Joined
Dec 8, 2014
Messages
338
Trophies
0
XP
212
Country
United States
the main reason the feature isn't anywhere is the 3ds is ungodly slow in terms of IO speed, it'd take forever to expand a fat32 partition in the configuration that we have redNAND set up in (you'd have to move the fat32 "to the left" (which means closer to sector 0)) therefore, there aren't any tools to do it with... it might be practical for low GB cards, but for anything over... I'd say 8 GB, you're looking at quite some time
Oh, right. I forgot how bad the 3DS is in terms of that kind of stuff.
 

ksanislo

Well-Known Member
OP
Member
Joined
Feb 23, 2016
Messages
386
Trophies
0
Location
Seattle, WA
XP
512
Country
United States
the main reason the feature isn't anywhere is the 3ds is ungodly slow in terms of IO speed, it'd take forever to expand a fat32 partition in the configuration that we have redNAND set up in (you'd have to move the fat32 "to the left" (which means closer to sector 0)) therefore, there aren't any tools to do it with... it might be practical for low GB cards, but for anything over... I'd say 8 GB, you're looking at quite some time

You should't need to move the files on the filesystem beyond the initial NAND size while creating the partition, anything beyond that could be left in place and you can just update the FAT to point to the new location, for deleting it would be even easier, with no files moving at all.
 

Wolfvak

nyaa~
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,386
Country
Uruguay
According to some tests I did, read speeds max out at about 12MiB/s, while write speeds average around 500KiB/s and 1.5MiB/s - from these numbers, you can expect yourself to be sitting in front of your 3DS for a long long time.

EDIT: It depends on what you want - you could simply rewrite the MBR and partition layout in order to "remove" the emunand, but that doesn't really remove it, it simply "dummies" it out (and makes it relatively hard to really remove it afterwards, since you'd have to restore the old MBR or format from zero, yadda yadda).
On the other hand, if what you want is to obliterate the rednand you'll have to move the FAT file system backwards as well as performing the MBR modification I mentioned earlier.
 
Last edited by Wolfvak,
  • Like
Reactions: dark_samus3

dark_samus3

Well-Known Member
Member
Joined
May 30, 2015
Messages
2,372
Trophies
0
XP
2,042
Country
United States
You should't need to move the files on the filesystem beyond the initial NAND size while creating the partition, anything beyond that could be left in place and you can just update the FAT to point to the new location, for deleting it would be even easier, with no files moving at all.
Wrong. You'd need to move at least the header and MBR, again, to the left to take advantage of the new space (you can't tell fat to look at addresses before the header, and to move the header, you're going to want to move the rest of the partition as well) unless I'm missing something here
 
  • Like
Reactions: Wolfvak

ksanislo

Well-Known Member
OP
Member
Joined
Feb 23, 2016
Messages
386
Trophies
0
Location
Seattle, WA
XP
512
Country
United States
Wrong. You'd need to move at least the header and MBR, again, to the left to take advantage of the new space (you can't tell fat to look at addresses before the header, and to move the header, you're going to want to move the rest of the partition as well) unless I'm missing something here
Yeah, you'd have to rewrite the MBR, and the FAT, and write the new offsets for all of the files in the FAT, but that's realistically only a few hundred KB of data. The actual file storage can remain in the same location on the SD card. If you're making a new emunand partition, you'd have to copy all of the allocated blocks in that first GB or so to somewhere later in the disk. But anything already allocated in space that isn't changing just needs the FAT entry updated to point to its new position, the stored data itself doesn't have to be touched.
 

moghedien

Well-Known Member
Member
Joined
Mar 9, 2015
Messages
411
Trophies
0
XP
317
Country
United States
Wrong. You'd need to move at least the header and MBR, again, to the left to take advantage of the new space (you can't tell fat to look at addresses before the header, and to move the header, you're going to want to move the rest of the partition as well) unless I'm missing something here
I think he's implying that you could update the inodes (not sure if that's the right term?) instead of moving the files. I would think that would be possible when removing EmuNAND at least... but I know almost nothing about the low level details of file systems so I may be completely off.
 

ksanislo

Well-Known Member
OP
Member
Joined
Feb 23, 2016
Messages
386
Trophies
0
Location
Seattle, WA
XP
512
Country
United States
I think he's implying that you could update the inodes (not sure if that's the right term?) instead of moving the files. I would think that would be possible when removing EmuNAND at least... but I know almost nothing about the low level details of file systems so I may be completely off.
Yeah, they're not inodes in FAT, but that's exactly how it works... There was an old GPL program called FIPS in the 90s that would handle this sort of thing, but I can't find the source for it anywhere... Parted and the like still do it, but I suspect they're far more complicated due to additional features than is really needed to pull this off on the 3DS.
 

dark_samus3

Well-Known Member
Member
Joined
May 30, 2015
Messages
2,372
Trophies
0
XP
2,042
Country
United States
Yeah, they're not inodes in FAT, but that's exactly how it works... There was an old GPL program called FIPS in the 90s that would handle this sort of thing, but I can't find the source for it anywhere... Parted and the like still do it, but I suspect they're far more complicated due to additional features than is really needed to pull this off on the 3DS.
FatFS (what /every/ arm9 application uses for SD access) might be able to help you out there
 

ksanislo

Well-Known Member
OP
Member
Joined
Feb 23, 2016
Messages
386
Trophies
0
Location
Seattle, WA
XP
512
Country
United States
FatFS (what /every/ arm9 application uses for SD access) might be able to help you out there

I've seen that, but FatFs doesn't seem to have any non-destructive volume management operations to handle this sort of thing, so it would probably be easier to mangle the FAT directly anyway. I really don't have the free time to start hacking on another project like this, I'm really just hoping someone else has already given it a go.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Nut on the hill