How to Unpack/Repack 3DS ROMS

Discussion in '3DS - Tutorials' started by Newest Nick Team, Feb 5, 2015.

  1. Newest Nick Team

    Newest Nick Team GBAtemp Regular

    Nov 28, 2014
    United States
    You don't wanna know. :P
    How to Unpack/Repack 3DS ROMS

    Step 1: Use these tools: 3DS to CIA tool, 3dstool, and the slot0x25KeyX.bin. Also get your ROM to hack it with. Notice on how they are blue. They lead to the software.

    Step 2: Go to the Step 1 folder. Drag the ROM to and I'll spit out an ncchinfo.bin.

    Step 3: Rename the Launcher.dat to something else, like Launcher_GW.bat if there is one. Drag the files for the SD Card's Launcher.dat, MSetForBoss.bat, ncchinfo.bin, and the slot0x25KeyX.bin (The slot0x25KeyX.bin will not be included in that folder) to the SD Card.

    Step 4: Launch the DS Profile Exploit (If you installed it), and I'll generate some XORPADS.

    Step 5: Go to the Step 2 folder. Copy the XORPADs and the ROM to the folder. Rename the ROM to rom.3ds.

    Step 6: Run the bat file. Follow the instructions. Then after generating it to a CIA, go to the decrypted folder. There will be a romfs.bin.

    Step 7: Copy the romfs.bin to the 3dstool folder. With Command Prompt on the same folder, type up this command (Please make sure the romfs is named romfs.bin first!):

    3dstool -xvtf romfs romfs.bin --romfs-dir romfs

    I'll extract the contents in a folder called romfs.

    Step 8: Go to the ROMFS folder. Edit anything now.

    Step 9: When your finished, go back to 3dstool, and put in this on Command Prompt (Make sure you rename the old romfs.bin to something else before doing this, I would go with romfs_old.bin):

    3dstool -cvtf romfs romfs.bin --romfs-dir romfs

    It will build the new romfs.bin.

    Step 10: Go back to the Step 2 folder where your ROM was converted to a CIA, go to the decrypted folder, and replace the romfs.bin.

    Step 11: Return to the bat file, and type up 1 if you see this message (If your using v5.1.4b):

    Use full or manual/dlp ( 1 or 2 )

    Step 12: Type up Y if you see this line:

    Are you trying to repack them? ( y / n )

    Step 13: Now follow the instructions. If you want a custom RSF for no conflicts against the regular CIA file, go to the tools folder and edit rom.rsf's title and product code. When done, use the custom RSF on number 3. Make sure you select 1 next after putting the rsf file in the root of where the bat file is.

    Step 14: When your done, you'll see a rom.cia. Copy it over to your SD Card. You can rename it if you like.

    Step 15: For those who already have DevMenu/BigBlueBox, launch it. Don't just replace it on the MicroSD. Also, rename the Launcher_GW.dat to Launcher.dat, but first rename the Xorpad Launcher.dat to Launcher_Xorpad.dat. If you want, you can use a separate SD Card for the purpose of decrypting stuff.

    Step 16: To load up DevMenu/BigBlueBox, put DevMenu.3ds or BigBlueBox.3ds to your MicroSD for Gateway Red Card, and your SD Card should contain the CIA file. Then, on Step 16.5, do what's in bold. Then go to the Gateway Multi-ROM screen, and select DevMenu/BigBlueBox. Then start it up. I use BigBlueBox because when I launch DevMenu.3ds, it ends up staying on a certain spot before the Nintendo 3DS logo.

    Step 17: When your there, go right. It will select SDMC. Go scroll over with the up-down-left-right keys (I don't know about Circle Pad), select your CIA using A, and press A to install it. Wait for it to be finished.

    Step 18: If it says it already exists, delete the product code of the game when scrolling down the first tab before installing! Use if you want (If you used a custom product code, find it)!

    Step 19: When done, and it says "Import suceeded", press A, and press HOME. Close DevMenu/BigBlueBox. You'll see that a new title has been added! Unwrap it by pressing A. After seeing the bnr stuff and icn stuff go lively, launch it. It will be a success since you used 3dstool, and CIA conversions, much rather than confusing yourself with makerom. :P
    Margen67, Hiccup and Sliter like this.
  2. Mylink5

    Mylink5 GBAtemp Fan

    Dec 22, 2010
    Hello! Thanks for the guide! Unfortunately, at steps 11-14, I get a " Cannot read rom file" Error :( What should I do?
  3. 4ur0r

    4ur0r GBAtemp Fan

    Feb 7, 2015
    Good job, useful guide. But is there any way to unpack a .cia file and repack into .3ds or 3dz?
  4. Helper

    Helper GBAtemp Regular

    Sep 14, 2009
    United States
    Note that this tutorial (currently) depends on access to a 4.x firmware 3DS. The xorpad generator only works on a 4.x firmware system. See Shadowtrance's post below; 9.2 or below and you're good to go.

    For anybody trying to acquire a "slot0x25KeyX.bin":
    • As far as I know, keys are treated like ROMs here; don't ask for the file/data itself, don't post it, etc.; Google is your friend.
    • Also, yes, this key is that "leaked 7.0 key".
    • You may need a hex editor to copy the hexadecimal representation of the key and save it to a file (slot0x25KeyX.bin) as raw bytes.
    • The key is 16 bytes long; the MD5 hash of the key is 817fd1bffba60f79cf8cdf19caf28923; this hash is NOT the key and cannot be used to find the key; however, it can be used to confirm that your file is the "correct" slot0x25KeyX.bin file.
    Margen67 likes this.
  5. Shadowtrance

    Shadowtrance GBAtemp Addict

    May 9, 2014
    Hervey Bay, Queensland
    The first part isn't true anymore thanks to

    So the process is pretty much the same except that you'd run the launcher.dat with the gateway web exploit rather than the DS Profile exploit that you'd use on 4.x. :)
    Margen67 and Helper like this.
  6. Helper

    Helper GBAtemp Regular

    Sep 14, 2009
    United States
    WOW! Thanks for the tip. This is fantastic. It was becoming so painful to 'downgrade', generate xorpads, restore sysNAND, and repeat. (Especially when you only need a single xorpad that's just a few megabytes...) Glad I was wrong :lol:.
  7. Newest Nick Team

    Newest Nick Team GBAtemp Regular

    Nov 28, 2014
    United States
    You don't wanna know. :P
    Uhh, sorry I haven't been on in a WHILE. I was doing other stuff like GoAnimate, Videos n' stuff. I'll be here when I feel like it. Sorry for any inconvenience. :(

    I haven't been developing Newer SMB2 in a while as well too. Just in case you wanna know. :(
  8. g.a.u

    g.a.u Member

    Oct 11, 2014
    Ho Chi Minh City, Vietnam
    Is there anyway to repack into .3ds

    --sorry for my bad english--
    Arkansaw likes this.
  9. Arkansaw

    Arkansaw GBAtemp Advanced Fan

    Jul 23, 2005
    Trinidad and Tobago
    yea, how does cia get repacked into 3ds?
  10. Arithmatics

    Arithmatics I'll be holding on to you. ;}

    Jan 29, 2009
    Anyone know if it's possible to repack what's installed back into a .cia? basically going backwards from step 19 to 14.

    I use the 3DS to CIA converter. It has an option to convert .cia back to .3ds.
  11. Fr3akGamer

    Fr3akGamer Member

    Dec 10, 2013
    United States
    Question. Why do I get this when I use the 3dstool and run the commands you listed?
    Last edited by Fr3akGamer, Oct 9, 2015
  12. Fawfulthegreat

    Fawfulthegreat Advanced Member

    Sep 20, 2014
    United States
    ^I'm getting the same error. Could someone explain what we're doing wrong? I always also get errors when running the bat file, even though I'm sure everything is in the right place. I really want to attempt a character model replacement in Mario Kart 7 and these errors are discouraging me.