1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-08 11:51:48 +00:00
Commit graph

151 commits

Author SHA1 Message Date
Pablo Curiel
3c0312961b gc_dumper: fix storage device path generation 2023-01-14 00:51:54 +01:00
Pablo Curiel
665a5baf7e Update libusbhsfs.
Also fixed a small bug in the gc_dumper PoC.
2023-01-05 01:30:12 +01:00
Pablo Curiel
3aae84a025 QoL changes.
* gc_dumper: add UMS device support.
* nsp_dumper: add DLC Update support.
* cnmt: add a reminder about the extended data size in NcmContentMetaType_DataPatch CNMTs.
* nca: update NcaKeyGeneration enum comment.
* title: update system titles array, severely overhaul the way linked lists work in Title* structs to properly support DLC updates.
2022-12-04 11:29:47 +01:00
Pablo Curiel
0f1055c84e Preliminar 15.x support.
This commit uses my yet unmerged libnx PR to update ncm_types.h.

PoC code hasn't been updated yet, so proper support for DLC updates will arrive at a later time.

Note to self: implement a way to provide access to loaded DataPatch TitleInfo entries (linked list hell).

* bktr: renamed bktrBucketInitializeSubStorageReadParams to bktrInitializeSubStorageReadParams to avoid redundancy, added debug code to dump BucketInfo and BucketTree tables if BucketTree storage initialization fails.

* cnmt: updated ContentMetaAddOnContentMetaExtendedHeader struct to its 15.x equivalent, added ContentMetaLegacyAddOnContentMetaExtendedHeader struct, added ContentMetaDataPatchMetaExtendedHeader struct, updated the cnmtGetRequiredTitleId and cnmtGetRequiredTitleVersion functions to support DataPatch titles, updated cnmtInitializeContext to support both the new AddOnContent extended header and DataPatch titles, added debug code to dump the whole CNMT if context initialization fails, updated cnmtGenerateAuthoringToolXml to support DataPatch titles.

* keys: updated block hashes to match 15.x keyset, use case-insensitive comparison while looking for entry names in keysReadKeysFromFile, make sure the eticket_rsa_kek is non-zero before proceeding in keysGetDecryptedEticketRsaDeviceKey.

* nca: updated NcaKeyGeneration enum, added reminder about updating NcaSignatureKeyGeneration if necessary, replaced ncaFsSectionCheckHashRegionAccess with ncaFsSectionCheckPlaintextHashRegionAccess, removed all extents checks on Patch RomFS and sparse sections, updated ncaGetFsSectionTypeName to reflect if a FS section holds a sparse layer or not.

* nca_storage: updated ncaStorageInitializeContext to avoid initializing a compressed storage if a sparse layer is also used (fixes issues with Them's Fightin' Herds), updated ncaStorageSetPatchOriginalSubStorage to enforce the presence of a compressed storage in a patch if the base FS holds a compressed storage.

* npdm: added reminder about updating NpdmSignatureKeyGeneration if necessary, updated NpdmFsAccessControlFlags enum, updated NpdmAccessibility enum, updated NpdmSystemCallId enum, fixed typos.

* title: updated all relevant functions that deal with NcmContentMetaType values to also handle DataPatch titles, added functions to handle DataPatchId values, removed titleConvertNcmContentSizeToU64 and titleConvertU64ToNcmContentSize functions in favor of ncmContentInfoSizeToU64 and ncmU64ToContentInfoSize from my unmerged libnx PR, updated internal arrays to match 15.x changes, renamed titleOrphanTitleInfoSortFunction to titleInfoEntrySortFunction and updated it to also sort entries by version and storage ID, updated titleGenerateTitleInfoEntriesForTitleStorage to sort TitleInfo entries, simplified titleDuplicateTitleInfo a bit by using macros.
2022-10-23 16:44:47 +02:00
Pablo Curiel
eee1b2a771 More changes.
* Update libusbhsfs.

* Update borealis.

* nsp_dumper: force free size retrieval after dumping an NSP.

* title: add titleGetGameCardApplicationMetadataEntries().

