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

LyuboA

Unknown Entity
Member
Joined
Jun 1, 2018
Messages
530
Trophies
0
XP
919
Country
Bulgaria
I'm trying to extract from a Super Mario Odyssey NSP with the update NSP, but it deletes the files with the following log (with the keys removed). For the record, I have extracted the keys with Lockpick RCM and renamed prod.keys to keys.ini.
Code:
[WARN]: Failed to match key "bis_kek_source", (value "*")
[WARN]: Failed to match key "bis_key_00", (value "*")
[WARN]: Failed to match key "bis_key_01", (value "*")
[WARN]: Failed to match key "bis_key_02", (value "*")
[WARN]: Failed to match key "bis_key_03", (value "*")
[WARN]: Failed to match key "bis_key_source_00", (value "*")
[WARN]: Failed to match key "bis_key_source_01", (value "*")
[WARN]: Failed to match key "bis_key_source_02", (value "*")
[WARN]: Failed to match key "device_key", (value "*")
[WARN]: Failed to match key "device_key_4x", (value "*")
[WARN]: Failed to match key "eticket_rsa_kek", (value "*")
[WARN]: Failed to match key "eticket_rsa_kek_source", (value "*")
[WARN]: Failed to match key "eticket_rsa_kekek_source", (value "*")
[WARN]: Failed to match key "master_kek_00", (value "*")
[WARN]: Failed to match key "master_kek_01", (value "*")
[WARN]: Failed to match key "master_kek_02", (value "*")
[WARN]: Failed to match key "master_kek_03", (value "*")
[WARN]: Failed to match key "master_kek_04", (value "*")
[WARN]: Failed to match key "master_kek_05", (value "*")
[WARN]: Failed to match key "master_kek_source_06", (value "*")
[WARN]: Failed to match key "master_kek_source_07", (value "*")
[WARN]: Failed to match key "master_kek_source_08", (value "*")
[WARN]: Failed to match key "master_kek_source_09", (value "*")
[WARN]: Failed to match key "master_kek_source_0a", (value "*")
[WARN]: Failed to match key "per_console_key_source", (value "*")
[WARN]: Failed to match key "retail_specific_aes_key_source", (value "*")
[WARN]: Failed to match key "rsa_oaep_kek_generation_source", (value "*")
[WARN]: Failed to match key "rsa_private_kek_generation_source", (value "*")
[WARN]: Failed to match key "save_mac_kek_source", (value "*")
[WARN]: Failed to match key "save_mac_key", (value "*")
[WARN]: Failed to match key "save_mac_key_source", (value "*")
[WARN]: Failed to match key "save_mac_sd_card_kek_source", (value "*")
[WARN]: Failed to match key "save_mac_sd_card_key_source", (value "*")
[WARN]: Failed to match key "sd_card_custom_storage_key_source", (value "*")
[WARN]: Failed to match key "sd_seed", (value "*")
[WARN]: Failed to match key "ssl_rsa_kek", (value "*")
[WARN]: Failed to match key "ssl_rsa_kek_source_x", (value "*")
[WARN]: Failed to match key "ssl_rsa_kek_source_y", (value "*")
Error: PFS0 is corrupt!



Key () must be 32 hex digits!



Key () must be 32 hex digits!
directory\Extracted_Base_Game_NSP\*, Are you sure (Y/N)? y
directory\Extracted_Update_Game_NSP\*, Are you sure (Y/N)? y


 Temp files was succefuly removed
I'm clueless as to what I'm doing wrong.

i get the same even though i have prod.keys, keys.txt, keys.ini and every other variation there is for keys actually hactool gives that no matter what other programs too
 

18Phoenix

Well-Known Member
Member
Joined
Nov 21, 2005
Messages
766
Trophies
1
XP
2,298
Country
Germany
Correct filename for keys is: keys.ini

All the [WARN]: Failed to match key ... message are normal and don't matter.

Code:
if (raw_header.magic != MAGIC_PFS0) {
        printf("Error: PFS0 is corrupt!\n");
        exit(EXIT_FAILURE);
    }
Corrupt file.

Key () must be 32 hex digits!
Or wrong/outdated keys.

Can only be one of both.
The program still works very nice - no problems at all.

And never forget to update hactool that is included and used by this app.
Newest version is 1.4.0, but it came after the last release here:
https://github.com/SciresM/hactool
 
Last edited by 18Phoenix,
  • Like
Reactions: huma_dawii

Imancol

Otak Productions
Member
Joined
Jun 29, 2017
Messages
1,375
Trophies
0
XP
2,762
Country
Colombia
Correct filename for keys is: keys.ini

All the [WARN]: Failed to match key ... message are normal and don't matter.

Code:
if (raw_header.magic != MAGIC_PFS0) {
        printf("Error: PFS0 is corrupt!\n");
        exit(EXIT_FAILURE);
    }
Corrupt file.

Key () must be 32 hex digits!
Or wrong/outdated keys.

Can only be one of both.
The program still works very nice - no problems at all.

And never forget to update hactool that is included and used by this app.
Newest version is 1.4.0, but it came after the last release here:
https://github.com/SciresM/hactool
What I do is install said program and then extract the keys again, from there it is added and the program can be read and extracted.
 

Neffin

Well-Known Member
Newcomer
Joined
Nov 4, 2019
Messages
50
Trophies
0
Age
40
XP
135
Country
France
Hi everyone,
I succedded to extract layeredFS files from a game with NCA-NSP-XCI to LayeredFS, it came out with "exefs folder" and "romfs.bin" file. I'd like to try to mod the game for increasing graphics or framerate. Once I have those files, how can I make changes ? and mostly, once done, what to do to make it read by the switch, is it needed to rebuild the file or other ?
Thanks a lot
 

