ROM Hack [Release] 3DS FBI CIA Manager NAND Inject Generator (JPN/USA/EUR/CHN/KOR/TWN)

LoveKC

Active Member
Newcomer
Joined
Jun 22, 2012
Messages
44
Trophies
0
XP
80
Country
United States
Updating to 9.9 on emunand let me inject fbi. My sysnand is 6.2 and it doesn't stick. Is there any way to fix this? I downgraded from 8.1 to 4.2 with GW Ultra and updated to 6.2 (thinking maybe that would be good enough since 9.9 worked) using a 3ds game cart.

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

I should note that I used this tool to inject it into my sysnand, and I tested it by writing it to my emunand and making sure it boots first, but when I try to use GW Ultra to write it to sysNAND I get an error from GW Ultra.


Edit: I wrote the 4.2 with fbi injected as emunand (and it worked fine), then read it with the emunand tool. It came back a bit larger, now I'm restoring it to my sysnand through GW Ultra. Lets see how this goes.

Edit 2: Success.
 
Last edited by LoveKC,

d0k3

3DS Homebrew Legend
Member
Joined
Dec 3, 2004
Messages
2,785
Trophies
1
XP
3,843
Country
Germany
After seeing how people having problems with FBI injection, I decided to take a look into process to see what can possibly go wrong. Basically, there's two main issues with previous injection methods: the first problem I see is that H&S is an optional app and only gets updated through internet and not card game updates (so even if you running FW9.x there's still possibility your 3DS have old H&S app version). As of now there's 14 different revisions of H&S app and to make things done right you should only use properly encrypted FBI app injected into exactly the same version your 3DS currently using. Second issue that seems to confuse people is TMD file name, it's never constant.

Now, my program designed to resolve both issues. Just drag&drop your original *.tmd file on exe and it generate files specifically for your system.
All regions are supported (JPN/USA/EUR/CHN/KOR/TWN) within 1.0-9.8 firmware range.

Basic instructions on how to inject FBI CIA Manager into Health & Safety SysApp:
1) Make NAND FAT16 XORpad file using rxTools (Decryption Options --> Generate fat16 Xorpad) or Decrypt9
2) Put NAND or emuNAND dump named 'NAND.BIN' and FAT 16 XORpad named 'nand.fat16.xorpad' into folder's root, right next to *.bat files.
3) Launch extract_nand.bat and wait for it to create 'nand_fat16dec.img' file.
4) Download WinImage 9.0, install&launch it, open 'nand_fat16dec.img' and navigate into H&S folder. The path is differs depending on your region:
JPN: title\000400010\00020300\content\
USA: title\000400010\00021300\content\
EUR: title\000400010\00022300\content\
CHN: title\000400010\00026300\content\
KOR: title:000400010\00027300\content\
TWN: title:000400010\00028300\content\

5) Extract *.tmd file using right click command, drag extracted file on '3ds_fbi_injectgen.exe' and you'll get FBI Inject files generated specifically for your system:
GKIbJcc.png
6) Inject newly created files using WinImage's Image --> Inject command and overwrite exciting files (no need to delete anything, just overwrite exciting files):
5rNyyxv.png
7) Launch 'rebuild_nand.bat' and wait for it to create 'NAND_rebuild.BIN' file.

This is your NAND image with FBI injected. Use your favorite tool to insert emuNAND back into SD card or you can write it into sysNAND (It's a nice thing to have in sysNAND, actually. You can't remove or corrupt it by mistake or after system format, it even launches without SD card inserted and hides when SigPatch disabled. Don't do it unless you're experienced user and know what you're doing, though).

Download links:
http://rghost.net/6pMsvnhFz
https://mega.co.nz/#!01YSiAqb!ApMgqXLkecvNesouuMEGTUWy5VvZsOn_wzxthTG1XiE

I have a (regular, non XL) N3DS v9.0.0.20E, and I don't have the folder called '\\title\000400010\00022300' in my NAND. The other regions folders aren't there as well, of course. Is that normal? :/ Health & Safety is still installed in my SysNAND, I can run it from the home menu.

By the way, any chance we can get the source code? :)
 
Last edited by d0k3,

d0k3

3DS Homebrew Legend
Member
Joined
Dec 3, 2004
Messages
2,785
Trophies
1
XP
3,843
Country
Germany
Alright, I understand. In a N3DS, the Health & Safety app has a different id (20022300 in my case). Also, this tool won't accept my TMD ("Input TMD is not a valid H&S applciation TMD file"). @Riku, any chance you'll add N3DS support? Or, are there any instructions on how to build compatible .tmd / .app ourselves?