* Makefile: remove -gdwarf-4 flag.

* nxdt_utils: treat NT_MAX_FILENAME_LENGTH as bytes instead of codepoints, add "TiB" to the array of supported size suffixes.

* GameCardTab: add ProcessGameCardStatus() and PopulateList(), manage list updates in the same fashion as TitlesTab, display message about how to mitigate launch errors after exiting the application, display available applications in the inserted gamecard, display message about how to perform individual operations on the gamecard titles.

* main: add a try/catch block to intercept any possible exceptions thrown while the application is running + use brls::Application::crash() to gracefully exit afterwards. Temporarily disable Applet Mode support.

* exception_handler: use LOG_LEVEL_ERROR.

* LayeredErrorFrame: add GetListFirstFocusableChild().
2022-07-28 00:53:52 +02:00
Pablo Curiel
b70da7e7bf nca: fix ctx init for NCAs with bogus Patch RomFS. 2022-07-14 14:10:03 +02:00
Pablo Curiel
a9b5f7211c Some changes. Read full commit message.
* title: implemented titleGetNcmStorageIdName().

* nxdt_log: implemented log verbosity levels (debug, info, warning, error, none) and helper macros for each level. The rest of the codebase still needs to be updated to take advantange of this change.

* nxdt_log: implemented auxiliary logging via nxlink, if available.

* nxdt_utils: system CPU/MEM overclocking is now only applied through utilsSetLongRunningProcessState(), as it should have been from the beginning.

* nxdt_utils: nxlink initialization is now carried out without redirecting stdout and/or stderr, entirely removing the need for utilsRestoreConsoleOutput(). utilsGetNxLinkFileDescriptor() is used to send data to the nxlink host via dprintf() in log functions.
2022-07-12 02:27:03 +02:00
Pablo Curiel
243080f1a6 NSP dumper: re-enable AT option by default. 2022-07-10 19:45:18 +02:00
Pablo Curiel
1cd88b1cd4 bktr: handle compression in patches (part 3).
Updated bktrIsBlockWithinIndirectStorageRange().

Got confirmation that everything is now working as it should. Big thanks to BigKahuna.
2022-07-10 06:41:18 +02:00
Pablo Curiel
6bf314bcea romfs: implement romfsIsFileEntryUpdated().
Also modified romfsGetTotalDataSize() to add an 'only_updated' argument.
2022-07-07 02:30:45 +02:00
Pablo Curiel
d8c0984115 romfs: slightly improve interface. 2022-07-06 11:57:31 +02:00
Pablo Curiel
c910fe6c0a romfs: reintroduce support for missing base RomFS.
Also added a free space check and concatenation file creation to sd_romfs_dumper.
2022-07-05 06:01:07 +02:00
Pablo Curiel
942a407247 Codebase cleanup.
Remove legacy code and trailing whitespace from all files.
2022-07-05 03:04:28 +02:00
Pablo Curiel
91dc20b7f3 Fix some issues + update PoCs.
ncaStorageSetPatchOriginalSubStorage: allow Patch title version to be equal to the Base title version (e.g. sparse titles).

ncaStorageGetHashTargetExtents: actually set proper storage extents.

bktrGetTreeNodeEntryIndex: fix index lookup algorithm.

bktrStorageNodeFind: fix binary search.

bktrVisitorMoveNext / bktrVisitorMovePrevious: fix integer overflows.
2022-07-05 01:25:28 +02:00
Pablo Curiel
8b0ed76011 Fix bugs + improve bktr interface.
* Check for sparse layers in nsp_dumper and xml_generator PoCs before attempting to initialize content-type-specific contexts.

* system_title_dumper now builds.

* gamecardCloseStorageArea() no longer returns prematurely on application exit.

* Fix section size for sparse sections in ncaInitializeFsSectionContext().

* Fix ncaFsSectionValidateHashDataBoundaries().

