1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-22 18:26:39 +00:00
Commit graph

412 commits

Author SHA1 Message Date
Pablo Curiel
2795ed14eb Fix codestyle. 2021-02-12 18:01:33 -04:00
Pablo Curiel
e77c72b0db Some changes.
* gamecard: added more comments, modified gamecardGetBundledFirmwareUpdateVersion() to fill a VersionType1 pointer instead of a u32, fallback to manually reading the gamecard certificate if fsDeviceOperatorGetGameCardDeviceCertificate() fails, updated GameCardFwVersion enum.

* title: tweaked conditions for some functions.

* usb: explicitly defined values for previously omitted struct members while initializing USB comms, imported libusb structs to make it easier to work with the USB BOS, added a few more comments and changed around some code.

* utils: tweaked the illegal filesystem character array to remove some chars that are actually allowed.
2021-02-12 16:35:23 -04:00
Pablo Curiel
ed2061ae3e Update nca.h 2021-01-31 05:21:50 -04:00
Pablo Curiel
88793eceea Populate app_metadata pointer in TitleInfo elements that aren't system titles or user applications. 2021-01-31 05:16:05 -04:00
Pablo Curiel
bbf1d2f7ad NSP dumper PoCs: fix crash while dumping updates/DLCs without an available base application. 2021-01-31 03:34:09 -04:00
Pablo Curiel
796e7ed42d Update libusbhsfs 2021-01-31 03:27:22 -04:00
Pablo Curiel
232fe05587 Use LIBUSBHSFS_FS_TYPE_STR() macro from libusbhsfs instead of our own one. 2020-12-24 07:16:16 -04:00
Pablo Curiel
48c084481a Update libusbhsfs 2020-12-24 07:09:14 -04:00
Pablo Curiel
b4bf505d4f UMS changes.
* Temporarily changed tracked libusbhsfs branch from main to dev.

* Minor improvements in ums.c/h.

* Refactored nsp_dumper_sd into nsp_dumper_stor - now capable of dumping NSPs to a mounted partition from a UMS device.

* Fixed utilsWaitForButtonPress() when no button mask is provided.

