Missing "ExtractedExeFS" in my .cia

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by Reshiban, Nov 12, 2019.

  1. Reshiban
    OP

    Reshiban Member

    Newcomer
    2
    May 13, 2018
    France
    Steps for making a code.bin if he is missing by extracting your own .cia -> to making code.elf for IDA Pro
    Use for updates files and not the game if available


    1) Open GM9 -> [A:] for SYSNAND SD -> go in path of your app -> Press A on .tmd file -> "TMD file options..." -> "Dump CXI/NDS file"
    2) Use this tool for extract your .cxi, and get "/DecryptedExHeader.bin" and "/exefs/code.bin"
    3) Move "/exefs/code.bin" to "/code.bin"
    4) Execute this python script and get -> code.elf .
    5) Enjoy! :D

    Thanks to: @Ammako and @Ryccardo for their help!
    @Zetta_D for find programs and script





    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 ;)
     

    Attached Files:

    Last edited by Reshiban, Nov 14, 2019
  2. Ryccardo

    Ryccardo and his tropane alkaloids

    Member
    14
    Feb 13, 2015
    Italy
    Imola
    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
     
    Reshiban likes this.
  3. Reshiban
    OP

    Reshiban Member

    Newcomer
    2
    May 13, 2018
    France
    I got this:
    Code:
    ERROR: the file type is mismatch
    That seem an error by 3dstool and not by cmd
     
  4. Ammako

    Ammako I like cake.

    Member
    11
    Dec 22, 2009
    Antarctica
    You can mount CIA or NCCH in GM9 to extract files you need, much simpler that way.
     
    Ryccardo likes this.
  5. Ryccardo

    Ryccardo and his tropane alkaloids

    Member
    14
    Feb 13, 2015
    Italy
    Imola
    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!)
     
  6. Reshiban
    OP

    Reshiban Member

    Newcomer
    2
    May 13, 2018
    France
    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 :)
     

    Attached Files:

    Last edited by Reshiban, Nov 12, 2019
  7. Ammako

    Ammako I like cake.

    Member
    11
    Dec 22, 2009
    Antarctica
    That's not how this works.
     
  8. Reshiban
    OP

    Reshiban Member

    Newcomer
    2
    May 13, 2018
    France
    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 :)
     

    Attached Files:

  9. Ammako

    Ammako I like cake.

    Member
    11
    Dec 22, 2009
    Antarctica
    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?
     
  10. Reshiban
    OP

    Reshiban Member

    Newcomer
    2
    May 13, 2018
    France
    She was downloaded from the eShop, and I built CIA in standard
     
  11. Ammako

    Ammako I like cake.

    Member
    11
    Dec 22, 2009
    Antarctica
    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 likes this.
  12. Reshiban
    OP

    Reshiban Member

    Newcomer
    2
    May 13, 2018
    France
    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 ;-)
     

    Attached Files:

    Ammako likes this.
  13. Reshiban
    OP

    Reshiban Member

    Newcomer
    2
    May 13, 2018
    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!
     
Quick Reply
Draft saved Draft deleted
Loading...