EDIT:
New3DS is not (and won't be) supported. Old3DS only.
Okay, I understand. Still, any hint on where to start if we want to generate injection files for N3DS?
 
Last edited by d0k3,

MelonGx

Well-Known Member
Member
Joined
Jan 8, 2009
Messages
1,647
Trophies
0
XP
877
Country
China
@Riku
bbsniua (a GBAtemp user who can't type English so I report his research instead) found that:
- If a native 4.5.0-10J 3DS has no system update stored inside the NAND, the rxTools enhanced FBI injection reports the TMD version v1024.
- If a native 4.5.0-10J 3DS has downloaded the system update and pops up the upgrading reminder, the rxTools enhanced FBI injection reports the TMD version v2050.
That means, FBI injection's TMD detection can be interfered by the downloaded system update temporary files.
Is it a bug already known?
Will it be fixed in future?
 
Last edited by MelonGx,

OctopusRift

GBATemp's Local Octopus, Open 9am-2am. "Not Yet"
Member
Joined
Nov 19, 2014
Messages
1,460
Trophies
0
XP
927
Country
Saint Kitts and Nevis
@Riku
bbsniua (a GBAtemp user who can't type English so I report his research instead) found that:
- If a native 4.5.0-10J 3DS has no system update stored inside the NAND, the rxTools enhanced FBI injection reports the TMD version v1024.
- If a native 4.5.0-10J 3DS has downloaded the system update and pops up the upgrading reminder, the rxTools enhanced FBI injection reports the TMD version v2050.
That means, FBI injection's TMD detection can be interfered by the downloaded system update temporary files.
Is it a bug already known?
Will it be fixed in future?
That is actually really interesting.
 

MelonGx

Well-Known Member
Member
Joined
Jan 8, 2009
Messages
1,647
Trophies
0
XP
877
Country
China
That is actually really interesting.
Just confirmed it by myself.

1) Make an emuNAND 4.5.0-10J.
2) Go to the rxTools's FBI injection & check emuNAND H&S TMD. It responses v1024.
3) Automatic download the update till the nag pops up.
4) When the automatic download is over, go to the rxTools's FBI injection & check emuNAND H&S TMD again. It responses v2050. Try to install v1024 file and it reports an error.
 
Last edited by MelonGx,
  • Like
Reactions: OctopusRift

OctopusRift

GBATemp's Local Octopus, Open 9am-2am. "Not Yet"
Member
Joined
Nov 19, 2014
Messages
1,460
Trophies
0
XP
927
Country
Saint Kitts and Nevis
Just confirmed it by myself.

1) Make an emuNAND 4.5.0-10J.
2) Go to the rxTools's FBI injection & check emuNAND H&S TMD. It responses v1024.
3) Automatic download the update till the nag pops up.
4) When the automatic download is over, go to the rxTools's FBI injection & check emuNAND H&S TMD again. It responses v2050. Try to install v1024 file and it reports an error.
AWESOME
 

MelonGx

Well-Known Member
Member
Joined
Jan 8, 2009
Messages
1,647
Trophies
0
XP
877
Country
China
Now it goes like the following:

4.5.0-10J --- (no update nag downloaded) --- H&S TMD is v1024
|
(update nag downloaded)
|
H&S TMD becomes v2050 --- (install v1024 FBI) --- Fail
|
(install v2050 FBI)
|
Succeed but H&S isn't changed
|
(update to 10.2.0-28J)
|
H&S is automatically changed into FBI
 

MelonGx

Well-Known Member
Member
Joined
Jan 8, 2009
Messages
1,647
Trophies
0
XP
877
Country
China
http://gbatemp.net/threads/project-injecting-any-app-into-health-and-safety.401697/

Since @d0k3 expands this method to injecting any APP into H&S, we should also notice about the following issue which happens on:
- Gateway DG 4.X
- Update Nag downloaded 4.X
when you're going to make any automatic installation of Non-FBI H&S injection.

4.5.0-10J --- (no update nag downloaded) --- H&S TMD is v1024
|
(update nag downloaded)
|
H&S TMD becomes v2050 --- (install v1024 FBI) --- Fail
|
(install v2050 FBI)
|
Succeed but H&S isn't changed
|
(update to 10.2.0-28J)
|
H&S is automatically changed into FBI

That's to say, if anyone wants to make an automatic installation of Non-FBI H&S injection, he/she should avoid the TMD misjudgment & file recognization on GWDG 4.X / Update Nag DLed 4.X which exists on current FBI injection.

---------------------------------------------

BTW, bbsniua has found out the reason why H&S isn't changed after installed v2050 FBI into GWDG 4.X / Update Nag DLed 4.X.

- When v2050 FBI installed into GWDG 4.X / Update Nag DLed 4.X NAND, it became 00000002.app & 00000002.tmd.
- It doesn't replace the existed H&S - 00000001.app & 00000001.tmd.
- 4.X only recognize 00000001.app & 00000001.tmd. That's why H&S isn't changed.
 
Last edited by MelonGx,

fischman

