Hacking Manually updating romfs.bin for backups

Mat37

Well-Known Member
Member
Joined
Dec 3, 2016
Messages
790
Trophies
0
Age
22
Location
Does it matter ?
XP
1,379
Country
France
This could maybe be done to an already existent romfs.bin with --baseromfs . Which means that we could swap out the update partitions of already updated games.
Tried with FE Warriors but it says failed to read file

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

Someone said it works with octopath prologue demo
It indeed works !! The game boots ! Thank you so much for saying me this, i wanted to play this game for a long time now !
 
Last edited by Mat37,

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
Why do you want to update xenoblade ? It doesn't run with LayeredFS yet, does it ?

yea so as mentioned it does work... after the latest Atmosphere commit (one with Zelda fix) Xenoblade also started working

I can confirm both the BBB and HR releases work with Donor: Octopath Traveler Prologue demo

I was trying to see if i can push Japanese Voice DLC to the BBB (EN) release as the british english bugs me... and the HR (JP) release does not have option to change text/subs to english

Also @huma_dawii if you still plan on testing DLC on xenoblade... i was testing using other DLCs (rare blade etcs) because the Voice DLC i downloaded was corrupted so finding an alternate link (just FYI)
 

huma_dawii

Well-Known Member
Member
Joined
Apr 3, 2014
Messages
3,880
Trophies
2
Age
33
Location
Planet Earth
XP
4,268
Country
United States
yea so as mentioned it does work... after the latest Atmosphere commit (one with Zelda fix) Xenoblade also started working

I can confirm both the BBB and HR releases work with Donor: Octopath Traveler Prologue demo

I was trying to see if i can push Japanese Voice DLC to the BBB (EN) release as the british english bugs me... and the HR (JP) release does not have option to change text/subs to english

Also @huma_dawii if you still plan on testing DLC on xenoblade... i was testing using other DLCs (rare blade etcs) because the Voice DLC i downloaded was corrupted so finding an alternate link (just FYI)

I can't find the DLC lol
 

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
:P too many folders I can't even start understanding what I need

i'm trying once again.. im' able to decrypt/extract original xenoblade.nca file
but when i try to do the same with dlc.nca file, it says

"Error: section 0 is corrupted!

Note: cannot save BKTR section without base romfs."

so i set the baseromfs=romfs.bin

then i get
"Error: section 0 is corrupted!

Error: section 1 is corrupted!"
 

huma_dawii

Well-Known Member
Member
Joined
Apr 3, 2014
Messages
3,880
Trophies
2
Age
33
Location
Planet Earth
XP
4,268
Country
United States
i'm trying once again.. im' able to decrypt/extract original xenoblade.nca file
but when i try to do the same with dlc.nca file, it says

"Error: section 0 is corrupted!

Note: cannot save BKTR section without base romfs."

so i set the baseromfs=romfs.bin

then i get
"Error: section 0 is corrupted!

Error: section 1 is corrupted!"
The key is probably wrong
 

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
The key is probably wrong

yea thats where i'm having difficulty to confirm which key to use

is there a way to find out what the RIGHTS ID is for my dlc.nca?

when i hactool, i see the following:
Rights ID: 0100E950040388000000000000000003
XCI Explorer shows the same 100E95004038000 for xenoblade.xci... so i can confirm thats for the game iteslf and not the dlc
 

Zumoly

GBATemp Analyst
Member
Joined
Apr 27, 2018
Messages
1,817
Trophies
0
Location
Yorosso
XP
3,094
Country
Mali
yea thats where i'm having difficulty to confirm which key to use

is there a way to find out what the RIGHTS ID is for my dlc.nca?

when i hactool, i see the following:
Rights ID: 0100E950040388000000000000000003
XCI Explorer shows the same 100E95004038000 for xenoblade.xci... so i can confirm thats for the game iteslf and not the dlc

Currently trying to get Splatoon 2 dlc working. Xenoblade 2 is pretty hefty so a no go for now.
 

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
Currently trying to get Splatoon 2 dlc working. Xenoblade 2 is pretty hefty so a no go for now.

ok i went back to the source to donwload and realized all dlcs come with RIGHT ID... even the titlekeys were provided >.>

Now, using the Voice pack DLC (Rights ID 0100e950040390630000000000000003) i grabbed the titlekey and renamed to update.nca and tried the following:

hactool.exe -k keys.txt --basenca="xenoblade.nca" --section1="done\romfs.bin" --exefsdir="done\exefs" "update.nca" --titlekey=79da****************17acc

Result
Error: section 0 is corrupted!

Where do i go from here? :S
 

Zumoly

GBATemp Analyst
Member
Joined
Apr 27, 2018
Messages
1,817
Trophies
0
Location
Yorosso
XP
3,094
Country
Mali
ok i went back to the source to donwload and realized all dlcs come with RIGHT ID... even the titlekeys were provided >.>