* Implement bktrInitializeIndirectStorage() and bktrInitializeAesCtrExStorage().
2022-06-29 14:41:58 +02:00
Pablo Curiel
590495d012 bktr: added ID offset and title version checks. 2022-06-29 09:55:46 +02:00
Pablo Curiel
d722683a77 Create merged nsp_dumper PoC. 2022-06-27 04:58:03 +02:00
Pablo Curiel
ce4034852c Remove support for NPDM patching. 2022-06-26 03:34:31 +02:00
Pablo Curiel
9e337a5d0a Update default dump options. 2022-06-24 03:44:16 +02:00
Pablo Curiel
2b59f7b65c gc_dumper: add back option to append key area.
Turned on by default. This is a measure to avoid hac2l warnings.
2022-03-18 18:23:56 +01:00
Pablo Curiel
7189943680 More changes.
* gc_dumper: fixed Card ID Set dumping.

* nacp: updated structs and enums to match latest changes (big thanks to @0Liam !), added helper macros.

* cnmt: added helper macros.

* program_info: added helper macros.

* exception_handler: added helper macros.

* nxdt_utils: only create output directories if the app isn't a PoC build.

* todo: changed task priority order. Sparse/compressed section support is mandatory and must be implemented ASAP.
2022-03-18 17:48:16 +01:00
Pablo Curiel
9604b5923d romfs_dumper: get latest patch from linked list. 2022-03-17 20:29:44 +01:00
Pablo Curiel
278cb5c72a Some changes.
* nxdt_includes: renamed VersionType1 to Version and tweaked it to add the application_version struct, renamed VersionType2 to SdkAddOnVersion.

* gc_dumper: use utilsGeneratePath() to truncate generated filenames to safe filesystem limits. Thanks to n0tw0rk for reporting the issue and testing the changes!

* nxdt_host.py: fixed a string formatting issue that made it impossible to unpack data from the SendFileProperties command block under certain circumstances.

* gamecard: modified GameCardKeySource to add a value field, added GameCardFlags_HasCa10Certificate flag.

* utils: utilsGeneratePath() no longer adds a dot on its own if it's not part of the provided extension string.
2022-03-17 13:37:24 +01:00
Pablo Curiel
b9018a7df0 gc_dumper: fix gamecard detection.
I'm dumb, sorry.
2022-03-04 13:25:12 +01:00
Pablo Curiel
fabb15bbe4 Fix home button exit on all PoCs. 2022-02-19 06:03:06 +01:00
Pablo Curiel
f6d133d793 gc_dumper: change info TXT layout. 2022-02-07 01:32:39 +01:00
Pablo Curiel
3999e48c43 Update gc_dumper.c 2022-02-06 03:33:03 +01:00
Pablo Curiel
fea5f8803d gc_dumper: generate text file with dump info. 2022-02-06 03:30:42 +01:00
Pablo Curiel
8c312ca636 Add SD card + Card ID Set support to gamecard PoC. 2022-02-04 03:04:43 +01:00
Pablo Curiel
8168a5ac84 gamecard: cache LAFW blob during interface initialization.
Other changes include:

