1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-10 04:31:44 +00:00
Commit graph

33 commits

Author SHA1 Message Date
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
477c321773 Remove unnecessary code.
libusbhsfs doesn't return FsFileSystem objects, that's why.
2020-11-21 06:29:29 -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
4425666395 NPDM support (part 1).
Only added header file with structs and enums. Actual functions come next but I'm tired atm.
2020-10-08 17:52:31 -04:00
Pablo Curiel
1c15a096b5 Codestyle fixes + prepare code for NPDM support. 2020-10-08 14:31:09 -04:00
Pablo Curiel
1e41148c02 NACP parsing (part 2).
NeighborDetectionClientConfiguration and RequiredAddOnContentsSetBinaryDescriptor haven't been implemented (yet).
2020-10-04 03:05:05 -04:00
Pablo Curiel
98b7a309b3 CNMT AuthoringTool-like XML generation. 2020-10-02 05:53:58 -04:00
Pablo Curiel
a19d3f2338 Ditched C threads in favor of libnx threads.
Preemptive multithreading is still used, just like libnx's newlib implementation.

Also changed the version number because the rewrite deserves it.
2020-08-18 01:04:13 -04:00
Pablo Curiel
6b8b3184ac Fixes for development units + diff patch for ns-usbloader.
Big thanks to ZachyCatGames.
2020-08-15 17:22:49 -04:00
Pablo Curiel
64f3a566f8 Commit filesystem changes when needed. 2020-08-01 00:43:55 -04:00
Pablo Curiel
7c4e7a4db0 New test app: system title NCA section dumper. 2020-07-29 17:02:21 -04:00
Pablo Curiel
158e424b96 List content infos as part of title list entries.
Finally got rid of location resolver stuff.
2020-07-26 00:57:12 -04:00
Pablo Curiel
e4a6e0e77a Begin work on title listing stuff. 2020-07-25 01:56:35 -04:00
Pablo Curiel
90e0f057bc Bunch of changes.
* Updated NCA structs (including NcaSparseInfo).
* Changed the way NCA header + NCA FS header decryption is handled.
* Changed the way the NCA encrypted key area is handled.
* Unified hierarchical patch generation functions.
* Updated PFS, RomFS and BKTR functions accordingly to reflect NCA handling changes.
* Logfile path is now relative.
* Gamecard initial data lookup code now uses the initial data hash from the gamecard header (a tad bit slower, but way more failproof).
2020-07-22 04:03:28 -04:00
Pablo Curiel
6bee2c5d20 Tweaked gamecard code.
Modified gamecard handle retrieval and storage area mounting. Added gamecard status codes.
2020-07-17 01:01:31 -04:00
Pablo Curiel
73861bc52f Normalize goto tag names + support for gamecard key area.
Big thanks to SciresM.
2020-07-13 02:36:17 -04:00
Pablo Curiel
400cab42a0 USB tweaks. 2020-07-12 11:29:08 -04:00
Pablo Curiel
b71f0d7b87 Some more changes.
* Codestyle fixes.
* NCA contexts for NCAs with titlekey crypto will now be generated even if the ticket can't be retrieved, in order to be able to use ncaReadContentFile() with them.
* Moved aes128XtsNintendoCrypt() out of nca.c.
2020-07-05 20:10:07 -04:00
Pablo Curiel
99429fd7b4 Bunch of changes.
* Updated disclaimer in all source files.
* Improved signed payload (certificate, ticket) handling.
* Prefer strlen + strcmp over strncmp whenever possible.
* Simplify header file inclusions in source files.
* Simplify background gamecard thread logic.
* Properly close keys file handle if there's a key parse error.
* Update NcaKeyGeneration enum.
* Small changes to save.c/h.

Will probably have to revert some USB changes...
2020-07-03 05:31:22 -04:00
Pablo Curiel
a3790dd0d6 Mooore USB fixes. 2020-05-11 15:12:03 -04:00
Pablo Curiel
253e72786b Tweaks to utilsReplaceIllegalCharacters.
We won't need to replace characters outside of the ASCII range for USB transfers.
2020-05-05 14:04:23 -04:00
Pablo Curiel
444c82b7c0 Save exception info to logfile.
Benchmark test updated to dump the inserted gamecard.
2020-05-04 14:15:03 -04:00
Pablo Curiel
2e48a22f8c Improve thread-safety. 2020-05-02 19:40:50 -04:00
Pablo Curiel
e1e38bcfc2 derp 2020-04-29 17:16:59 -04:00
Pablo Curiel
b64bcf5451 Fix mem leaks in PFS/RomFS initializers.
Also renamed Ecsda240 -> Ecc480 and added a new Hmac160 signature type.
2020-04-29 17:11:27 -04:00
Pablo Curiel
c6eaf3c8b6 PFS0 mod data + RomFS start. 2020-04-26 04:35:01 -04:00
Pablo Curiel
0e5683b880 NCA read (almost) done.
Missing BKTR stuff.
2020-04-21 06:23:33 -04:00
Pablo Curiel
1b45cdf05a Mooooore baby steps.
I can finally continue the NCA handler.
2020-04-17 17:59:05 -04:00
Pablo Curiel
9679eb72bb Hash FS start. 2020-04-16 06:13:11 -04:00
Pablo Curiel
c83858311b More baby steps. 2020-04-15 20:06:41 -04:00
Pablo Curiel
eccd3f0c1c Baby steps. 2020-04-15 16:50:07 -04:00