ROM Hack [Tutorial] How to Decrypt, Extract & Rebuild a CIA

Status
Not open for further replies.

medoli900

Open the Benzenes;Gate
Member
Joined
Jan 7, 2013
Messages
1,116
Trophies
0
Location
Lavender Town
XP
1,316
Country
Antarctica
Your tutorial works only for 4.5 by the way. You need the browser hack for higher firmware. I tried decrypt9, but the only option I have is NCCH padgen and pressing up and down does nothing.
 

motezazer

Well-Known Member
Member
Joined
Feb 6, 2015
Messages
1,214
Trophies
0
Age
24
XP
1,442
Country
France
good to know, thanks.

But know i have a New 3DS XL, i need RxTool's Update xD

Decrypt9 isn't enough?
Anyway, it's easy to rebuild the CIA :
-Rebuild with 3DS builder (like you did with the ROM building tutorial, but why use RomFSBuilder while 3DS builder can rebuild the RomFS itself? And faster!)
-Extract its NCCH with rom_tool : rom_tool -x .\ rom.3ds
-Rename the extracted CXI into rom.cxi
-Build the CIA with makerom : makerom -f cia -content rom.cxi:0:0 -o rom.cia
 

Asia81

Yuri Lover ~
OP
Member
Joined
Nov 15, 2014
Messages
6,656
Trophies
3
Age
29
XP
3,489
Country
France
Decrypt9 isn't enough?
Anyway, it's easy to rebuild the CIA :
-Rebuild with 3DS builder (like you did with the ROM building tutorial, but why use RomFSBuilder while 3DS builder can rebuild the RomFS itself? And faster!)
-Extract its NCCH with rom_tool : rom_tool -x .\ rom.3ds
-Rename the extracted CXI into rom.cxi
-Build the CIA with makerom : makerom -f cia -content rom.cxi:0:0 -o rom.cia

When Decrypt9 finish his process, i can't find my Xorpads. Even in my Decrypt9 folder or in the root of my sd card
 

motezazer

Well-Known Member
Member
Joined
Feb 6, 2015
Messages
1,214
Trophies
0
Age
24
XP
1,442
Country
France
When Decrypt9 finish his process, i can't find my Xorpads. Even in my Decrypt9 folder or in the root of my sd card
The culprit is... your ncchinfo.bin!
You must generate it with the Decrypt9 python script, not the old one.
 

Asia81

Yuri Lover ~
OP
Member
Joined
Nov 15, 2014
Messages
6,656
Trophies
3
Age
29
XP
3,489
Country
France
oh... Thanks for info xD

--------------------- MERGED ---------------------------

But decrypt 9 is very slow...
 

motezazer

Well-Known Member
Member
Joined
Feb 6, 2015
Messages
1,214
Trophies
0
Age
24
XP
1,442
Country
France
oh... Thanks for info xD

--------------------- MERGED ---------------------------

But decrypt 9 is very slow...
BUT it works on 5.0-9.2 and on the New 3DS.
We can't say the same thing with the older decryptor.
 

DJPlayer

Banned!
Banned
Joined
May 21, 2015
Messages
542
Trophies
0
Age
46
XP
429
Country
Netherlands
Is there a way to rebuild a Update-Cia after I decrypted it?
ee004f602d.png
 

liomajor

Well-Known Member
Member
Joined
Jun 10, 2008
Messages
1,468
Trophies
0
XP
1,373
Country
United States
Thats pretty easy, maybe Chelsea Fantasy or me should handle this after translation is finished.
 

DJPlayer