New Member
Newbie
Joined
Oct 6, 2006
Messages
4
Trophies
0
XP
226
Country
Bahamas, The
Have now found out with the help why me "Input XOR pad file is not valid" is always displayed.

Namely, it is necessary to extract the RXTools the EMUNAND.
And this then rename in NAND.BIN.

By NAND.BIN of Gatway it does not.
 

Sam_SpadeR

Well-Known Member
Member
Joined
Jun 19, 2015
Messages
215
Trophies
0
Age
33
XP
931
Country
Colombia
Guys, I have a question here: I have been done everything and now I have the Nand rebuild bin file. How can I write into my sysnand?
 
P

PaiiNSteven

Guest
The .rar wont let me extract to my desktop? It says that the .exe is broken.
 
Last edited by ,

amaru007

Member
Newcomer
Joined
Aug 12, 2007
Messages
9
Trophies
0
XP
186
Country
Guys, I have a question here: I have been done everything and now I have the Nand rebuild bin file. How can I write into my sysnand?

Same. Injected it into my emuNAND and it worked great.
Tried to write it via Gateway, but keep getting >> NAND.BIN ERROR message.
 
General chit-chat
Help Users
  • phalk @ phalk:
    Assembler is something I always wanted to learn
    Gift
  • phalk @ phalk:
    but.... nah
    Gift
  • Veho @ Veho:
    No point really.
    Gift
  • Veho @ Veho:
    Even the simplest device these days runs some sort of high level language.
    Gift
  • The Real Jdbye @ The Real Jdbye:
    @Veho all the IT stuff i've learned in school has been extremely basic... i knew most of it already
    Gift
  • The Real Jdbye @ The Real Jdbye:
    it's better to learn on your own, it goes much faster than the snail pace they teach you at in school
    Gift
  • Coto @ Coto:
    assembly is actually great, gets you to run everything about 80% faster than C massaged code
    Gift
  • Coto @ Coto:
    assembler syntax is dead easy, but "how to put pieces together" logic requires to have in mind the original idea, and the CPU layout, and that's like double the work of C stuff. It's best to write C first, add some unit tests, then go assembly, then run the unit tests
    Gift
  • The Real Jdbye @ The Real Jdbye:
    it can run faster than compiled code, but modern compilers are really good at optimization and you need to be even better at assembly to do a better job
    Gift
  • Coto @ Coto:
    with that all your assembler base will actually work
    Gift
  • Coto @ Coto:
    even on embedded systems, without a damned debugger
    Gift
  • The Real Jdbye @ The Real Jdbye:
    syntax is easy but the code is hard to read, you can't look at a piece of code and expect to understand it without looking at all the code around it to see how it all works together so it takes much longer to read the code, it takes longer to write it too because what might be 1 line of code in C might be 20 lines of assembly
    Gift
  • The Real Jdbye @ The Real Jdbye:
    the language is very simple to understand (because it's barely a language at all) understanding how all the instructions work together to form a whole is another matter, in general it's such a pain to work with that i would never recommend it unless you have a need for it. don't listen to this guy and learn assembly just because you want to make your code run faster, you are wasting your time, but if you run into a situation where your code isn't fast enough even after you enabled -Ofast and you NEED it to be faster, then you can consider assembly
    Gift
  • The Real Jdbye @ The Real Jdbye:
    @Coto have you tried -Ofast btw? ;)
    Gift
  • Gift
  • Psionic Roshambo @ Psionic Roshambo:
    I have o fast before but I suspect we are talking different Os lol
    Gift
  • Gift
  • Coto @ Coto:
    @The Real Jdbye quite idiotic and frankly, bu
    llshit points as usual you make. Not only because you have no idea what you're talking about, but also because there is proof (both i've seen and maintained) in regards to C and hand-written assembler code, and the speed gain is simply over half the framerate.
    Gift
  • Coto @ Coto:
    gbaemu4ds's C ARM and THUMB CPU emulator and GBARunner2's ARM and THUMB handcoded assembly. Just run Yoshi's Island GBA and compare it by yourself.
    Gift
  • Coto @ Coto:
    or SnemulDS's C CPU Core vs SnemulDS SnezziDS ARM core. The first running at about 45% (half the speed) vs ~105% (full speed)
    Gift
  • Coto @ Coto:
    yeah, keep believing -Ofast will make everything faster.
    Gift
  • mthrnite @ mthrnite:
    Must ambulate quickly! ~Sonic (a hedgehog)
    Gift
  • Gift
  • Psionic Roshambo @ Psionic Roshambo:
    Gotta Go Fast diarrhea makes a horrible sound, blue skin and super sick... Probably food poisoning from bad chili dogs.
    Gift
  • KennieDaMeanie @ KennieDaMeanie:
    Huh Betty white was born on mlk day
    Gift
    KennieDaMeanie @ KennieDaMeanie: Huh Betty white was born on mlk day