* Refactored utilsGetFreeSpaceFromFileSystemByPath() into utilsGetFileSystemStatsByPath().
2020-12-24 04:49:38 -04:00
Pablo Curiel
6f43764e1b Improved UMS interface. 2020-12-23 14:43:12 -04:00
Pablo Curiel
736f2e155b Add DisableDeviceAddressSpaceMerge NPDM meta flag.
Also updated the Makefile to link the application against lwext4.
2020-12-23 14:02:02 -04:00
Pablo Curiel
fbd250a417 Update copyright years. 2020-12-23 13:48:57 -04:00
Pablo Curiel
3eb65f0caf Update libusbhsfs 2020-12-23 13:28:13 -04:00
Pablo Curiel
d7f71a8575 Update libusbhsfs 2020-12-18 17:37:30 -04:00
Pablo Curiel
ae12e48678 Added UMS interface based around libusbhsfs.
Also normalized Initialized -> Init in names from global variables.
2020-12-07 00:26:59 -04:00
Pablo Curiel
5a070f624c Use UsbState enum values from latest libnx. 2020-12-06 18:45:30 -04:00
Pablo Curiel
6c931988d3 Treat errors as warnings. 2020-12-04 03:24:17 -04:00
Pablo Curiel
c29f994b35 Support for HOS 11.0.0.
* Updated hardcoded system title list to match HOS 11.0.0.
* Updated NcaKeyGeneration_Current.
* Updated button input handling to match the new pad API from libnx.
2020-12-04 02:38:44 -04:00
Pablo Curiel
9732bf9adf libusbhsfs-related changes.
* Free space is now retrieved via statvfs() for all filesystems, including the SD card.
* Updated Makefile to reflect latest libusbhsfs changes (dev branch).
2020-12-02 02:28:35 -04:00
Pablo Curiel
7899fc419c Update usbHsFsInitialize() call to reflect changes in libusbhsfs. 2020-11-28 02:56:54 -04:00
Pablo Curiel
6bbe0aca19 Make libusbhsfs submodule track its main branch 2020-11-28 02:50:44 -04:00
Pablo Curiel
457f468519 Fix comments. 2020-11-28 02:38:53 -04:00
Pablo Curiel
dff9b1defa Revert "Rename FatFs functions to avoid linking issues with libusbhsfs."
This reverts commit 6715242fed.
2020-11-28 02:38:01 -04:00
Pablo Curiel
2632af43a0 Update libusbhsfs 2020-11-28 02:37:44 -04:00
Pablo Curiel
32c134ca4e Add libusbhsfs submodule. 2020-11-23 21:45:20 -04:00
Pablo Curiel
477c321773 Remove unnecessary code.
libusbhsfs doesn't return FsFileSystem objects, that's why.
2020-11-21 06:29:29 -04:00
Pablo Curiel
2e00977f56 Update build.sh 2020-11-21 02:13:50 -04:00
Pablo Curiel
6715242fed Rename FatFs functions to avoid linking issues with libusbhsfs. 2020-11-20 04:56:12 -04:00
Pablo Curiel
e8956c0e4b Various changes.
* Cancel USB file transfer if something goes wrong during a NSP transfer via USB.
* Added SD card RomFS dumper.
* Further optimizations to the *WriteNcaPatch() functions.
* Change struct naming in nso.c/h (thanks @0Liam !).
* Replace fsp-usb with libusbhsfs. ( ͡° ͜ʖ ͡°)
2020-11-08 15:08:30 -04:00
Pablo Curiel
5f0f281e2d Added USB ABI specs. 2020-11-01 11:04:38 -04:00
Pablo Curiel
bceff64da4 Fix parent layer chunk size calculation while generating HierarchicalSha256 / HierarchicalIntegrity patches. 2020-10-29 03:51:17 -04:00
Pablo Curiel
0229124173 NACP changes.
Fixed types for some NACP struct entries (thanks @0Liam !) + added functions to generate and write NACP patches.
2020-10-28 18:48:46 -04:00
Pablo Curiel
2b8e80c283 Remove unused code. 2020-10-28 01:03:48 -04:00
Pablo Curiel
57162b5634 CNMT: fixed support for patches. 2020-10-28 00:30:13 -04:00
Pablo Curiel
7c4c969fc6 Update todo.txt 2020-10-27 17:25:49 -04:00
Pablo Curiel
278afbabfa Title handler bugfixes.
* Fixed possible invalid memory accesses using TitleInfo pointers from gamecard titles if the gamecard they belong to is taken out.
* Fixed invalid for loop condition in _titleGetInfoFromStorageByTitleId() if no gamecard titles have been retrieved.
2020-10-27 17:23:19 -04:00
Pablo Curiel
14ee45b38a Use BUILD_TYPE as APP_TITLE. 2020-10-26 16:17:57 -04:00
Pablo Curiel
5c5f388feb Add NSP transfer mode to USB code + implement SendNspHeader USB command.
Completely untested.
2020-10-26 02:39:33 -04:00
Pablo Curiel
da5290189b Optimize modified NCA header(s) write code. 2020-10-25 20:03:02 -04:00
Pablo Curiel
d777183d9f Update nsul_nxdt_patch.diff 2020-10-25 14:31:12 -04:00
Pablo Curiel
ae6defb0e6 Another typo. 2020-10-25 11:43:22 -04:00
Pablo Curiel
c44b9c998e Add endpoint max packet size field to the UsbStatus response block.
And fix typos. lol
2020-10-25 11:42:53 -04:00
Pablo Curiel
7e2aa976b4 Rename KEY_NONE definition. 2020-10-22 16:13:00 -04:00
Pablo Curiel
974790944f More changes.
* Added NSP dumper PoC (SD card only atm, single-threaded).
* Cert: replaced a wrong strcmp() with a proper strncmp().
* CNMT: added functions to update content info entries and generate/write Partition FS patches.
* NCA: encrypt key area right after removing titlekey crypto.
* NPDM/ProgramInfo: changed function names.
* NPDM: check if the NCA has been modified before attempting to patch ACID data + calculate RSA-PSS signature *after* generating the PFS patch, not before. lol
* PFS: restore name table size value before writing the header padding.
* Tik: reworked the ticket lookup algorithm. Now uses information from ticket_list.bin to properly calculate the offset to the requested ticket in ticket.bin.
* Title: changed title type strings used for filename generation.
* Updated to-do list.
2020-10-22 00:38:14 -04:00
Pablo Curiel
15431ec2c8 Many changes.
* AES: moved CTR initializing/updating functions here from nca.c.
* BKTR/RomFS/PFS: check if we're dealing with a NCA with titlekey crypto and the titlekey hasn't been retrieved.
* BFTTF: use void pointers for output font data.
* Mem: Only exclude Unmapped/Uo/ThreadLocal/Reserved memory pages if dealing with FS.
* NCA: use content type context pointers inside NCA contexts to manage ContentMeta, ProgramInfo, Nacp and LegalInfo contexts.
* NCA: added 'written' bool elements to patch structs to indicate patch write completion.
* NPDM: remove unnecessary inline functions, generate PFS patch right after changing ACID data, add a pfsWriteEntryPatchToMemoryBuffer wrapper.
* PFS: added PartitionFileSystemFileContext and related functions to deal with NSP headers.
* ProgramInfo: removed unnecessary inline functions.
* Save: added commented code to dump a full system savefile - will probably use it down the road.
* Tik: added support for volatile tickets (thanks to @shchmue and @Whovian9369!), added a rights ID string representation to the Ticket struct, clear Volatile and ELicenseRequired flags in conversions to common tickets.
* Title: added a function to calculate the number of titles (current + siblings) from a TItleInfo block.
* Utils: added a function to generate a dynamically allocated path string using a prefix, a filename and a extension.
* Removed explicit offset checks throughout all the code.
* Codestyle fixes.
* Updated to-do.
2020-10-21 00:27:48 -04:00
Pablo Curiel
bd98fd4c32 Replace unnecessary strlen() calls with pointer dereferences or calculations using info available at runtime (when possible).
This should probably improve performance a little bit in certain sections.
2020-10-14 20:06:53 -04:00
Pablo Curiel
6f4cb98033 Cleanup startup logfile messages. 2020-10-14 19:08:01 -04:00
Pablo Curiel
5b22fe07f2 More code cleanup. 2020-10-14 14:58:33 -04:00
Pablo Curiel
13efdb6074 Update bfttf.h 2020-10-14 09:24:56 -04:00
Pablo Curiel
e6bb15d608 Implemented BFTTF font loading and decoding.
Some people may call me a madman but I don't want to see any more nxdumptool screenshots with a Disney-like font. *war flashbacks*
2020-10-14 09:23:49 -04:00