Commit graph

809 commits

Author SHA1 Message Date
Xpl0itR
771663786d
Use LibHac's RentedArray<T> struct 2020-08-30 10:32:52 +01:00
Alex Barney
d138a52d06 Add some docs for EmulatedBisFileSystemCreator 2020-08-29 21:53:45 -07:00
Alex Barney
30f306f637 Add additional documentation to the access control classes 2020-08-26 17:10:12 -07:00
Alex Barney
4552a2d94f Add permission checks to DeleteSaveDataFileSystem 2020-08-26 17:10:12 -07:00
Alex Barney
1f25b87d20 Add RegisterProgramIndexMapInfo shim and tests 2020-08-26 17:10:12 -07:00
Alex Barney
6496a2c1bc Honor permissions in OpenFileSystemWithId. Add basic AC test 2020-08-26 17:10:12 -07:00
Alex Barney
3184e6ca7e Add IFileSystemProxyForLoader and IProgramRegistry interfaces 2020-08-26 17:10:12 -07:00
Alex Barney
071b608f5f Tweak how the Horizon class and service manager work
- Store IServiceObjects in the service manager that return the usable objects instead of storing the objects directly
- Register FS services in the service manager instead of giving them special treatment
- Give each created HorizonClient its own "process ID"
2020-08-26 17:10:12 -07:00
Alex Barney
deaf111ac3 Add functions to ProgramRegistryService
Adds RegisterProgramIndexMapInfo and GetProgramIndexForAccessLog to both FileSystemProxy and ProgramRegistryService
2020-08-26 17:10:12 -07:00
Alex Barney
0b050d2189 Add ProgramIndexMapInfoManager 2020-08-26 17:10:12 -07:00
Alex Barney
004e46cacc Add the program registry 2020-08-26 17:10:12 -07:00
Alex Barney
76d21263da Add AccessControl 2020-08-26 17:10:12 -07:00
Alex Barney
3a3c4822be hactoolnet: Remove use of enum reflection 2020-08-19 11:07:28 -07:00
Alex Barney
2242fc6371 Miscellaneous code style cleanup 2020-08-18 21:47:46 -07:00
Alex Barney
71824f06dc Fixes in Nca and U8Span 2020-08-17 19:23:30 -07:00
Alex Barney
f2f2111729 hactoolnet: Add functions to convert some enums to strings 2020-08-17 19:23:30 -07:00
Alex Barney
a005b40022 Build updates
Use the version in the .csproj if there is no local git repository.
Always use Windows line endings in codegen output.
Update build dependency versions. We're still using GitVersion 5.1.3 because of https://github.com/nuke-build/nuke/issues/509.
2020-08-15 23:34:48 -07:00
Alex Barney
30273bf3ef Avoid false positives in detection of unencrypted NCAs 2020-08-15 17:13:28 -07:00
Alex Barney
a07e17c369 Make file option struct constructors public. 2020-08-14 23:40:03 -07:00
Alex Barney
f20337d774 Add support for NCA0 files.
Any operation that is supported with other NCAs is supported NCA0s. This includes reading both encrypted and decrypted NCA0s, and encrypting and decrypting NCA0s.
2020-08-14 22:09:11 -07:00
Alex Barney
6bab1d9273 Support extracting INI binaries embedded in the kernel 2020-08-12 14:27:58 -07:00
Alex Barney
8491ec2117 Add Package2StorageReader and InitialProcessBinaryReader 2020-08-12 14:27:58 -07:00
Alex Barney
81340027fc Rename FsService to FsSrv 2020-08-07 18:32:01 -07:00
Alex Barney
24ba7c6b5b Set the next version to 0.12.0 2020-08-07 10:22:14 -07:00
Alex Barney
9e57cc174e Add documentation for SaveDataIndexer and related classes 2020-08-07 10:02:50 -07:00
Alex Barney
730167785e Add a few save data management tests 2020-08-07 10:02:50 -07:00
Alex Barney
c1b9eb8903 Change ref to in where possible in SaveDataIndexer and kvdb 2020-08-07 10:02:50 -07:00
Alex Barney
d575415b0e Remove the old KeyValueDatabase 2020-08-07 10:02:50 -07:00
Alex Barney
a551360da0 Use FlatMapKeyValueStore in SaveDataIndexer
FS 10.0 tweaks how the SaveDataIndexerManager is accessed. SaveDataFileSystemServiceImpl's configuration now includes an ISaveDataIndexerManager instead of using global state.

