nsz 4.6.1 rejects --keys and loads keys.txt beside argv[0] during import. Run the converter in its temporary output folder with the selected key file linked there before import, using absolute input and output paths. Remove the temporary link on both successful and failed conversions. Integrate PR #204 with XCZ and relative-path regressions, rename the test flag that shadowed unittest.TestCase.fail, and qualify the documentation for the verified nsz release. Record the packing finding and provenance. Validation: reproduced the exact parser failure using real nsz 4.6.1; a synthetic NSZ conversion verifies selected-key lookup and link cleanup; 52 NSP tests, four documentation tests and git diff --check pass. The synthetic payload is unencrypted and uses dummy keys. Real-game decryption, actual XCZ conversion and a full IPA build remain unverified. Co-authored-by: Fernando Messias <fernandomessias95@gmail.com>
1.0 KiB
1.0 KiB
Packing
Compressed inputs
NSZ decompression rejects --keys
- Symptom:
decompress NSZstops immediately withnsz: error: unrecognized arguments: --keys …. - Cause:
nsz4.6.1 has no--keysargument. It loadskeys.txtbesidesys.argv[0], or falls back to~/.switch/prod.keys, while importing its modules, before parsing arguments (4.6.1 key loader). Newer upstream code supports--keys; stagingkeys.txtalso supports 4.6.1. - Fix:
scripts/build_ipa_from_nsp.pydecompress_nszlinks the file selected by-kaskeys.txtin the conversion's temporary folder and runsnsz -Dthere, withsys.argv[0]set tonszbefore import. Input and output paths are absolute. The temporary folder and link are removed on success or failure; the user's default keys are untouched. - Found on: Super Mario Odyssey, converting its v0 NSZ. Applies to NSZ and XCZ inputs for every game.