XorTroll / Goldleaf

🍂 Multipurpose homebrew tool for Nintendo Switch
GNU General Public License v3.0
2.58k stars 349 forks source link

v0.10.1 - Goldleaf fails to install NSP dumps from nxdumptool rewrite builds #674

Closed ghost closed 1 year ago

ghost commented 1 year ago

Goldleaf fails to install nxdumptool (rewrite) NSPs

Bug description

Goldleaf seems to be having trouble with installing game dumps made using the nxdumptool rewrite branch. When using the "Remove console-specific data" option, ETickets errors with 2145-0001 (0x291). Enabling "Remove titlekey crypto" results in a File system (FS?) error 2002-4075 (0x1FD602). I've tested this with a copy of Celeste [01002B30028F6000] from the eShop, but this seems to happen with any legitimate title.

This has been fairly consistent for all of the rewrite builds I've used (commits 2b8dcec and e63c7ff). NSP dumps from the "legacy" nxdumptool version (v1.1.15) with roughly the equivalent settings will install correctly.

Your setup

Bug reproduction

  1. Dump a title from sysCFW using either the nxdt_rw_poc homebrew or the nsp_dumper homebrew (depending on rewrite version) from the nxdumptool GitHub Actions.
  2. In nxdumptool, either only set "Remove console specific data" to yes, or also set "Remove titlekey crypto" to yes.
  3. Once the dump is complete, launch Goldleaf and attempt to install the NSP. Goldleaf will either fail with error 2145-0001 (0x291) from ETickets if only the first option is set, or error 2002-4075 (0x1FD602) in FS if both options are set.

Additional information

NSP dumps from the Legacy nxdumptool branch will also fail to install if only "Remove console specific data" is selected, just like rewrite. Additionally using "Generate ticket-less dump" and "Change NPDM RSA key/sig in Program NCA" will make the NSP installable by Goldleaf, but these options are not present in the rewrite.

I'm using the FS and Loader patches from the Nintendo Homebrew community.

ghost commented 1 year ago

It turns out that the ETickets error was due to a lack of ES sigpatches. The FS errors were a result of the wrong hash function (SHA3-256 instead of SHA2-256) being used in the rewrite builds. This has now been found and fixed, and hopefully pushed to the main branch soon. Installing an NSP with "Remove console-specific data" and "Remove titlekey crypto" should now work in the future.