ROM Hack [Release] ExInjector - Inject original exheaders into repacked roms

  • Thread starter Thread starter piratesephiroth
  • Start date Start date
  • Views Views 123,888
  • Replies Replies 343
  • Likes Likes 29
Riku Searinox

Updated: Now It doesn't use MSG.exe anymore. You won't get any error message anymore.

Now regarding changing fw version requirements, I don't think it's relevant but I'll test some stuff right now.
 
So this has nothing to do with converting to .cia format and the rsf file that you have to change to generate the file?
It's not related to the CIA format itself, but you can only run games from the SD if their exheaders say they are supposed to work like that. 3DS Cartridge games aren't supposed to run from the SD card.
That's what this tool modifies.
Also most of the RSF file regulates the exheader, so for some roms it can be very complicated.
Importing the original exheader from the retail rom automatically adds all the correct settings, overwriting any wrong values you added in the RSF.
 
  • Like
Reactions: cearp
It's not related to the CIA format itself, but you can only run games from the SD if their exheaders say they are supposed to work like that. 3DS Cartridge games aren't supposed to run from the SD card.
That's what this tool modifies.
Also most of the RSF file regulates the exheader, so for some roms it can be very complicated.
Importing the original exheader from the retail rom automatically adds all the correct settings, overwriting any wrong values you added in the RSF.

I run mine from the Gateway emunand and they run fine installing them via the devmenu from the sd card onto the homescreen.
 
I run mine from the Gateway emunand and they run fine.
Be it on the CFW or on Gateway's emunand, they only run if you repacked them enabling the 'UseOnSD' option.

I never said this tool is the only way to do it, but it GREATLY simpifies the process.
 
Be it on the CFW or on Gateway's emunand, they only run if you repacked them enabling the 'UseOnSD' option.

I never said this tool is the only way to do it, but it GREATLY simpifies the process.

Oh I don't know bud, I have not got clue how I ran the games to change them to .cia format I just did it standard way but all have worked so far OK via the emuand home screen menu but I have noticed nothing will run on the systemnand home screen menu even though they are present.
 
WAT

Also which Playcoinsetter are you using? Does it have a logo.bin inside the exefs folder?
Nicely noticed. I must've shat out that command there during frustration. Still, it does nothing at all, so it shouldn't be causing failure. Are all the other commands okay though? You may not be seeing the paths as variables, but they are working, I'm not getting any missing file errors, and at the end it does produce a .cia.
It has no logo.bin in the exefs, just an icon.bin. But really if that's not needed, I can live without it, I just want it to work.

Here's something I get when I use makerom -ccitocia however:
[CIA WARNING] Common Key could not be loaded, CIA will not be encrypted

Is this correct or should I somehow be making it encrypt with a 0-key?
 
Now regarding changing fw version requirements, I don't think it's relevant but I'll test some stuff right now.
Relevant or not, you won't be able to launch any SDK5 game on 4.5 CFW as long as there 2.35 or higher fw kernel set in original exheader.
 
Nicely noticed. I must've shat out that command there during frustration. Still, it does nothing at all, so it shouldn't be causing failure. Are all the other commands okay though? You may not be seeing the paths as variables, but they are working, I'm not getting any missing file errors, and at the end it does produce a .cia.
It has no logo.bin in the exefs, just an icon.bin. But really if that's not needed, I can live without it, I just want it to work.

Here's something I get when I use makerom -ccitocia however:
[CIA WARNING] Common Key could not be loaded, CIA will not be encrypted

Is this correct or should I somehow be making it encrypt with a 0-key?

That's just a warning about the CIA encryption. DevMenu will still accept it like that (at least for roms).

Now can you extract the logo from the rom? (ctrtool --logo logo.bin playcoinsetter.csu)
 
Relevant or not, you want be able to launch any SDK5 game on 4.5 CFW as long as there 2.35 or higher fw kernel set in original exheader.
That could be caused by the game requesting a service that doesn't exist in fw 4.5. Changing fw version in the exheader would not fix that. But I shall test here and report the results.
 
Nicely noticed. I must've shat out that command there during frustration. Still, it does nothing at all, so it shouldn't be causing failure. Are all the other commands okay though? You may not be seeing the paths as variables, but they are working, I'm not getting any missing file errors, and at the end it does produce a .cia.
It has no logo.bin in the exefs, just an icon.bin. But really if that's not needed, I can live without it, I just want it to work.

Here's something I get when I use makerom -ccitocia however:
[CIA WARNING] Common Key could not be loaded, CIA will not be encrypted

Is this correct or should I somehow be making it encrypt with a 0-key?

Mine say that mostly all the time at the end but they still work. :)

Edit: N:ninja:'d
 
And yet, the compiled PlayCoinSetter with this STILL produces a package which displays "BANNER" on the top screen and crashes the console on start. I continue to be unable to repack this thing and I've been trying for a day now...
then you are doing it correct, the playcoinsetter doesn't have its own banner. Did you include romfs? (this is waht i forgot after a few developers apps)
 
I added the -logo command, it DOES extract a logo.bin, used it in makerom. The program has an ICON, but no LOGO. Okay, so maybe it doesn't have a banner. Personally I don't even know. But it continues to crash on launch. I think at this point I'm just going to give up and see if someone ever posts a working script to convert .csu to .cia for apps, because I've gotten burned out. If I can't turn a csu into a cia even with extra tools, I must be doing it wrong.
 
It's not related to the CIA format itself, but you can only run games from the SD if their exheaders say they are supposed to work like that. 3DS Cartridge games aren't supposed to run from the SD card.
That's what this tool modifies.
Also most of the RSF file regulates the exheader, so for some roms it can be very complicated.
Importing the original exheader from the retail rom automatically adds all the correct settings, overwriting any wrong values you added in the RSF.

hmm so i wonder can we then edit 3ds eshop game headers to make them ID as a cart game to make them run on a 1:1 clone card like a sky 3ds?if you change the header of a 3ds eshop game to make it say it is a cart game, i wonder if it would run on 9.x with a clone card
 
I added the -logo command, it DOES extract a logo.bin, used it in makerom. The program has an ICON, but no LOGO. Okay, so maybe it doesn't have a banner. Personally I don't even know. But it continues to crash on launch. I think at this point I'm just going to give up and see if someone ever posts a working script to convert .csu to .cia for apps, because I've gotten burned out. If I can't turn a csu into a cia even with extra tools, I must be doing it wrong.


Try this batch file to convert PlayCoinSetter.csu to cia(supposing the executables are on the parent directory)

Code:
..\ctrtool --exheader extracted\exheader.bin --romfs extracted\romfs.bin --exefsdir extracted\exefs --logo extracted\logo.bin PlaycoinSetter.csu
..\makerom -f cci -target t -desc app:3 -rsf rsf.rsf -romfs extracted\romfs.bin -logo extracted\logo.bin -exheader test\exheader.bin -code extracted\exefs\code.bin -icon extracted\exefs\icon.bin -banner extracted\exefs\banner.bin -alignwr -o PlaycoinSetter.3DS
..\exinjector -rom PlaycoinSetter.3DS -exheader test\exheader.bin -sd
..\makerom -target t -ccitocia PlaycoinSetter.3DS -o PlaycoinSetter.cia
pause
 
I added the -logo command, it DOES extract a logo.bin, used it in makerom. The program has an ICON, but no LOGO. Okay, so maybe it doesn't have a banner. Personally I don't even know. But it continues to crash on launch. I think at this point I'm just going to give up and see if someone ever posts a working script to convert .csu to .cia for apps, because I've gotten burned out. If I can't turn a csu into a cia even with extra tools, I must be doing it wrong.

Sorry what are you trying to do? convert a .3ds rom to .cia format and also what game are you generating? to work on CFW or Gateway Emunand devmenu?
 
Try this batch file to convert PlayCoinSetter.csu to cia(supposing the executables are on the parent directory)

Code:
..\ctrtool --exheader extracted\exheader.bin --romfs extracted\romfs.bin --exefsdir extracted\exefs --logo extracted\logo.bin PlaycoinSetter.csu
..\makerom -f cci -target t -desc app:3 -rsf rsf.rsf -romfs extracted\romfs.bin -logo extracted\logo.bin -exheader test\exheader.bin -code extracted\exefs\code.bin -icon extracted\exefs\icon.bin -banner extracted\exefs\banner.bin -alignwr -o PlaycoinSetter.3DS
..\exinjector -rom PlaycoinSetter.3DS -exheader test\exheader.bin -sd
..\makerom -target t -ccitocia PlaycoinSetter.3DS -o PlaycoinSetter.cia
pause
Failing to read exheader file at the exheader command... what is test\exheader? I created the folder test but it's not putting anything in it.
 
on trying makerom -target t -ccitocia GameName.cci -o GameName.cia makerom crashes, using x86 version works o.O
 
IT WORKED THANK YOU! I can't believe it did................. thank you so much. ^O^
Also I've noticed that everytime I compile, it produces a file with a different hash. Why is that?

For anyone who wants to avoid the troubles I've had, I made an archive with the whole package.

Two ways to use:

1. Drag and drop the .csu file over csu-cia.bat
OR
2. Rightclick .csu file - open with - browse to csu-cia.bat

A notepad is opened where you can change the unique id(give every app a different ID and Name), save then close it, it will continue compiling.

It will create a .cia with the same name in the same folder as the file you are converting.
 

Attachments

Site & Scene News

Popular threads in this forum