Banned!
Banned
Joined
May 21, 2015
Messages
542
Trophies
0
Age
46
XP
429
Country
Netherlands
Thats pretty easy, maybe you should handle this Chelsea Fantasy or me after translation is finished.
check PM for this.
I want to find out how does it work because I want to test it on my device (don't want to reinstall the whole game everytime).
NTR-CFW + Assassination Classroom does not work on my CFW. Always get a crash (other games working fine).
Would be cool if you can tell me how to build a patch
 

mariodon

New Member
Newbie
Joined
May 15, 2015
Messages
3
Trophies
0
XP
67
Country
Switzerland
How would I rebuild a CIA that contains DLC for use with EMUNAND?
I followed the following steps after extracting and editing some files in the RomFS.
  • Rebuild RomFS with RomFS Builder
  • Build NCCH with makerom for each content
    • Here is a sample code I used
    • Code:
      ./makerom -o 0001 -rsf rsf.yaml -romfs 0001.romfs
    • Here is my rsf.yaml
    • BasicInfo:
      Title : “Taiko_DLC”
      CompanyCode : "00"
      ProductCode : "CTR-M-BT7J-00"
      ContentType : Application # Application / SystemUpdate / Manual / Child / Trial
      Logo : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem

      TitleInfo:
      UniqueId : 0x102f
      Category : Application

      Option:
      UseOnSD : true # true if App is to be #installed to SD
      EnableCompress : true # Compresses exefs code
      FreeProductCode : true # Removes limitations on ProductCode
      EnableCrypt : true # Enables encryption for NCCH and CIA
      MediaFootPadding : true # If true CCI files are created with padding

      AccessControlInfo:
      ExtSaveDataId: 0x102f # same as UniqueId
      SystemSaveDataId1: 0x00000000 # plaintext exheader
      SystemSaveDataId2: 0x00000000 # plaintext exheader
      OtherUserSaveDataId1: 0x00000 # plaintext exheader
      OtherUserSaveDataId2: 0x00000 # plaintext exheader
      OtherUserSaveDataId3: 0x00000 # plaintext exheader
      UseOtherVariationSaveData : false

      SystemControlInfo:
      SaveDataSize: 1M # plaintext exheader
      RemasterVersion: 0 # plaintext exheader
      StackSize: 0x00040000 # plaintext exheader
      JumpId: 0x0004008c00102f00L # plaintext exheader (<full UniqueID>L)
    • I got the following warning when doing so: "[NCCH WARNING] NCCH AES Key could not be loaded, NCCH will not be encrypted"
    • When I used ctrtool to examine its condition, it says its crypto key is none.
  • Build CIA with makerom
    • Code:
      ./makerom -o dlc.cia -f cia -i 0000:0000:00000000 -i 0001:0001:00000001 -dlc -major 0 -minor 1
    • I got two warnings here: [CIA WARNING] Common Key could not be loaded, CIA will not be encrypted and [NCCH ERROR] Failed to load ncch aes key
  • Install the CIA with FBI, and I failed with "Invalid NCCH."
What is my problem here? Does the NCCH have to be encrypted for use with EMUNAND? Why do I get the NCCH warning?
By the way, the CIA I made showed up as an application instead of DLC in Devmenu, will it interfere with the final result?
 

motezazer

Well-Known Member
Member
Joined
Feb 6, 2015
Messages
1,214
Trophies
0
Age
24
XP
1,442
Country
France
Anyway, it's easy to rebuild the CIA :
-Rebuild with 3DS builder (like you did with the ROM building tutorial, but why use RomFSBuilder while 3DS builder can rebuild the RomFS itself? And faster!)
-Extract its NCCH with rom_tool : rom_tool -x .\ rom.3ds
-Rename the extracted CXI into rom.cxi
-Build the CIA with makerom : makerom -f cia -content rom.cxi:0:0 -o rom.cia
 
  • Like
Reactions: liomajor

DJPlayer

Banned!
Banned
Joined
May 21, 2015
Messages
542
Trophies
0
Age
46
XP
429
Country
Netherlands
Anyway, it's easy to rebuild the CIA :
-Rebuild with 3DS builder (like you did with the ROM building tutorial, but why use RomFSBuilder while 3DS builder can rebuild the RomFS itself? And faster!)
-Extract its NCCH with rom_tool : rom_tool -x .\ rom.3ds
-Rename the extracted CXI into rom.cxi
-Build the CIA with makerom : makerom -f cia -content rom.cxi:0:0 -o rom.cia
I tried this, built the Game with 3DS Builder.
Used the extracted exefs-folder, extracted romfs-folder and my DecryptedExHeader.bin to build the 3ds-file.
I extracted the NCCH and renamed it to rom.cxi.
I used and built the cia with "makerom -f cia -content rom.cxi:0:0 -o rom.cia".

I got this while converting to cia:
aa259e4d23.png

i tried to install it on my 3DS and got this error
800664bc03.png
 

DJPlayer

Banned!
Banned
Joined
May 21, 2015
Messages
542
Trophies
0
Age
46
XP
429
Country
Netherlands
You still can't rebuild it as a .cia?
right, I'm still not able to rebuild it as cia.
I don't want to "just rebuild it" to cia. I want to decrypt it, rebuild the romfs with custom stuff (makeromfs or RomFS Builder are working great for this) and rebuild this custom stuff to cia.

Still not able to do this.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=pnRVIC7kS4s