ROM Hack RELEASE Extract NSP, NCA, XCI, Update all in one tool for LayeredFS

tomx86

Well-Known Member
Member
Joined
Jun 3, 2015
Messages
778
Trophies
0
Age
38
XP
2,190
Country
Poland
-i highly recommend Plague Mod you can easily switch donor title right on console.
-you also can use this Website to patch them.
I tried with "Pokemon Quest" and it worked but saving doesn't work, so "Happy Birthdays DEMO" doesn't work with version 1.5.0:
upload_2018-7-29_5-14-38.jpeg

Maybe you know a donor that will work, and no "Fortnite" doesn't work (crashes when auto saving a the start).
 

nitro322

Well-Known Member
Newcomer
Joined
Mar 5, 2014
Messages
59
Trophies
0
XP
453
Country
United States
Hello. I'm sorry if this is obvious, but can anyone tell me, or point me to a tutorial for, how to get the title key for a given game?

I've dumped Cave Story+ using gcdumptool and I'm trying to unpack the game data. I compiled hactool and then ran through PRAGMA's tutorial to extract the keys from my switch; verified I have all that working as best I can (given I'm still new to this). I'm able to unpack the XCI into nca files, but I can't proceed any further. As I understand it, the nca files are encrypted, and I need the title key to decrypt them.

Is this something I'm supposed to be able to determine on my own, given I have the original cart and XCI dump? or is this one of those things I have to "find"? If the former, can anyone please give me a hint on how to do this? Heck, even if the latter a hint would be appreciated.

Thanks!

Oh, and I should mention that I'm actually not using the NCA-NSP-XCI_TO_LayeredFS.bat file for this as I'm running Linux. However, I've been jumping through the source code and using the commands in there as an example. That's been really helpful - I was struggling with the right syntax unpacking the XCI with hactool before I found this. Posting here because I'm at least using your same methodology if not the exact script. Thanks again.
 

Assasin1990

Well-Known Member
Member
Joined
Dec 8, 2014
Messages
140
Trophies
0
Age
34
XP
739
Country
Moldova
Hello. I'm sorry if this is obvious, but can anyone tell me, or point me to a tutorial for, how to get the title key for a given game?

I've dumped Cave Story+ using gcdumptool and I'm trying to unpack the game data. I compiled hactool and then ran through PRAGMA's tutorial to extract the keys from my switch; verified I have all that working as best I can (given I'm still new to this). I'm able to unpack the XCI into nca files, but I can't proceed any further. As I understand it, the nca files are encrypted, and I need the title key to decrypt them.

Is this something I'm supposed to be able to determine on my own, given I have the original cart and XCI dump? or is this one of those things I have to "find"? If the former, can anyone please give me a hint on how to do this? Heck, even if the latter a hint would be appreciated.

Thanks!

Oh, and I should mention that I'm actually not using the NCA-NSP-XCI_TO_LayeredFS.bat file for this as I'm running Linux. However, I've been jumping through the source code and using the commands in there as an example. That's been really helpful - I was struggling with the right syntax unpacking the XCI with hactool before I found this. Posting here because I'm at least using your same methodology if not the exact script. Thanks again.
NCAs that come from XCI don't need title key except updates.
NCAs that come from NSP needs title key.
If Secure folder from XCI contains *.tik file then there should be update game NCA in there that needs title key.

Now where you can find title keys ?
When you extract NSPs you get *.tik file that contain title key, also some XCI carts can have it but it's for update nca not for base game.
Open *.tik file with any Hex Editor and
look at 0x180, there is it.
 

Attachments

  • tk.png
    tk.png
    17 KB · Views: 708
Last edited by Assasin1990,

nitro322

Well-Known Member
Newcomer
Joined
Mar 5, 2014
Messages
59
Trophies
0
XP
453
Country
United States
NCAs that come from XCI don't need title key except updates.
NCAs that come from NSP needs title key.

Thanks, that clears things up quite a bit. Appreciate you taking some time to explain.

Unfortunately, I'm still having trouble getting this extracted. Using your :ExtractDecryptedNCA_Folder code as an example

Code:
$ ./hactool /home/user/games/switch/extract/97e31c6e7b60b1effcc89f6bc608e9b6.nca -k keys.ini --romfsdir=/home/user/games/switch/extract/romfs --exefsdir=/home/user/games/switch/extract/exefs
[WARN] prod.keys does not exist.
Invalid NCA header! Are keys correct?
Done!

Guessing I must've missed something with the keys. I'll research that some more and post back here if I hit another wall.

Thanks again.
 
  • Like
Reactions: xSillusx

Assasin1990

Well-Known Member
Member
Joined
Dec 8, 2014
Messages
140
Trophies
0
Age
34
XP
739
Country
Moldova
Thanks, that clears things up quite a bit. Appreciate you taking some time to explain.

Unfortunately, I'm still having trouble getting this extracted. Using your :ExtractDecryptedNCA_Folder code as an example

Code:
$ ./hactool /home/user/games/switch/extract/97e31c6e7b60b1effcc89f6bc608e9b6.nca -k keys.ini --romfsdir=/home/user/games/switch/extract/romfs --exefsdir=/home/user/games/switch/extract/exefs
[WARN] prod.keys does not exist.
Invalid NCA header! Are keys correct?
Done!

Guessing I must've missed something with the keys. I'll research that some more and post back here if I hit another wall.

Thanks again.
what is not a command try to put in "*.nca" or "folders"
 

xSillusx

Well-Known Member
Newcomer
Joined
Jun 3, 2018
Messages
71
Trophies
0
Age
24
Location
Berlin, Germany
XP
281
Country
Germany
Thanks, that clears things up quite a bit. Appreciate you taking some time to explain.

Unfortunately, I'm still having trouble getting this extracted. Using your :ExtractDecryptedNCA_Folder code as an example

Code:
$ ./hactool /home/user/games/switch/extract/97e31c6e7b60b1effcc89f6bc608e9b6.nca -k keys.ini --romfsdir=/home/user/games/switch/extract/romfs --exefsdir=/home/user/games/switch/extract/exefs
[WARN] prod.keys does not exist.
Invalid NCA header! Are keys correct?
Done!

Guessing I must've missed something with the keys. I'll research that some more and post back here if I hit another wall.

Thanks again.

Hey, did you find a solution to the problem? I got the same. Would appreciate if someone knows whats going on.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: I'm devastated