Is it possible to extract from 3ds .cia files?

Discussion in '3DS - Flashcards & Custom Firmwares' started by Dan_Tsukasa, Nov 27, 2014.

  1. Dan_Tsukasa
    OP

    Dan_Tsukasa GBAtemp Regular

    Member
    172
    43
    Oct 14, 2014
    Tokyo Japan
    Hey Guys.

    I've got a .cia file for a 3DS game, I've no interest in putting the game on the console as I already have it in cartridge form anyway, but I would like to take a look at the files within.

    From my understanding .cia files are unencrypted .3ds files, so after the XORpad decryption and so on. Is there any way to just extract the .cia files at all?

    I'd ideally like to checkout the files using EveryFileExplorer.

    Is this at all possible?
     
  2. Vappy

    Vappy GBAtemp Advanced Maniac

    Member
    1,507
    1,154
    May 23, 2012
    makerom -ciatocci <file>.cia
    This'll convert to to .cci (.3ds) format
     
    descac and ground like this.
  3. Dan_Tsukasa
    OP

    Dan_Tsukasa GBAtemp Regular

    Member
    172
    43
    Oct 14, 2014
    Tokyo Japan
    Okei great.

    So the steps would be as follows.

    make rom -ciatocci
    Then I get a .cci file, from there I can extract that .cci file using what? 3DSExplorer perhaps?

    Sorry if it sounds like I'm asking some basic questions, I scoured the forums for an answer before posting.
     
  4. Vappy

    Vappy GBAtemp Advanced Maniac

    Member
    1,507
    1,154
    May 23, 2012
    Yes, 3DSExplorer should be able to extract from it. I read some time ago that 3DSExplorer had some issues with extracting files, though I'm not sure how accurate or up to date that information is with more recent builds of 3DSExplorer.
     
  5. Dan_Tsukasa
    OP

    Dan_Tsukasa GBAtemp Regular

    Member
    172
    43
    Oct 14, 2014
    Tokyo Japan
    Fantastic. I can open it perfectly just using 'open' in 3DS explorer.
    Things are a bit messy inside though.

    From here I've been able to get the .cxi file, but now I'm stumped as nothing opens that (well 3ds explorer does, but all the hex/string values are 0.

    This cia is already a decrypted file so I hadn't expected this.
    Perhaps it would be easier to share the encryptedRomFS.bin with someone to make a Xorpad from (unfortunately I've updated my 3DS as it was necessary to play Fantasy Life), however I know this is against the forum rules so I won't request this.

    Do you have any suggestions at all, I'm quite stumped now, I appreciate everything so far, you've been very helpful.
     
  6. Vappy

    Vappy GBAtemp Advanced Maniac

    Member
    1,507
    1,154
    May 23, 2012
    You could try extracting using ctrtool instead? If you use
    Code:
    ctrtool -p --romfs=romfs.bin --exefs=exefs.bin --exheader=exheader.bin game.cci
    ctrtool -t romfs --romfsdir=romfs romfs.bin
    That should extract the romfs contents.
     
    Arkansaw likes this.
  7. Dan_Tsukasa
    OP

    Dan_Tsukasa GBAtemp Regular

    Member
    172
    43
    Oct 14, 2014
    Tokyo Japan
    Thankyou, though I can't seem to get it to work. ctrtool -p --romfs=romfs.bin --exefs=exefs.bin --exheader=exheader.bin BravelyDefault.cci but I get an error saying unknown file.

    My understanding of CMD isn't perfect, but after doing -h to check the commands, that does appear to be the correct setup, I'm unsure what I'm missing here.
     
  8. Dan_Tsukasa
    OP

    Dan_Tsukasa GBAtemp Regular

    Member
    172
    43
    Oct 14, 2014
    Tokyo Japan
    Still a bit stumped here, starting to think I'll need to find an entirely diffrent way of doing this, any suggestions?
     
  9. Abcdfv

    Abcdfv What comes around goes around.

    Member
    1,458
    592
    Dec 24, 2013
    United States
    Change the extension to .3ds, see if that works.
     
  10. piratesephiroth

    piratesephiroth I wish I could read

    Member
    3,010
    1,621
    Sep 5, 2013
    Brazil
    You say you got a CIA version of the game, so you should have downloaded an already decrypted and repacked version of the game.

    In that case you don't have to use the '-p' switch with ctrtool when extracting the contents
     
  11. Dan_Tsukasa
    OP

    Dan_Tsukasa GBAtemp Regular

    Member
    172
    43
    Oct 14, 2014
    Tokyo Japan
    Abcdfv:

    I can open the .CCI file in 3DS Explorer with no problems at all, its just the insides are a bit messy, romFS.bin and so on so forth, what I'm after are things like directories, ie: Stage (or really any directory other than NCCH).

    piratesephiroth.

    Even in removing the -p I simply get the 'unknown file' error.

    My command is like so:

    ctrtool --romfs=romfs.bin --exefs=exefs.bin --exheader=exheader.bin (mygamenamehere).cci

    According to the help file within ctrtool, this command should be perfectly fine, but for some reason its not, I've tried the same commmand with the .cci and the .cia version.

    I'm sure its a simple case of me missing something rather obvious though, but for the life of me I can't work out what.
     
  12. piratesephiroth

    piratesephiroth I wish I could read

    Member
    3,010
    1,621
    Sep 5, 2013
    Brazil
    are your there aren't any spaces on the rom name?
    You have to eiither enclose it in quotes or remove the spaces.
     
  13. Dan_Tsukasa
    OP

    Dan_Tsukasa GBAtemp Regular

    Member
    172
    43
    Oct 14, 2014
    Tokyo Japan
    Nope no name spaces (I removed those), thats why im so stumped.
     
  14. Dan_Tsukasa
    OP

    Dan_Tsukasa GBAtemp Regular

    Member
    172
    43
    Oct 14, 2014
    Tokyo Japan
    Okei I figured out the issue.

    I was, rather stupidly, not extracting the romfs and other files along with it, so the 'can't find' error, was for those.

    The bad news, is that when I try to extract the exheader,romfs etc from the rom via 3ds explorer, I get asked to put in a key (or leave it blank for encryption) and if I leave it blank I get a C++ error, however I've no idea what the values it wants are.

    The values thing is, likely something I just don't anything about, but since its a CIA file I figured there would be no key at all.
     
  15. Newest Nick Team

    Newest Nick Team GBAtemp Regular

    Member
    237
    83
    Nov 28, 2014
    United States
    You don't wanna know. :P
    Guys,

    I KNOW there is a way. Look on this website, somebody extracted the contents out of a sample CIA:
    http://sherer.co.il/3ds/cia/Sample Cia/sample cia extract/0f7fff00/content/

    The link doesn't work all the way, so you have to copy and paste.
     
  16. urherenow

    urherenow GBAtemp Psycho!

    Member
    3,039
    901
    Mar 8, 2009
    United States
    Japan
    makerom doesn't seem to play nice with firmware .cia files made with 3dnus. Any suggestions?
     
  17. pakrett

    pakrett GBAtemp Maniac

    Member
    1,472
    559
    Apr 6, 2015
    France