FS 10.0 uses the new nn::fssrv::storage namespace for abstracting the interface to nn::gc and nn::sdmmc. A tiny bit of the namespace has been added so we can create mock SD card handles for SaveDataIndexerManager.

ReferenceCountedDisposable<T> is now being used for returning ISaveDataInfoReader objects from IFileSystemProxy. I've tried coming up with a pattern to cleanly return a ReferenceCountedDisposable<T>, but the lack of features like RAII or move semantics makes this difficult without either lots of allocations or lots of boilerplate code.
2020-08-07 10:02:50 -07:00
Alex Barney
37251968c0 Add FlatMapKeyValueStore with tests 2020-08-07 10:02:50 -07:00
Alex Barney
672a0016b3 Use "in" instead of "ref" for read-only SpanHelper methods 2020-08-07 10:02:50 -07:00
Alex Barney
717e54fe4e Rename TitleId to ProgramId and add other NCM ID types 2020-08-07 10:02:50 -07:00
Alex Barney
3819cfdca7 Flesh out NCA encryption
Allows opening decrypted NCAs.
Allows opening encrypted and decrypted storages of any NCA, whether encrypted or decrypted.
hactoolnet: Allow saving an encrypted version of any NCA.
2020-07-24 22:41:45 -07:00
Xpl0itR
e0ddf17945 Implement function in NCA class to re-encrypt decrypted NCAs 2020-07-24 22:41:45 -07:00
leo60228
c56c8ba8ed Include title ID in --listapps when possible 2020-07-24 15:35:20 -07:00
Alex Barney
7dd21ae05b SubStorage in AesXtsFile should be resizable 2020-07-06 11:43:48 -07:00
Alex Barney
ff96c8575b Use "Result" and "Success" asserts in tests 2020-07-06 11:43:48 -07:00
Alex Barney
d04e713356 Add some docs to SubStorage 2020-07-06 11:43:48 -07:00
Alex Barney
d7ae809cf3 Add TruncatedSubStorage 2020-07-06 11:43:48 -07:00
Alex Barney
e9c38dc7ba Remove old SubStorage 2020-07-06 11:43:48 -07:00
Alex Barney
f02c84e8dd Add ReferenceCountedDisposable<T>
This class is meant to be used in the same types of places std::shared_ptr is used but with manual instead of automatic ref counting.

SubStorage now uses the class to optionally dispose its base storage object.
2020-07-06 11:43:48 -07:00
Alex Barney
b6eac5ddb5 Rename Util class to Utilities
Preparation to split it up into the Util namespace and to add nn::util code
2020-07-06 11:43:48 -07:00
Alex Barney
88983d39e5 Remove use of code that involves reflection
This allows over 40% of the CoreRT native binary size to be removed by removing reflection capabilities.

The "--noreflection" option for the build script can be used to build hactoolnet with no reflection.

The Linux build won't always work because creating a new thread for the progress bar runs into some issue with EventSource being removed.
2020-06-27 16:28:32 -07:00
Alex Barney
d3c95d14d3
Merge pull request #147 from Thealexbarney/bucket-tree
Add more accurate BucketTree and IndirectStorage classes to replace the old ones.
Add a bucket tree builder.
2020-06-26 20:22:37 -07:00
Alex Barney
83dc874df1 Rent arrays in BucketTree.Visitor 2020-06-26 09:11:06 -07:00
Alex Barney
33b414a15c Remove old BucketTree 2020-06-25 20:50:54 -07:00
Alex Barney
d3abdeacc4 Use the new BucketTree in Aes128CtrExStorage 2020-06-25 19:03:51 -07:00
Alex Barney
33af34cefc Rewrite IndirectStorage 2020-06-25 15:26:55 -07:00
Alex Barney
c2247e583f Address compiler warnings 2020-06-19 22:01:22 -07:00
Alex Barney
4b4b354a7e Use IStorage for the bucket tree builder instead of Spans 2020-06-19 22:01:22 -07:00