ROM Hack Missing "ExtractedExeFS" in my .cia

Reshiban

Well-Known Member
OP
Member
Joined
May 13, 2018
Messages
129
Trophies
0
XP
1,949
Country
France
Steps for making a code.bin if he is missing by extracting your own .cia -> to making code.elf for IDA Pro
Use update files and not the complete game if available.


1) Open GM9 -> [A:] for SYSNAND SD -> go in path of your app
2) Press A on .tmd file -> "TMD file options..." -> "Dump CXI/NDS file"
3) Press A on .tmd file -> "TMD file options..." -> "Extract .code"
4) Use this tool to extract your .cxi, and get "./DecryptedExHeader.bin"
5) Copy "<tid>.dec.code" in the same path
6) Rename "<tid>.dec.code" in -> "code.bin"
7) Download and execute this python script in the same path .
8) Get -> codecave.elf :D

Thanks to: @Ammako and @Ryccardo for their help!
Creators for all programs and scripts used, and @Zetta_D for found these :P



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



Original:
Hello, I need help pls! :(

For explaining fast, I want to get code.elf of a 3ds game for open with IDA Pro.
So I use this tool for extract my .cia, and get "/ExHeader.bin" and "/ExtractedExeFS/code.bin"
The last step is executing this script python and I get -> code.elf .

We must do this methode on the update files for code.elf match with your game PkmnORAS 1.4.
So I launched GM9 and generated .cia file from update tmd file.
I use the tool for extract .cia, and... I found only "/ExHeader.bin" and the "/ExtractedExeFS/code.bin" is missing!
So when I get update.cia from internet, this file (and folder) are created, but with my updategm9.cia, the file (and folder) are missing! ;-;
I can get my updates from internet, but I prefere extract my owns updates.

So, do you know a solution/alternative and for what this appens please?


Thanks! :P



PS: 2 screenshots of my contents ar linked ;)
 

Attachments

  • explorer_2019-11-11_19-51-40.png
    explorer_2019-11-11_19-51-40.png
    39 KB · Views: 206
  • explorer_2019-11-11_19-51-54.png
    explorer_2019-11-11_19-51-54.png
    31.4 KB · Views: 218
Last edited by Reshiban,
  • Like
Reactions: Nick3421421

Ryccardo

Penguin accelerator
Member
Joined
Feb 13, 2015
Messages
7,687
Trophies
1
Age
28
Location
Imola
XP
6,902
Country
Italy
Well, since you already managed to get the exefs as a file... get a(n updated) copy of 3dstool and use the following command, of course in a command line so that you can see any errors:

3dstool -xvtf exefs DecryptedExeFS.bin --header exefs-header.bin --exefs-dir exefs
 

Ryccardo

Penguin accelerator
Member
Joined
Feb 13, 2015
Messages
7,687
Trophies
1
Age
28
Location
Imola
XP
6,902
Country
Italy
Yeah, it doesn't like that file...

...well, if you have it currently installed on your console, no need to go through a cia - you can use GM9's "mount ncch" feature to directly copy and paste the extracted parts (or you can use fuse-3ds to access the encrypted installed title on SD using a computer!)
 

Reshiban

Well-Known Member
OP
Member
Joined
May 13, 2018
Messages
129
Trophies
0
XP
1,949
Country
France
You can mount CIA or NCCH in GM9 to extract files you need, much simpler that way.
Yeah, it doesn't like that file...

...well, if you have it currently installed on your console, no need to go through a cia - you can use GM9's "mount ncch" feature to directly copy and paste the extracted parts (or you can use fuse-3ds to access the encrypted installed title on SD using a computer!)
No, mounting .cia with GM9 will mount the encrypted content (the "/exefs/code.bin" is "/exefs/.code" in GM9 by example)

BUT I've mounted the .cia with ninfs and that work! The "/exefs/code.bin" is accessible! Thank you! :D:)


Edit: Finaly that don't work :( still seraching :)
 

Attachments

  • explorer_2019-11-12_23-54-37.png
    explorer_2019-11-12_23-54-37.png
    26.9 KB · Views: 168
Last edited by Reshiban,
  • Like
Reactions: Nick3421421

Reshiban

Well-Known Member
OP
Member
Joined
May 13, 2018
Messages
129
Trophies
0
XP
1,949
Country
France
That's not how this works.
Ah yes sorry I don't realy know how this work, that I wanted to said it is I've already tryed and that havn't worked.

And at the final there is a problem, I have put the files correctly etc... but the code.elf isn't good xD

So I will retry your GM9 option :)
 

Attachments

  • cmd_2019-11-13_00-25-06.png
    cmd_2019-11-13_00-25-06.png
    11.5 KB · Views: 153
  • Like
Reactions: Nick3421421
D

Deleted-236924

Guest
When you're creating a CIA from your installed update, are you picking (standard) or (legit)? And is it a genuine update from eShop, or one you've downloaded online in the past?
 
  • Like
Reactions: Nick3421421
D

Deleted-236924

Guest
Okay, I think the problem here is not encryption, but compression (there is no such thing as an encrypted .code, but it can be compressed.)

In GM9, navigate to the folder for your update, but instead of pressing A on the .tmd, press A on the .app

Then in NCCH options, go all the way to the bottom, and do "Extract .code", this both extracts + decompresses .code

Otherwise you can mount the CIA, and you can do NCCH options --> Extract .code from the .app inside.
 

Reshiban

Well-Known Member
OP
Member
Joined
May 13, 2018
Messages
129
Trophies
0
XP
1,949
Country
France
Okay, I think the problem here is not encryption, but compression (there is no such thing as an encrypted .code, but it can be compressed.)

In GM9, navigate to the folder for your update, but instead of pressing A on the .tmd, press A on the .app

Then in NCCH options, go all the way to the bottom, and do "Extract .code", this both extracts + decompresses .code

Otherwise you can mount the CIA, and you can do NCCH options --> Extract .code from the .app inside.
Re,I did your operations. An name.code file has been maked for the .app and .tmd (with the same size for both), file what I renamed to code.bin for the python operation.

I've taked the ExHeader.bin and code.bin and executed the .py... and the .elf is realy workin! Thank you!!! :):)


I put screens and edit the first post ;-)
 

Attachments

  • cmd_2019-11-13_19-09-55.png
    cmd_2019-11-13_19-09-55.png
    23.1 KB · Views: 183
  • cmd_2019-11-13_19-14-52.png
    cmd_2019-11-13_19-14-52.png
    23.1 KB · Views: 154
  • ida_2019-11-13_19-28-35.png
    ida_2019-11-13_19-28-35.png
    144 KB · Views: 185
  • Like
Reactions: Deleted-236924

Reshiban

Well-Known Member
OP
Member
Joined
May 13, 2018
Messages
129
Trophies
0
XP
1,949
Country
France
Strangely, the methode has worked for 1 game I've tested, and after this post, I've tryed with other games... but now... she don't work ;-;

BUT! I've found an alternative, so I put here the old tutorial I've maked, and put the new methode in the first post (it's with .cxi ;))


-----------------------------------!!!Don't work!!!--------------------------------------


Steps for do what I've tryed (making a code.bin to making code.elf for IDA Pro)
Use for updates and not the game if there is that


1) Go in GM9 -> [A:] for SYSNAND SD -> go in path of your app -> Press A on .tmd file -> "TMD file options..." -> "Build CIA (standard)" and return for "Extract .code"
2) Use this tool for extract your .cia, and get "/ExHeader.bin"
3) Move the "name.code" file in same folder of extracted content -> rename to "code.bin"
4) Execute this python script and get -> code.elf .
5) Enjoy! :D

Thanks to: @Ammako and @Ryccardo for their help!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    AncientBoi @ AncientBoi: :rofl2: +1