Given a decrypted TMD and APP file, is it possible to generate a 3DS or CIA file?

Discussion in '3DS - Homebrew Development and Emulators' started by HighMans, Apr 27, 2016.

  1. HighMans
    OP

    HighMans GBAtemp Regular

    Member
    128
    15
    Aug 9, 2012
    United States
    I have a GBA VC game that I have lost the CIA to on a backup of my sysnand. I want to move this app over to my current sysnand, but I don't exactly know how to. I can access the files using godmode9, but from there I am lost. Any guidance would be appreciated.
     
  2. d0k3

    d0k3 3DS Homebrew Legend

    Member
    2,560
    2,577
    Dec 3, 2004
    Gambia, The
    That app file is the CXI (look that up if you want to), which is in essence all you want. Makerom should be able to make a CIA from it, but for the actual commands you are on your own.
     
  3. HighMans
    OP

    HighMans GBAtemp Regular

    Member
    128
    15
    Aug 9, 2012
    United States
    Thank you for leading me in the right direction!

    I managed to extract it (blank romFS, and a large ExeFS code.bin file...) but when I repacked it using 3dsbuilder, I got a cia of ~128mb from a 16mb CXI file...

    Using makerom, I need an RSF file... (Currently looking that up)
     
    Last edited by HighMans, Apr 27, 2016
  4. TheDuckMan64

    TheDuckMan64 Chicken nugget.

    Member
    355
    48
    Oct 9, 2015
    The smallest size a 3ds .cia file comes in is 128mb, hence 3dsbuilder :P probably added files to increase the size to 128mb. My guess is that it won't work, but your welcome to install it and try.
     
  5. HighMans
    OP

    HighMans GBAtemp Regular

    Member
    128
    15
    Aug 9, 2012
    United States
    Oh, that would make sense hahaha
    Devmenu flagged it as an invalid CIA and wouldn't install it.
     
    TheDuckMan64 likes this.
  6. cearp

    cearp the ticket master

    Member
    7,403
    4,648
    May 26, 2008
    Tuvalu
    yes, on cdn the tmd is decrypted anyway.
    you can re encrypt the contents, after removing your unique console encryption, using aescbc if you know the right key to make it neat, then use makecdncia like normal and you could build a legit cia
     
  7. HighMans
    OP

    HighMans GBAtemp Regular

    Member
    128
    15
    Aug 9, 2012
    United States
    I can't download from the CDN because this VC game isn't from the eshop.
     
  8. cearp

    cearp the ticket master

    Member
    7,403
    4,648
    May 26, 2008
    Tuvalu
    oh ok, but you wouldn't need to use from cdn because i was answering the question like how you asked, from the sd contents :)
    i would personally just recreate or find the cia online, faster than converting to cia.
    but yes, it's possible :)
     
    HighMans likes this.
  9. Tomato Hentai

    Tomato Hentai snart

    Member
    3,671
    5,803
    Oct 30, 2014
    Canada
    actually north korea. please send help
    He's saying that you can generate a 3DS/CIA file like you would a title downloaded from the CDN, not that you have to download it from the CDN.
     
    HighMans likes this.
  10. HighMans
    OP

    HighMans GBAtemp Regular

    Member
    128
    15
    Aug 9, 2012
    United States
    I'm sorry, but what files do I need to run make_cdn_cia? The only files I have are *.tmd, *.app, and *.cmd.
     
  11. cearp

    cearp the ticket master

    Member
    7,403
    4,648
    May 26, 2008
    Tuvalu
    You will have to make a ticket, and decrypt the stuff on your SD card to remove your unique encryption. Then maybe encrypt but I think not necessary. It is possible but really, not worth it for something like this
     
  12. Ryccardo

    Ryccardo WiiUaboo

    Member
    2,894
    1,353
    Feb 13, 2015
    Italy
    Imola
    If you have a CXI, you just need to know the content index (if the file isn't renamed and still a number, you're set!)

    So if you only have 00000004:
    makerom -f cia -o TheGame.cia -content 00000004:0:0x04 -minor 1