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

PRAGMA

Well-Known Member
OP
Member
Joined
Dec 29, 2015
Messages
2,202
Trophies
1
Location
127.0.0.1
Website
pragma.pw
XP
4,598
Country
Ireland

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

Step 1 - PreparationStep 2 - DecryptionStep 3 - FinalizingExtras


    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!

  1. 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.
 

Attachments

  • Decrypt-XCI-v2.1.zip
    772 bytes · Views: 11,174
Last edited by PRAGMA,

Mrdx

Well-Known Member
Member
Joined
Dec 12, 2013
Messages
107
Trophies
0
XP
1,056
Country
Antigua and Barbuda
Can this tool be used with this method:

So, about backup loading.
(Don't take anything I say as facts, I'm not involved in any technical stuff due to lack of time and skill)

Hekate (which conseguently uses a stripped down version of Atmosphére) supports exeFS redirection (which is used to load hbmenu) in a quite simple manner:
you just create on your SD a folder called atmosphere/titles/TITLEID/exefs and put your 'main' and 'main.npdm' inside.

(Here's a list of titleIDs http://switchbrew.org/index.php?title=Title_list/Games)
You can do this with any title (including game cartridge).

Out of curiosity I attempted to load Zelda:BotW exeFS with this method and it did indeed load (or I think it did) just to crash soon after saying that "The software has been closed".
What of course we are missing (or I think we are) is romFS redirection (which was implemented in one of the latest Atmosphére commits).

If anyone wants to play with this, be my guest.

(Once again, I feel to need to reiterate that I could be, and probably am, wrong.)

In order to launch XCIs content on Atmosphere?? :O
 
Last edited by Mrdx,

CuriousTommy

Well-Known Member
Member
Joined
Jul 22, 2014
Messages
524
Trophies
0
Age
25
XP
621
Country
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...
 

Zumoly

GBATemp Analyst
Member
Joined
Apr 27, 2018
Messages
1,787
Trophies
0
Location
Yorosso
XP
2,295
Country
Mali
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?
 

Ty_

Well-Known Member
Member
Joined
May 22, 2018
Messages
397
Trophies
0
Age
42
XP
1,219
Country
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
 

PRAGMA

Well-Known Member
OP
Member
Joined
Dec 29, 2015
Messages
2,202
Trophies
1
Location
127.0.0.1
Website
pragma.pw
XP
4,598
Country
Ireland
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!

--------------------- MERGED ---------------------------

Later versions of atmoshpére expect atmosphere/titles/TITLEID/romfs.bin (https://github.com/Atmosphere-NX/At...tratosphere/fs_mitm/source/fsmitm_service.cpp)
Updated for this.

--------------------- MERGED ---------------------------

So basically what we need is a newer build of atmosphere + this tool and we’re set for loading backups ?
We can now do it!

--------------------- MERGED ---------------------------

Do we have a list of what games load?
Yes I made yet another list thread: https://gbatemp.net/threads/how-to-...redirection-list-of-working-redirects.507510/

--------------------- MERGED ---------------------------

pretty dope. any way we can easily just extract the contents of the .romfs file? :3c
You can now! :O

--------------------- MERGED ---------------------------

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...
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

--------------------- MERGED ---------------------------

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?
.xci must be right next to the hactool.exe and .bat file.
And you must get your keys. Read very top of thread.

--------------------- MERGED ---------------------------

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
Can you try new version I updated?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    KenniesNewName @ KenniesNewName: Nah it's like April 06 C April 06 E