3DS romfs.bin extraction

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by nero99, Oct 14, 2015.

  1. nero99
    OP

    nero99 GBAtemp Advanced Maniac

    Member
    1,861
    839
    Sep 18, 2014
    United States
    Can someone post a proper 3DS romfs.bin extraction tutorial? I get to the point with every single decrypting tool to where it dumps the contents of the exefs.bin and romfs.bin files. Yet only the exefs files are extracted from exefs.bin, romfs.bin does not get its files extracted at all. Yes everything has been decrypted before attempting. I am using Pokemon Omega Ruby because I want to use pk3ds to edit a few things, but i have no way of doing that since my romfs.bin won't extract its files. Can someone please help me?
     


  2. Thelostrune

    Thelostrune GBAtemp Advanced Fan

    Member
    541
    128
    Aug 13, 2015
    Norway
    You can use Ohana3DS to dump directly from the .3ds
     
  3. Asia81

    Asia81 In my Ecchi World <3

    Member
    4,880
    2,348
    Nov 15, 2014
    France
    Albi
    ohana3ds is really not the best for .bin extraction (romhacking)
     
  4. Ambassador

    Ambassador GBAtemp Regular

    Member
    217
    105
    May 30, 2015
    Egypt
    ctrtool.exe -t romfs --romfsdir=./romfs romfs.bin
     
  5. MDashK

    MDashK GBAtemp Regular

    Member
    219
    58
    Jul 22, 2011
    Internetus Exploratis
    ctrtool -x --romfsdir=romfs romfs.bin

    The command above will extract your ROMFS.BIN is the file is decrypted.

    Code:
    @echo off
    
    ctrtool -x --romfsdir=romfs_ext romfs.bin
    
    pause
    exit
    
    
    Copy-paste this into notepad, save it has a BAT file, and run it in the same directory where ROMFS.BIN is, along with ctrtool.exe.
     
    Thelostrune likes this.
  6. Asia81

    Asia81 In my Ecchi World <3

    Member
    4,880
    2,348
    Nov 15, 2014
    France
    Albi
    ctrtool -p --exheader=DecryptedExHeader.bin %Name%.3ds
    ctrtool -p --exefs=DecryptedExeFS.bin %Name%.3ds
    ctrtool -p --romfs=DecryptedRomFS.bin %Name%.3ds

    ctrtool.exe -t romfs --romfsdir=./romfs DecryptedRomFS.bin
    ctrtool.exe -t exefs --exefsdir=./exe DecryptedExeFS.bin --decompresscode
     
    DesuIsSparta likes this.
  7. Roxerism

    Roxerism Advanced Member

    Newcomer
    98
    20
    May 10, 2015
    There's this batch file in Asia81's kit that takes the romfs from the .3ds file. I recommend it :)


    (The name is "hackingtoolkit" I think...)
     
  8. nero99
    OP

    nero99 GBAtemp Advanced Maniac

    Member
    1,861
    839
    Sep 18, 2014
    United States
    I have tried everything all of you have suggested. The Romfs.bin is indeed decrypted. Yet the problem is still happening :/ Wherever I use the command lines that you have all posted, The window auto closes after a second and then will not let me do it again unless I restart my laptop.. Even with all of the "Hack Packs" and decryption tools, the romfs never extracts its files :( Should I try this on a different computer?
     
  9. daxtsu

    daxtsu GBAtemp Guru

    Member
    5,494
    3,879
    Jun 9, 2007
    How are you trying to run the commands? Command-line programs aren't meant to be double-clicked. They're meant to be run from an actual terminal window (aka a command prompt/"dos" box). If you're double clicking them, consider instead opening cmd from the start menu and navigating to the folder with those exe files in it, then running the commands that way (or, alternatively, make sure you have no files selected in the folder you're in, hold Shift, and then right click, and an option that says "Open Command Prompt Here" should show up).
     
  10. MDashK

    MDashK GBAtemp Regular

    Member
    219
    58
    Jul 22, 2011
    Internetus Exploratis
    The command BATCH I gave you above has a PAUSE there for a reason...
    It shouldn't be closing by itself. It needs a key press to close...
    If it's indeed closing automatically, something else must be wrong...

    You sure you are putting both files (ROMFS.BIN AND ctrtool.exe) in the same directory, along with the BAT file? (not .BAT.TXT, remember this)

    I'm not sure if CTRTOOL needs anything else extra installed, like VC Redist or something...

    UPDATE: Here: http://www23.zippyshare.com/v/MqChs2df/file.html

    Extract this, put the ROMFS.BIN inside the folder along with the already present EXE, BAT and DLL, and double-click the BAT to extract the ROMFS.
    It should work flawlessly.

    That RAR file contains: ctrtool, DLL required and the BAT file I pasted in post above.
     
    Last edited by MDashK, Oct 15, 2015
  11. nero99
    OP

    nero99 GBAtemp Advanced Maniac

    Member
    1,861
    839
    Sep 18, 2014
    United States
    I have done what you said and it tells me two things. "Unknown file. Press any key to continue..." & "ctrtool' is not recognized as an internal or external command,operable program or batch file. Press any key to continue . . ." Im going to try this on my desktop to see if that will help with this issue
     
  12. MDashK

    MDashK GBAtemp Regular

    Member
    219
    58
    Jul 22, 2011
    Internetus Exploratis
    Hmmm.... The "unknown file" error message is from ctrtool... But that usually happens when the ROMFS.BIN file is encrypted... OR, it's damaged somehow...

    The not recognized error is weird, because, if he ran ctrtool to be able to spit out the unknown file error, and the BAT command only requests ctrtool once... Why is he giving you that error as a follow up? (Running BAT as admin???)

    Anyways, try these things:

    1) Run this inside a folder, but in a drive or USB pen, OR somewhere that does not need Administrator privileges. Example: D: instead of C:
    2) DO NOT RUN THIS AS ADMINISTRATOR MODE. It may give unwanted results... It happened to me at least a couple of times.

    Try these and let me know. The errors you are getting may be related to that, if the case applies.
     
  13. nero99
    OP

    nero99 GBAtemp Advanced Maniac

    Member
    1,861
    839
    Sep 18, 2014
    United States
    Thanks for the help. I was finally able to see the issue.. It says my romfs, that is decrypted, is corrupt :(
     
  14. MDashK

    MDashK GBAtemp Regular

    Member
    219
    58
    Jul 22, 2011
    Internetus Exploratis
    Maybe your decryption failed somewhere...
    Try to decrypt it using this: https://gbatemp.net/threads/download-decrypt9-wip-3dsx-launcher-dat.388831/
    Personally, I prefer Shadowtrances release.
    It's what I use to cryptofix and decrypt when needed.
     
  15. nero99
    OP

    nero99 GBAtemp Advanced Maniac

    Member
    1,861
    839
    Sep 18, 2014
    United States
    I actually use what you just linked me to. Do you think the RXTools decrypting option would be any better?
     
  16. MDashK

    MDashK GBAtemp Regular

    Member
    219
    58
    Jul 22, 2011
    Internetus Exploratis
    I've had issues with rxTools, that's why I don't use it anymore. I kept getting "S" files and even failing to try to decrypt at all stating the ncchinfo file was to small/big, etc etc... So I gave up on that one...
    Did you have enough free space in your SD card to decrypt everything and not fail?
     
  17. nero99
    OP

    nero99 GBAtemp Advanced Maniac

    Member
    1,861
    839
    Sep 18, 2014
    United States
    I have a 32gb sd card. So yea, way more than enough space :lol:
     
  18. MDashK

    MDashK GBAtemp Regular

    Member
    219
    58
    Jul 22, 2011
    Internetus Exploratis
    Well... I'm fresh out of ideas...

    What I find odd is being able to extract all the content and not getting decryption errors...

    Have you tried to extract EXEFS.BIN to see if it extracts OK?

    Code:
    ctrtool.exe -t exefs --exefsdir=./exe exefs.bin --decompresscode
    or
    Code:
    ctrtool.exe -t exefs --exefsdir=./exe_noD exefs.bin
    for no decompression of CODE.BIN

    If it extracts OK and you can, for example, open the banner fil in 3dsexplorer, it means everything is decrypted...

    I'm suggesting this just to triple check if the issue is in fact the decryption part.
     
    Last edited by MDashK, Oct 15, 2015
  19. nero99
    OP

    nero99 GBAtemp Advanced Maniac

    Member
    1,861
    839
    Sep 18, 2014
    United States
    They are decrypted, but corrupt as well (stated by 3dsExplorer).. Guess Ill try all decryption methods again to see if it'll work this time around. Thanks for all the help. At least now I know the problem >.>
     
  20. MDashK

    MDashK GBAtemp Regular

    Member
    219
    58
    Jul 22, 2011
    Internetus Exploratis
    Even if the files are decrypted, 3dsexplorer will give that error...

    I have had that problem already too, and the EXEFS and ROMFS we're correctly decrypted.

    "Error: CRC Error or Corrupt Save File". Right? When trying to open EXEFS or ROMFS?
     
    Last edited by MDashK, Oct 15, 2015