Now, using the Voice pack DLC (Rights ID 0100e950040390630000000000000003) i grabbed the titlekey and renamed to update.nca and tried the following:

hactool.exe -k keys.txt --basenca="xenoblade.nca" --section1="done\romfs.bin" --exefsdir="done\exefs" "update.nca" --titlekey=79da****************17acc

Result
Error: section 0 is corrupted!

Where do i go from here? :S

Try removing those ("" and the done\) bit
 

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
Try removing those ("" and the done\) bit

Same error... Error: section 0 is corrupted!

Input:
hactool.exe -k keys.txt --basenca=xenoblade.nca --section1=romfs.bin --exefsdir=exefs update.nca --titlekey=79da****************17acc

if i understand correctly, the above creates a new romfs.bin combining files from update.nca right?

so if i want to just extract the update.nca, whats the command for that?
 

huma_dawii

Well-Known Member
Member
Joined
Apr 3, 2014
Messages
3,880
Trophies
2
Age
33
Location
Planet Earth
XP
4,268
Country
United States
Same error... Error: section 0 is corrupted!

Input:
hactool.exe -k keys.txt --basenca=xenoblade.nca --section1=romfs.bin --exefsdir=exefs update.nca --titlekey=79da****************17acc

if i understand correctly, the above creates a new romfs.bin combining files from update.nca right?

so if i want to just extract the update.nca, whats the command for that?


hactool.exe -k keys.ini --titlekey=key --basenca="stock.nca" --section1="romfs.bin" --exefsdir="exefs" "update.nca"


that's the one I got working
 
  • Like
Reactions: 0000ff

Zumoly

GBATemp Analyst
Member
Joined
Apr 27, 2018
Messages
1,817
Trophies
0
Location
Yorosso
XP
3,094
Country
Mali
Same error... Error: section 0 is corrupted!

Input:
hactool.exe -k keys.txt --basenca=xenoblade.nca --section1=romfs.bin --exefsdir=exefs update.nca --titlekey=79da****************17acc

if i understand correctly, the above creates a new romfs.bin combining files from update.nca right?

so if i want to just extract the update.nca, whats the command for that?

The update nca has to be extracted along with the base game. I'm not sure what is wrong with your command...try this way: hactool.exe -k keys.txt --titlekey=79da****************17acc --basenca=xenoblade.nca --section1=romfs.bin --exefsdir=exefs update.nca
 

huma_dawii

Well-Known Member
Member
Joined
Apr 3, 2014
Messages
3,880
Trophies
2
Age
33
Location
Planet Earth
XP
4,268
Country
United States
The update nca has to be extracted along with the base game. I'm not sure what is wrong with your command...try this way: hactool.exe -k keys.txt --titlekey=79da****************17acc --basenca=xenoblade.nca --section1=romfs.bin --exefsdir=exefs update.nca
you are forgetting the quotes ""
hactool.exe -k keys.ini --titlekey=key --basenca="stock.nca" --section1="romfs.bin" --exefsdir="exefs" "update.nca"
 

HoTsHoTz79

GIC-Developer
Member
Joined
May 9, 2018
Messages
322
Trophies
0
Age
39
XP
964
Country
Canada
you are forgetting the quotes ""
hactool.exe -k keys.ini --titlekey=key --basenca="stock.nca" --section1="romfs.bin" --exefsdir="exefs" "update.nca"

no errors this time and just said "DONE!"

only difference this time "keys.ini" and not "keys.txt"

the keys.ini i wasn't using since it has all the keys with comments, so it gives warning errors;
[WARN]: Failed to match key ";", (value "=======================")​

therefore i created a new keys.txt until i had no more errors ended with following;
master_key_00 = XXXX
master_key_01 = XXXX
master_key_02 = XXXX
master_key_03 = XXXX
master_key_04 = XXXX

header_key = XXXX
aes_kek_generation_source = XXXX
aes_key_generation_source = XXXX
key_area_key_application_source = XXXX​

2 Questions;

1. is my keys.txt incorrect with only those 9 keys listed?
2. now that i used keys.ini, and it didn't give error, was i supposed to see new files? because no new files were created and both the .nca files are not updated (i.e Date Modified: not updated to current time)

----
EDIT this is how my file structure looks like;
hactool.exe
keys.ini
keys.txt
4x .dll (for hactool)
update.nca 870 MB
xenoblade.nca 13.0 GB

----

