jakcron / nstool

General purpose read/extract tool for Nintendo Switch file formats.
MIT License
449 stars 43 forks source link

nstool failed to patch update on base nca (Indirect storage not ascending ordered) #99

Closed ghost closed 3 months ago

ghost commented 1 year ago

Hey there, I m trying to patch a game using nstool But i got an error, hactool also shows the same error but somehow hac2l and hactoolnet are able to patch them is it possible to fix with nstool ?

game - Pokemon Violet, patch update v1.1.0

here's the errors -

[WARNING] NCA Header Main Signature: FAIL [WARNING] ACID Signature: FAIL (Failed to verify Access Control Info Desc) [NCA Header] Format Type: NCA3 Dist. Type: Download Content Type: Program Key Generation: 10 Sig. Generation: 0 Kaek Index: Application (0) Size: 0xb78af000 ProgID: 0x0100abf008968000 Content Index: 0 SdkAddon Ver.: 7.7.0 (v117899264) [WARNING] NCA Partition 1 not readable. (Indirect storage not ascending ordered.) [ContentArchive/Extract] Saving ./out/0/main... Saving ./out/0/main.npdm... Saving ./out/0/rtld... Saving ./out/0/sdk... Saving ./out/0/subsdk0... Saving ./out/0/subsdk1...

thanks in advance

basilicon commented 1 year ago

I am getting the same issue. I am trying to open the 3.0.2 update files for SMM2 and am running the following command:

nstool.exe --basenca ./base/Program.nca --tik ./output/key.tik -k "./prod.keys" -x ./output/Program/ ./output/Program.nca

It then gives me this error:

[WARNING] NCA Header Main Signature: FAIL
[WARNING] NCA Header ACID Signature: FAIL (Bad signature)
[NCA Header]
  Format Type:     NCA3
  Dist. Type:      Download
  Content Type:    Program
  Key Generation:  8
  Sig. Generation: 0
  Kaek Index:      Application (0)
  Size:            0xe9b1a00
  ProgID:          0x01009b90006dc000
  Content Index:   0
  SdkAddon Ver.:   7.4.0 (v117702656)
  RightsId:        01009B90006DC8000000000000000008
[WARNING] NCA Partition 1 not readable. (Indirect storage not ascending ordered.)
[ContentArchive/Extract]
Saving .\output\Program\0\main...
Saving .\output\Program\0\main.npdm...
Saving .\output\Program\0\rtld...
Saving .\output\Program\0\sdk...

The strange thing is that my friend ran the same command, and he tells me that it worked for him; it extracted NCA partition 1. I don't know what I could possibly be doing wrong.

ghost commented 1 year ago

@basilicon is this a problem based on my architecture? coz i m using aarch64 Linux

idaftlifei commented 1 year ago

I have the same error as well. smm2 update v302

jakcron commented 1 year ago

Thank you for letting me know the specific games/patch. I should be able to reproduce this on my machine when I get ahold of some copies

jakcron commented 3 months ago

Fixed in https://github.com/jakcron/nstool/releases/tag/v1.9.1