ROM Hack Need help with rebuilding DLC CIA

mariodon

New Member
OP
Newbie
Joined
May 15, 2015
Messages
3
Trophies
0
XP
67
Country
Switzerland
Hey guys, I am trying to rebuild some DLC after editing them, but FBI refuses to install it with the error "Invalid NCCH." Here is the procedures I followed to build the CIA.
  • 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"
  • 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
I checked the CIA with ctrtool, which says that the crypto key used for the content is none. Also, the application type displayed in DevMenu is Application instead of DLC. Anyone knows what is going wrong?
 

shinyquagsire23

SALT/Sm4sh Leak Guy
Member
Joined
Nov 18, 2012
Messages
1,977
Trophies
2
Age
26
Location
Las Vegas
XP
3,765
Country
United States
For update repacking , I use this:
Code:
makerom -f cxi -target t -rsf gw_workaround.rsf -o update.cxi -exheader exheader.bin -code exefs/code.bin -romfs romfs.bin -icon exefs/icon.icn -banner exefs/banner.bnr -alignwr
wine ../../Exinjector.exe -rom update.cxi -exheader exheader.bin -sd
makerom -f cia -target t -content update.cxi:0:0 -o update.cia

I've never had any luck getting makerom to generate a .cia straight, but generating a .cxi and then injecting the proper exheaders works fine.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtu.be/22tVWwmTie8?si=2CEDZldUW5ODozYh meh