Also my output;
hactool.exe -k keys.ini --basenca="xenoblade.nca" --section1="done\romfs.bin" --exefsdir="done\exefs" "update.nca" --titlekey=79######################ACC
multiple lines for [WARN]: Failed to match key ";", (value "=======================")
NCA:
Magic: NCA3
Fixed-Key Signature: ######################
######################
######################
######################
######################​
NPDM Signature: 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
Content Size: 0x000036624000
Title ID: 0100e95004039063
SDK Version: 3.5.0.0
Distribution type: Download
Content Type: Unknown
Master Key Revision: 2 (3.0.1-3.0.2)
Encryption Type: Titlekey crypto
Rights ID: 0100E950040390630000000000000003
Titlekey (Encrypted) 79######################ACC
Titlekey (Decrypted) D5######################1A
Sections:
Section 0:
Offset: 0x000000004000
Size: 0x000036620000
Partition Type: RomFS
Section CTR: 000000000000000000000000036620BB
Superblock Hash: 5AB46EFC9987BF2EC045317171852E745AF0E27174D9233CC4CE44CDBE855CE5
Magic: IVFC
ID: 00020000
Level 0:
Data Offset: 0x000000000000
Data Size: 0x000000004000
Hash Block Size: 0x00004000
Level 1:
Data Offset: 0x000000004000
Data Size: 0x000000004000
Hash Offset: 0x000000000000
Hash Block Size: 0x00004000
Level 2:
Data Offset: 0x000000008000
Data Size: 0x000000004000
Hash Offset: 0x000000004000
Hash Block Size: 0x00004000
Level 3:
Data Offset: 0x00000000c000
Data Size: 0x000000004000
Hash Offset: 0x000000008000
Hash Block Size: 0x00004000
Level 4:
Data Offset: 0x000000010000
Data Size: 0x0000001b4000
Hash Offset: 0x00000000c000
Hash Block Size: 0x00004000
Level 5:
Data Offset: 0x0000001c4000
Data Size: 0x000036458bb8
Hash Offset: 0x000000010000
Hash Block Size: 0x00004000


Done!​
 
Last edited by HoTsHoTz79,

huma_dawii

Well-Known Member
Member
Joined
Apr 3, 2014
Messages
3,880
Trophies
2
Age
33
Location
Planet Earth
XP
4,268
Country
United States
no errors this time and just said "DONE!"

only difference this time "keys.ini" and not "keys.txt"

the keys.ini i wasn't using since it has all the keys with comments, so it gives warning errors;
[WARN]: Failed to match key ";", (value "=======================")​

therefore i created a new keys.txt until i had no more errors ended with following;
master_key_00 = XXXX
master_key_01 = XXXX
master_key_02 = XXXX
master_key_03 = XXXX
master_key_04 = XXXX

header_key = XXXX
aes_kek_generation_source = XXXX
aes_key_generation_source = XXXX
key_area_key_application_source = XXXX​

2 Questions;

1. is my keys.txt incorrect with only those 9 keys listed?
2. now that i used keys.ini, and it didn't give error, was i supposed to see new files? because no new files were created and both the .nca files are not updated (i.e Date Modified: not updated to current time)

----
EDIT this is how my file structure looks like;
hactool.exe
keys.ini
keys.txt
4x .dll (for hactool)
update.nca 870 MB
xenoblade.nca 13.0 GB

----

Also my output;
hactool.exe -k keys.ini --basenca="xenoblade.nca" --section1="done\romfs.bin" --exefsdir="done\exefs" "update.nca" --titlekey=79######################ACC
multiple lines for [WARN]: Failed to match key ";", (value "=======================")
NCA:
Magic: NCA3
Fixed-Key Signature: ######################
######################
######################
######################
######################​
NPDM Signature: 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
Content Size: 0x000036624000
Title ID: 0100e95004039063
SDK Version: 3.5.0.0
Distribution type: Download
Content Type: Unknown
Master Key Revision: 2 (3.0.1-3.0.2)
Encryption Type: Titlekey crypto
Rights ID: 0100E950040390630000000000000003
Titlekey (Encrypted) 79######################ACC
Titlekey (Decrypted) D5######################1A
Sections:
Section 0:
Offset: 0x000000004000
Size: 0x000036620000
Partition Type: RomFS
Section CTR: 000000000000000000000000036620BB
Superblock Hash: 5AB46EFC9987BF2EC045317171852E745AF0E27174D9233CC4CE44CDBE855CE5
Magic: IVFC
ID: 00020000
Level 0:
Data Offset: 0x000000000000
Data Size: 0x000000004000
Hash Block Size: 0x00004000
Level 1:
Data Offset: 0x000000004000
Data Size: 0x000000004000
Hash Offset: 0x000000000000
Hash Block Size: 0x00004000
Level 2:
Data Offset: 0x000000008000
Data Size: 0x000000004000
Hash Offset: 0x000000004000
Hash Block Size: 0x00004000
Level 3:
Data Offset: 0x00000000c000
Data Size: 0x000000004000
Hash Offset: 0x000000008000
Hash Block Size: 0x00004000
Level 4:
Data Offset: 0x000000010000
Data Size: 0x0000001b4000
Hash Offset: 0x00000000c000
Hash Block Size: 0x00004000
Level 5:
Data Offset: 0x0000001c4000
Data Size: 0x000036458bb8
Hash Offset: 0x000000010000
Hash Block Size: 0x00004000


Done!​
it means it works?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: good night