jakcron / nstool

General purpose read/extract tool for Nintendo Switch file formats.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem NCA

AinzOoalGown-fun opened this issue · comments

Hello
I used XCI-Explorer-v2.0.0 extracted .nca and .tik form .Nsp file.

I don't know the command to extract with nstool.exe.

after I extracted .nca with the following command but there is an error

Capture d’écran 2023-01-28 225637

Thank you for you help -_-

commented

That is a bit confounding. From looking at the errors, it is either the ticket was somehow invalid (NSTool is generating the wrong content key). Or the NCA is corrupted.

I'm not sure the best way to solve this, but you can try adding these extra command flags after -k "prod.keys": -y -v

This will enable full verification of the file, and enable verbose output. Hopefully the combination of the two will hint to why NSTool is failing for this file.

That is a bit confounding. From looking at the errors, it is either the ticket was somehow invalid (NSTool is generating the wrong content key). Or the NCA is corrupted.

I'm not sure the best way to solve this, but you can try adding these extra command flags after -k "prod.keys": -y -v

This will enable full verification of the file, and enable verbose output. Hopefully the combination of the two will hint to why NSTool is failing for this file.
dont work
error.txt

What is command to extract Nsp with nstool.exe ?
Thank you-_-

commented

nstool -x nspextracted your.nsp

sorry for the wait, I had to try several commands.

nstool -x nspextracted your.nsp

same error + new.txt
Capture d’écran 2023-01-29 033013

commented

I'll give you some specific steps now I can see what the file names are:

  1. Extract NSP
    nstool.exe -k "prod.keys" -x "nspextracted" "file.nsp"

  2. Check the ticket file (so I can see the titlekey and other data)
    nstool.exe -k "prod.keys" -v "nspextracted\0100ea6014bb8000000000000000000b.tik"

With the output of this I may be able to figure out what's happening.

I'll give you some specific steps now I can see what the file names are:

  1. Extract NSP
    nstool.exe -k "prod.keys" -x "nspextracted" "file.nsp"
  2. Check the ticket file (so I can see the titlekey and other data)
    nstool.exe -k "prod.keys" -v "nspextracted\0100ea6014bb8000000000000000000b.tik"

With the output of this I may be able to figure out what's happening.

nstool.exe -k "prod.keys" -x "nspextracted" "file.nsp" is work.

output.txt

commented

I can't see anything wrong with the ticket or how it's being decrypted. So maybe the NCA was extracted wrong using the original tool.

We can try two ways to decrypt/extract the NCA:

  1. Try to extract NCA (and supply raw titlekey from ticket)
    nstool.exe -k "prod.keys" --titlekey F354A70FA85EE2E5922AD04FEAD828C5 -v -x "narutoprogram" "nspextracted\d5bdc4b294e5fdb8b4845510c0512a2f.nca"
  2. Try to extract NCA (and supply raw decrypted titlekey from ticket)
    nstool.exe -k "prod.keys" --contentkey AE83CAC1F2A47088CC2A4636CBC0CE61 -v -x "narutoprogram" "nspextracted\d5bdc4b294e5fdb8b4845510c0512a2f.nca"
commented

Unfortunately I can't figure this one out. Your file NSP file might be corrupted.

Unfortunately I can't figure this one out. Your file NSP file might be corrupted.
no it works, I tested it .
maybe you have to extract with romfs

I tried another program and it works with titlekey F354A70FA85EE2E5922AD04FEAD828C5
https://github.com/bodyXY/Ultimate-Material-Hactool-GUI
it's your program that's the problem.
Thank you for you help

commented

Thank you for your feedback

commented

What is the name of this game by the way?

just dance

close issue -_-

commented

For future investigation if I get time~

ContentType: Download Version (eShop)
ContentVersion: BaseGame
Title: Just Dance 2022
ProgramId: 0100EA6014BB800
KeyGeneration: 11 (master_key_0a)
RightsId: 0100EA6014BB8000000000000000000B
TitleKey: F354A70FA85EE2E5922AD04FEAD828C5

ok -_-