How to Unpack/Repack 3DS ROMS

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 ctrKeyGen.py 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 http://3ds.essh.co/ 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
 

4ur0r

Well-Known Member
Member
Joined
Feb 7, 2015
Messages
392
Trophies
0
XP
599
Country
Italy
Good job, useful guide. But is there any way to unpack a .cia file and repack into .3ds or 3dz?
 

Helper

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
136
Trophies
0
XP
227
Country
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.
 
  • Like
Reactions: Margen67

Shadowtrance

Well-Known Member
Member
Joined
May 9, 2014
Messages
2,493
Trophies
0
Location
Hervey Bay, Queensland
XP
1,807
Country
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.

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.

The first part isn't true anymore thanks to https://github.com/archshift/Decrypt9

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. :)
 
  • Like
Reactions: Margen67 and Helper

Helper

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
136
Trophies
0
XP
227
Country
United States
The first part isn't true anymore thanks to https://github.com/archshift/Decrypt9

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. :)
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:.
 

SpencerlyEverly

Spencer Everly
OP
Member
Joined
Nov 28, 2014
Messages
272
Trophies
0
Location
Central City, KY
Website
www.youtube.com
XP
1,045
Country
United States
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. :(
 

Arithmatics

I'll be holding on to you. ;}
Member
Joined
Jan 29, 2009
Messages
1,162
Trophies
1
Age
30
XP
1,052
Country
Malaysia
Anyone know if it's possible to repack what's installed back into a .cia? basically going backwards from step 19 to 14.

Is there anyway to repack into .3ds

--sorry for my bad english--
yea, how does cia get repacked into 3ds?

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

Fr3akGamer

Member
Newcomer
Joined
Dec 10, 2013
Messages
10
Trophies
0
Age
28
XP
98
Country
United States
Question. Why do I get this when I use the 3dstool and run the commands you listed?
PBlkhtM.png
 
Last edited by Fr3akGamer,

Fawfulthegreat

Well-Known Member
Newcomer
Joined
Sep 20, 2014
Messages
66
Trophies
0
XP
270
Country
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.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: