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

piratesephiroth

I wish I could read
OP
Member
Joined
Sep 5, 2013
Messages
3,453
Trophies
2
Age
103
XP
3,228
Country
Brazil
This solves about 90% of all compatibility problems with repacked roms, since issues usally come from exheader settings.
You don't need to waste time tweaking RSF files anymore. Get any good RSF file and you just have to set the obvious settings, like BasicInfo, CardInfo and Options. Leave the rest as is and build with any -desc template.
Inject the original exheader and you always get a flawlessly repacked rom.

It can also make any rom work from the SD and spoof firmware requirements as if the game was made for v4.0 (won't make the most recent games work though).

It's a command line tool but double clicking the exe will also work.

This method was originally discovered by ground, but it takes a bit of work to be done manually, so I made this crappy thing.
I also added a new feature: it can make any game work from the SD card, but only if your rom isn't encrypted.

It works via command line, so you can include it into your batch scripts but you can also double click the exe and it will ask you for the files.

(Remember you need to extract the exheader with ctrtool. If you dump it with 3DSExplorer it won't work)

Update 1:
Now it checks if it's a retail rom;
Doesn't use msg.exe anymore;

Update 2:
Supports NCCH files.
Changed bat example because -ccitocia option is buggy (thanks VerseHell)

Update 4:
Supports firmware spoofing, so more games can run on the CFW's 4.X NAND.
Any game that works with Gateway's firmware spoofing should work in the CFW as well.
Thanks, Riku, for the idea.

Update 5:
Only offfer fw spoofing if the selected rom requires it.

Update 6:
Fixed some little stuff and disable exheader's "SD App" flag if the "-sd" switch isn't used

Example:
here's what I used to repack Animal Crossing into a functional CIA file:
Code:
..\makerom -f ncch -target t -desc ecapp:3 -rsf gw.rsf -exefslogo -romfs extracted\xored_romfs.bin -exheader extracted\xored_exheader.bin -code extracted\exefs\code.bin -icon extracted\exefs\icon.bin -banner extracted\exefs\banner.bin -alignwr -o ANIMALTEST.CXI
..\exinjector -rom ANIMALTEST.cxi -exheader extracted\xored_exheader.bin -sd -fwspoof
..\makerom -f cia -target t -content ANIMALTEST.cxi:0:0 -o ANIMALTEST.cia
 

Attachments

  • rsfgen.py.zip
    2.7 KB · Views: 1,514
  • ExInjector.zip
    428.5 KB · Views: 3,053
Last edited by piratesephiroth,

PieFace

Well-Known Member
Newcomer
Joined
Aug 4, 2014
Messages
59
Trophies
0
XP
157
Country
United States
Can this be used also when the rom is encrypted and the .cia is rebuilt from the extracted binaries?
 

piratesephiroth

I wish I could read
OP
Member
Joined
Sep 5, 2013
Messages
3,453
Trophies
2
Age
103
XP
3,228
Country
Brazil
Can this be used also when the rom is encrypted and the .cia is rebuilt from the extracted binaries?

If the rom is encrypted we can't edit the exheader directly without resigning it. So it will only work as a CIA if the encrypted rom can already run from the SD.
 

PieFace

Well-Known Member
Newcomer
Joined
Aug 4, 2014
Messages
59
Trophies
0
XP
157
Country
United States
If the rom is encrypted we can't edit the exheader directly without resigning it. So it will only work as a CIA if the encrypted rom can already run from the SD.

Oh I see what your saying. I didn't read the first command all the way. So it builds the .3ds with the template exheader from makerom, then injects the actual exheader, then does -ccitocia.

Edit: I don't have my 3ds on me at the moment, will try when I get home. :)
 

Riku

Well-Known Member
Member
Joined
May 3, 2009
Messages
288
Trophies
0
XP
1,490
Country
United States
When using command
Code:
exinjector -rom MARIOTEST.3DS -exheader xored_exh.bin -sd
It throws this:

swOtcxW.png
 

Riku

Well-Known Member
Member
Joined
May 3, 2009
Messages
288
Trophies
0
XP
1,490
Country
United States
lol is your windows broken or what.
where's your msg.exe?

I'll edit it to handle that exception.
Also, is it possible to change kernel version without touching signature? It would be nice having ability to change kernel version so SDK5 games could work on 4.5 fw.
 

PieFace

Well-Known Member
Newcomer
Joined
Aug 4, 2014
Messages
59
Trophies
0
XP
157
Country
United States
Ok, when running it just says "ERROR Could not read exheader file!" I am 99.9% certain that the file name is correct and that the exheader is valid
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Veho @ Veho:
    Mkay.
  • Veho @ Veho:
    I just ordered another package from China just to spite you.
  • SylverReZ @ SylverReZ:
    Communism lol
  • SylverReZ @ SylverReZ:
    OUR products
  • The Real Jdbye @ The Real Jdbye:
    @LeoTCK actually good quality products are dying out because they can't compete with dropshipped chinese crap
    +2
  • BakerMan @ BakerMan:
    @LeoTCK is your partner the sascrotch or smth?
  • Xdqwerty @ Xdqwerty:
    Good morning
  • Xdqwerty @ Xdqwerty:
    Out of nowhere I got several scars on my forearm and part of my arm and it really itches.
  • AdRoz78 @ AdRoz78:
    Hey, I bought a modchip today and it says "New 2040plus" in the top left corner. Is this a legit chip or was I scammed?
  • Veho @ Veho:
    @AdRoz78 start a thread and post a photo of the chip.
    +2
  • Xdqwerty @ Xdqwerty:
    Yawn
  • S @ salazarcosplay:
    and good morning everyone
    +1
  • K3Nv2 @ K3Nv2:
    @BakerMan, his partner is Luke
  • Sicklyboy @ Sicklyboy:
    Sup nerds
    +1
  • Flame @ Flame:
    oh hi, Sickly
  • K3Nv2 @ K3Nv2:
    Oh hi flame
  • S @ salazarcosplay:
    @K3Nv2 what was your ps4 situation
  • S @ salazarcosplay:
    did you always have a ps4 you never updated
  • S @ salazarcosplay:
    or were you able to get new ps4 tracking it \
    as soon as the hack was announced
  • S @ salazarcosplay:
    or did you have to find a used one with the lower firm ware that was not updated
  • K3Nv2 @ K3Nv2:
    I got this ps4 at launch and never updated since 9.0
  • K3Nv2 @ K3Nv2:
    You got a good chance of buying a used one and asking the seller how often they used or even ask for a Pic of fw and telling them not to update
    K3Nv2 @ K3Nv2: You got a good chance of buying a used one and asking the seller how often they used or even ask...