* Codestyle fixes.
* Remove references to GameCardKeyArea in the usb_gc_dumper PoC.
* Remove option to append key area to output XCI dumps in usb_gc_dumper PoC.
2022-02-03 04:39:54 +01:00
Johnson
e79b03afeb
Add support for dumping full GameCardSecurityInformation (#105)
* Add support for dumping full GameCardSecurityInformation

* Add support for dumping LAFW

* Clear out ASIC session hash data

Co-authored-by: Pablo Curiel <pabloacurielz@gmail.com>
2022-02-03 02:22:57 +01:00
Pablo Curiel
4929330e32 gamecard: support ID set dumping. 2022-02-03 02:13:20 +01:00
Pablo Curiel
cd300fe149 Fix PoC building. 2021-09-04 00:17:17 -04:00
Pablo Curiel
230e3d2cee PoC: fix building + implement AuthoringTool data option. 2021-08-03 02:37:04 -04:00
Pablo Curiel
ff0a2a385c Fix PoCs. 2021-07-23 08:42:20 -04:00
Pablo Curiel
41ce1f23b2 Update PoCs to reflect the changes made to usbIsReady(). 2021-06-25 17:05:02 -04:00
Pablo Curiel
4d1b3660c3 Cherry-pick improvements from the rewrite-yoga branch. 2021-06-23 14:27:06 -04:00
Pablo Curiel
c70fd0c1c8 RootView: display status labels using StatusInfoTask data. 2021-06-18 14:10:19 -04:00
Pablo Curiel
b7daac6807 title: handle extra allocated user application metadata entries in titleFindApplicationMetadataByTitleId(). 2021-06-15 01:44:10 -04:00
Pablo Curiel
04abb342bb Small code refactor (part 3).
* Both gamecard header and decrypted CardInfo area are now retrieved upon gamecard insertion. LAFW version is checked against the CardInfo LAFW version right afterwards.

* Expanded GameCardStatus enum to add NoGameCardPatchEnabled and LotusAsicFirmwareUpdateRequired values.

* Updated utilsReplaceIllegalCharacters() to perform replacements on a per-codepoint basis, which means that invalid multibyte UTF-8 codepoints can now be replaced with a single ASCII underscore.

* Updated utilsGeneratePath() to truncate path elements that exceed 255 UTF-8 codepoints (safe limit for FAT and NTFS filesystems).

* Heavily simplified core logic in title functions by using newly defined TitleStorage elements (which hold the NCM database/storage handles, a TitleInfo array and a title counter) instead of the old, global index-based methods.

* Simplified background gamecard title thread logic by always returning duplicated TitleInfo data to the user.

* Update title API to account for the previously mentioned changes, including functions to free duplicated title data.

* Fallback gamecard filename string now also holds the gamecard package ID whenever possible.

* Implemented HDCP patching for Control NCAs.
2021-05-31 21:12:15 -04:00
Pablo Curiel
f526d4e6f4 Crypto changes.
* Implemented RSA-2048-PSS + SHA256 signature verification.

* Refactored RSA-2048-OAEP decryption steps to use mbedtls function calls.

* Implemented NCA header main signature verification.

* Replaced Björn Samuelsson's CRC32 algorithm with the hardware accelerated CRC32 checksum calculation from libnx (latest commit with support for calculation in blocks).
2021-05-21 09:34:43 -04:00
Pablo Curiel
f82d7a3db4 Small code refactor (part 2).
* Rewrote mutex handling throughout the code to use a small, macro-based scoped lock implementation.

* Removed extern variables from common.h - launch path management is now completely handled in utils.c.

* Updated NpdmSystemCallId_Count to reflect changes introduced in 12.0.0.

* Added NcaMainSignatureKeyGeneration enum.

* NCA main signature moduli are now retrieved from FS .rodata at runtime.

* Simplified lock management in usb.c by using a single global mutex with scoped locks instead of three different r/w locks.

* Updated FatFs to R0.14b.

* Enabled 64-bit LBA support in FatFs to potentially support custom eMMC replacements / resized USER partitions in the future.

* Updated LZ4 to v1.9.3.

* Fixed typos.

* USB gamecard dumper PoC now only dumps the Initial Data area.

* Updated to-do list.
2021-05-18 08:32:43 -04:00
Pablo Curiel
85f146f50c Add uppercase hex string generation to utilsGenerateHexStringFromData(). 2021-05-11 18:36:15 -04:00
Pablo Curiel
4c0c7d2c56 Small code refactor.
* Refactored keydata handling.

* Sealed NCA KAEKs are now generated at startup, and NCA key area entries are now decrypted by keysDecryptNcaKeyAreaEntry(), reducing the number of calls to spl functions.

* The eTicket RSA device key is now retrieved and decrypted at startup. RSA-OAEP wrapped titlekeys are now decrypted by keysDecryptRsaOaepWrappedTitleKey().

* Renamed titlekek -> ticket common key throughout the codebase.

* Added NcaKeyAreaEncryptionKeyIndex_Count and NcaKeyGeneration_Max enum values to nca.h.

* Proper usage of strcasecmp() in some functions.

* Moved syscall hint checks from keys.c to mem.c.

* Define illegal FS characters as an array rather than a char pointer.

* Services are now initialized before the CFW type checks.

* Fixed pcv/clkrst service initialization.

* Implemented additional thread safety and logfile output to service functions.

* Slightly tweaked running service checks.

* Added proper Markdown documentation for the USB ABI.
2021-05-11 02:00:33 -04:00
Pablo Curiel
17dd24bc92 Modified NCA key area handling + restored PoC building.
* Avoid performing any crypto operations on null NCA key area entries.

* Added commented out code to handle the aes_ctr_ex NCA key area entry, just in case we end up needing it at some point.
2021-04-25 19:10:34 -04:00
Pablo Curiel
11da814fb2 Fix building issues with Borealis. 2021-03-26 00:35:14 -04:00
Pablo Curiel
c6c5667bf0 Change project layout + upgrade license to GPLv3. 2021-03-25 15:26:58 -04:00
Pablo Curiel
ae3b7266a0 Fix NACP bitflag checks. 2021-03-20 03:13:16 -04:00
Pablo Curiel
a7984de0c8 Send Git commit hash as part of the StartSession block. 2021-03-16 01:08:38 -04:00
Pablo Curiel
a01b7846de title: use dynamic pointer arrays.
* Added functions to deal with title info and application metadata reallocations, greatly reducing the number of references to realloc() throughout the code.

* Tweaked gamecardGetHashFileSystemContext() to not return a pointer to a dynamic context.

* Added a type field to Hash FS contexts.
2021-03-09 21:12:01 -04:00
Pablo Curiel
8be5460229 Store last log message using a small stack buffer.
Will be used to print error messages down the road.
2021-03-08 10:44:11 -04:00
Pablo Curiel
43f744326f Minor fixes.
* The new logfile handler should now work properly.

* A UTF-8 BOM is now written at the start of every new logfile.
2021-03-08 07:11:28 -04:00
Pablo Curiel
a384137636 Fix compatibility with latest libusbhsfs commit. 2021-03-02 00:39:51 -04:00
Pablo Curiel
6df7ff0cba Fix output filenames not being updated in usb_gc_dumper. 2021-02-20 14:52:07 -04:00
Pablo Curiel
de076f4908 More USB changes.
* usb: copy command ID and block size before moving command data within the USB transfer buffer.

* nsp_dumper_usb: now spans a background thread for the dump process, progress is now displayed, process can now be cancelled by holding B, updated to properly make use of the new usbCancelFileTransfer() behavior.

* usb_gc_dumper: updated to properly make use of the new usbCancelFileTransfer() behavior.

* usb_romfs_dumper: updated to properly make use of the new usbCancelFileTransfer() behavior.

* Updated ns-usbloader patch. Must be used on commit `8771d551a4e6fa2d645e519d504a377e34cbd730`.
2021-02-16 08:22:14 -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
232fe05587 Use LIBUSBHSFS_FS_TYPE_STR() macro from libusbhsfs instead of our own one. 2020-12-24 07:16:16 -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
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
477c321773 Remove unnecessary code.
libusbhsfs doesn't return FsFileSystem objects, that's why.
2020-11-21 06:29:29 -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
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
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
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
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
6f4cb98033 Cleanup startup logfile messages. 2020-10-14 19:08:01 -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
Pablo Curiel
44965430b3 Even more code cleanup.
* Added a function to write re-encrypted NCA and/or FS section headers. Getting ready to re-implement NSP dumping.
* Added more CNMT XML fields (thanks 0Liam).
* Updated my to-do list because I'm dummy.
2020-10-13 20:15:21 -04:00
Pablo Curiel
ba4fdcd01c Code cleanup.
* Added 'encrypted_header' members to both NcaContext and NcaFsSectionContext. In-place re-encryption isn't desirable in this case.
* Fixed FsAccessControl-related type naming for ACI0 blocks.
2020-10-13 10:00:03 -04:00
Pablo Curiel
ebd97d7c82 Add FsAccessControlData to ProgramInfo XML.
Also:

* Fixed support for NSOs with invalid module_name, api_info, dynstr and/or dynsym offsets/sizes.
* Updated the XML generator example to generate XML data for all available NCAs, regardless of their ID offset values.
2020-10-12 16:35:47 -04:00
Pablo Curiel
4ab8f44003 Wipe more legacy code that has already been rewritten. 2020-10-12 12:17:29 -04:00
Pablo Curiel
40fc21b5a3 Fix ProgramInfo and NSO issues.
XML generation confirmed to be working. The new algorithm faithfully reproduces the same output from legacy nxdumptool with much less overhead and memory usage.
2020-10-11 20:40:54 -04:00
Pablo Curiel
3affe1f4d0 ProgramInfo AuthoringTool-like XML generation.
Untested. Completely reworked both Middleware and ELF symbol parsing from NSOs.
2020-10-11 15:55:01 -04:00
Pablo Curiel
495e331306 Fix support for NSOs without a valid .api_info section + ProgramInfo context.
ProgramInfo XML generation is still missing. Getting real close to reimplementing NSP dumping.
2020-10-11 14:13:09 -04:00
Pablo Curiel
1de967ed42 NSO structs (thanks 0Liam). 2020-10-10 11:35:14 -04:00
Pablo Curiel
3e59d15bc4 Minor template tweaks + LegalInfo fix. 2020-10-10 06:10:50 -04:00
Pablo Curiel
d1f0361725 Update NPDM structs (thanks to 0Liam) + LegalInformation XML retrieval.
From now on, I'll delete code from the legacy codebase directory as soon as specific features from it are rewritten... Because it's a mess to navigate.
2020-10-09 05:58:53 -04:00
Pablo Curiel
1c15a096b5 Codestyle fixes + prepare code for NPDM support. 2020-10-08 14:31:09 -04:00
Pablo Curiel
e943e84380 Unified XML generator + finished NACP parsing.
Big thanks to 0Liam.
2020-10-06 11:41:26 -04:00
Pablo Curiel
7573c53457 Fix silly bug in titleGetNcmContentMetaTypeName. 2020-10-04 06:40:56 -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
fa1b9c70a5 NCA changes. 2020-10-02 22:37:05 -04:00
Pablo Curiel
98b7a309b3 CNMT AuthoringTool-like XML generation. 2020-10-02 05:53:58 -04:00
Pablo Curiel
6e32829cf1 CNMT parsing. 2020-10-01 02:17:59 -04:00
Pablo Curiel
b806c2e7d0 Support multi-program titles in the RomFS dumper. 2020-09-19 02:59:31 -04:00
Pablo Curiel
971d7fd72c Silly fix. 2020-08-20 23:49:57 -04:00
Pablo Curiel
f809d795e3 Update BKTR PoC to make it dump user application RomFS data if an update isn't available. 2020-08-19 13:20:26 -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
ace4732fda Functions to generate gamecard/title filenames + fix CRC32 calculation.
Updated the threaded gamecard dumper to reflect these changes.
2020-08-13 22:31:02 -04:00
Pablo Curiel
ad401d559d New template: threaded gamecard dumper via USB.
Key area and certificate can be optionally appended and/or preserved, respectively. Trimming is supported.

Also added a bunch of ZLT packet related fixes to usb.c, as well as a function to properly cancel an ongoing file transfer.
2020-08-13 02:01:23 -04:00
Pablo Curiel
e26637125b Add slightly better scrolling + title counter. 2020-08-03 17:41:00 -04:00
Pablo Curiel
3105540c99 Block HOME button presses during dumping operations in code templates. 2020-08-03 14:13:24 -04:00
Pablo Curiel
ca333bd71d Missing fs commit changes. 2020-08-01 00:52:40 -04:00
Pablo Curiel
5d1944b43c Move title info dump code to a template. 2020-07-30 18:40:02 -04:00
Pablo Curiel
bb8cba1eaa Threaded gamecard title info/metadata retrieval. 2020-07-30 17:43:50 -04:00
Pablo Curiel
cd8afd2cd8 Fixed gamecard key area template. 2020-07-30 16:01:26 -04:00