Decrypt XCI to RomFS and ExeFS for Atmosphere/FSRedirect/Backup Loading/Ryujinx/Yuzu in 1 click

Discussion in 'Switch - Tutorials' started by PRAGMA, Jun 10, 2018.

  1. PRAGMA
    OP

    PRAGMA GBAtemp Advanced Maniac

    Member
    9
    Dec 29, 2015
    Ireland
    127.0.0.1

    IMPORTANT:
    • THIS TUTORIAL ASSUMES YOU HAVE THE DECRYPTION KEYS!
    • THIS TUTORIAL WILL NEVER PROVIDE KEYS
    • YOU ARE NOT ALLOWED TO POST ANY KEYS HERE!


    Get Switch Keys (NEEDED):
    My tutorial is here


    Tutorial — RISEofProBB


      1. Download hactool: https://github.com/SciresM/hactool/releases/
      2. Extract the following next to hactool.exe: https://gbatemp.net/attachments/decrypt-xci-v2-1-zip.131659
      3. Make sure your keys are in keys.ini filename and format and is next to hactool.exe aswell

      1. Put the .XCI you want to decrypt next to hactool.exe (Important)
      2. Drag the .XCI onto the Decrypt-XCI.bat
      3. Let it do its thing, it could take a while
      4. Once you see "DONE!" your done!

    • The new folder xciDecrypted next to hactool.exe is now the romfs and exefs of the xci decrypted.
      romfs in xciDecrypted/romfs.bin and exefs in xciDecrypted/exefs
      The structure is 100% ready to copy and paste into sd:/atmosphere/titles/{titleid}/ for Backup Loading/LayeredFS Mods.
      (but you still need to rename the folder to the titleid and edit the main.npdm)
      To use this with Ryujinx, drag the xciDecrypted/exefs folder onto Ryujinx.exe (No idea about Yuzu).

      • If you want the Batch file to close once its done, remove the last line (pause >nul) and save.


    Thanks to gdkchan for the original script, since the original script, I have HEAVILY modified it.
     

    Attached Files:

    Last edited by PRAGMA, Jun 16, 2018
  2. hausa51

    hausa51 Member

    Newcomer
    1
    Jan 18, 2016
    Last edited by hausa51, Jun 10, 2018
  3. PRAGMA
    OP

    PRAGMA GBAtemp Advanced Maniac

    Member
    9
    Dec 29, 2015
    Ireland
    127.0.0.1
  4. Mrdx

    Mrdx Advanced Member

    Newcomer
    3
    Dec 12, 2013
    Antigua and Barbuda
    Can this tool be used with this method:

    In order to launch XCIs content on Atmosphere?? :O
     
    Last edited by Mrdx, Jun 11, 2018
  5. PRAGMA
    OP

    PRAGMA GBAtemp Advanced Maniac

    Member
    9
    Dec 29, 2015
    Ireland
    127.0.0.1
    Yes but you can see, the dude tried, no romFs redirection which is the main bit of the code, exefs is bascally header and title info
     
  6. LucaFraga

    LucaFraga Advanced Member

    Newcomer
    4
    Aug 10, 2009
    Italy
  7. Mrdx

    Mrdx Advanced Member

    Newcomer
    3
    Dec 12, 2013
    Antigua and Barbuda
    So basically what we need is a newer build of atmosphere + this tool and we’re set for loading backups ?
     
    Mazamin likes this.
  8. PatrickJr

    PatrickJr GBAtemp Regular

    Member
    2
    Jan 5, 2017
    Bridgwater
    Do we have a list of what games load?
     
  9. Sonicbrawler

    Sonicbrawler GBAtemp Regular

    Member
    3
    Sep 7, 2015
    United States
    pretty dope. any way we can easily just extract the contents of the .romfs file? :3c
     
  10. Mazamin

    Mazamin GBAtemp Advanced Maniac

    Member
    6
    GBAtemp Patron
    Mazamin is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Sep 4, 2014
    Italy
    This will be useful when atmosphere will be released
    It reminds me of loadiine times
     
    Sonicbrawler likes this.
  11. CuriousTommy

    CuriousTommy GBAtemp Fan

    Member
    3
    Jul 22, 2014
    United States
    I am having trouble trying to convert this command to the Linux equivalent:
    Code:
    hactool.exe -k keys.ini --exefsdir="xciDecrypted" --romfs="xciDecrypted\romfs.romfs" "xciDecrypted\%nca_file%"
    I tried to convert the command to the following, but the program rejects the arguments (prints out a help screen)
    Code:
    ./hactool -k keys.txt --exefsdir="xciDecrypted" --romfs="xciDecrypted\romfs.romfs" xciDecrypted/*.nca
    Does anyone know what I am doing wrong here...
     
  12. Zumoly

    Zumoly GBATemp Analyst

    Member
    3
    Apr 27, 2018
    Mali
    Yorosso
    Hi
    Tried to decrypt an xci file by dragging & dropping onto the decr.bat file
    But I'm getting specified file not found in windows and also:
    key <xxxxxxxxxxx> must be 32 hex!
    What am I doing wrong?
     
  13. Ty_

    Ty_ GBAtemp Regular

    Member
    2
    May 22, 2018
    United Kingdom
    I've followed the other tutorial about getting the keys.ini file and all is well with that. But when I try this I get an error message about invalid NCA header and could not find .tik/.cert files

    Also some .nca files briefly appear in the xciDecrypted folder but vanish
     
  14. naddel81

    naddel81 GBAtemp Advanced Maniac

    Member
    4
    Dec 14, 2009
    United States
    why can't we just load the .xci files like a cartridge? why do we have to decrypt and install them?
     
  15. PRAGMA
    OP

    PRAGMA GBAtemp Advanced Maniac

    Member
    9
    Dec 29, 2015
    Ireland
    127.0.0.1
    I heavilly updated this thread. Instead of ONLY getting romfs, it now gets romfs AND exefs and structures it 100% ready for Atmospheres LayeredFS redirect/Backup Loading!

    — Posts automatically merged - Please don't double post! —

    Updated for this.

    — Posts automatically merged - Please don't double post! —

    We can now do it!

    — Posts automatically merged - Please don't double post! —

    Yes I made yet another list thread: https://gbatemp.net/threads/how-to-...redirection-list-of-working-redirects.507510/

    — Posts automatically merged - Please don't double post! —

    You can now! :O

    — Posts automatically merged - Please don't double post! —

    the *.nca isnt what we are doing here. the nca bit at the end is the full path to the BIGGEST .nca file. Hope you get it going. Recommend looking at my updated version though

    — Posts automatically merged - Please don't double post! —

    .xci must be right next to the hactool.exe and .bat file.
    And you must get your keys. Read very top of thread.

    — Posts automatically merged - Please don't double post! —

    Can you try new version I updated?
     
    TunaKetchup and CuriousTommy like this.
  16. PatrickJr

    PatrickJr GBAtemp Regular

    Member
    2
    Jan 5, 2017
    Bridgwater
    Guessing I should just update to the latest now?
     
  17. PRAGMA
    OP

    PRAGMA GBAtemp Advanced Maniac

    Member
    9
    Dec 29, 2015
    Ireland
    127.0.0.1
    Yes definitely. Makes it much easier than original bat file.
     
  18. PatrickJr

    PatrickJr GBAtemp Regular

    Member
    2
    Jan 5, 2017
    Bridgwater

    No no, I meant as in my Switch Firmware, as I'm on 4.1.0
     
  19. PRAGMA
    OP

    PRAGMA GBAtemp Advanced Maniac

    Member
    9
    Dec 29, 2015
    Ireland
    127.0.0.1
    Oh, up to you, the layeredfs files out atm of the kernal-patched.bin works on v5.0.0-v5.1.0 as nothing was changed, but if someone can patch one for v4.1, you wouldnt need to update.
     
  20. PatrickJr

    PatrickJr GBAtemp Regular

    Member
    2
    Jan 5, 2017
    Bridgwater
    Alright thanks for telling me!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice