Extracting CTRNAND

BufferOverflow

Well-Known Member
OP
Newcomer
Joined
Nov 15, 2014
Messages
48
Trophies
0
Location
Matrix
Website
mbware.bplaced.net
XP
183
Country
Germany
Due to the recent announcement from Nintendo that the services will be shutting down April this year, I would like to extract my partitionA.bin from an older NAND backup for Pretendo. I was able to extract the NAND bin using Ninfs. To access the internal CTR files, I tried to mount the ctrnand_full.img using OSFMount or open it using 7-ZIP but none of them worked. AFAIR, the ctrnand_full.img is encrypted. Using GodMode9, I can open the full backup, but It only displays the content that I already see on Windows. The older backup was created with an older version of GodMode9, which should be an issue here. Is there anything I missed out here? Thanks for any help!

PS: There is a way to "convert" the ctrnand_full.img using hex editor to a readable FAT partition (ctrnand_fat.img) but I was unable to find the necessary HEX values in my extracted ctrnand_full.img. I was also 1 year ago able to extract the CTRNAND, but I can't recall how I pulled this off.
 

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
4,323
Trophies
1
XP
4,461
Country
Canada
To access the internal CTR files, I tried to mount the ctrnand_full.img using OSFMount or open it using 7-ZIP but none of them worked. AFAIR, the ctrnand_full.img is encrypted.
The whole point of ninfs is that it decrypts these things for you.

Did you try copying ctrnand_full.img to somewhere else on your hard drive before using OSFMount or 7-Zip?
 
  • Like
Reactions: BufferOverflow

BufferOverflow

Well-Known Member
OP
Newcomer
Joined
Nov 15, 2014
Messages
48
Trophies
0
Location
Matrix
Website
mbware.bplaced.net
XP
183
Country
Germany
And how exactly are you trying to mount them with OSFMount? https://gbatemp.net/threads/extract...nd-backups-and-sd-contents-with-ninfs.499994/ specifically cautions against using drive letters.

Your screenshot suggests you have WinImage; does that work? (I'm not entirely sure 7-Zip supports hard drive images.)

I tried to mount my image with and without a drive letter using OSFMount. I still can't read the image. WinImage reports an invalid image. I also tried the same thing with a current backup from my N3DS XL; same issue here. None of the tools, I used, recognized the image as a readable partition.
 

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
4,323
Trophies
1
XP
4,461
Country
Canada
Finally occurred to me to give this a go. I used DiskExplorer, which I had handy, and it opened right up. (I specified the default "plain image".)

PS: There is a way to "convert" the ctrnand_full.img using hex editor to a readable FAT partition (ctrnand_fat.img) but I was unable to find the necessary HEX values in my extracted ctrnand_full.img.
Also, I have no idea what you are referring to here. Doesn't ninfs provide the option of extracting either ctrnand_full or ctrnand_fat ?
 

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
4,323
Trophies
1
XP
4,461
Country
Canada
I was just looking with 1.7b2, and it had both ctrnand_fat and ctrnand_full. Perhaps something changed in newer versions?
 

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,842
Country
United States
Yes, I had removed ctrnand_fat because it was basically the same as ctrnand_full. And unlike GodMode9, both files could be accessed at the same time, and if the two files were read and written to at the same time, bad things could happen. So I decided to not show duplicate writable files. Same reason for twl_main and twl_photo being removed and only leaving twlnand_full.
 

Kwyjor

Well-Known Member
Member
Joined
May 23, 2018
Messages
4,323
Trophies
1
XP
4,461
Country
Canada
I see, changed in version 2.0a1.

So... How does one convert ctrnand_full into ctrnand_fat? I assume they can both be opened with osfmount?
 

ihaveahax

Well-Known Member
Member
Joined
Apr 20, 2015
Messages
6,070
Trophies
2
XP
7,842
Country
United States
OSFMount can mount single filesystem images as well as partitioned images, so in this case it supports ctrnand_fat (single filesystem image), ctrnand_full (partitioned drive with one partition) and twlnand_full (which has two partitions).

If you mount twlnand_full.img for example:
Screenshot of an OSFMount window, Mount Virtual Disk, showing the option of mounting individual partitions of a disk, or the entire disk.


If OSFMount isn't accepting the file, it's probably just corrupt. Or maybe there's a bug in ninfs (but check to see if it can't be decrypted with different tools before assuming this).

If you really need to get the individual FAT partitions, I'm not sure how to do this on Windows at the moment. You could probably script it yourself with a library like pymbr. On Linux and macOS this could be done by attaching the drive and dd-ing the correct partition from /dev.
 
  • Like
Reactions: BufferOverflow

BufferOverflow

Well-Known Member
OP
Newcomer
Joined
Nov 15, 2014
Messages
48
Trophies
0
Location
Matrix
Website
mbware.bplaced.net
XP
183
Country
Germany
Thanks for your reply. Using ninfs version 1.7b2 I was able to extract ctrnand_fat.img, which I could open 7-ZIP without any issues. So I don't have to bother with ctrnand_full.img again to make it readable.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Materia_tofu @ Materia_tofu:
    im not a very bright individual, but we live and we learn
  • SylverReZ @ SylverReZ:
    @Materia_tofu, We do learn a lot from plenty of talented individuals.
  • Materia_tofu @ Materia_tofu:
    this is true! i learned how to make soundfont remixes from a friend back in 2021
    +1
  • BakerMan @ BakerMan:
    Update on my brother: He's home now, tired and hungry, obviously, but other than that, seems to be doing fine.
    +2
  • Veho @ Veho:
    That's a relief to hear. Do you know what happened?
  • SylverReZ @ SylverReZ:
    @BakerMan, Any idea what happened? I hope that your brother's doing good.
  • BakerMan @ BakerMan:
    Well, from what I've heard from my parents, he had a seizure last night, perhaps an epileptic episode, fucking died, had a near death experience, my dad called the paramedics, they showed up, took him to the hospital, and he woke up covered in tubes, and started complaining.
  • BakerMan @ BakerMan:
    He couldn't eat until after his MRI, when he had a bomb pop.
  • BakerMan @ BakerMan:
    What matters now is that he's doing alright.
  • Veho @ Veho:
    But you still don't know what it was?
  • Veho @ Veho:
    Has he had seizures before?
  • The Real Jdbye @ The Real Jdbye:
    apparently stress can cause seizures, my brother had one during a test once
  • The Real Jdbye @ The Real Jdbye:
    never had one before that, and never had one since
  • Redleviboy123 @ Redleviboy123:
    Question about game texture chanching Do i need an own game id?
  • The Real Jdbye @ The Real Jdbye:
    @Veho for those that want to
    experience being sonic the hedgehog
  • Veho @ Veho:
    Ah, you mean
    furries.
  • The Real Jdbye @ The Real Jdbye:
    well, sonic fans are a whole separate thing from furries
  • The Real Jdbye @ The Real Jdbye:
    like bronys
  • The Real Jdbye @ The Real Jdbye:
    sonic porn is too weird even for me
  • Dumpflam @ Dumpflam:
    bruh
  • Dumpflam @ Dumpflam:
    guys how do i delete a post
  • The Real Jdbye @ The Real Jdbye:
    you don't
  • The Real Jdbye @ The Real Jdbye:
    you can report it and request deletion
    The Real Jdbye @ The Real Jdbye: you can report it and request deletion