ArttyRios

Member
Newcomer
Joined
Apr 8, 2021
Messages
9
Trophies
0
Age
26
XP
31
Country
Brazil
Hi everyone,
I succedded to extract layeredFS files from a game with NCA-NSP-XCI to LayeredFS, it came out with "exefs folder" and "romfs.bin" file. I'd like to try to mod the game for increasing graphics or framerate. Once I have those files, how can I make changes ? and mostly, once done, what to do to make it read by the switch, is it needed to rebuild the file or other ?
Thanks a lot

I got those files too. I don't know what to do with them I wanted to get the 3d models of the game
 

ArttyRios

Member
Newcomer
Joined
Apr 8, 2021
Messages
9
Trophies
0
Age
26
XP
31
Country
Brazil
I'm not getting. I can only get empty folders, .no files, romfs.bin file or a folder called exefs with the following files: main, main.npdm, rtld, sdk, subsdks0 and subsk1.

can someone help? I just wanted to get the 3d models of the pokemons let's go game as in the @ Manurocker95 post, but I can't get the game decrypted at all
 

18Phoenix

Well-Known Member
Member
Joined
Nov 21, 2005
Messages
766
Trophies
1
XP
2,298
Country
Germany
If you get a romfs.bin the wrong selection has been made.
I think you want the unpacked files.
To unpack a nca file choose:

Extracting NCA files:
  • nca from a base nsp:
    1-2-2 : 1 NCA - 2 Extract Ecrypted NCA - 2 Romfs folder
  • nca from an update nsp (decrypted base nca needed):
    1-3-2 : 1 NCA - 3 Update (base.nca + update.nca) - 2 Romfs folder
 
Last edited by 18Phoenix,

MASTERAFFO

New Member
Newbie
Joined
Jun 14, 2021
Messages
1
Trophies
0
XP
45
Country
United States
How do I get title keys? I have a title keys file, but what do I put? Is it game specific? (P.S., trying to extract SM3DW + BF)
 

Attachments

  • Screenshot 2021-06-13 224907.png
    Screenshot 2021-06-13 224907.png
    6.6 KB · Views: 422

18Phoenix

Well-Known Member
Member
Joined
Nov 21, 2005
Messages
766
Trophies
1
XP
2,298
Country
Germany
That was my last answer here.
I should have known that, people being to lazy to find the answer given in this thread are to rude to say thanks aswell.
 
Last edited by 18Phoenix,

Assasin1990

Well-Known Member
Member
Joined
Dec 8, 2014
Messages
140
Trophies
0
Age
34
XP
739
Country
Moldova
This tool (script) is deprecated but there is something much better.
Google for DBI , it is more complex but also can be used to extract application files.
 

Attachments

  • Screenshot_10.png
    Screenshot_10.png
    319.7 KB · Views: 413
  • Screenshot_11.png
    Screenshot_11.png
    76.4 KB · Views: 389
  • Screenshot_9.png
    Screenshot_9.png
    4.7 KB · Views: 382
  • Screenshot_8.png
    Screenshot_8.png
    10.8 KB · Views: 385
  • Screenshot_7.png
    Screenshot_7.png
    35 KB · Views: 403

18Phoenix

Well-Known Member
Member
Joined
Nov 21, 2005
Messages
766
Trophies
1
XP
2,298
Country
Germany
1.) Use "newest" 1.6.4 located here: https://gbatemp.net/attachments/nca-nsp-xci_to_layeredfs-rar.174634/
2.) Use the "newest" hactool here: https://github.com/SciresM/hactool/releases
3.) Extracting NSP:
  • extract a Base NSP:
    2-4 : 2 eShop NSP - 4 Extract GAME Files
  • extract an Update NSP:
    2-5 : 2 eShop NSP - 5 Extract UPDATE Files
You'll get everything you need.
To combine both copy everthing from the update to the base files overwriting all.
Keep in mind that this steps extract only the Program NCAs.​





This tool (script) is deprecated but there is something much better.
Google for DBI , it is more complex but also can be used to extract application files.
I like DBI for installing or transfering files via MTP. But I want to work with the files on PC without need of using the Switch.
As I see in Screenshot_8 DBI gives access to everything, nice.
I wish an app for Win10 could do that, I don't want to work with the Switch.
Just mounting the NSP so that it could be opened by doubleclick to get access as shown in DBI and getting the files by drag&drop.
But for me it's ok like this, everything is possible with hactool+hacpack.
 
Last edited by 18Phoenix,
  • Like
Reactions: Assasin1990

Mikyky

New Member
Newbie
Joined
Jul 21, 2021
Messages
1
Trophies
0
Age
32
XP
24
Country
France
Hey guys,

I've updated everything as suggested in the previous posts.
I have my keys.ini file, extracted via lockpick.

Still, everytime I use it, it still have those failed to match key.
Code:
[WARN]: Failed to match key "bis_kek_source", (value "*")
[WARN]: Failed to match key "bis_key_00", (value "*")

Haven't tried internet keys.

I actually want to unpack my dump base BOTW file to mod it via BCML but the keys are always the problem
 

Imancol

Otak Productions
Member
Joined
Jun 29, 2017
Messages
1,375
Trophies
0
XP
2,762
Country
Colombia
i get this error if i update hactool

Error: Rights ID 01006A800016F06B0000000000000008 already has a corresponding titlekey! Key () must be 32 hex digits!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/@legolambs