<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://switchbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Paeton</id>
	<title>Nintendo Switch Brew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://switchbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Paeton"/>
	<link rel="alternate" type="text/html" href="https://switchbrew.org/wiki/Special:Contributions/Paeton"/>
	<updated>2026-05-11T06:00:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=7896</id>
		<title>Filesystem services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=7896"/>
		<updated>2019-09-15T15:10:57Z</updated>

		<summary type="html">&lt;p&gt;Paeton: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= fsp-ldr =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IFileSystemProxyForLoader&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#OpenCodeFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#IsArchivedProgram]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] [[#SetCurrentProcess]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OpenCodeFileSystem ==&lt;br /&gt;
Takes an u64 TitleId and a [[#ContentPath]]. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
== IsArchivedProgram ==&lt;br /&gt;
Takes an u64 ProcessId. Returns a bool (1 if the process id&#039;s [[#ContentPath]] ends in &amp;quot;.nca&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== SetCurrentProcess ==&lt;br /&gt;
Takes a PID descriptor.&lt;br /&gt;
&lt;br /&gt;
= fsp-pr =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IProgramRegistry&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#RegisterProgram]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#UnregisterProgram]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] [[#SetCurrentProcess]]&lt;br /&gt;
|-&lt;br /&gt;
| 256 || [[#SetEnabledProgramVerification]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RegisterProgram ==&lt;br /&gt;
Takes a storageID, a pid, a titleID, a 0x1C type-A buffer for the [[NPDM#FS_Access_Header| FS Access Header]], and a 0x2C type-A buffer for the [[NPDM#FS_Access_Control| FS Access Control]]&lt;br /&gt;
&lt;br /&gt;
Final FS permissions are stored as (ACI0_perms &amp;amp; ACID_perms). Will panic(svcBreak) when buffer sizes from ipc-rawdata are invalid.&lt;br /&gt;
&lt;br /&gt;
== UnregisterProgram ==&lt;br /&gt;
Takes a pid. Removes registered FS permissions for that PID.&lt;br /&gt;
&lt;br /&gt;
== SetEnabledProgramVerification ==&lt;br /&gt;
Seems to sets a global flag to inputval &amp;amp; 1.&lt;br /&gt;
&lt;br /&gt;
When the flag is zero, it will set ret=0 instead of ret={error} when verifying the fixed-key [[NPDM]] ACID signature fails. This also skips verifying the [[NCA_Format|NCA Header]] signature using the ACID key. Note that if verifying the fixed-key ACID signature is successful, and verifying the ACID-key NCA header signature fails, it will throw an error and abort.&lt;br /&gt;
&lt;br /&gt;
= fsp-srv =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IFileSystemProxy&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [1.0.0] [[#OpenFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#SetCurrentProcess]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || OpenDataFileSystemByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [2.0.0+] [[#OpenFileSystemWithPatch]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [2.0.0+] [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [3.0.0+] OpenDataFileSystemByProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || InvalidateBisCache&lt;br /&gt;
|-&lt;br /&gt;
| 17 || OpenHostFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 18 || OpenSdCardFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [2.0.0+] FormatSdCardFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#DeleteSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [[#CreateSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [[#CreateSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 24 || RegisterSaveDataFileSystemAtomicDeletion&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [2.0.0+] DeleteSaveDataFileSystemBySaveDataSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 26 || [2.0.0+] FormatSdCardDryRun&lt;br /&gt;
|-&lt;br /&gt;
| 27 || [2.0.0+] IsExFatSupported&lt;br /&gt;
|-&lt;br /&gt;
| 28 || [4.0.0+] DeleteSaveDataFileSystemBySaveDataAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [[#OpenGameCardStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [[#OpenGameCardFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [3.0.0+] ExtendSaveDataFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 33 || [5.0.0+] DeleteCacheStorage&lt;br /&gt;
|-&lt;br /&gt;
| 34 || [5.0.0+] GetCacheStorageSize&lt;br /&gt;
|-&lt;br /&gt;
| 35 || [6.0.0+] [[#CreateSaveDataFileSystemWithHashSalt]]&lt;br /&gt;
|-&lt;br /&gt;
| 36 || [9.0.0+] OpenHostFileSystemWithOption&lt;br /&gt;
|-&lt;br /&gt;
| 51 || [[#OpenSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 52 || [[#OpenSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 53 || [2.0.0+] OpenReadOnlySaveDataFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 57 || [3.0.0+] [[#ReadSaveDataFileSystemExtraDataBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| 58 || [[#ReadSaveDataFileSystemExtraData]]&lt;br /&gt;
|-&lt;br /&gt;
| 59 || [2.0.0+] WriteSaveDataFileSystemExtraData&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [[#OpenSaveDataInfoReader]]&lt;br /&gt;
|-&lt;br /&gt;
| 61 || [[#OpenSaveDataInfoReaderBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| 62 || [5.0.0+] OpenSaveDataInfoReaderOnlyCacheStorage&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [5.0.0+] OpenSaveDataInternalStorageFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [5.0.0+] UpdateSaveDataMacForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [5.0.0+] WriteSaveDataFileSystemExtraDataWithMask&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [6.0.0+] [[#FindSaveDataWithFilter]]&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [6.0.0+] [[#OpenSaveDataInfoReaderWithFilter]]&lt;br /&gt;
|-&lt;br /&gt;
| 69 || [8.0.0+] ReadSaveDataFileSystemExtraDataBySaveDataAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 70 || [8.0.0+] WriteSaveDataFileSystemExtraDataBySaveDataAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 80 || OpenSaveDataMetaFile&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [4.0.0+] [[#OpenSaveDataTransferManager]]&lt;br /&gt;
|-&lt;br /&gt;
| 82 || [5.0.0+] [[#OpenSaveDataTransferManagerVersion2]]&lt;br /&gt;
|-&lt;br /&gt;
| 83 || [6.0.0+] [[#OpenSaveDataTransferProhibiter]]&lt;br /&gt;
|-&lt;br /&gt;
| 84 || [6.0.0+] [[#ListAccessibleSaveDataOwnerId]]&lt;br /&gt;
|-&lt;br /&gt;
| 85 || [9.0.0+] [[#OpenSaveDataTransferManagerForSaveDataRepair]]&lt;br /&gt;
|-&lt;br /&gt;
| 100 || OpenImageDirectoryFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 110 || [[#OpenContentStorageFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 120 || [6.0.0+] [[#OpenCloudBackupWorkStorageFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 130 || [7.0.0+] [[#OpenCustomStorageFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 200 || OpenDataStorageByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 201 || [3.0.0+] OpenDataStorageByProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 202 || [[#OpenDataStorageByDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 203 || OpenPatchDataStorageByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 204 || [7.0.0+] [[#OpenDataFileSystemWithProgramIndex]]&lt;br /&gt;
|-&lt;br /&gt;
| 205 || [7.0.0+] [[#OpenDataStorageWithProgramIndex]]&lt;br /&gt;
|-&lt;br /&gt;
| 400 || [[#OpenDeviceOperator]]&lt;br /&gt;
|-&lt;br /&gt;
| 500 || [[#OpenSdCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 501 || [[#OpenGameCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 510 || [5.0.0+] OpenSystemDataUpdateEventNotifier&lt;br /&gt;
|-&lt;br /&gt;
| 511 || [5.0.0+] NotifySystemDataUpdateEvent&lt;br /&gt;
|-&lt;br /&gt;
| 520 || [6.0.0+] [[#SimulateDeviceDetectionEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 600 || [1.0.0-3.0.2] SetCurrentPosixTime&lt;br /&gt;
|-&lt;br /&gt;
| 601 || QuerySaveDataTotalSize&lt;br /&gt;
|-&lt;br /&gt;
| 602 || [[#VerifySaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 603 || CorruptSaveDataFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 604 || CreatePaddingFile&lt;br /&gt;
|-&lt;br /&gt;
| 605 || DeleteAllPaddingFiles&lt;br /&gt;
|-&lt;br /&gt;
| 606 || [2.0.0+] GetRightsId&lt;br /&gt;
|-&lt;br /&gt;
| 607 || [2.0.0+] RegisterExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 608 || [2.0.0+] UnregisterAllExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 609 || [2.0.0+] GetRightsIdByPath&lt;br /&gt;
|-&lt;br /&gt;
| 610 || [3.0.0+] GetRightsIdAndKeyGenerationByPath&lt;br /&gt;
|-&lt;br /&gt;
| 611 || [4.0.0+] SetCurrentPosixTimeWithTimeDifference&lt;br /&gt;
|-&lt;br /&gt;
| 612 || [4.0.0+] GetFreeSpaceSizeForSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 613 || [4.0.0+] VerifySaveDataFileSystemBySaveDataSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 614 || [4.0.0+] CorruptSaveDataFileSystemBySaveDataSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 615 || [5.0.0+] QuerySaveDataInternalStorageTotalSize&lt;br /&gt;
|-&lt;br /&gt;
| 616 || [6.0.0+] [[#GetSaveDataCommitId]]&lt;br /&gt;
|-&lt;br /&gt;
| 617 || [7.0.0+] UnregisterExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 620 || [2.0.0+] [[#SetSdCardEncryptionSeed]]&lt;br /&gt;
|-&lt;br /&gt;
| 630 || [4.0.0+] SetSdCardAccessibility&lt;br /&gt;
|-&lt;br /&gt;
| 631 || [4.0.0+] IsSdCardAccessible&lt;br /&gt;
|-&lt;br /&gt;
| 640 || [4.0.0-7.0.1] IsSignedSystemPartitionOnSdCardValid&lt;br /&gt;
|-&lt;br /&gt;
| 700 || [5.0.0+] [[#OpenAccessFailureDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 701 || [5.0.0+] GetAccessFailureDetectionEvent&lt;br /&gt;
|-&lt;br /&gt;
| 702 || [5.0.0+] IsAccessFailureDetected&lt;br /&gt;
|-&lt;br /&gt;
| 710 || [5.0.0+] ResolveAccessFailure&lt;br /&gt;
|-&lt;br /&gt;
| 720 || [5.0.0+] AbandonAccessFailure&lt;br /&gt;
|-&lt;br /&gt;
| 800 || [2.0.0+] GetAndClearErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 810 || [7.0.0+] RegisterProgramIndexMapInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || SetBisRootForHost&lt;br /&gt;
|-&lt;br /&gt;
| 1001 || [[#SetSaveDataSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 1002 || [[#SetSaveDataRootPath]]&lt;br /&gt;
|-&lt;br /&gt;
| 1003 || DisableAutoSaveDataCreation&lt;br /&gt;
|-&lt;br /&gt;
| 1004 || [[#SetGlobalAccessLogMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 1005 || [[#GetGlobalAccessLogMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 1006 || [[#OutputAccessLogToSdCard]]&lt;br /&gt;
|-&lt;br /&gt;
| 1007 || [4.0.0+] RegisterUpdatePartition&lt;br /&gt;
|-&lt;br /&gt;
| 1008 || [4.0.0+] OpenRegisteredUpdatePartition&lt;br /&gt;
|-&lt;br /&gt;
| 1009 || [4.0.0+] GetAndClearMemoryReportInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1010 || [5.1.0-6.2.0] SetDataStorageRedirectTarget&lt;br /&gt;
|-&lt;br /&gt;
| 1011 || [7.0.0+] [[#GetProgramIndexForAccessLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 1012 || [9.0.0+] GetFsStackUsage&lt;br /&gt;
|-&lt;br /&gt;
| 1013 || [9.0.0+] UnsetSaveDataRootPath&lt;br /&gt;
|-&lt;br /&gt;
| 1100 || [4.0.0+] OverrideSaveDataTransferTokenSignVerificationKey&lt;br /&gt;
|-&lt;br /&gt;
| 1110 || [6.0.0+] CorruptSaveDataFileSystemByOffset&lt;br /&gt;
|-&lt;br /&gt;
| 1200 || [6.0.0+] [[#OpenMultiCommitManager]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Permissions ==&lt;br /&gt;
Every time permissions are checked, the process registration [[#fsp-pr]] is loaded using the session processID. The permission data is populated with data from the [[NPDM]].&lt;br /&gt;
&lt;br /&gt;
If the processID is &amp;lt;= 6 (which happens only for built-in sysmodules), it will use a hardcoded registration data. The default mask in this case is 0x8000000000000000.&lt;br /&gt;
&lt;br /&gt;
Note that the functions check whether or not at least one bit is set in the mask. This means that, you don&#039;t need to set 0xFFFFFFFFFFFFFFFF to get all permissions: it suffices to set 0x8000000000000000.&lt;br /&gt;
&lt;br /&gt;
If the code were to request an invalid input type, panic. But this never happens.&lt;br /&gt;
&lt;br /&gt;
=== RwPermissions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Name || Value || Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8000000000000801 || CanMountLogo || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1 || 0x8000000000000801 || CanMountContentMeta || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x2 || 0x8000000000000801 || CanMountContentControl || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x3 || 0x8000000000000801 || CanMountContentManual || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x8000000000000801 || CanMountContentData || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5 || 0x8000000000000801 || CanMountApplicationPackage || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || 0x8000000000000000 || CanMountSaveDataStorage || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x7 || 0x8000000000000800 || CanMountContentStorage || 3 || [[#OpenContentStorageFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000001000 || CanMountImageAndVideoStorage || 3 || [[#OpenImageDirectoryFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x8000000200000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000084) || CanMountCloudBackupWorkStorage || 3 || OpenCloudBackupWorkStorageFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x8000000000000000&amp;lt;br/&amp;gt;([7.0.0-7.0.1] 0x4000000000000000)&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000084)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000080) || CanMountCustomStorage || 3 || OpenCustomStorageFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || 0x8000000000000084&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000080)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000008080) || CanMountBisCalibrationFile || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x8000000000000080&amp;lt;br/&amp;gt;([1.0.0-6.2.0] 0x8000000000008080) || CanMountBisSafeMode || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x8000000000008080&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000080) || CanMountBisUser || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0x8000000000008080&amp;lt;br/&amp;gt;([3.0.0-6.2.0] 0x8000000000000080)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0xC000000000200000) || CanMountBisSystem || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000000080&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0xC000000000200000)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000010) || CanMountBisSystemProperEncryption || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8000000000000080&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0xC000000000200000&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000000010)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000040020) || CanMountBisSystemProperPartition || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0xC000000000200000&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000010)&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000040020)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000028) || CanMountSdCard || 3 || [[#OpenSdCardFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 0x8000000000000010&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000040020)&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000000028)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000020) || CanMountGameCard || 3 || [[#OpenGameCardFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 0x8000000000040020&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000028)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000020) || CanMountDeviceSaveData || 3 || [[#OpenSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x8000000000000028&amp;lt;br/&amp;gt;([3.0.0-6.2.0] 0x8000000000000020)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000010082) || CanMountSystemSaveData || 3 || [[#OpenSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0x8000000000000020&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000010082)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000010080) || CanMountOthersSaveData || 3 || [[#OpenSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || 0x8000000000000020&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000010082)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000010080) || CanMountOthersSystemSaveData || 3 || [[#OpenSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || 0x8000000000010082&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000010080)&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000000080)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000010080) || CanOpenBisPartitionBootPartition1Root || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x8000000000010080&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000080)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000010080) || CanOpenBisPartitionBootPartition2Root || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || 0x8000000000000080&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000010080) || CanOpenBisPartitionUserDataRoot || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || 0x8000000000010080 || CanOpenBisPartitionBootConfigAndPackage2Part1 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || 0x8000000000010080 || CanOpenBisPartitionBootConfigAndPackage2Part2 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || 0x8000000000010080 || CanOpenBisPartitionBootConfigAndPackage2Part3 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || 0x8000000000010080&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000084) || CanOpenBisPartitionBootConfigAndPackage2Part4 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || 0x8000000000010080&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000084) || CanOpenBisPartitionBootConfigAndPackage2Part5 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1F || 0x8000000000010080&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000084)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000080) || CanOpenBisPartitionBootConfigAndPackage2Part6 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x8000000000000084&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000080) || CanOpenBisPartitionCalibrationBinary || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x21 || 0x8000000000000084&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000080) || CanOpenBisPartitionCalibrationFile || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x22 || 0x8000000000000080 || CanOpenBisPartitionSafeMode || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x23 || 0x8000000000000080&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0xC000000000200000) || CanOpenBisPartitionUser || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || 0x8000000000000080&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000100) || CanOpenBisPartitionSystem || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x25 || 0x8000000000000080&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0xC000000000200000)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000100008) || CanOpenBisPartitionSystemProperEncryption || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x26 || 0x8000000000000080&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0xC000000000200000)&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000000100)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0xC000000000400000) || CanOpenBisPartitionSystemProperPartition || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0+] 0x27 || 0xC000000000200000&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000100)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000100008) || CanOpenSdCardStorage || ||&lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0+] 0x28 || 0x8000000000000100&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000100008)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0xC000000000400000) || CanOpenGameCardStorage || 3 || [[#OpenGameCardStorage]], [[#EraseGameCard]] (bit1), [[#WriteToGameCard]] (bit1), [[#GetGameCardErrorInfo]] (bit1), [[#EraseAndWriteParamDirectly]] (bit1), [[#ReadParamDirectly]] (bit1), [[#ForceEraseGameCard]] (bit1) &lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x29 || 0x8000000000100008&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0xC000000000400000)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000010000) || CanMountSystemDataPrivate || 1 || [[#OpenFileSystem]], [[#OpenDataStorageByDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2A || 0xC000000000400000&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000010000)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000000) || CanMountHost || 3 || [[#OpenHostFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x2B || 0x8000000000010000&amp;lt;br/&amp;gt;([1.0.0-6.2.0]0x8000000000000000) || CanMountRegisteredUpdatePartition || 1 || [[#OpenRegisteredUpdatePartition]]&lt;br /&gt;
|-&lt;br /&gt;
| [7.0.0+] 0x2C || 0x8000000000000000 || CanOpenSaveDataInternalStorage || 3 || [[#OpenSaveDataInternalStorageFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| [7.0.0+] 0x2D || 0x0000000000000000 || CanNotMountCustomStorage || 3 || OpenCustomStorageFileSystem&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== BoolPermissions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Name || Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8000000000000080 || CanInvalidateBisCache || [[#InvalidateBisCache]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1 || 0x8000000000000080 || CanEraseMmc || [[#EraseMmc]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x2 || 0x8000000000000010 || CanGetGameCardDeviceCertificate || [[#GetGameCardDeviceCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x3 || 0x8000000000000010 || CanGetGameCardIdSet || [[#GetGameCardIdSet]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x8000000000000200 || CanFinalizeGameCardDriver || [[#FinalizeGameCardDriver]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5 || 0x8000000000000200 || CanGetGameCardAsicInfo || [[#GetGameCardAsicInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || 0x8000000000002020 || CanCreateSaveData || [[#CreateSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x7 || 0x8000000000000060 || CanDeleteSaveData || [[#DeleteSaveDataFileSystem]], [[#RegisterSaveDataFileSystemAtomicDeletion]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000000028 || CanCreateSystemSaveData || [[#CreateSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x8000000000000020 || CanCreateOthersSystemSaveData || [[#CreateSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x8000000000004028 || CanDeleteSystemSaveData || [[#DeleteSaveDataFileSystem]], [[#RegisterSaveDataFileSystemAtomicDeletion]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || 0x8000000000000060 || CanOpenSaveDataInfoReader || [[#OpenSaveDataInfoReaderBySaveDataSpaceId]], [[#OpenSaveDataInfoReader]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x8000000000004020 || CanOpenSaveDataInfoReaderForSystem || [[#OpenSaveDataInfoReaderBySaveDataSpaceId]], [[#OpenSaveDataInfoReader]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x8000000000000040&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000020000) || CanOpenSaveDataInfoReaderForInternal || OpenSaveDataInfoReaderWithFilter&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0x8000000000020000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000400) || CanOpenSaveDataMetaFile || [[#OpenSaveDataMetaFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000000400&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000004060) || CanSetCurrentPosixTime || [[#SetCurrentPosixTime]], [[#SetCurrentPosixTimeWithTimeDifference]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8000000000004060&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000080000) || CanReadSaveDataFileSystemExtraData || [[#ReadSaveDataFileSystemExtraData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x8000000000080000 || CanSetGlobalAccessLogMode || [[#SetGlobalAccessMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 0x8000000000080000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] Invalid) || CanSetSpeedEmulationMode || [[#SetSpeedEmulationMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || Invalid&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0xC000000000800000) || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0xC000000000800000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0xC000000001000000) || CanFillBis || [[#CreatePaddingFile]], [[#DeleteAllPaddingFiles]] &lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0xC000000001000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000001000060)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0xC000000002000000) || CanCorruptSaveData || [[#CorruptSaveDataFileSystem]], [[#CorruptSaveDataFileSystemBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x16 || 0x8000000001000060&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000000060)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000004000000) || CanCorruptSystemSaveData || [[#CorruptSaveDataFileSystem]], [[#CorruptSaveDataFileSystemBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x17 || 0x8000000000000060&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0xC000000002000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000008000000) || CanVerifySaveData || [[#VerifySaveDataFileSystem]], [[#VerifySaveDataFileSystemBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x18 || 0xC000000002000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000004000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000010000000) || CanDebugSaveData || [[#CreateSaveDataFileSystem]], [[#OpenSaveDataFileSystem]], [[#SetSaveDataRootPath]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x19 || 0x8000000004000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000008000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000000800) || CanFormatSdCard || [[#FormatSdCardFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x1A || 0x8000000008000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000010000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000004020) || CanGetRightsId || [[#GetRightsId]], [[#GetRightsIdAndKeyGenerationByPath]], [[#GetRightsIdByPath]]&lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0+] 0x1B || 0x8000000010000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000000800)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000002020) || CanRegisterExternalKey || [[#RegisterExternalKey]], [[#UnregisterAllExternalKey]]&lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0+] 0x1C || 0x8000000000000800&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000004020)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000000028) || CanSetEncryptionSeed || [[#SetSdCardEncryptionSeed]]&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x1D || 0x8000000000000020&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000020000000) || CanWriteSaveDataFileSystemExtraDataTimeStamp || [[#WriteSaveDataFileSystemExtraData]], [[#WriteSaveDataFileSystemExtraDataWithMask]]&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x1E || 0x8000000000004020&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000002020)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000040000000) || CanWriteSaveDataFileSystemExtraDataFlags || [[#WriteSaveDataFileSystemExtraData]], [[#WriteSaveDataFileSystemExtraDataWithMask]]&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x1F || 0x8000000000000020&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000000028)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000000000) || CanWriteSaveDataFileSystemExtraDataCommitId || [[#WriteSaveDataFileSystemExtraData]], [[#WriteSaveDataFileSystemExtraDataWithMask]]&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x20 || 0x8000000000000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000020000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000000000) || CanWriteSaveDataFileSystemExtraDataAll || [[#WriteSaveDataFileSystemExtraData]], [[#WriteSaveDataFileSystemExtraDataWithMask]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x21 || 0x8000000000002020&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000040000000) || CanExtendSaveData || [[#ExtendSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x22 || 0x8000000000000028&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000002) || CanExtendSystemSaveData || [[#ExtendSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x23 || 0x8000000020000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000000) || CanRegisterUpdatePartition || [[#RegisterUpdatePartition]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x24 || 0x8000000040000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000000) || CanOpenSaveDataTransferManager || [[#OpenSaveDataTransferManager]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x25 || 0x8000000200000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080200000) || CanOpenSaveDataTransferManagerVersion2 || [[#OpenSaveDataTransferManagerVersion2]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x26 || 0x8000000200002000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080000110) || CanOpenOpenSaveDataTransferProhibiter || [[#OpenSaveDataTransferProhibiter]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x27 || 0x8000000240002000 &amp;lt;br/&amp;gt;([6.0.0-7.0.1] 0x8000000200002000)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000100008) || CanListAccessibleSaveDataOwnerId || ListAccessibleSaveDataOwnerId&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x28 || 0x8000000000000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080010000) || CanControlMmcPatrol || [[#SuspendMmcPatrol]], [[#ResumeMmcPatrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x29 || 0x8000000000000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanOverrideSaveDataTransferTokenSignVerificationKey || [[#OverrideSaveDataTransferTokenSignVerificationKey]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2A || 0x8000000080200000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanOpenSdCardDetectionEventNotifier || [[#OpenSdCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2B || 0x8000000080000110&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanOpenGameCardDetectionEventNotifier || [[#OpenGameCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2C || 0x8000000000100008&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanOpenSystemDataUpdateEventNotifier || [[#OpenSystemDataUpdateEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2D || 0x8000000000010000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanNotifySystemDataUpdateEvent || [[#NotifySystemDataUpdateEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2E || 0x8000000100000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000040000000) || CanOpenAccessFailureDetectionEventNotifier || [[#OpenAccessFailureDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2F || 0x8000000100000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080200000) || CanGetAccessFailureDetectionEvent || [[#GetAccessFailureDetectionEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.1.0+] 0x30 || 0x8000000100000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080080000) || CanIsAccessFailureDetected || [[#IsAccessFailureDetected]] &lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x31 || 0x8000000100000000 || CanResolveAccessFailure || [[#ResolveAccessFailure]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x32 || 0x8000000100000000 || CanAbandonAccessFailure || [[#AbandonAccessFailure]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x33 || 0x8000000040000000 || CanQuerySaveDataInternalStorageTotalSize || [[#QuerySaveDataInternalStorageTotalSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x34 || 0x8000000200000020 || CanGetSaveDataCommitId || [[#GetSaveDataCommitId]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x35 || 0x8000000000200000 || CanSetSdCardAccessibility || [[#SetSdCardAccessibility]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x36 || 0x4000000000000000 || CanSimulateDevice || SimulateDeviceDetectionEvent, SetSimulationEvent, ClearSimulationEvent&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x37 || 0x8000000000000000&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000080000) || CanCreateSaveDataWithHashSalt || [[#CreateSaveDataFileSystem]], CreateSaveDataFileSystemWithHashSalt&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x38 || 0x8000000400000000&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000000) || CanRegisterProgramIndexMapInfo || RegisterProgramIndexMapInfo&lt;br /&gt;
|-&lt;br /&gt;
| [8.0.0+] 0x39 || 0x8000000000000010 || CanChallengeCardExistence || ChallengeCardExistence&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OpenFileSystem ==&lt;br /&gt;
Takes a type-0x19 input buffer (ContentPath) and a [[#FileSystemType]] as parameters. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
[2.0.0+] This function was removed.&lt;br /&gt;
&lt;br /&gt;
== SetCurrentProcess ==&lt;br /&gt;
Takes a pid-descriptor.&lt;br /&gt;
&lt;br /&gt;
== OpenFileSystemWithPatch ==&lt;br /&gt;
Takes an input [[#FileSystemType]] and an u64 title-id. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Web-applet loads the [[#FileSystemType]] (which must be &#039;&#039;&#039;ContentManual&#039;&#039;&#039;) from u32_table[inparam].&lt;br /&gt;
&lt;br /&gt;
Note: web-applet strings refer to both this cmd and [[#OpenFileSystemWithId]] as &amp;quot;MountContent&amp;quot;, but official nn_sf_sync symbols use &amp;quot;OpenXX&amp;quot; names.&lt;br /&gt;
&lt;br /&gt;
== OpenFileSystemWithId ==&lt;br /&gt;
Takes a type-0x19 input buffer, an [[#FileSystemType]] and an u64 title-id. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
The [[#IFileSystem]] must be &#039;&#039;&#039;ContentMeta&#039;&#039;&#039; if the NCA type is 0 (control).&lt;br /&gt;
&lt;br /&gt;
The input buffer is the output string path from [[NS_Services#GetApplicationContentPath|GetApplicationContentPath]].&lt;br /&gt;
&lt;br /&gt;
May return errors when attempting to access NCA-paths for an update-title with a gamecard, when the gamecard isn&#039;t inserted. May return error 0x7D402 in some cases with update-titles. Non-val2 in32 values with NCA-type1 are unusable, even for normal titles.&lt;br /&gt;
&lt;br /&gt;
The official &amp;quot;MountApplicationPackage&amp;quot; func uses this with in64=0 and [[#FileSystemType]] &#039;&#039;&#039;ApplicationPackage&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
After the [[#FileSystemType]] specific permissions are checked, it then gets the func retval for permissions-type 0x25 and func0.&lt;br /&gt;
&lt;br /&gt;
When [[#FileSystemType]] is &#039;&#039;&#039;ContentMeta&#039;&#039;&#039;, it uses in64=0xffffffffffffffff internally, otherwise it checks if in64 is set to 0xffffffffffffffff then throws an error if so. When the in64 used internally is not 0xffffffffffffffff, it&#039;s compared with the NCA titleID, then an error is thrown on mismatch.&lt;br /&gt;
&lt;br /&gt;
== OpenBisFileSystem ==&lt;br /&gt;
Takes a type-0x19 input buffer string and a u32 [[Flash_Filesystem|Bis partitionID]]. Official user-process code sets instr[0] = 0 normally. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Only partitionIDs for FAT partitions are usable with this, otherwise error 0x2EE202 is returned. Seems to be about the same as [[#OpenBisStorage]] except this mounts the partition filesystem instead of allowing direct access to the partition sectors.&lt;br /&gt;
&lt;br /&gt;
== OpenBisStorage ==&lt;br /&gt;
Takes a u32 partition ID, returns 0x2EE202 for partitions which do not exist, 0x320002 for partitions which cannot be opened and a valid [[#IStorage]] handle otherwise.&lt;br /&gt;
&lt;br /&gt;
== InvalidateBisCache ==&lt;br /&gt;
Seems to invalidate the Bis cache for MBR/GPT after overwriting that data via the OpenBisStorage IStorage. Used by [[SystemInitializer]].&lt;br /&gt;
&lt;br /&gt;
== DeleteSaveDataFileSystem ==&lt;br /&gt;
Takes an input u64.&lt;br /&gt;
&lt;br /&gt;
== CreateSaveDataFileSystem ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry, a 0x40-byte SaveCreate-struct entry, and a 0x10-byte input struct.&lt;br /&gt;
&lt;br /&gt;
Only the first 0x5-bytes in the 0x10-byte struct are initialized: all-zero when automatically creating savedata during savecommon mount by official user-processes. In the dedicated save-creation code in official user-processes: +0 u32 = 0x40060, +4 u8 = 1.&lt;br /&gt;
&lt;br /&gt;
Creates regular savedata.&lt;br /&gt;
&lt;br /&gt;
== CreateSaveDataFileSystemBySystemSaveDataId ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry and a 0x40-byte SaveCreate-struct entry.&lt;br /&gt;
&lt;br /&gt;
Creates savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardStorage ==&lt;br /&gt;
Takes two input u32s (gamecard handle, partition ID), and returns an [[#IStorage]] for the [[Gamecard_Format|partition]].&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardFileSystem ==&lt;br /&gt;
Takes two input u32s, with the second u32 located at +4 in rawdata after the first u32. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts a [[Gamecard_Partition|gamecard partition]].&lt;br /&gt;
&lt;br /&gt;
== CreateSaveDataFileSystemWithHashSalt ==&lt;br /&gt;
Takes a total of 0xB0-bytes of input, no output.&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataFileSystem ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and a 0x40-byte Save-struct entry. Official user-process code is only known to use value 1 for the u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Permissions aren&#039;t checked until the specified save is successfully found.&lt;br /&gt;
&lt;br /&gt;
Only one process (specifically only one [[#IFileSystem]] session) can mount a given savedata at any given time (this includes SystemSaveData).&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataFileSystemBySystemSaveDataId ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and a 0x40-byte Save-struct entry. Web-applet only uses value0 for the input u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== ReadSaveDataFileSystemExtraDataBySaveDataSpaceId ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], an input u64 saveID, and a type-0x6 output buffer containing the [[#SaveDataFileSystemExtraData]].&lt;br /&gt;
&lt;br /&gt;
== ReadSaveDataFileSystemExtraData ==&lt;br /&gt;
Takes an input u64 saveID and a type-0x6 output buffer containing the [[#SaveDataFileSystemExtraData]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataInfoReader ==&lt;br /&gt;
No input, returns an output [[#ISaveDataInfoReader]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataInfoReaderBySaveDataSpaceId ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], returns an output [[#ISaveDataInfoReader]].&lt;br /&gt;
&lt;br /&gt;
== FindSaveDataWithFilter ==&lt;br /&gt;
Takes a total of 0x50-bytes of input, returns 8-bytes of output and a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataInfoReaderWithFilter ==&lt;br /&gt;
Takes a total of 0x50-bytes of input, returns an [[#ISaveDataInfoReader]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataTransferManager ==&lt;br /&gt;
No input, returns an [[#ISaveDataTransferManager]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataTransferManagerVersion2 ==&lt;br /&gt;
No input, returns an [[#ISaveDataTransferManagerWithDivision]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataTransferProhibiter ==&lt;br /&gt;
Takes an input u64, returns an [[#ISaveDataTransferProhibiter]].&lt;br /&gt;
&lt;br /&gt;
== ListAccessibleSaveDataOwnerId ==&lt;br /&gt;
Takes a total of 0x10-bytes of input, returns 4-bytes of output and a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataTransferManagerForSaveDataRepair ==&lt;br /&gt;
No input, returns an output [[#ISaveDataTransferManagerForSaveDataRepair]].&lt;br /&gt;
&lt;br /&gt;
== OpenContentStorageFileSystem ==&lt;br /&gt;
Takes a [[#ContentStorageId]]. Invalid values return 0x2EE202.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]] with NCA files. The read data from these files is identical to the data read by [[NCM_services#ReadContentIdFile]].&lt;br /&gt;
&lt;br /&gt;
== OpenCloudBackupWorkStorageFileSystem ==&lt;br /&gt;
Takes 4-bytes of input, returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
== OpenCustomStorageFileSystem ==&lt;br /&gt;
Takes a [[#CustomStorageId]]. Invalid values return 0x2EE202.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]] from either User:/CustomStorage0 or Sdcard:/Nintendo/CustomStorage0. If on the SD card, an AesXtsFileSystem is created using a key source specifically for custom storage.&lt;br /&gt;
&lt;br /&gt;
== OpenDataStorageByDataId ==&lt;br /&gt;
Takes a [[#StorageId]] and a TitleID.&lt;br /&gt;
&lt;br /&gt;
Returns a [[IPC_Marshalling#Domain_message|domain object ID]] implementing the [[#IStorage]] interface for data archives.&lt;br /&gt;
&lt;br /&gt;
== OpenDataFileSystemWithProgramIndex ==&lt;br /&gt;
Takes an input u8, returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
== OpenDataStorageWithProgramIndex ==&lt;br /&gt;
Takes an input u8, returns an [[#IStorage]].&lt;br /&gt;
&lt;br /&gt;
== OpenDeviceOperator ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IDeviceOperator]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenSdCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== SimulateDeviceDetectionEvent ==&lt;br /&gt;
Takes a total of 0xC-bytes of input, no output.&lt;br /&gt;
&lt;br /&gt;
== VerifySaveDataFileSystem ==&lt;br /&gt;
Takes an unknown input u64 and a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
The input u64 high-byte must be non-zero, otherwise an [[Error_codes|error]] is returned(0xE02).&lt;br /&gt;
&lt;br /&gt;
== GetSaveDataCommitId ==&lt;br /&gt;
Takes an input u8 and u64, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== SetSdCardEncryptionSeed ==&lt;br /&gt;
Takes in the 0x10 byte SD card encryption seed, and loads it into FS-module state.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]]-module reads the 0x10 bytes from SdCard:/Nintendo/Contents/private, and compares them to the first 0x10 bytes of the ns_appman:/private (in [[Flash_Filesystem#System_Savegames|system savedata]] 0x8000000000000043). If they match, NS calls this command using bytes 0x10-0x20 from ns_appman:/private. The rest of this file (0x1F0 bytes total) is (usually/always?) all-zero (however in some cases the byte at offset 0x20 is value 0x1).&lt;br /&gt;
&lt;br /&gt;
== OpenAccessFailureDetectionEventNotifier ==&lt;br /&gt;
Takes 8-bytes of input and returns an [[#IEventNotifier]].&lt;br /&gt;
&lt;br /&gt;
[8.0.0+] Now takes an additional 8-bytes of input.&lt;br /&gt;
&lt;br /&gt;
== SetSaveDataSize ==&lt;br /&gt;
Takes two input u64s &amp;quot;size&amp;quot; and &amp;quot;journal_size&amp;quot;, and writes them to fsp-srv object member variables.&lt;br /&gt;
&lt;br /&gt;
These variables are normally initialized with 32 MiB (0x2000000) and 16 MiB (0x1000000), respectively.&lt;br /&gt;
&lt;br /&gt;
These variables don&#039;t seem to be actually used anywhere else (?)&lt;br /&gt;
&lt;br /&gt;
== SetSaveDataRootPath ==&lt;br /&gt;
Takes an input path, and does snprintf(&amp;lt;fsp-srv object&amp;gt;-&amp;gt;m_save_data_root_path, FS_MAX_PATH-1, &amp;quot;/%s&amp;quot;, input_path);&lt;br /&gt;
&lt;br /&gt;
This path is normally all-zero. When this path is non-zero, the internal OpenSaveDataFileSystem function will create a DirectorySaveDataFileSystem if the target save is a user-save + a directory exists, instead of the normal savedata filesystem object.&lt;br /&gt;
&lt;br /&gt;
== SetGlobalAccessLogMode ==&lt;br /&gt;
Takes an input u32.&lt;br /&gt;
&lt;br /&gt;
== SetGlobalAccessLogMode ==&lt;br /&gt;
Takes an input u32.&lt;br /&gt;
&lt;br /&gt;
== GetGlobalAccessLogMode ==&lt;br /&gt;
Returns an output u32.&lt;br /&gt;
&lt;br /&gt;
GlobalAccessLogMode is normally 0.&lt;br /&gt;
&lt;br /&gt;
== OutputAccessLogToSdCard ==&lt;br /&gt;
Takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
The input buffer is the string to output to the log. User-processes normally include a newline at the end.&lt;br /&gt;
&lt;br /&gt;
User-processes only use this when the value previously loaded from [[#GetGlobalAccessLogMode]] has bit1 set.&lt;br /&gt;
&lt;br /&gt;
When bit1 in GlobalAccessLogMode is clear, FS-module will just return 0 for OutputAccessLogToSdCard. However even with that set the log doesn&#039;t show up SD, unknown why.&lt;br /&gt;
&lt;br /&gt;
The input buffer is written to the &amp;quot;$FsAccessLog:/FsAccessLog.txt&amp;quot; file, where &amp;quot;$FsAccessLog&amp;quot; is the SD-card mount-name. It&#039;s written to the current end of the file(appended).&lt;br /&gt;
&lt;br /&gt;
== GetProgramIndexForAccessLog ==&lt;br /&gt;
No input, returns two 32-bit values &amp;quot;version&amp;quot; and &amp;quot;program_index&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== OpenMultiCommitManager ==&lt;br /&gt;
No input, returns an output [[#IMultiCommitManager]].&lt;br /&gt;
&lt;br /&gt;
= IStorage =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IStorage&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This is the interface for a raw device, usually a block device.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Read]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#Write]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#Flush]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#SetSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#GetSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+] OperateRange&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Read ==&lt;br /&gt;
Takes a type-0x46 buffer, an offset and length.&lt;br /&gt;
&lt;br /&gt;
== Write ==&lt;br /&gt;
Takes a type-0x45 buffer, an offset and length.&lt;br /&gt;
&lt;br /&gt;
== Flush ==&lt;br /&gt;
No input.&lt;br /&gt;
&lt;br /&gt;
== SetSize ==&lt;br /&gt;
Takes a size.&lt;br /&gt;
&lt;br /&gt;
== GetSize ==&lt;br /&gt;
Returns a size.&lt;br /&gt;
&lt;br /&gt;
= IFileSystem =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IFileSystem&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are two main implementations of this interface:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;RomFS&#039;&#039;&#039;: Filesystem implementation statically linked in the binary. Uses an [[#IStorage]] interface as underlying raw device.&lt;br /&gt;
* &#039;&#039;&#039;IPC proxy&#039;&#039;&#039;: Used for all non-RomFS filesystems. In this case, actual filesystem implementation is in the FS process.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateFile&lt;br /&gt;
|-&lt;br /&gt;
| 1 || DeleteFile&lt;br /&gt;
|-&lt;br /&gt;
| 2 || CreateDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 3 || DeleteDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeleteDirectoryRecursively&lt;br /&gt;
|-&lt;br /&gt;
| 5 || RenameFile&lt;br /&gt;
|-&lt;br /&gt;
| 6 || RenameDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#GetEntryType]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [[#OpenFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#OpenDirectory]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#Commit]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#GetFreeSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#GetTotalSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [3.0.0+] [[#CleanDirectoryRecursively]]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [3.0.0+] [[#GetFileTimeStampRaw]]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [4.0.0+] QueryEntry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetEntryType ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns [[#DirectoryEntryType]] as an output u32.&lt;br /&gt;
&lt;br /&gt;
== OpenFile ==&lt;br /&gt;
Takes a type-0x19 input buffer for the path, and an u32 &#039;&#039;&#039;mode&#039;&#039;&#039;. &#039;&#039;&#039;mode&#039;&#039;&#039; controls how the file is opened, based on which bits are set:&lt;br /&gt;
&lt;br /&gt;
* When bit 0 is set, the file is Readable: you can use the Read operation.&lt;br /&gt;
* When bit 1 is set, the file is Writable: you can use the Write operation.&lt;br /&gt;
* When bit 2 is set, the file is Appendable: unless this bit is set, you will not be able to write beyond the end of a file (such writes will result in an error 0x307202)&lt;br /&gt;
&lt;br /&gt;
== OpenDirectory ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and an u64 &#039;&#039;&#039;filter_flags&#039;&#039;&#039;. &#039;&#039;&#039;filter_flags&#039;&#039;&#039; controls what type of entries are read by the [[#IDirectory]]: bitmask 0x1 = directories, bitmask 0x2 = files.&lt;br /&gt;
&lt;br /&gt;
== Commit ==&lt;br /&gt;
Like [https://3dbrew.org/wiki/FS:ControlArchive 3DS], this has to be used after writing to savedata for the changes to take affect.&lt;br /&gt;
&lt;br /&gt;
== GetFreeSpaceSize ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns an output byte-size u64 for the total free space with this FS.&lt;br /&gt;
&lt;br /&gt;
== GetTotalSpaceSize ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns an output byte-size u64 for the total space available with this FS(free+used).&lt;br /&gt;
&lt;br /&gt;
== CleanDirectoryRecursively ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and clears the contents of the directory specified in the path.&lt;br /&gt;
&lt;br /&gt;
== GetFileTimeStampRaw ==&lt;br /&gt;
Takes a type-0x19 input buffer for the path and returns a 0x20-byte struct. This contains 3 u64s and an u8.&lt;br /&gt;
&lt;br /&gt;
= IDirectory =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IDirectory&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Read]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetEntryCount]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Read ==&lt;br /&gt;
Takes a type-0x6 output buffer. Returns an output u64(?) for the total number of read entries, this is 0 when no more entries are available.&lt;br /&gt;
&lt;br /&gt;
The output buffer contains the read array of [[#DirectoryEntry]]. This doesn&#039;t include entries for &amp;quot;.&amp;quot; and &amp;quot;..&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== GetEntryCount ==&lt;br /&gt;
Returns an u64 for the total number of readable entries.&lt;br /&gt;
&lt;br /&gt;
= DirectoryEntry =&lt;br /&gt;
This is &amp;quot;nn::fs::DirectoryEntry&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x301 || Path&lt;br /&gt;
|-&lt;br /&gt;
| 0x301 || 0x1 || File attributes (bit 0 = is directory; bit 1 = archive bit)&lt;br /&gt;
|-&lt;br /&gt;
| 0x302 || 0x2 || Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x304 || 0x1 || [[#DirectoryEntryType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x305 || 0x3 || Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x308 || 0x8 || Filesize, 0 for directories.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= DirectoryEntryType =&lt;br /&gt;
This is &amp;quot;nn::fs::DirectoryEntryType&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
An s8 value indicating a directory entry type. The current values are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Directory&lt;br /&gt;
|-&lt;br /&gt;
| 1 || File&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IFile =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IFile&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+] OperateRange&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ISaveDataInfoReader =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataInfoReader&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#ReadSaveDataInfo]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ReadSaveDataInfo ==&lt;br /&gt;
Takes a type-0x6 output buffer. Returns an output u64 for total output entries. This buffer contains an array of [[#SaveDataInfo]].&lt;br /&gt;
&lt;br /&gt;
This is used to get [[#SaveDataInfo]] for all savedata on the system (or all savedata for the current [[#SaveDataSpaceId]]). When used multiple times, it will resume reading where it left off, until no more entries are available (in that case the out u64 is value 0).&lt;br /&gt;
&lt;br /&gt;
= IDeviceOperator =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IDeviceOperator&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || IsSdCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetSdCardSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [2.0.0+] GetSdCardCid&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [2.0.0+] GetSdCardUserAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [2.0.0+] GetSdCardProtectedAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [2.0.0+] GetAndClearSdCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 100 || GetMmcCid&lt;br /&gt;
|-&lt;br /&gt;
| 101 || GetMmcSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 110 || EraseMmc&lt;br /&gt;
|-&lt;br /&gt;
| 111 || GetMmcPartitionSize&lt;br /&gt;
|-&lt;br /&gt;
| 112 || [2.0.0+] GetMmcPatrolCount&lt;br /&gt;
|-&lt;br /&gt;
| 113 || [2.0.0+] GetAndClearMmcErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 114 || [2.0.0+] GetMmcExtendedCsd&lt;br /&gt;
|-&lt;br /&gt;
| 115 || [4.0.0+] SuspendMmcPatrol&lt;br /&gt;
|-&lt;br /&gt;
| 116 || [4.0.0+] ResumeMmcPatrol&lt;br /&gt;
|-&lt;br /&gt;
| 200 || IsGameCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 201 || EraseGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 202 || GetGameCardHandle&lt;br /&gt;
|-&lt;br /&gt;
| 203 || [[#GetGameCardUpdatePartitionInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 204 || FinalizeGameCardDriver&lt;br /&gt;
|-&lt;br /&gt;
| 205 || GetGameCardAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 206 || GetGameCardDeviceCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 207 || GetGameCardAsicInfo&lt;br /&gt;
|-&lt;br /&gt;
| 208 || GetGameCardIdSet&lt;br /&gt;
|-&lt;br /&gt;
| 209 || WriteToGameCardDirectly&lt;br /&gt;
|-&lt;br /&gt;
| 210 || SetVerifyWriteEnalbleFlag&lt;br /&gt;
|-&lt;br /&gt;
| 211 || GetGameCardImageHash&lt;br /&gt;
|-&lt;br /&gt;
| 212 || [2.0.0+] GetGameCardDeviceIdForProdCard&lt;br /&gt;
|-&lt;br /&gt;
| 213 || [2.0.0+] EraseAndWriteParamDirectly&lt;br /&gt;
|-&lt;br /&gt;
| 214 || [2.0.0+] ReadParamDirectly&lt;br /&gt;
|-&lt;br /&gt;
| 215 || [2.0.0+] ForceEraseGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 216 || [2.0.0+] GetGameCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 217 || [2.1.0+] GetGameCardErrorReportInfo&lt;br /&gt;
|-&lt;br /&gt;
| 218 || [3.0.0+] GetGameCardDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 219 || [8.0.0+] ChallengeCardExistence&lt;br /&gt;
|-&lt;br /&gt;
| 220 || [9.0.0+] GetGameCardCompatibilityType&lt;br /&gt;
|-&lt;br /&gt;
| 300 || SetSpeedEmulationMode&lt;br /&gt;
|-&lt;br /&gt;
| 301 || GetSpeedEmulationMode&lt;br /&gt;
|-&lt;br /&gt;
| 400 || [5.0.0+] SuspendSdmmcControl&lt;br /&gt;
|-&lt;br /&gt;
| 401 || [5.0.0+] ResumeSdmmcControl&lt;br /&gt;
|-&lt;br /&gt;
| 402 || [6.0.0+] [[#GetSdmmcConnectionStatus]]&lt;br /&gt;
|-&lt;br /&gt;
| 500 || [6.0.0+] [[#SetDeviceSimulationEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 501 || [6.0.0+] [[#ClearDeviceSimulationEvent]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetGameCardUpdatePartitionInfo ==&lt;br /&gt;
Returns a titleID and the title-version for it.&lt;br /&gt;
&lt;br /&gt;
* Output u32 with ARMS-gamecard: title-version v131162. This is the title-version for [[2.1.0]], which is the sysupdate included with this gamecard. Launch-day gamecards return title-version v450.&lt;br /&gt;
* Output u64 with ARMS-gamecard: titleID 0100000000000816.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]] appears to only use this with [[Content_Manager_services#GetTitleIdInfo]] and [[Content_Manager_services#GetUpdateTitleList]] with storageid=nandsys, for checking whether a sysupdate is required.&lt;br /&gt;
&lt;br /&gt;
== GetSdmmcConnectionStatus ==&lt;br /&gt;
Takes a total of 4-bytes of input, returns a total of 8-bytes of output.&lt;br /&gt;
&lt;br /&gt;
== SetDeviceSimulationEvent == &lt;br /&gt;
Takes a total of 0x14-bytes of input, no output.&lt;br /&gt;
&lt;br /&gt;
== ClearDeviceSimulationEvent ==&lt;br /&gt;
Takes a total of 4-bytes of input, no output.&lt;br /&gt;
&lt;br /&gt;
= IEventNotifier =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IEventNotifier&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetEventHandle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ISaveDataTransferManager =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataTransferManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [[4.0.0]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetChallenge]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#SetToken]]&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [[#OpenSaveDataExporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [[#OpenSaveDataImporter]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetChallenge ==&lt;br /&gt;
No input/output, takes a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
== SetToken ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataExporter ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and u64, returns an [[#ISaveDataExporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporter ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and a 0x10-byte userID, and a type-0x5 input buffer. Returns an output u64 and an [[#ISaveDataImporter]].&lt;br /&gt;
&lt;br /&gt;
= ISaveDataTransferManagerForSaveDataRepair =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataTransferManagerForSaveDataRepair&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [[9.0.0]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetChallenge]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#SetKeyPackage]]&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [[#OpenSaveDataExporterAndGetEncryptedKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [[#PrepareOpenSaveDataImporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 90 || [[#OpenSaveDataImporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 91 || [[#OpenSaveDataImporter2]]&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [[#OpenSaveDataExporterWithKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 110 || [[#OpenSaveDataImporterWithKey]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SetKeyPackage ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataExporterAndGetEncryptedKey ==&lt;br /&gt;
Takes a total of 0x10-bytes of input and a type-0x1A output buffer to receive a RsaEncryptedKey. Returns an [[#ISaveDataDivisionExporter]].&lt;br /&gt;
&lt;br /&gt;
== PrepareOpenSaveDataImporter ==&lt;br /&gt;
Takes a type-0x1A output buffer to receive a RsaEncryptedKey.&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporter ==&lt;br /&gt;
Takes a total of 0x18-bytes of input and two type-0x5 input buffers, returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporter2 ==&lt;br /&gt;
Takes a total of 0x18-bytes of input and a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataExporterWithKey ==&lt;br /&gt;
Takes a total of 0x20-bytes of input, returns an [[#ISaveDataDivisionExporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporterWithKey ==&lt;br /&gt;
Takes a total of 0x28-bytes of input and a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
= ISaveDataExporter =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataExporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [[4.0.0]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetSaveDataInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetRestSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#Pull]]&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [[#PullInitialData]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetSaveDataInfo ==&lt;br /&gt;
No input/output, takes a type-0x1A [[#SaveDataInfo]] output buffer.&lt;br /&gt;
&lt;br /&gt;
The actual name for this is the SaveDataExporter constructor. This is used automatically after [[#OpenSaveDataExporter]] by official sw.&lt;br /&gt;
&lt;br /&gt;
== GetRestSize ==&lt;br /&gt;
No input, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
Takes a type-0x6 output buffer, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== PullInitialData ==&lt;br /&gt;
No input/output, takes a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
= ISaveDataImporter =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataImporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [[4.0.0]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetSaveDataInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetRestSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#Push]]&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [[#Finalize]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetSaveDataInfo ==&lt;br /&gt;
No input/output, takes a type-0x1A [[#GetSaveDataInfo]] output buffer.&lt;br /&gt;
&lt;br /&gt;
The actual name for this is the SaveDataImporter constructor. This is used automatically after [[#OpenSaveDataImporter]] by official sw.&lt;br /&gt;
&lt;br /&gt;
== GetRestSize ==&lt;br /&gt;
No input, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== Push ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
== Finalize ==&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
= ISaveDataTransferManagerWithDivision =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataTransferManagerWithDivision&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetChallenge]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#SetKeySeedPackage]]&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [[#OpenSaveDataExporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 33 || [[#OpenSaveDataExporterForDiffExport]]&lt;br /&gt;
|-&lt;br /&gt;
| 34 || [6.0.0+] [[#OpenSaveDataExporterByContext]]&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;| 64 || [5.0.0-5.1.0] OpenSaveDataImporter&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] [[#OpenSaveDataImporterDeprecated]]&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [[#OpenSaveDataImporterForDiffImport]]&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [6.0.0+] [[#OpenSaveDataImporterForDuplicateDiffImport]]&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [6.0.0+] [[#OpenSaveDataImporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [6.0.0+] [[#OpenSaveDataImporterByContext]]&lt;br /&gt;
|-&lt;br /&gt;
| 69 || [6.0.0+] [[#CancelSuspendingImport]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetChallenge ==&lt;br /&gt;
No input/output, takes a type-0x6 output buffer containing the &#039;&#039;&#039;Challenge&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== SetKeySeedPackage ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer containing the &#039;&#039;&#039;KeySeedPackage&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataExporter ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and u64. Returns an [[#ISaveDataDivisionExporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataExporterForDiffExport ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], an u64, and a type-0x5 input buffer [[#InitialDataVersion2]]. Returns an [[#ISaveDataDivisionExporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataExporterByContext ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer, returns an [[#ISaveDataDivisionExporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporterDeprecated ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], a 0x10-byte userID, and a type-0x5 input buffer [[#InitialDataVersion2]]. Returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporterForDiffImport ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], an u64, and a type-0x5 input buffer [[#InitialDataVersion2]], returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporterForDuplicateDiffImport ==&lt;br /&gt;
Takes an input u8 and an u64, and a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporter ==&lt;br /&gt;
Takes an input u8, an u8(bool), a 0x10-byte struct, and a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporterByContext ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== CancelSuspendingImport ==&lt;br /&gt;
Takes an input u64 and a 0x10-byte struct, no output.&lt;br /&gt;
&lt;br /&gt;
= ISaveDataDivisionExporter =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataDivisionExporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#SetDivisionCount]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [6.0.0+] [[#GetSaveDataInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#OpenSaveDataDiffChunkIterator]]&lt;br /&gt;
|-&lt;br /&gt;
| 48 || [[#OpenSaveDataChunkExporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [6.0.0-8.1.0] [[#FinalizeFullExport]]&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [6.0.0-8.1.0] [[#FinalizeDiffExport]]&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [6.0.0+] [[#CancelExport]]&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [6.0.0+] [[#SuspendExport]]&lt;br /&gt;
|-&lt;br /&gt;
| 70 || [6.0.0+] [[#GetKeySeed]]&lt;br /&gt;
|-&lt;br /&gt;
| 71 || [6.0.0+] [[#GetInitialDataMac]]&lt;br /&gt;
|-&lt;br /&gt;
| 72 || [6.0.0+] [[#FinalizeExport]]&lt;br /&gt;
|-&lt;br /&gt;
| 73 || [9.0.0+] [[#GetInitialDataMacKeyGeneration]]&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [6.0.0+] [[#GetImportInitialDataAad]]&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [6.0.0+] [[#SetExportInitialDataAad]]&lt;br /&gt;
|-&lt;br /&gt;
| 96 || [6.0.0+] [[#GetReportInfo]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SetDivisionCount ==&lt;br /&gt;
Takes an input u32, no output.&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataChunkExporter ==&lt;br /&gt;
Takes an input u32, returns an [[#ISaveDataChunkExporter]].&lt;br /&gt;
&lt;br /&gt;
== FinalizeFullExport ==&lt;br /&gt;
No input, returns two 0x10-byte output structs.&lt;br /&gt;
&lt;br /&gt;
== FinalizeDiffExport ==&lt;br /&gt;
No input, returns an output 0x10-byte struct.&lt;br /&gt;
&lt;br /&gt;
== CancelExport ==&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
== SuspendExport ==&lt;br /&gt;
No input/output, takes a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
== GetKeySeed ==&lt;br /&gt;
No input, returns an output 0x10-byte struct.&lt;br /&gt;
&lt;br /&gt;
== GetInitialDataMac ==&lt;br /&gt;
No input, returns an output 0x10-byte struct.&lt;br /&gt;
&lt;br /&gt;
== FinalizeExport ==&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
== SetExportInitialDataAad ==&lt;br /&gt;
Takes an input 0x20-byte struct, no output.&lt;br /&gt;
&lt;br /&gt;
= ISaveDataDivisionImporter =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataDivisionImporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [6.0.0+] [[#GetSaveDataInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#OpenSaveDataDiffChunkIterator]]&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [[#InitializeImport]]&lt;br /&gt;
|-&lt;br /&gt;
| 33 || [[#FinalizeImport]]&lt;br /&gt;
|-&lt;br /&gt;
| 34 || [6.0.0+] [[#CancelImport]]&lt;br /&gt;
|-&lt;br /&gt;
| 35 || [6.0.0+] [[#GetImportContext]]&lt;br /&gt;
|-&lt;br /&gt;
| 36 || [6.0.0+] [[#SuspendImport]]&lt;br /&gt;
|-&lt;br /&gt;
| 48 || [[#OpenSaveDataChunkImporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [6.0.0+] [[#GetImportInitialDataAad]]&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [6.0.0+] [[#GetReportInfo]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetSaveDataInfo ==&lt;br /&gt;
No input/output, takes a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataDiffChunkIterator ==&lt;br /&gt;
No input, returns an [[#ISaveDataChunkIterator]].&lt;br /&gt;
&lt;br /&gt;
== InitializeImport ==&lt;br /&gt;
No input, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== FinalizeImport ==&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
== CancelImport ==&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
== GetImportContext ==&lt;br /&gt;
No input/output, takes a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
== SuspendImport ==&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataChunkImporter ==&lt;br /&gt;
Takes an input u32, returns an [[#ISaveDataChunkImporter]].&lt;br /&gt;
&lt;br /&gt;
== GetImportInitialDataAad == &lt;br /&gt;
No input, returns an output 0x20-byte struct.&lt;br /&gt;
&lt;br /&gt;
== GetReportInfo ==&lt;br /&gt;
No input, returns an output 0x20-byte struct.&lt;br /&gt;
&lt;br /&gt;
= ISaveDataChunkIterator =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataChunkIterator&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Next]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#IsEnd]] &lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#GetId]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Next ==&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
== IsEnd ==&lt;br /&gt;
No input, returns an output u8.&lt;br /&gt;
&lt;br /&gt;
== GetId ==&lt;br /&gt;
No input, returns an output u32.&lt;br /&gt;
&lt;br /&gt;
= ISaveDataChunkExporter =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataChunkExporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Pull]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [6.0.0+] [[#GetRestRawDataSize]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
Takes an input u64 and a type-0x6 output buffer, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== GetRestRawDataSize ==&lt;br /&gt;
No input, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
= ISaveDataChunkImporter =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataChunkImporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Push]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Push ==&lt;br /&gt;
Takes an input u64 and a type-0x5 input buffer, no output.&lt;br /&gt;
&lt;br /&gt;
= ISaveDataTransferProhibiter =&lt;br /&gt;
This was added with [[6.0.0]].&lt;br /&gt;
&lt;br /&gt;
This doesn&#039;t seem to handle any commands (?).&lt;br /&gt;
&lt;br /&gt;
= IMultiCommitManager =&lt;br /&gt;
This was added with [[6.0.0]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#Add]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#Commit]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Add ==&lt;br /&gt;
Takes an input [[#IFilesystem]], no output.&lt;br /&gt;
&lt;br /&gt;
== Commit ==&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
= FileSystemType =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Code&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Logo&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ContentControl&lt;br /&gt;
|-&lt;br /&gt;
| 4 || ContentManual&lt;br /&gt;
|-&lt;br /&gt;
| 5 || ContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 6 || ContentData&lt;br /&gt;
|-&lt;br /&gt;
| 7 || ApplicationPackage&lt;br /&gt;
|-&lt;br /&gt;
| 8 || RegisteredUpdate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= StorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || None&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Host&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GameCard&lt;br /&gt;
|-&lt;br /&gt;
| 3 || NandSystem&lt;br /&gt;
|-&lt;br /&gt;
| 4 || NandUser&lt;br /&gt;
|-&lt;br /&gt;
| 5 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentStorageId =&lt;br /&gt;
This is &amp;quot;nn::fs::ContentStorageId&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || System&lt;br /&gt;
|-&lt;br /&gt;
| 1 || User&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= SaveDataSpaceId =&lt;br /&gt;
This is &amp;quot;nn::fs::SaveDataSpaceId&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || System&lt;br /&gt;
|-&lt;br /&gt;
| 1 || User&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SdSystem&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [3.0.0+] ProperSystem&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Determines the storage where the savedata is stored.&lt;br /&gt;
&lt;br /&gt;
= SaveDataType =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SystemSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SaveData&lt;br /&gt;
|-&lt;br /&gt;
| 2 || BcatDeliveryCacheStorage&lt;br /&gt;
|-&lt;br /&gt;
| 3 || DeviceSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [3.0.0+] TemporaryStorage&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [3.0.0+] CacheStorage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ImageDirectoryId =&lt;br /&gt;
This is &amp;quot;nn::fs::ImageDirectoryId&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Nand&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CloudBackupWorkStorageId =&lt;br /&gt;
This is &amp;quot;nn::fs::CloudBackupWorkStorageId&amp;quot;.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Nand&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CustomStorageId =&lt;br /&gt;
This is &amp;quot;nn::fs::CustomStorageId&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Nand&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentPath =&lt;br /&gt;
These are the 0x300 paths to NCA files for the various filesystems FS can access, beginning with @. They&#039;re passed via X descriptors, and returned via various [[Location Resolver services|ncm/lr]] commands.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Path || Notes&lt;br /&gt;
|-&lt;br /&gt;
| @SystemContent ||&lt;br /&gt;
|- &lt;br /&gt;
| @UserContent ||&lt;br /&gt;
|-&lt;br /&gt;
| @SdCardContent ||&lt;br /&gt;
|-&lt;br /&gt;
| @CalibFile ||&lt;br /&gt;
|-&lt;br /&gt;
| @Safe ||&lt;br /&gt;
|-&lt;br /&gt;
| @User ||&lt;br /&gt;
|-&lt;br /&gt;
| @System ||&lt;br /&gt;
|-&lt;br /&gt;
| @Sdcard ||&lt;br /&gt;
|-&lt;br /&gt;
| @Host ||&lt;br /&gt;
|-&lt;br /&gt;
| @GcApp || Gamecard App partition (Partition 2)&lt;br /&gt;
|-&lt;br /&gt;
| @GcXYYYYYYYY || Gamecard Contents. X is the partition type (U - Update, N - Normal, S - Secure). Y is the gamecard handle as a 32-bit hex value &lt;br /&gt;
|-&lt;br /&gt;
| @upp || Gamecard update partition (Partition 0)&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] @RegUpdate || Registered update partition&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Save Struct =&lt;br /&gt;
This is &amp;quot;nn::fs::SaveDataAttribute&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData. SaveData: 0 can be used for accessing the savedata associated with the current FS session titleID, otherwise when set this is the titleID associated with the savedata to access.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x10&lt;br /&gt;
| userID for user-specific savedata(saveuser) when set, otherwise when zero this indicates the common savedata(savecommon). This is loaded from [[Account_services]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| u64 [[Flash_Filesystem|saveID]]. 0 for SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[#SaveDataType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x21&lt;br /&gt;
| 0x1&lt;br /&gt;
| Save data &#039;rank&#039; or &#039;precedence&#039;. 0 if this save data is considered the primary save data. 1 if it&#039;s considered the secondary save data.&lt;br /&gt;
|-&lt;br /&gt;
| 0x22&lt;br /&gt;
| 0x2&lt;br /&gt;
| Save data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x4&lt;br /&gt;
| Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
For DeviceSaveData, this struct is all-zero except for the [[#SaveDataType]] field.&lt;br /&gt;
&lt;br /&gt;
= SaveCreate Struct =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| Save data size.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| Save data journal size.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x8&lt;br /&gt;
| Save data block size. 0x4000 for SystemSaveData/SaveData/DeviceSaveData/BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| Save data owner id. Official user-processes only uses 0 here for SystemSaveData/SaveData. For the dedicated save-creation code with SaveData/DeviceSaveData, this value comes from an input param with official user-processes. For BcatSaveData, this is the hard-coded [[Title_list|titleID]] of the bcat-sysmodule.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x4&lt;br /&gt;
| Save data flags. Written using an input param for official user-processes. Hard-coded 0 for BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[#SaveDataSpaceId]]. Official user-processes only uses 0 here for SystemSaveData, 1 for SaveData/DeviceSaveData/BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x25&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown. 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x26&lt;br /&gt;
| 0x1A&lt;br /&gt;
| Not initialized for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
= DeviceSaveData =&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8, the only difference compared to SaveData is the Save-struct.&lt;br /&gt;
&lt;br /&gt;
= BcatSaveData =&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8. The Save-struct is the same as DeviceSaveData, except that the titleID field is set to &amp;lt;input titleID&amp;gt;. See above regarding SaveCreate-struct.&lt;br /&gt;
&lt;br /&gt;
The 0x10-byte struct passed to [[#CreateSaveDataFileSystem]] has the first 0x5-bytes set to all-zero.&lt;br /&gt;
&lt;br /&gt;
= SaveDataInfo =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| Unknown saveID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[#SaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[#SaveDataType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| 0x6&lt;br /&gt;
| Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x10&lt;br /&gt;
| userID&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x8&lt;br /&gt;
| saveID, 0 for regular SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x8&lt;br /&gt;
| Application titleID, for regular SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x8&lt;br /&gt;
| Raw saveimage size&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x2&lt;br /&gt;
| Save data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x3A&lt;br /&gt;
| 0x1&lt;br /&gt;
| Save data &#039;rank&#039; or &#039;precedence&#039;. 0 if this save data is considered the primary save data. 1 if it&#039;s considered the secondary save data.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B&lt;br /&gt;
| 0x25&lt;br /&gt;
| Unknown. Usually zeros?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x60-byte struct.&lt;br /&gt;
&lt;br /&gt;
= SaveDataFileSystemExtraData =&lt;br /&gt;
This is a 0x200-byte struct. Appears to match [[Savegames#Extra_data]].&lt;br /&gt;
&lt;br /&gt;
= InitialDataVersion2 =&lt;br /&gt;
This is a 0x8210-byte struct used by [[#ISaveDataTransferManagerWithDivision]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Paeton</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=NS_services&amp;diff=7771</id>
		<title>NS services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=NS_services&amp;diff=7771"/>
		<updated>2019-09-10T15:33:47Z</updated>

		<summary type="html">&lt;p&gt;Paeton: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= aoc:u =&lt;br /&gt;
This is &amp;quot;nn::aocsrv::detail::IAddOnContentManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [1.0.0-6.2.0] CountAddOnContentByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [1.0.0-6.2.0] ListAddOnContentByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 2 || CountAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ListAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [1.0.0-6.2.0] GetAddOnContentBaseIdByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetAddOnContentBaseId&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [1.0.0-6.2.0] PrepareAddOnContentByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 7 || PrepareAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [4.0.0+] GetAddOnContentListChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [7.0.0+] [[#IPurchaseEventManager|CreateEcPurchasedEventManager]]&lt;br /&gt;
|-&lt;br /&gt;
| 101 || [9.0.0+] [[#IPurchaseEventManager|CreatePermanentEcPurchasedEventManager]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IPurchaseEventManager ==&lt;br /&gt;
This is &amp;quot;nn::ec::IPurchaseEventManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetDefaultDeliveryTarget&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SetDeliveryTarget&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetPurchasedEventReadableHandle&lt;br /&gt;
|-&lt;br /&gt;
| 3 || PopPurchasedProductInfo&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [9.0.0+] PopPurchasedProductInfoWithUid&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ns:am =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IApplicationManagerInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[3.0.0+] This service was replaced by [[#ns:am2, ns:ec, ns:rid, ns:rt, ns:web|ns:am2]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#ListApplicationRecord]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GenerateApplicationRecordCount&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetApplicationRecordUpdateSystemEvent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetApplicationViewDeprecated&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeleteApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 5 || DeleteApplicationCompletely&lt;br /&gt;
|-&lt;br /&gt;
| 6 || IsAnyApplicationEntityRedundant&lt;br /&gt;
|-&lt;br /&gt;
| 7 || DeleteRedundantApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 8 || IsApplicationEntityMovable&lt;br /&gt;
|-&lt;br /&gt;
| 9 || MoveApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 11 || CalculateApplicationOccupiedSize&lt;br /&gt;
|-&lt;br /&gt;
| 16 || PushApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 17 || ListApplicationRecordContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 18 || &lt;br /&gt;
|-&lt;br /&gt;
| 19 || [[#LaunchApplication]]&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#GetApplicationContentPath]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || TerminateApplication&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [2.0.0+] ResolveApplicationContentPath&lt;br /&gt;
|-&lt;br /&gt;
| 26 || BeginInstallApplication&lt;br /&gt;
|-&lt;br /&gt;
| 27 || DeleteApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 30 || RequestApplicationUpdateInfo&lt;br /&gt;
|-&lt;br /&gt;
| 31 || RequestUpdateApplication&lt;br /&gt;
|-&lt;br /&gt;
| 32 || CancelApplicationDownload&lt;br /&gt;
|-&lt;br /&gt;
| 33 || ResumeApplicationDownload&lt;br /&gt;
|-&lt;br /&gt;
| 34 || &lt;br /&gt;
|-&lt;br /&gt;
| 35 || UpdateVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 36 || PushLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| 37 || ListRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 38 || CheckApplicationLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| 39 || CheckApplicationLaunchRights&lt;br /&gt;
|-&lt;br /&gt;
| 40 || GetApplicationLogoData&lt;br /&gt;
|-&lt;br /&gt;
| 41 || CalculateApplicationDownloadRequiredSize&lt;br /&gt;
|-&lt;br /&gt;
| 42 || CleanupSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 43 || CheckSdCardMountStatus&lt;br /&gt;
|-&lt;br /&gt;
| 44 || GetSdCardMountStatusChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 45 || GetGameCardAttachmentEvent&lt;br /&gt;
|-&lt;br /&gt;
| 46 || GetGameCardAttachmentInfo&lt;br /&gt;
|-&lt;br /&gt;
| 47 || [[#GetTotalSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 48 || [[#GetFreeSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 49 || GetSdCardRemovedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 52 || GetGameCardUpdateDetectionEvent&lt;br /&gt;
|-&lt;br /&gt;
| 53 || DisableApplicationAutoDelete&lt;br /&gt;
|-&lt;br /&gt;
| 54 || EnableApplicationAutoDelete&lt;br /&gt;
|-&lt;br /&gt;
| 55 || [[#GetApplicationDesiredLanguage]]&lt;br /&gt;
|-&lt;br /&gt;
| 56 || SetApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 57 || ClearApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 58 || GetLastSdCardMountUnexpectedResult&lt;br /&gt;
|-&lt;br /&gt;
| 59 || ConvertApplicationLanguageToLanguageCode&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [[#ConvertLanguageCodeToApplicationLanguage]]&lt;br /&gt;
|-&lt;br /&gt;
| 61 || GetBackgroundDownloadStressTaskInfo&lt;br /&gt;
|-&lt;br /&gt;
| 62 || GetGameCardStopper&lt;br /&gt;
|-&lt;br /&gt;
| 63 || IsSystemProgramInstalled&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [2.0.0+] StartApplyDeltaTask&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [2.0.0+] GetRequestServerStopper&lt;br /&gt;
|-&lt;br /&gt;
| 100 || ResetToFactorySettings&lt;br /&gt;
|-&lt;br /&gt;
| 101 || ResetToFactorySettingsWithoutUserSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 102 || [2.0.0+] ResetToFactorySettingsForRefurbishment&lt;br /&gt;
|-&lt;br /&gt;
| 200 || CalculateUserSaveDataStatistics&lt;br /&gt;
|-&lt;br /&gt;
| 201 || DeleteUserSaveDataAll&lt;br /&gt;
|-&lt;br /&gt;
| 210 || DeleteUserSystemSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 220 || UnregisterNetworkServiceAccount&lt;br /&gt;
|-&lt;br /&gt;
| 300 || GetApplicationShellEvent&lt;br /&gt;
|-&lt;br /&gt;
| 301 || PopApplicationShellEventInfo&lt;br /&gt;
|-&lt;br /&gt;
| 302 || LaunchLibraryApplet&lt;br /&gt;
|-&lt;br /&gt;
| 303 || TerminateLibraryApplet&lt;br /&gt;
|-&lt;br /&gt;
| 304 || LaunchSystemApplet&lt;br /&gt;
|-&lt;br /&gt;
| 305 || TerminateSystemApplet&lt;br /&gt;
|-&lt;br /&gt;
| 306 || LaunchOverlayApplet&lt;br /&gt;
|-&lt;br /&gt;
| 307 || TerminateOverlayApplet&lt;br /&gt;
|-&lt;br /&gt;
| 400 || [[#GetApplicationControlData]]&lt;br /&gt;
|-&lt;br /&gt;
| 401 || InvalidateAllApplicationControlCache&lt;br /&gt;
|-&lt;br /&gt;
| 402 || RequestDownloadApplicationControlData&lt;br /&gt;
|-&lt;br /&gt;
| 403 || GetMaxApplicationControlCacheCount&lt;br /&gt;
|-&lt;br /&gt;
| 404 || [2.0.0+] InvalidateApplicationControlCache&lt;br /&gt;
|-&lt;br /&gt;
| 405 || [2.0.0+] ListApplicationControlCacheEntryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 502 || [2.0.0+] RequestCheckGameCardRegistration&lt;br /&gt;
|-&lt;br /&gt;
| 503 || [2.0.0+] RequestGameCardRegistrationGoldPoint&lt;br /&gt;
|-&lt;br /&gt;
| 504 || [2.0.0+] RequestRegisterGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 600 || [2.0.0+] CountApplicationContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 601 || [2.0.0+] [[#ListApplicationContentMetaStatus]]&lt;br /&gt;
|-&lt;br /&gt;
| 602 || [2.0.0+] ListAvailableAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 603 || [2.0.0+] GetOwnedApplicationContentMetaStatus&lt;br /&gt;
|-&lt;br /&gt;
| 604 || [2.0.0+] RegisterContentsExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 605 || [2.0.0+] ListApplicationContentMetaStatusWithRightsCheck&lt;br /&gt;
|-&lt;br /&gt;
| 700 || [2.0.0+] PushDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 701 || [2.0.0+] ClearTaskStatusList&lt;br /&gt;
|-&lt;br /&gt;
| 702 || [2.0.0+] RequestDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 703 || [2.0.0+] RequestEnsureDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 704 || [2.0.0+] ListDownloadTaskStatus&lt;br /&gt;
|-&lt;br /&gt;
| 705 || [2.0.0+] RequestDownloadTaskListData&lt;br /&gt;
|-&lt;br /&gt;
| 800 || [2.0.0+] RequestVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 801 || [2.0.0+] ListVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 900 || [2.0.0+] GetApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 901 || [2.0.0+] GetApplicationRecordProperty&lt;br /&gt;
|-&lt;br /&gt;
| 902 || [2.0.0+] EnableApplicationAutoUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 903 || [2.0.0+] DisableApplicationAutoUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 904 || [2.0.0+] TouchApplication&lt;br /&gt;
|-&lt;br /&gt;
| 905 || [2.0.0+] RequestApplicationUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 906 || [2.0.0+] IsApplicationUpdateRequested&lt;br /&gt;
|-&lt;br /&gt;
| 907 || [2.0.0+] WithdrawApplicationUpdateRequest&lt;br /&gt;
|-&lt;br /&gt;
| 908 || [2.0.0+] ListApplicationRecordInstalledContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || [2.0.0+] RequestVerifyApplicationDeprecated&lt;br /&gt;
|-&lt;br /&gt;
| 1001 || [2.0.0+] CorruptApplicationForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 1200 || [2.0.0+] [[#NeedsUpdateVulnerability]]&lt;br /&gt;
|-&lt;br /&gt;
| 1300 || [2.0.0+] IsAnyApplicationEntityInstalled&lt;br /&gt;
|-&lt;br /&gt;
| 1301 || [2.0.0+] DeleteApplicationContentEntities&lt;br /&gt;
|-&lt;br /&gt;
| 1302 || [2.0.0+] CleanupUnrecordedApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 1400 || [2.0.0+] PrepareShutdown&lt;br /&gt;
|-&lt;br /&gt;
| 1500 || [2.0.0+] FormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1501 || [2.0.0+] NeedsSystemUpdateToFormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1502 || [2.0.0+] GetLastSdCardFormatUnexpectedResult&lt;br /&gt;
|-&lt;br /&gt;
| 1503 || [2.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 1600 || [2.0.0+] GetSystemSeedForPseudoDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 1700 || [2.0.0+] ListApplicationDownloadingContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 1800 || [2.0.0+] IsNotificationSetupCompleted&lt;br /&gt;
|-&lt;br /&gt;
| 1801 || [2.0.0+] GetLastNotificationInfoCount&lt;br /&gt;
|-&lt;br /&gt;
| 1802 || [2.0.0+] ListLastNotificationInfo&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ListApplicationRecord ==&lt;br /&gt;
Takes a type-6 output buffer and an u32 entry_offset.&lt;br /&gt;
&lt;br /&gt;
Returns an array of title-info entries using the specified offset and size. No input titleID is passed to this.&lt;br /&gt;
&lt;br /&gt;
=== Application Record Format ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| Title ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x1&lt;br /&gt;
| Type? (Known values: 2=Installing?, 3=Gamecard?, 4=Installed?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown, usually 0x02&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| 0x6&lt;br /&gt;
| Unknown, usually zeros?&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown, seems to change between reboots and removing/reinserting gamecards&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| 0x7&lt;br /&gt;
| Unknown, usually zeros?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== LaunchApplication ==&lt;br /&gt;
Takes an input u64 titleID, returns an output u64 PID.&lt;br /&gt;
&lt;br /&gt;
Launches an application title which is registered with NS.&lt;br /&gt;
&lt;br /&gt;
== GetApplicationContentPath ==&lt;br /&gt;
Takes a 0x16-type output buffer, an u8 [[NCM_services#Title_Types|title type]], and an u64 titleID.&lt;br /&gt;
&lt;br /&gt;
The input titleID is used with the application-title table like various other cmds, anything not in that table can&#039;t be used with this.&lt;br /&gt;
&lt;br /&gt;
Returns a string path for the specified type of patch content with this titleID, otherwise returns regular-application paths when update-title not installed. Returns an error when the specified type of content doesn&#039;t exist for this title. Starts with &amp;quot;@{SdCardContent,UserContent}://&amp;quot; and ends in &amp;quot;.nca&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For gamecard content, the output path is: &amp;quot;@GcSXXXXXXXX:/&amp;lt;NcaId&amp;gt;.nca&amp;quot;. NCA-type0 with gamecard returns 0 with an empty output string.&lt;br /&gt;
&lt;br /&gt;
The output string is then used by the user-process with [[Filesystem_services|FS]] to mount the content.&lt;br /&gt;
&lt;br /&gt;
== GetTotalSpaceSize ==&lt;br /&gt;
Takes an input media-id that must be 5.&lt;br /&gt;
&lt;br /&gt;
Returns the u64 from [[Content_Manager_services#IContentStorage]] cmd22.&lt;br /&gt;
&lt;br /&gt;
== GetFreeSpaceSize ==&lt;br /&gt;
Takes an input media-id that must be 5.&lt;br /&gt;
&lt;br /&gt;
Returns the u64 from [[Content_Manager_services#IContentStorage]] cmd23.&lt;br /&gt;
&lt;br /&gt;
== GetApplicationDesiredLanguage ==&lt;br /&gt;
Takes an input u8 language-bitmask, returns an output u8 [[control.nacp]] langentry index.&lt;br /&gt;
&lt;br /&gt;
User-processes generate the language-bitmask with the following for all 16 lang-entries: &amp;lt;code&amp;gt;if(&amp;lt;either string in langentry[i] is non-empty&amp;gt;)bitmask |= 1&amp;lt;&amp;lt;i&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ConvertLanguageCodeToApplicationLanguage ==&lt;br /&gt;
Takes an input u8 pointer for the resulting Id to be written to and a string represented as a u64 (i.e 0x53552D6E65 for &#039;en-US&#039;).&lt;br /&gt;
&lt;br /&gt;
Returns 0 if an ID was successfully found, otherwise returns 0x25810.&lt;br /&gt;
&lt;br /&gt;
== GetApplicationControlData ==&lt;br /&gt;
Takes an input u8 flag, an u64 titleID, and a type-0x6 output buffer. Returns an output u32 for actual_size. Official user-processes use buffer size 0x24000. [[qlaunch]] only uses flag value 0x1.&lt;br /&gt;
&lt;br /&gt;
Loads cached [[control.nacp]] to buf+0 and the cached icon to buf+0x4000. Returns an error if the buffer is too small.&lt;br /&gt;
&lt;br /&gt;
== ListApplicationContentMetaStatus ==&lt;br /&gt;
Returns 0x10-byte entries using the specified titleID starting at the specified u32 entryindex. Can only return game titles. The second entry if any is the update-title usually. When the input entryindex is &amp;gt;= totalentries, this will return 0 with out_entrycount=0.&lt;br /&gt;
&lt;br /&gt;
Entry structure:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8 &amp;quot;type&amp;quot;. [[Content_Manager_services|Title type]] (String is from web-applet)&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8 &amp;quot;installedStorage&amp;quot; / [[Filesystem_services|StorageId]] (String is from web-applet)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown. Non-zero with output from cmd 605, differs for app/update titles.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32 Title-version&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| u64 titleID&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ns:am2, ns:ec, ns:rid, ns:rt, ns:web =&lt;br /&gt;
These services are all, at the top level, &amp;quot;nn::ns::detail::IServiceGetterInterface&amp;quot;. These commands check a state field for a command-specific bit and returns an error if not set, this is likely a permissions check for service+command.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 7988 || [6.0.0+] [[#IDynamicRightsInterface|GetDynamicRightsInterface]].&lt;br /&gt;
|-&lt;br /&gt;
| 7989 || [5.1.0+] [[#IReadOnlyApplicationControlDataInterface|GetReadOnlyApplicationControlDataInterface]].&lt;br /&gt;
|-&lt;br /&gt;
| 7991 || [5.0.0+] [[#IReadOnlyApplicationRecordInterface|GetReadOnlyApplicationRecordInterface]].&lt;br /&gt;
|-&lt;br /&gt;
| 7992 || [4.0.0+] [[#IECommerceInterface|GetECommerceInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7993 || [4.0.0+] [[#IApplicationVersionInterface|GetApplicationVersionInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7994 || [[#IFactoryResetInterface|GetFactoryResetInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7995 || [[#IAccountProxyInterface|GetAccountProxyInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7996 || [[#IApplicationManagerInterface|GetApplicationManagerInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7997 || [[#IDownloadTaskInterface|GetDownloadTaskInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7998 || [[#IContentManagementInterface|GetContentManagementInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7999 || [[#IDocumentInterface|GetDocumentInterface]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IAccountProxyInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IAccountProxyInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateUserAccount&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IApplicationManagerInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IApplicationManagerInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#ListApplicationRecord]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GenerateApplicationRecordCount&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetApplicationRecordUpdateSystemEvent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetApplicationViewDeprecated&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeleteApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 5 || DeleteApplicationCompletely&lt;br /&gt;
|-&lt;br /&gt;
| 6 || IsAnyApplicationEntityRedundant&lt;br /&gt;
|-&lt;br /&gt;
| 7 || DeleteRedundantApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 8 || IsApplicationEntityMovable&lt;br /&gt;
|-&lt;br /&gt;
| 9 || MoveApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 11 || CalculateApplicationOccupiedSize&lt;br /&gt;
|-&lt;br /&gt;
| 16 || PushApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 17 || ListApplicationRecordContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [1.0.0-5.1.0] LaunchApplicationOld&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#GetApplicationContentPath]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || TerminateApplication&lt;br /&gt;
|-&lt;br /&gt;
| 23 || ResolveApplicationContentPath&lt;br /&gt;
|-&lt;br /&gt;
| 26 || BeginInstallApplication&lt;br /&gt;
|-&lt;br /&gt;
| 27 || DeleteApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 30 || RequestApplicationUpdateInfo&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [1.0.0-3.0.2] &lt;br /&gt;
|-&lt;br /&gt;
| 32 || CancelApplicationDownload&lt;br /&gt;
|-&lt;br /&gt;
| 33 || ResumeApplicationDownload&lt;br /&gt;
|-&lt;br /&gt;
| 35 || UpdateVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 36 || PushLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| 37 || ListRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 38 || CheckApplicationLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| 39 || [1.0.0-6.2.0] CheckApplicationLaunchRights&lt;br /&gt;
|-&lt;br /&gt;
| 40 || GetApplicationLogoData&lt;br /&gt;
|-&lt;br /&gt;
| 41 || CalculateApplicationDownloadRequiredSize&lt;br /&gt;
|-&lt;br /&gt;
| 42 || CleanupSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 43 || CheckSdCardMountStatus&lt;br /&gt;
|-&lt;br /&gt;
| 44 || GetSdCardMountStatusChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 45 || GetGameCardAttachmentEvent&lt;br /&gt;
|-&lt;br /&gt;
| 46 || GetGameCardAttachmentInfo&lt;br /&gt;
|-&lt;br /&gt;
| 47 || [[#GetTotalSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 48 || [[#GetFreeSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 49 || GetSdCardRemovedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 52 || GetGameCardUpdateDetectionEvent&lt;br /&gt;
|-&lt;br /&gt;
| 53 || DisableApplicationAutoDelete&lt;br /&gt;
|-&lt;br /&gt;
| 54 || EnableApplicationAutoDelete&lt;br /&gt;
|-&lt;br /&gt;
| 55 || GetApplicationDesiredLanguage&lt;br /&gt;
|-&lt;br /&gt;
| 56 || SetApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 57 || ClearApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 58 || GetLastSdCardMountUnexpectedResult&lt;br /&gt;
|-&lt;br /&gt;
| 59 || ConvertApplicationLanguageToLanguageCode&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [[#ConvertLanguageCodeToApplicationLanguage]]&lt;br /&gt;
|-&lt;br /&gt;
| 61 || GetBackgroundDownloadStressTaskInfo&lt;br /&gt;
|-&lt;br /&gt;
| 62 || GetGameCardStopper&lt;br /&gt;
|-&lt;br /&gt;
| 63 || IsSystemProgramInstalled&lt;br /&gt;
|-&lt;br /&gt;
| 64 || StartApplyDeltaTask&lt;br /&gt;
|-&lt;br /&gt;
| 65 || GetRequestServerStopper&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [3.0.0+] GetBackgroundApplyDeltaStressTaskInfo&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [3.0.0+] CancelApplicationApplyDelta&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [3.0.0+] ResumeApplicationApplyDelta&lt;br /&gt;
|-&lt;br /&gt;
| 69 || [3.0.0+] CalculateApplicationApplyDeltaRequiredSize&lt;br /&gt;
|-&lt;br /&gt;
| 70 || [3.0.0+] ResumeAll&lt;br /&gt;
|-&lt;br /&gt;
| 71 || [3.0.0+] GetStorageSize&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [3.0.0+] RequestDownloadApplication&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [3.0.0+] RequestDownloadAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 82 || [3.0.0+] DownloadApplication&lt;br /&gt;
|-&lt;br /&gt;
| 83 || [4.0.0-6.2.0] CheckApplicationResumeRights&lt;br /&gt;
|-&lt;br /&gt;
| 84 || [4.0.0+] GetDynamicCommitEvent&lt;br /&gt;
|-&lt;br /&gt;
| 85 || [4.0.0+] RequestUpdateApplication2&lt;br /&gt;
|-&lt;br /&gt;
| 86 || [4.0.0+] EnableApplicationCrashReport&lt;br /&gt;
|-&lt;br /&gt;
| 87 || [4.0.0+] IsApplicationCrashReportEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 90 || [4.0.0-8.1.0] BoostSystemMemoryResourceLimit&lt;br /&gt;
|-&lt;br /&gt;
| 91 || [5.0.0+] DeprecatedLaunchApplication&lt;br /&gt;
|-&lt;br /&gt;
| 92 || [5.0.0+] GetRunningApplicationProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 93 || [5.0.0+] GetMainApplicationProgramIndex&lt;br /&gt;
|-&lt;br /&gt;
| 94 || [6.0.0+] LaunchApplication&lt;br /&gt;
|-&lt;br /&gt;
| 95 || [6.0.0+] GetApplicationLaunchInfo&lt;br /&gt;
|-&lt;br /&gt;
| 96 || [6.0.0+] AcquireApplicationLaunchInfo&lt;br /&gt;
|-&lt;br /&gt;
| 97 || [6.0.0+] GetMainApplicationProgramIndexByApplicationLaunchInfo&lt;br /&gt;
|-&lt;br /&gt;
| 98 || [6.0.0+] EnableApplicationAllThreadDumpOnCrash&lt;br /&gt;
|-&lt;br /&gt;
| 99 || [8.0.0+] [[#LaunchDevMenu]]&lt;br /&gt;
|-&lt;br /&gt;
| 100 || ResetToFactorySettings&lt;br /&gt;
|-&lt;br /&gt;
| 101 || ResetToFactorySettingsWithoutUserSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 102 || ResetToFactorySettingsForRefurbishment&lt;br /&gt;
|-&lt;br /&gt;
| 200 || CalculateUserSaveDataStatistics&lt;br /&gt;
|-&lt;br /&gt;
| 201 || DeleteUserSaveDataAll&lt;br /&gt;
|-&lt;br /&gt;
| 210 || DeleteUserSystemSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 211 || [6.0.0+] DeleteSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 220 || UnregisterNetworkServiceAccount&lt;br /&gt;
|-&lt;br /&gt;
| 221 || [6.0.0+] UnregisterNetworkServiceAccountWithUserSaveDataDeletion&lt;br /&gt;
|-&lt;br /&gt;
| 300 || GetApplicationShellEvent&lt;br /&gt;
|-&lt;br /&gt;
| 301 || PopApplicationShellEventInfo&lt;br /&gt;
|-&lt;br /&gt;
| 302 || LaunchLibraryApplet&lt;br /&gt;
|-&lt;br /&gt;
| 303 || TerminateLibraryApplet&lt;br /&gt;
|-&lt;br /&gt;
| 304 || LaunchSystemApplet&lt;br /&gt;
|-&lt;br /&gt;
| 305 || TerminateSystemApplet&lt;br /&gt;
|-&lt;br /&gt;
| 306 || LaunchOverlayApplet&lt;br /&gt;
|-&lt;br /&gt;
| 307 || TerminateOverlayApplet&lt;br /&gt;
|-&lt;br /&gt;
| 400 || GetApplicationControlData&lt;br /&gt;
|-&lt;br /&gt;
| 401 || InvalidateAllApplicationControlCache&lt;br /&gt;
|-&lt;br /&gt;
| 402 || RequestDownloadApplicationControlData&lt;br /&gt;
|-&lt;br /&gt;
| 403 || GetMaxApplicationControlCacheCount&lt;br /&gt;
|-&lt;br /&gt;
| 404 || InvalidateApplicationControlCache&lt;br /&gt;
|-&lt;br /&gt;
| 405 || ListApplicationControlCacheEntryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 406 || [6.0.0+] GetApplicationControlProperty&lt;br /&gt;
|-&lt;br /&gt;
| 407 || [8.0.0+] ListApplicationTitle&lt;br /&gt;
|-&lt;br /&gt;
| 408 || [8.0.0+] ListApplicationIcon&lt;br /&gt;
|-&lt;br /&gt;
| 502 || RequestCheckGameCardRegistration&lt;br /&gt;
|-&lt;br /&gt;
| 503 || RequestGameCardRegistrationGoldPoint&lt;br /&gt;
|-&lt;br /&gt;
| 504 || RequestRegisterGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 505 || [3.0.0+] GetGameCardMountFailureEvent&lt;br /&gt;
|-&lt;br /&gt;
| 506 || [3.0.0+] IsGameCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 507 || [3.0.0+] EnsureGameCardAccess&lt;br /&gt;
|-&lt;br /&gt;
| 508 || [3.0.0+] GetLastGameCardMountFailureResult&lt;br /&gt;
|-&lt;br /&gt;
| 509 || [5.0.0+] ListApplicationIdOnGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 510 || [9.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 600 || CountApplicationContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 601 || [[#ListApplicationContentMetaStatus]]&lt;br /&gt;
|-&lt;br /&gt;
| 602 || [2.0.0-5.1.0] ListAvailableAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 603 || GetOwnedApplicationContentMetaStatus&lt;br /&gt;
|-&lt;br /&gt;
| 604 || RegisterContentsExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 605 || ListApplicationContentMetaStatusWithRightsCheck&lt;br /&gt;
|-&lt;br /&gt;
| 606 || [3.0.0+] GetContentMetaStorage&lt;br /&gt;
|-&lt;br /&gt;
| 607 || [6.0.0+] ListAvailableAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 700 || PushDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 701 || ClearTaskStatusList&lt;br /&gt;
|-&lt;br /&gt;
| 702 || RequestDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 703 || RequestEnsureDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 704 || ListDownloadTaskStatus&lt;br /&gt;
|-&lt;br /&gt;
| 705 || RequestDownloadTaskListData&lt;br /&gt;
|-&lt;br /&gt;
| 800 || RequestVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 801 || ListVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 802 || [3.0.0+] RequestVersionListData&lt;br /&gt;
|-&lt;br /&gt;
| 900 || GetApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 901 || GetApplicationRecordProperty&lt;br /&gt;
|-&lt;br /&gt;
| 902 || EnableApplicationAutoUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 903 || DisableApplicationAutoUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 904 || TouchApplication&lt;br /&gt;
|-&lt;br /&gt;
| 905 || RequestApplicationUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 906 || IsApplicationUpdateRequested&lt;br /&gt;
|-&lt;br /&gt;
| 907 || WithdrawApplicationUpdateRequest&lt;br /&gt;
|-&lt;br /&gt;
| 908 || ListApplicationRecordInstalledContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 909 || [3.0.0+] WithdrawCleanupAddOnContentsWithNoRightsRecommendation&lt;br /&gt;
|-&lt;br /&gt;
| 910 || [5.0.0+] HasApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 911 || [5.1.0+] SetPreInstalledApplication&lt;br /&gt;
|-&lt;br /&gt;
| 912 || [5.1.0+] ClearPreInstalledApplicationFlag&lt;br /&gt;
|-&lt;br /&gt;
| 913 || [9.0.0+] ListAllApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 914 || [9.0.0+] HideApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 915 || [9.0.0+] ShowApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || RequestVerifyApplicationDeprecated&lt;br /&gt;
|-&lt;br /&gt;
| 1001 || CorruptApplicationForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 1002 || [3.0.0+] RequestVerifyAddOnContentsRights&lt;br /&gt;
|-&lt;br /&gt;
| 1003 || [5.0.0+] RequestVerifyApplication&lt;br /&gt;
|-&lt;br /&gt;
| 1004 || [5.0.0+] CorruptContentForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 1200 || [[#NeedsUpdateVulnerability]]&lt;br /&gt;
|-&lt;br /&gt;
| 1300 || IsAnyApplicationEntityInstalled&lt;br /&gt;
|-&lt;br /&gt;
| 1301 || DeleteApplicationContentEntities&lt;br /&gt;
|-&lt;br /&gt;
| 1302 || CleanupUnrecordedApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 1303 || [3.0.0+] CleanupAddOnContentsWithNoRights&lt;br /&gt;
|-&lt;br /&gt;
| 1304 || [3.0.0+] DeleteApplicationContentEntity&lt;br /&gt;
|-&lt;br /&gt;
| 1308 || [5.0.0+] DeleteApplicationCompletelyForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 1309 || [6.0.0+] CleanupUnavailableAddOnContents&lt;br /&gt;
|-&lt;br /&gt;
| 1400 || PrepareShutdown&lt;br /&gt;
|-&lt;br /&gt;
| 1500 || FormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1501 || NeedsSystemUpdateToFormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1502 || GetLastSdCardFormatUnexpectedResult&lt;br /&gt;
|-&lt;br /&gt;
| 1504 || [3.0.0+] InsertSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1505 || [3.0.0+] RemoveSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1506 || [9.0.0+] GetSdCardStartupStatus&lt;br /&gt;
|-&lt;br /&gt;
| 1600 || GetSystemSeedForPseudoDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 1601 || [3.0.0+] ResetSystemSeedForPseudoDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 1700 || ListApplicationDownloadingContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 1701 || [3.0.0+] GetApplicationView&lt;br /&gt;
|-&lt;br /&gt;
| 1702 || [3.0.0+] GetApplicationDownloadTaskStatus&lt;br /&gt;
|-&lt;br /&gt;
| 1703 || [4.0.0+] GetApplicationViewDownloadErrorContext&lt;br /&gt;
|-&lt;br /&gt;
| 1704 || [8.0.0+] GetApplicationViewWithPromotionInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1800 || IsNotificationSetupCompleted&lt;br /&gt;
|-&lt;br /&gt;
| 1801 || GetLastNotificationInfoCount&lt;br /&gt;
|-&lt;br /&gt;
| 1802 || ListLastNotificationInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1803 || [3.0.0+] ListNotificationTask&lt;br /&gt;
|-&lt;br /&gt;
| 1900 || [3.0.0+] IsActiveAccount&lt;br /&gt;
|-&lt;br /&gt;
| 1901 || [4.0.0+] RequestDownloadApplicationPrepurchasedRights&lt;br /&gt;
|-&lt;br /&gt;
| 1902 || [5.0.0+] GetApplicationTicketInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2000 || [4.0.0+] GetSystemDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2001 || [4.0.0+] SelectLatestSystemDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2002 || [4.0.0+] VerifyDeliveryProtocolVersion&lt;br /&gt;
|-&lt;br /&gt;
| 2003 || [4.0.0+] GetApplicationDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2004 || [4.0.0+] HasAllContentsToDeliver&lt;br /&gt;
|-&lt;br /&gt;
| 2005 || [4.0.0+] CompareApplicationDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2006 || [4.0.0+] CanDeliverApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2007 || [4.0.0+] ListContentMetaKeyToDeliverApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2008 || [4.0.0+] NeedsSystemUpdateToDeliverApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2009 || [4.0.0+] EstimateRequiredSize&lt;br /&gt;
|-&lt;br /&gt;
| 2010 || [4.0.0+] RequestReceiveApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2011 || [4.0.0+] CommitReceiveApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2012 || [4.0.0+] GetReceiveApplicationProgress&lt;br /&gt;
|-&lt;br /&gt;
| 2013 || [4.0.0+] RequestSendApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2014 || [4.0.0+] GetSendApplicationProgress&lt;br /&gt;
|-&lt;br /&gt;
| 2015 || [4.0.0+] CompareSystemDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2016 || [4.0.0+] ListNotCommittedContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 2017 || [4.0.0+] RecoverDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 2018 || [5.0.0+] GetApplicationDeliveryInfoHash&lt;br /&gt;
|-&lt;br /&gt;
| 2050 || [6.0.0+] GetApplicationRightsOnClient&lt;br /&gt;
|-&lt;br /&gt;
| 2051 || [9.0.0+] InvalidateRightsIdCache&lt;br /&gt;
|-&lt;br /&gt;
| 2100 || [6.0.0+] GetApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 2101 || [6.0.0+] GetRawApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 2150 || [6.0.0+] CreateRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2151 || [6.0.0+] DestroyRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2152 || [6.0.0+] ActivateRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2153 || [6.0.0+] DeactivateRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2154 || [6.0.0+] ForceActivateRightsContextForExit&lt;br /&gt;
|-&lt;br /&gt;
| 2155 || [7.0.0+] UpdateRightsEnvironmentStatus&lt;br /&gt;
|-&lt;br /&gt;
| 2156 || [9.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 2160 || [6.0.0+] AddTargetApplicationToRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2161 || [6.0.0+] SetUsersToRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2170 || [6.0.0+] GetRightsEnvironmentStatus&lt;br /&gt;
|-&lt;br /&gt;
| 2171 || [6.0.0+] GetRightsEnvironmentStatusChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 2180 || [6.0.0+] RequestExtendExpirationInRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2181 || [6.0.0+] GetResultOfExtendExpirationInRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2182 || [6.0.0+] SetActiveRightsContextUsingStateToRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2190 || [6.0.0+] GetRightsEnvironmentHandleForApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2199 || [6.0.0+] GetRightsEnvironmentCountForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 2200 || [6.0.0+] GetGameCardApplicationCopyIdentifier&lt;br /&gt;
|-&lt;br /&gt;
| 2201 || [6.0.0+] GetInstalledApplicationCopyIdentifier&lt;br /&gt;
|-&lt;br /&gt;
| 2250 || [6.0.0-6.2.0] RequestReportActiveELicence&lt;br /&gt;
|-&lt;br /&gt;
| 2300 || [6.0.0-8.1.0] ListEventLog&lt;br /&gt;
|-&lt;br /&gt;
| 2350 || [7.0.0+] PerformAutoUpdateByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 2400 || [8.0.0+] GetPromotionInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2401 || [8.0.0+] CountPromotionInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2402 || [8.0.0+] ListPromotionInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2403 || [8.0.0+] ImportPromotionJsonForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 2404 || [8.0.0+] ClearPromotionInfoForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 2500 || [8.0.0+] ConfirmAvailableTime&lt;br /&gt;
|-&lt;br /&gt;
| 2510 || [9.0.0+] [[#CreateApplicationResource]]&lt;br /&gt;
|-&lt;br /&gt;
| 2511 || [9.0.0+] [[#GetApplicationResource]]&lt;br /&gt;
|-&lt;br /&gt;
| 2513 || [9.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 2514 || [9.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 2800 || [9.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[4.0.0+] RequestDownloadAddOnContent now takes an additional 8-bytes of input.&lt;br /&gt;
&lt;br /&gt;
==== LaunchDevMenu ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
This is used by AM cmd [[Applet_Manager_services#LaunchDevMenu|LaunchDevMenu]].&lt;br /&gt;
&lt;br /&gt;
This loads titleIDs from [[System_Settings|system-settings]] &amp;lt;code&amp;gt;ns.applet!devmenu_id&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ns.applet!devoverlaydisp_id&amp;lt;/code&amp;gt;, which only exists on devunits. An error is thrown if loading these fail.&lt;br /&gt;
&lt;br /&gt;
[[NCM_services|NCM]] OpenContentMetaDatabase is used with StorageId = NandSystem, then IContentMetaDatabase GetLatestContentMetaKey is used with both of the above titleIDs to verify that the cmd is successful.&lt;br /&gt;
&lt;br /&gt;
Then if the above succeeds, the above titles are launched with the above StorageId via [[Process_Manager_services|pmshell]] LaunchProgram, with a 0.5s sleep-thread afterwards on success.&lt;br /&gt;
&lt;br /&gt;
==== CreateApplicationResource ====&lt;br /&gt;
Returns an [[#IApplicationResource]].&lt;br /&gt;
&lt;br /&gt;
==== GetApplicationResource ====&lt;br /&gt;
Returns an [[#IApplicationResource]].&lt;br /&gt;
&lt;br /&gt;
=== IApplicationVersionInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IApplicationVersionInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [4.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetLaunchRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 1 || UpgradeLaunchRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 35 || UpdateVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 36 || PushLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| 37 || ListRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 800 || RequestVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 801 || ListVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 802 || RequestVersionListData&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || PerformAutoUpdate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IContentManagerInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IContentManagementInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 11 || CalculateApplicationOccupiedSize&lt;br /&gt;
|-&lt;br /&gt;
| 43 || CheckSdCardMountStatus&lt;br /&gt;
|-&lt;br /&gt;
| 47 || GetTotalSpaceSize&lt;br /&gt;
|-&lt;br /&gt;
| 48 || GetFreeSpaceSize&lt;br /&gt;
|-&lt;br /&gt;
| 600 || CountApplicationContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 601 || ListApplicationContentMetaStatus&lt;br /&gt;
|-&lt;br /&gt;
| 605 || ListApplicationContentMetaStatusWithRightsCheck&lt;br /&gt;
|-&lt;br /&gt;
| 607 || IsAnyApplicationRunning&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IDocumentInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IDocumentInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 21 || GetApplicationContentPath&lt;br /&gt;
|-&lt;br /&gt;
| 23 || ResolveApplicationContentPath&lt;br /&gt;
|-&lt;br /&gt;
| 92 || [5.0.0+] GetRunningApplicationProgramId&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IDownloadTaskInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IDownloadTaskInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 701 || ClearTaskStatusList&lt;br /&gt;
|-&lt;br /&gt;
| 702 || RequestDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 703 || RequestEnsureDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 704 || ListDownloadTaskStatus&lt;br /&gt;
|-&lt;br /&gt;
| 705 || RequestDownloadTaskListData&lt;br /&gt;
|-&lt;br /&gt;
| 706 || [4.0.0+] TryCommitCurrentApplicationDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 707 || [4.0.0+] EnableAutoCommit&lt;br /&gt;
|-&lt;br /&gt;
| 708 || [4.0.0+] DisableAutoCommit&lt;br /&gt;
|-&lt;br /&gt;
| 709 || [4.0.0+] TriggerDynamicCommitEvent&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IReadOnlyApplicationRecordInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IReadOnlyApplicationRecordInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [5.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || HasApplicationRecord || Same as [[#IApplicationManagerInterface]] cmd 910&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IReadOnlyApplicationControlDataInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IReadOnlyApplicationControlDataInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [5.1.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetApplicationControlData]] || Same as [[#IApplicationManagerInterface]] cmd 400&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetApplicationDesiredLanguage]] || Same as [[#IApplicationManagerInterface]] cmd 55&lt;br /&gt;
|-&lt;br /&gt;
| 2 || ConvertApplicationLanguageToLanguageCode || Same as [[#IApplicationManagerInterface]] cmd 59&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#ConvertLanguageCodeToApplicationLanguage]] || Same as [[#IApplicationManagerInterface]] cmd 60&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [9.0.0+] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IDynamicRightsInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IDynamicRightsInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [6.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RequestApplicationRightsOnServer || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || RequestAssignRights || &lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeprecatedRequestAssignRightsToResume || &lt;br /&gt;
|-&lt;br /&gt;
| 5 || VerifyActivatedRightsOwners || &lt;br /&gt;
|-&lt;br /&gt;
| 6 || DeprecatedGetApplicationRightsStatus || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || RequestPrefetchForDynamicRights || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || GetDynamicRightsState || &lt;br /&gt;
|-&lt;br /&gt;
| 9 || [7.0.0+] RequestApplicationRightsOnServerToResume || &lt;br /&gt;
|-&lt;br /&gt;
| 10 || [7.0.0+] RequestAssignRightsToResume || &lt;br /&gt;
|-&lt;br /&gt;
| 11 || [7.0.0+] GetActivatedRightsUsers || &lt;br /&gt;
|-&lt;br /&gt;
| 12 || [8.0.0+] GetApplicationRightsStatus ||&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [8.0.0+] GetRunningApplicationStatus ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IECommerceInterface===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IECommerceInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [4.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RequestLinkDevice || Takes a total of 0x10-bytes of input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [6.0.0+] RequestCleanupAllPreInstalledApplications || No input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [6.0.0+] RequestCleanupPreInstalledApplication || Takes a total of 0x8-bytes of input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [6.0.0+] RequestSyncRights || No input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [6.0.0+] RequestUnlinkDevice || Takes a total of 0x10-bytes of input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [6.1.0+] RequestRevokeAllELicense || Takes a total of 0x10-bytes of input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [9.0.0+] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IFactoryResetInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IFactoryResetInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 100 || ResetToFactorySettings&lt;br /&gt;
|-&lt;br /&gt;
| 101 || ResetToFactorySettingsWithoutUserSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 102 || ResetToFactorySettingsForRefurbishment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IApplicationResource ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IApplicationResource&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [9.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Attach&lt;br /&gt;
|-&lt;br /&gt;
| 1 || BoostSystemMemoryResourceLimit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ns:vm =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IVulnerabilityManagerInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 1200 || [3.0.0+] [[#NeedsUpdateVulnerability]]&lt;br /&gt;
|-&lt;br /&gt;
| 1201 || [4.0.0+] [[#UpdateSafeSystemVersionForDebug]]&lt;br /&gt;
|-&lt;br /&gt;
| 1202 || [4.0.0+] [[#GetSafeSystemVersion]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== NeedsUpdateVulnerability ==&lt;br /&gt;
No input, returns an output u8 bool flag.&lt;br /&gt;
&lt;br /&gt;
Web-applets use this command to check if the system needs an update.&lt;br /&gt;
&lt;br /&gt;
== UpdateSafeSystemVersionForDebug ==&lt;br /&gt;
Takes an input u64 &#039;&#039;&#039;titleID&#039;&#039;&#039; and an u32 &#039;&#039;&#039;version&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This command is not available for retail units. On a debug unit, if the [[System_Settings|system setting]] &amp;lt;code&amp;gt;vulnerability!enable_debug&amp;lt;/code&amp;gt; is set, this mounts the system savegame [[Flash_Filesystem#System_Savegames|0x8000000000000049]] as &amp;quot;ns_ssversion:/&amp;quot;, opens the file &amp;quot;ns_ssversion:/entry&amp;quot; and writes the supplied &#039;&#039;&#039;titleID&#039;&#039;&#039; and &#039;&#039;&#039;version&#039;&#039;&#039; in it.&lt;br /&gt;
&lt;br /&gt;
Finally, it calls [[NCM_services#ncm|OpenContentMetaDatabase]] with [[Filesystem_services#StorageId|StorageID]] 3, then calls [[NCM_services#IContentMetaDatabase|GetLatestContentMetaKey]] with the supplied &#039;&#039;&#039;titleID&#039;&#039;&#039; and compares the version field from the returned [[CNMT#Content_Meta_Records|Content Meta Record]] with the supplied &#039;&#039;&#039;version&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If the supplied &#039;&#039;&#039;version&#039;&#039;&#039; is higher than the one in NCM&#039;s database, the value returned by [[NS_Services#NeedsUpdateVulnerability|NeedsUpdateVulnerability]] is set to &amp;quot;true&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== GetSafeSystemVersion ==&lt;br /&gt;
No input, returns a 0x10 byte array with the cached contents of &amp;quot;ns_ssversion:/entry&amp;quot; (u64 &#039;&#039;&#039;titleID&#039;&#039;&#039;, u32 &#039;&#039;&#039;version&#039;&#039;&#039; and u32 &#039;&#039;&#039;policy&#039;&#039;&#039; from &amp;lt;code&amp;gt;vulnerability!needs_update_vulnerability_policy&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
= ns:su =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::ISystemUpdateInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetBackgroundNetworkUpdateState&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#ISystemUpdateControl|OpenSystemUpdateControl]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || NotifyExFatDriverRequired&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ClearExFatDriverStatusForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 4 || RequestBackgroundNetworkUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 5 || NotifyBackgroundNetworkUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 6 || NotifyExFatDriverDownloadedForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetSystemUpdateNotificationEventForContentDelivery&lt;br /&gt;
|-&lt;br /&gt;
| 10 || NotifySystemUpdateForContentDelivery&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [3.0.0+] PrepareShutdown&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [3.0.0-3.0.2]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [3.0.0-3.0.2]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [3.0.0-3.0.2]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [3.0.0-3.0.2]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [4.0.0+] DestroySystemUpdateTask&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [4.0.0+] RequestSendSystemUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 18 || [4.0.0+] GetSendSystemUpdateProgress&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ISystemUpdateControl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#HasDownloaded]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || RequestCheckLatestUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 2 || RequestDownloadLatestUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#GetDownloadProgress]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#ApplyDownloadedUpdate]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || RequestPrepareCardUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetPrepareCardUpdateProgress&lt;br /&gt;
|-&lt;br /&gt;
| 7 || HasPreparedCardUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 8 || ApplyCardUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#GetDownloadedEulaDataSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#GetDownloadedEulaData]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SetupCardUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetPreparedCardUpdateEulaDataSize&lt;br /&gt;
|-&lt;br /&gt;
| 13 || GetPreparedCardUpdateEulaData&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [4.0.0+] SetupCardUpdateViaSystemUpdater&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [4.0.0+] HasReceived&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [4.0.0+] RequestReceiveSystemUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [4.0.0+] GetReceiveProgress&lt;br /&gt;
|-&lt;br /&gt;
| 18 || [4.0.0+] ApplyReceivedUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [4.0.0+] GetReceivedEulaDataSize&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [4.0.0+] GetReceivedEulaData&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [4.0.0+] SetupToReceiveSystemUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [6.0.0+] RequestCheckLatestUpdateIncludesRebootlessUpdate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== HasDownloaded ===&lt;br /&gt;
No input, returns an output u8 bool flag.&lt;br /&gt;
&lt;br /&gt;
Gets whether a network sysupdate was downloaded, with install pending.&lt;br /&gt;
&lt;br /&gt;
Uses [[NIM_services|nim]] ListSystemUpdateTask and [[NIM_services|nim]] GetSystemUpdateTaskInfo. When ListSystemUpdateTask successfully returns a task and GetSystemUpdateTaskInfo is successful, the output flag is set to: &amp;lt;code&amp;gt;*((u8*)(taskinfo+0) == 0x3&amp;lt;/code&amp;gt;. Otherwise, flag=0.&lt;br /&gt;
&lt;br /&gt;
This always returns 0, however this will assert if GetSystemUpdateTaskInfo fails with ret!=0x3C89.&lt;br /&gt;
&lt;br /&gt;
=== GetDownloadProgress ===&lt;br /&gt;
No input, returns a 0x10-byte output struct.&lt;br /&gt;
&lt;br /&gt;
Similar to [[#HasDownloaded]] except instead of a flag, this returns the 0x10-bytes from taskinfo+8. The output struct is cleared when the task(info) isn&#039;t available.&lt;br /&gt;
&lt;br /&gt;
=== ApplyDownloadedUpdate ===&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
Runs code similar to [[#HasDownloaded]], throwing an error if a network sysupdate isn&#039;t ready for install. Then the sysupdate is installed:&lt;br /&gt;
&lt;br /&gt;
* Uses ListSystemUpdateTask again, then [[NIM_services|nim]] IsExFatDriverIncluded. Runs ExFat handling when the output flag is set.&lt;br /&gt;
* The two flags in [[Flash_Filesystem#System_Update_Control]] are set to 1.&lt;br /&gt;
* Uses [[NIM_services|nim]] CommitSystemUpdateTask and [[NIM_services|nim]] DestroySystemUpdateTask.&lt;br /&gt;
* Installs FIRM.&lt;br /&gt;
&lt;br /&gt;
=== GetDownloadedEulaDataSize ===&lt;br /&gt;
Takes a type-0x15 input buffer &#039;&#039;&#039;path&#039;&#039;&#039;, returns an output u64 &#039;&#039;&#039;filesize&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Runs code similar to [[#HasDownloaded]], throwing an error if a network sysupdate isn&#039;t ready for install.&lt;br /&gt;
&lt;br /&gt;
Uses ListSystemUpdateTask again. Then [[NIM_services|nim]] GetDownloadedSystemDataPath, with the output ContentPath being used to mount the EULA title with FS.&lt;br /&gt;
&lt;br /&gt;
Then &amp;quot;&amp;lt;mountname&amp;gt;:/&amp;lt;&#039;&#039;&#039;path&#039;&#039;&#039;&amp;gt;&amp;quot; is opened, gets the &#039;&#039;&#039;filesize&#039;&#039;&#039;, then runs cleanup.&lt;br /&gt;
&lt;br /&gt;
=== GetDownloadedEulaData ===&lt;br /&gt;
Takes a type-0x15 input buffer &#039;&#039;&#039;path&#039;&#039;&#039; and a type-0x6 output buffer, returns an output u64 &#039;&#039;&#039;filesize&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Similar to [[#GetDownloadedEulaDataSize]] except this reads the file instead, using the specified output buffer with size=filesize. This will throw an error if the filesize is larger than the buffer size.&lt;br /&gt;
&lt;br /&gt;
= IAsyncValue =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IAsyncValue&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetSize&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Get&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [4.0.0+] GetErrorContext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Cmd3: No input/output, takes a type-0x16 output buffer.&lt;br /&gt;
&lt;br /&gt;
= IAsyncResult =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IAsyncResult&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Get&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] GetErrorContext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Cmd2: No input/output, takes a type-0x16 output buffer.&lt;br /&gt;
&lt;br /&gt;
= ns:dev =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IDevelopInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#LaunchProgram]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#TerminateProcess]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#TerminateProgram]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#GetShellEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#GetShellEventInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [[#TerminateApplication]]&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#PrepareLaunchProgramFromHost]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [[#LaunchApplicationForDevelop]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#LaunchApplicationWithStorageIdForDevelop]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [6.0.0+] TerminateApplication2&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [6.0.0+] GetRunningApplicationProcessIdForDevelop&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [6.0.0+] SetCurrentApplicationRightsEnvironmentCanBeActiveForDevelop&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [9.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [9.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== LaunchProgram ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#LaunchProcess|LaunchProcess]].&lt;br /&gt;
&lt;br /&gt;
== TerminateProcess ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#TerminateTitleByPid|TerminateTitleByPid]].&lt;br /&gt;
&lt;br /&gt;
== TerminateProgram ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#TerminateTitleByTitleId|TerminateTitleByTitleId]].&lt;br /&gt;
&lt;br /&gt;
== GetShellEvent ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetProcessEventWaiter|GetProcessEventWaiter]].&lt;br /&gt;
&lt;br /&gt;
== GetShellEventInfo ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetProcessEventType|GetProcessEventType]].&lt;br /&gt;
&lt;br /&gt;
== TerminateApplication ==&lt;br /&gt;
Calls &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetCrashingProcessPid|GetCrashingProcessPid]] and sends PID to [[Process_Manager_services#TerminateTitleByPid|TerminateTitleByPid]].&lt;br /&gt;
&lt;br /&gt;
== PrepareLaunchProgramFromHost ==&lt;br /&gt;
Takes a type-0x5 input buffer containing the [[Filesystem_services|ContentPath]], returns an output 0x10-byte struct.&lt;br /&gt;
&lt;br /&gt;
Calls [[NCM_services#IPathResolverForStorage|IPathResolverForStorage]] Set...NcaPath functions.&lt;br /&gt;
&lt;br /&gt;
== LaunchApplicationForDevelop ==&lt;br /&gt;
Takes an input u32 [[Process_Manager_services#LaunchFlags|LaunchFlags]] and u64 titleID, returns an output u64 PID.&lt;br /&gt;
&lt;br /&gt;
Same as LaunchApplicationWithStorageId except the last two params passed to the internal vtable funcptr call are value 0x6, instead of from the command input.&lt;br /&gt;
&lt;br /&gt;
== LaunchApplicationWithStorageIdForDevelop ==&lt;br /&gt;
Takes 2 input u8s, an u32 [[Process_Manager_services#LaunchFlags|LaunchFlags]], and an u64 titleID. Returns an output u64 PID.&lt;br /&gt;
&lt;br /&gt;
Launches an application title which is registered with NS.&lt;br /&gt;
&lt;br /&gt;
== Cmd13 ==&lt;br /&gt;
Returns an [[#IApplicationResource]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Paeton</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=NS_services&amp;diff=7769</id>
		<title>NS services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=NS_services&amp;diff=7769"/>
		<updated>2019-09-10T15:27:22Z</updated>

		<summary type="html">&lt;p&gt;Paeton: /* IApplicationManagerInterface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= aoc:u =&lt;br /&gt;
This is &amp;quot;nn::aocsrv::detail::IAddOnContentManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [1.0.0-6.2.0] CountAddOnContentByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [1.0.0-6.2.0] ListAddOnContentByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 2 || CountAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ListAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [1.0.0-6.2.0] GetAddOnContentBaseIdByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetAddOnContentBaseId&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [1.0.0-6.2.0] PrepareAddOnContentByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 7 || PrepareAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [4.0.0+] GetAddOnContentListChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [7.0.0+] [[#IPurchaseEventManager|CreateEcPurchasedEventManager]]&lt;br /&gt;
|-&lt;br /&gt;
| 101 || [9.0.0+] [[#IPurchaseEventManager|CreatePermanentEcPurchasedEventManager]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IPurchaseEventManager ==&lt;br /&gt;
This is &amp;quot;nn::ec::IPurchaseEventManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetDefaultDeliveryTarget&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SetDeliveryTarget&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetPurchasedEventReadableHandle&lt;br /&gt;
|-&lt;br /&gt;
| 3 || PopPurchasedProductInfo&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [9.0.0+] PopPurchasedProductInfoWithUid&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ns:am =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IApplicationManagerInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[3.0.0+] This service was replaced by [[#ns:am2, ns:ec, ns:rid, ns:rt, ns:web|ns:am2]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#ListApplicationRecord]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GenerateApplicationRecordCount&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetApplicationRecordUpdateSystemEvent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetApplicationViewDeprecated&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeleteApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 5 || DeleteApplicationCompletely&lt;br /&gt;
|-&lt;br /&gt;
| 6 || IsAnyApplicationEntityRedundant&lt;br /&gt;
|-&lt;br /&gt;
| 7 || DeleteRedundantApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 8 || IsApplicationEntityMovable&lt;br /&gt;
|-&lt;br /&gt;
| 9 || MoveApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 11 || CalculateApplicationOccupiedSize&lt;br /&gt;
|-&lt;br /&gt;
| 16 || PushApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 17 || ListApplicationRecordContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 18 || &lt;br /&gt;
|-&lt;br /&gt;
| 19 || [[#LaunchApplication]]&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#GetApplicationContentPath]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || TerminateApplication&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [2.0.0+] ResolveApplicationContentPath&lt;br /&gt;
|-&lt;br /&gt;
| 26 || BeginInstallApplication&lt;br /&gt;
|-&lt;br /&gt;
| 27 || DeleteApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 30 || RequestApplicationUpdateInfo&lt;br /&gt;
|-&lt;br /&gt;
| 31 || RequestUpdateApplication&lt;br /&gt;
|-&lt;br /&gt;
| 32 || CancelApplicationDownload&lt;br /&gt;
|-&lt;br /&gt;
| 33 || ResumeApplicationDownload&lt;br /&gt;
|-&lt;br /&gt;
| 34 || &lt;br /&gt;
|-&lt;br /&gt;
| 35 || UpdateVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 36 || PushLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| 37 || ListRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 38 || CheckApplicationLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| 39 || CheckApplicationLaunchRights&lt;br /&gt;
|-&lt;br /&gt;
| 40 || GetApplicationLogoData&lt;br /&gt;
|-&lt;br /&gt;
| 41 || CalculateApplicationDownloadRequiredSize&lt;br /&gt;
|-&lt;br /&gt;
| 42 || CleanupSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 43 || CheckSdCardMountStatus&lt;br /&gt;
|-&lt;br /&gt;
| 44 || GetSdCardMountStatusChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 45 || GetGameCardAttachmentEvent&lt;br /&gt;
|-&lt;br /&gt;
| 46 || GetGameCardAttachmentInfo&lt;br /&gt;
|-&lt;br /&gt;
| 47 || [[#GetTotalSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 48 || [[#GetFreeSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 49 || GetSdCardRemovedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 52 || GetGameCardUpdateDetectionEvent&lt;br /&gt;
|-&lt;br /&gt;
| 53 || DisableApplicationAutoDelete&lt;br /&gt;
|-&lt;br /&gt;
| 54 || EnableApplicationAutoDelete&lt;br /&gt;
|-&lt;br /&gt;
| 55 || [[#GetApplicationDesiredLanguage]]&lt;br /&gt;
|-&lt;br /&gt;
| 56 || SetApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 57 || ClearApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 58 || GetLastSdCardMountUnexpectedResult&lt;br /&gt;
|-&lt;br /&gt;
| 59 || ConvertApplicationLanguageToLanguageCode&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [[#ConvertLanguageCodeToApplicationLanguage]]&lt;br /&gt;
|-&lt;br /&gt;
| 61 || GetBackgroundDownloadStressTaskInfo&lt;br /&gt;
|-&lt;br /&gt;
| 62 || GetGameCardStopper&lt;br /&gt;
|-&lt;br /&gt;
| 63 || IsSystemProgramInstalled&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [2.0.0+] StartApplyDeltaTask&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [2.0.0+] GetRequestServerStopper&lt;br /&gt;
|-&lt;br /&gt;
| 100 || ResetToFactorySettings&lt;br /&gt;
|-&lt;br /&gt;
| 101 || ResetToFactorySettingsWithoutUserSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 102 || [2.0.0+] ResetToFactorySettingsForRefurbishment&lt;br /&gt;
|-&lt;br /&gt;
| 200 || CalculateUserSaveDataStatistics&lt;br /&gt;
|-&lt;br /&gt;
| 201 || DeleteUserSaveDataAll&lt;br /&gt;
|-&lt;br /&gt;
| 210 || DeleteUserSystemSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 220 || UnregisterNetworkServiceAccount&lt;br /&gt;
|-&lt;br /&gt;
| 300 || GetApplicationShellEvent&lt;br /&gt;
|-&lt;br /&gt;
| 301 || PopApplicationShellEventInfo&lt;br /&gt;
|-&lt;br /&gt;
| 302 || LaunchLibraryApplet&lt;br /&gt;
|-&lt;br /&gt;
| 303 || TerminateLibraryApplet&lt;br /&gt;
|-&lt;br /&gt;
| 304 || LaunchSystemApplet&lt;br /&gt;
|-&lt;br /&gt;
| 305 || TerminateSystemApplet&lt;br /&gt;
|-&lt;br /&gt;
| 306 || LaunchOverlayApplet&lt;br /&gt;
|-&lt;br /&gt;
| 307 || TerminateOverlayApplet&lt;br /&gt;
|-&lt;br /&gt;
| 400 || [[#GetApplicationControlData]]&lt;br /&gt;
|-&lt;br /&gt;
| 401 || InvalidateAllApplicationControlCache&lt;br /&gt;
|-&lt;br /&gt;
| 402 || RequestDownloadApplicationControlData&lt;br /&gt;
|-&lt;br /&gt;
| 403 || GetMaxApplicationControlCacheCount&lt;br /&gt;
|-&lt;br /&gt;
| 404 || [2.0.0+] InvalidateApplicationControlCache&lt;br /&gt;
|-&lt;br /&gt;
| 405 || [2.0.0+] ListApplicationControlCacheEntryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 502 || [2.0.0+] RequestCheckGameCardRegistration&lt;br /&gt;
|-&lt;br /&gt;
| 503 || [2.0.0+] RequestGameCardRegistrationGoldPoint&lt;br /&gt;
|-&lt;br /&gt;
| 504 || [2.0.0+] RequestRegisterGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 600 || [2.0.0+] CountApplicationContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 601 || [2.0.0+] [[#ListApplicationContentMetaStatus]]&lt;br /&gt;
|-&lt;br /&gt;
| 602 || [2.0.0+] ListAvailableAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 603 || [2.0.0+] GetOwnedApplicationContentMetaStatus&lt;br /&gt;
|-&lt;br /&gt;
| 604 || [2.0.0+] RegisterContentsExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 605 || [2.0.0+] ListApplicationContentMetaStatusWithRightsCheck&lt;br /&gt;
|-&lt;br /&gt;
| 700 || [2.0.0+] PushDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 701 || [2.0.0+] ClearTaskStatusList&lt;br /&gt;
|-&lt;br /&gt;
| 702 || [2.0.0+] RequestDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 703 || [2.0.0+] RequestEnsureDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 704 || [2.0.0+] ListDownloadTaskStatus&lt;br /&gt;
|-&lt;br /&gt;
| 705 || [2.0.0+] RequestDownloadTaskListData&lt;br /&gt;
|-&lt;br /&gt;
| 800 || [2.0.0+] RequestVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 801 || [2.0.0+] ListVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 900 || [2.0.0+] GetApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 901 || [2.0.0+] GetApplicationRecordProperty&lt;br /&gt;
|-&lt;br /&gt;
| 902 || [2.0.0+] EnableApplicationAutoUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 903 || [2.0.0+] DisableApplicationAutoUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 904 || [2.0.0+] TouchApplication&lt;br /&gt;
|-&lt;br /&gt;
| 905 || [2.0.0+] RequestApplicationUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 906 || [2.0.0+] IsApplicationUpdateRequested&lt;br /&gt;
|-&lt;br /&gt;
| 907 || [2.0.0+] WithdrawApplicationUpdateRequest&lt;br /&gt;
|-&lt;br /&gt;
| 908 || [2.0.0+] ListApplicationRecordInstalledContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || [2.0.0+] RequestVerifyApplicationDeprecated&lt;br /&gt;
|-&lt;br /&gt;
| 1001 || [2.0.0+] CorruptApplicationForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 1200 || [2.0.0+] [[#NeedsUpdateVulnerability]]&lt;br /&gt;
|-&lt;br /&gt;
| 1300 || [2.0.0+] IsAnyApplicationEntityInstalled&lt;br /&gt;
|-&lt;br /&gt;
| 1301 || [2.0.0+] DeleteApplicationContentEntities&lt;br /&gt;
|-&lt;br /&gt;
| 1302 || [2.0.0+] CleanupUnrecordedApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 1400 || [2.0.0+] PrepareShutdown&lt;br /&gt;
|-&lt;br /&gt;
| 1500 || [2.0.0+] FormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1501 || [2.0.0+] NeedsSystemUpdateToFormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1502 || [2.0.0+] GetLastSdCardFormatUnexpectedResult&lt;br /&gt;
|-&lt;br /&gt;
| 1503 || [2.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 1600 || [2.0.0+] GetSystemSeedForPseudoDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 1700 || [2.0.0+] ListApplicationDownloadingContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 1800 || [2.0.0+] IsNotificationSetupCompleted&lt;br /&gt;
|-&lt;br /&gt;
| 1801 || [2.0.0+] GetLastNotificationInfoCount&lt;br /&gt;
|-&lt;br /&gt;
| 1802 || [2.0.0+] ListLastNotificationInfo&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ListApplicationRecord ==&lt;br /&gt;
Takes a type-6 output buffer and an u32 entry_offset.&lt;br /&gt;
&lt;br /&gt;
Returns an array of title-info entries using the specified offset and size. No input titleID is passed to this.&lt;br /&gt;
&lt;br /&gt;
=== Application Record Format ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| Title ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x1&lt;br /&gt;
| Type? (Known values: 2=Installing?, 3=Gamecard?, 4=Installed?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown, usually 0x02&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| 0x6&lt;br /&gt;
| Unknown, usually zeros?&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown, seems to change between reboots and removing/reinserting gamecards&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| 0x7&lt;br /&gt;
| Unknown, usually zeros?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== LaunchApplication ==&lt;br /&gt;
Takes an input u64 titleID, returns an output u64 PID.&lt;br /&gt;
&lt;br /&gt;
Launches an application title which is registered with NS.&lt;br /&gt;
&lt;br /&gt;
== GetApplicationContentPath ==&lt;br /&gt;
Takes a 0x16-type output buffer, an u8 [[NCM_services#Title_Types|title type]], and an u64 titleID.&lt;br /&gt;
&lt;br /&gt;
The input titleID is used with the application-title table like various other cmds, anything not in that table can&#039;t be used with this.&lt;br /&gt;
&lt;br /&gt;
Returns a string path for the specified type of patch content with this titleID, otherwise returns regular-application paths when update-title not installed. Returns an error when the specified type of content doesn&#039;t exist for this title. Starts with &amp;quot;@{SdCardContent,UserContent}://&amp;quot; and ends in &amp;quot;.nca&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For gamecard content, the output path is: &amp;quot;@GcSXXXXXXXX:/&amp;lt;NcaId&amp;gt;.nca&amp;quot;. NCA-type0 with gamecard returns 0 with an empty output string.&lt;br /&gt;
&lt;br /&gt;
The output string is then used by the user-process with [[Filesystem_services|FS]] to mount the content.&lt;br /&gt;
&lt;br /&gt;
== GetTotalSpaceSize ==&lt;br /&gt;
Takes an input media-id that must be 5.&lt;br /&gt;
&lt;br /&gt;
Returns the u64 from [[Content_Manager_services#IContentStorage]] cmd22.&lt;br /&gt;
&lt;br /&gt;
== GetFreeSpaceSize ==&lt;br /&gt;
Takes an input media-id that must be 5.&lt;br /&gt;
&lt;br /&gt;
Returns the u64 from [[Content_Manager_services#IContentStorage]] cmd23.&lt;br /&gt;
&lt;br /&gt;
== GetApplicationDesiredLanguage ==&lt;br /&gt;
Takes an input u8 language-bitmask, returns an output u8 [[control.nacp]] langentry index.&lt;br /&gt;
&lt;br /&gt;
User-processes generate the language-bitmask with the following for all 16 lang-entries: &amp;lt;code&amp;gt;if(&amp;lt;either string in langentry[i] is non-empty&amp;gt;)bitmask |= 1&amp;lt;&amp;lt;i&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ConvertLanguageCodeToApplicationLanguage ==&lt;br /&gt;
Takes an input u8 pointer for the resulting Id to be written to and a string represented as a u64 (i.e 0x53552D6E65 for &#039;en-US&#039;).&lt;br /&gt;
&lt;br /&gt;
Returns 0 if an ID was successfully found, otherwise returns 0x25810.&lt;br /&gt;
&lt;br /&gt;
== GetApplicationControlData ==&lt;br /&gt;
Takes an input u8 flag, an u64 titleID, and a type-0x6 output buffer. Returns an output u32 for actual_size. Official user-processes use buffer size 0x24000. [[qlaunch]] only uses flag value 0x1.&lt;br /&gt;
&lt;br /&gt;
Loads cached [[control.nacp]] to buf+0 and the cached icon to buf+0x4000. Returns an error if the buffer is too small.&lt;br /&gt;
&lt;br /&gt;
== ListApplicationContentMetaStatus ==&lt;br /&gt;
Returns 0x10-byte entries using the specified titleID starting at the specified u32 entryindex. Can only return game titles. The second entry if any is the update-title usually. When the input entryindex is &amp;gt;= totalentries, this will return 0 with out_entrycount=0.&lt;br /&gt;
&lt;br /&gt;
Entry structure:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8 &amp;quot;type&amp;quot;. [[Content_Manager_services|Title type]] (String is from web-applet)&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8 &amp;quot;installedStorage&amp;quot; / [[Filesystem_services|StorageId]] (String is from web-applet)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown. Non-zero with output from cmd 605, differs for app/update titles.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32 Title-version&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| u64 titleID&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ns:am2, ns:ec, ns:rid, ns:rt, ns:web =&lt;br /&gt;
These services are all, at the top level, &amp;quot;nn::ns::detail::IServiceGetterInterface&amp;quot;. These commands check a state field for a command-specific bit and returns an error if not set, this is likely a permissions check for service+command.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 7988 || [6.0.0+] [[#IDynamicRightsInterface|GetDynamicRightsInterface]].&lt;br /&gt;
|-&lt;br /&gt;
| 7989 || [5.1.0+] [[#IReadOnlyApplicationControlDataInterface|GetReadOnlyApplicationControlDataInterface]].&lt;br /&gt;
|-&lt;br /&gt;
| 7991 || [5.0.0+] [[#IReadOnlyApplicationRecordInterface|GetReadOnlyApplicationRecordInterface]].&lt;br /&gt;
|-&lt;br /&gt;
| 7992 || [4.0.0+] [[#IECommerceInterface|GetECommerceInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7993 || [4.0.0+] [[#IApplicationVersionInterface|GetApplicationVersionInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7994 || [[#IFactoryResetInterface|GetFactoryResetInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7995 || [[#IAccountProxyInterface|GetAccountProxyInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7996 || [[#IApplicationManagerInterface|GetApplicationManagerInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7997 || [[#IDownloadTaskInterface|GetDownloadTaskInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7998 || [[#IContentManagementInterface|GetContentManagementInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7999 || [[#IDocumentInterface|GetDocumentInterface]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IAccountProxyInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IAccountProxyInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateUserAccount&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IApplicationManagerInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IApplicationManagerInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#ListApplicationRecord]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GenerateApplicationRecordCount&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetApplicationRecordUpdateSystemEvent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetApplicationViewDeprecated&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeleteApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 5 || DeleteApplicationCompletely&lt;br /&gt;
|-&lt;br /&gt;
| 6 || IsAnyApplicationEntityRedundant&lt;br /&gt;
|-&lt;br /&gt;
| 7 || DeleteRedundantApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 8 || IsApplicationEntityMovable&lt;br /&gt;
|-&lt;br /&gt;
| 9 || MoveApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 11 || CalculateApplicationOccupiedSize&lt;br /&gt;
|-&lt;br /&gt;
| 16 || PushApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 17 || ListApplicationRecordContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [1.0.0-5.1.0] LaunchApplicationOld&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#GetApplicationContentPath]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || TerminateApplication&lt;br /&gt;
|-&lt;br /&gt;
| 23 || ResolveApplicationContentPath&lt;br /&gt;
|-&lt;br /&gt;
| 26 || BeginInstallApplication&lt;br /&gt;
|-&lt;br /&gt;
| 27 || DeleteApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 30 || RequestApplicationUpdateInfo&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [1.0.0-3.0.2] &lt;br /&gt;
|-&lt;br /&gt;
| 32 || CancelApplicationDownload&lt;br /&gt;
|-&lt;br /&gt;
| 33 || ResumeApplicationDownload&lt;br /&gt;
|-&lt;br /&gt;
| 35 || UpdateVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 36 || PushLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| 37 || ListRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 38 || CheckApplicationLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| 39 || [1.0.0-6.2.0] CheckApplicationLaunchRights&lt;br /&gt;
|-&lt;br /&gt;
| 40 || GetApplicationLogoData&lt;br /&gt;
|-&lt;br /&gt;
| 41 || CalculateApplicationDownloadRequiredSize&lt;br /&gt;
|-&lt;br /&gt;
| 42 || CleanupSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 43 || CheckSdCardMountStatus&lt;br /&gt;
|-&lt;br /&gt;
| 44 || GetSdCardMountStatusChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 45 || GetGameCardAttachmentEvent&lt;br /&gt;
|-&lt;br /&gt;
| 46 || GetGameCardAttachmentInfo&lt;br /&gt;
|-&lt;br /&gt;
| 47 || [[#GetTotalSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 48 || [[#GetFreeSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 49 || GetSdCardRemovedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 52 || GetGameCardUpdateDetectionEvent&lt;br /&gt;
|-&lt;br /&gt;
| 53 || DisableApplicationAutoDelete&lt;br /&gt;
|-&lt;br /&gt;
| 54 || EnableApplicationAutoDelete&lt;br /&gt;
|-&lt;br /&gt;
| 55 || GetApplicationDesiredLanguage&lt;br /&gt;
|-&lt;br /&gt;
| 56 || SetApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 57 || ClearApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 58 || GetLastSdCardMountUnexpectedResult&lt;br /&gt;
|-&lt;br /&gt;
| 59 || ConvertApplicationLanguageToLanguageCode&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [[#ConvertLanguageCodeToApplicationLanguage]]&lt;br /&gt;
|-&lt;br /&gt;
| 61 || GetBackgroundDownloadStressTaskInfo&lt;br /&gt;
|-&lt;br /&gt;
| 62 || GetGameCardStopper&lt;br /&gt;
|-&lt;br /&gt;
| 63 || IsSystemProgramInstalled&lt;br /&gt;
|-&lt;br /&gt;
| 64 || StartApplyDeltaTask&lt;br /&gt;
|-&lt;br /&gt;
| 65 || GetRequestServerStopper&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [3.0.0+] GetBackgroundApplyDeltaStressTaskInfo&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [3.0.0+] CancelApplicationApplyDelta&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [3.0.0+] ResumeApplicationApplyDelta&lt;br /&gt;
|-&lt;br /&gt;
| 69 || [3.0.0+] CalculateApplicationApplyDeltaRequiredSize&lt;br /&gt;
|-&lt;br /&gt;
| 70 || [3.0.0+] ResumeAll&lt;br /&gt;
|-&lt;br /&gt;
| 71 || [3.0.0+] GetStorageSize&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [3.0.0+] RequestDownloadApplication&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [3.0.0+] RequestDownloadAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 82 || [3.0.0+] DownloadApplication&lt;br /&gt;
|-&lt;br /&gt;
| 83 || [4.0.0-6.2.0] CheckApplicationResumeRights&lt;br /&gt;
|-&lt;br /&gt;
| 84 || [4.0.0+] GetDynamicCommitEvent&lt;br /&gt;
|-&lt;br /&gt;
| 85 || [4.0.0+] RequestUpdateApplication2&lt;br /&gt;
|-&lt;br /&gt;
| 86 || [4.0.0+] EnableApplicationCrashReport&lt;br /&gt;
|-&lt;br /&gt;
| 87 || [4.0.0+] IsApplicationCrashReportEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 90 || [4.0.0-8.1.0] BoostSystemMemoryResourceLimit&lt;br /&gt;
|-&lt;br /&gt;
| 91 || [5.0.0+] DeprecatedLaunchApplication&lt;br /&gt;
|-&lt;br /&gt;
| 92 || [5.0.0+] GetRunningApplicationProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 93 || [5.0.0+] GetMainApplicationProgramIndex&lt;br /&gt;
|-&lt;br /&gt;
| 94 || [6.0.0+] LaunchApplication&lt;br /&gt;
|-&lt;br /&gt;
| 95 || [6.0.0+] GetApplicationLaunchInfo&lt;br /&gt;
|-&lt;br /&gt;
| 96 || [6.0.0+] AcquireApplicationLaunchInfo&lt;br /&gt;
|-&lt;br /&gt;
| 97 || [6.0.0+] GetMainApplicationProgramIndexByApplicationLaunchInfo&lt;br /&gt;
|-&lt;br /&gt;
| 98 || [6.0.0+] EnableApplicationAllThreadDumpOnCrash&lt;br /&gt;
|-&lt;br /&gt;
| 99 || [8.0.0+] [[#LaunchDevMenu]]&lt;br /&gt;
|-&lt;br /&gt;
| 100 || ResetToFactorySettings&lt;br /&gt;
|-&lt;br /&gt;
| 101 || ResetToFactorySettingsWithoutUserSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 102 || ResetToFactorySettingsForRefurbishment&lt;br /&gt;
|-&lt;br /&gt;
| 200 || CalculateUserSaveDataStatistics&lt;br /&gt;
|-&lt;br /&gt;
| 201 || DeleteUserSaveDataAll&lt;br /&gt;
|-&lt;br /&gt;
| 210 || DeleteUserSystemSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 211 || [6.0.0+] DeleteSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 220 || UnregisterNetworkServiceAccount&lt;br /&gt;
|-&lt;br /&gt;
| 221 || [6.0.0+] UnregisterNetworkServiceAccountWithUserSaveDataDeletion&lt;br /&gt;
|-&lt;br /&gt;
| 300 || GetApplicationShellEvent&lt;br /&gt;
|-&lt;br /&gt;
| 301 || PopApplicationShellEventInfo&lt;br /&gt;
|-&lt;br /&gt;
| 302 || LaunchLibraryApplet&lt;br /&gt;
|-&lt;br /&gt;
| 303 || TerminateLibraryApplet&lt;br /&gt;
|-&lt;br /&gt;
| 304 || LaunchSystemApplet&lt;br /&gt;
|-&lt;br /&gt;
| 305 || TerminateSystemApplet&lt;br /&gt;
|-&lt;br /&gt;
| 306 || LaunchOverlayApplet&lt;br /&gt;
|-&lt;br /&gt;
| 307 || TerminateOverlayApplet&lt;br /&gt;
|-&lt;br /&gt;
| 400 || GetApplicationControlData&lt;br /&gt;
|-&lt;br /&gt;
| 401 || InvalidateAllApplicationControlCache&lt;br /&gt;
|-&lt;br /&gt;
| 402 || RequestDownloadApplicationControlData&lt;br /&gt;
|-&lt;br /&gt;
| 403 || GetMaxApplicationControlCacheCount&lt;br /&gt;
|-&lt;br /&gt;
| 404 || InvalidateApplicationControlCache&lt;br /&gt;
|-&lt;br /&gt;
| 405 || ListApplicationControlCacheEntryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 406 || [6.0.0+] GetApplicationControlProperty&lt;br /&gt;
|-&lt;br /&gt;
| 407 || [8.0.0+] ListApplicationTitle&lt;br /&gt;
|-&lt;br /&gt;
| 408 || [8.0.0+] ListApplicationIcon&lt;br /&gt;
|-&lt;br /&gt;
| 502 || RequestCheckGameCardRegistration&lt;br /&gt;
|-&lt;br /&gt;
| 503 || RequestGameCardRegistrationGoldPoint&lt;br /&gt;
|-&lt;br /&gt;
| 504 || RequestRegisterGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 505 || [3.0.0+] GetGameCardMountFailureEvent&lt;br /&gt;
|-&lt;br /&gt;
| 506 || [3.0.0+] IsGameCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 507 || [3.0.0+] EnsureGameCardAccess&lt;br /&gt;
|-&lt;br /&gt;
| 508 || [3.0.0+] GetLastGameCardMountFailureResult&lt;br /&gt;
|-&lt;br /&gt;
| 509 || [5.0.0+] ListApplicationIdOnGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 510 || [9.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 600 || CountApplicationContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 601 || [[#ListApplicationContentMetaStatus]]&lt;br /&gt;
|-&lt;br /&gt;
| 602 || [2.0.0-5.1.0] ListAvailableAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 603 || GetOwnedApplicationContentMetaStatus&lt;br /&gt;
|-&lt;br /&gt;
| 604 || RegisterContentsExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 605 || ListApplicationContentMetaStatusWithRightsCheck&lt;br /&gt;
|-&lt;br /&gt;
| 606 || [3.0.0+] GetContentMetaStorage&lt;br /&gt;
|-&lt;br /&gt;
| 607 || [6.0.0+] ListAvailableAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 700 || PushDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 701 || ClearTaskStatusList&lt;br /&gt;
|-&lt;br /&gt;
| 702 || RequestDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 703 || RequestEnsureDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 704 || ListDownloadTaskStatus&lt;br /&gt;
|-&lt;br /&gt;
| 705 || RequestDownloadTaskListData&lt;br /&gt;
|-&lt;br /&gt;
| 800 || RequestVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 801 || ListVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 802 || [3.0.0+] RequestVersionListData&lt;br /&gt;
|-&lt;br /&gt;
| 900 || GetApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 901 || GetApplicationRecordProperty&lt;br /&gt;
|-&lt;br /&gt;
| 902 || EnableApplicationAutoUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 903 || DisableApplicationAutoUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 904 || TouchApplication&lt;br /&gt;
|-&lt;br /&gt;
| 905 || RequestApplicationUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 906 || IsApplicationUpdateRequested&lt;br /&gt;
|-&lt;br /&gt;
| 907 || WithdrawApplicationUpdateRequest&lt;br /&gt;
|-&lt;br /&gt;
| 908 || ListApplicationRecordInstalledContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 909 || [3.0.0+] WithdrawCleanupAddOnContentsWithNoRightsRecommendation&lt;br /&gt;
|-&lt;br /&gt;
| 910 || [5.0.0+] HasApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 911 || [5.1.0+] SetPreInstalledApplication&lt;br /&gt;
|-&lt;br /&gt;
| 912 || [5.1.0+] ClearPreInstalledApplicationFlag&lt;br /&gt;
|-&lt;br /&gt;
| 913 || [9.0.0+] ListAllApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 914 || [9.0.0+] HideApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 915 || [9.0.0+] ShowApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || RequestVerifyApplicationDeprecated&lt;br /&gt;
|-&lt;br /&gt;
| 1001 || CorruptApplicationForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 1002 || [3.0.0+] RequestVerifyAddOnContentsRights&lt;br /&gt;
|-&lt;br /&gt;
| 1003 || [5.0.0+] RequestVerifyApplication&lt;br /&gt;
|-&lt;br /&gt;
| 1004 || [5.0.0+] CorruptContentForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 1200 || [[#NeedsUpdateVulnerability]]&lt;br /&gt;
|-&lt;br /&gt;
| 1300 || IsAnyApplicationEntityInstalled&lt;br /&gt;
|-&lt;br /&gt;
| 1301 || DeleteApplicationContentEntities&lt;br /&gt;
|-&lt;br /&gt;
| 1302 || CleanupUnrecordedApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 1303 || [3.0.0+] CleanupAddOnContentsWithNoRights&lt;br /&gt;
|-&lt;br /&gt;
| 1304 || [3.0.0+] DeleteApplicationContentEntity&lt;br /&gt;
|-&lt;br /&gt;
| 1308 || [5.0.0+] DeleteApplicationCompletelyForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 1309 || [6.0.0+] CleanupUnavailableAddOnContents&lt;br /&gt;
|-&lt;br /&gt;
| 1400 || PrepareShutdown&lt;br /&gt;
|-&lt;br /&gt;
| 1500 || FormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1501 || NeedsSystemUpdateToFormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1502 || GetLastSdCardFormatUnexpectedResult&lt;br /&gt;
|-&lt;br /&gt;
| 1504 || [3.0.0+] InsertSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1505 || [3.0.0+] RemoveSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1506 || [9.0.0+] GetSdCardStartupStatus&lt;br /&gt;
|-&lt;br /&gt;
| 1600 || GetSystemSeedForPseudoDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 1601 || [3.0.0+] ResetSystemSeedForPseudoDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 1700 || ListApplicationDownloadingContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 1701 || [3.0.0+] GetApplicationView&lt;br /&gt;
|-&lt;br /&gt;
| 1702 || [3.0.0+] GetApplicationDownloadTaskStatus&lt;br /&gt;
|-&lt;br /&gt;
| 1703 || [4.0.0+] GetApplicationViewDownloadErrorContext&lt;br /&gt;
|-&lt;br /&gt;
| 1704 || [8.0.0+] GetApplicationViewWithPromotionInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1800 || IsNotificationSetupCompleted&lt;br /&gt;
|-&lt;br /&gt;
| 1801 || GetLastNotificationInfoCount&lt;br /&gt;
|-&lt;br /&gt;
| 1802 || ListLastNotificationInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1803 || [3.0.0+] ListNotificationTask&lt;br /&gt;
|-&lt;br /&gt;
| 1900 || [3.0.0+] IsActiveAccount&lt;br /&gt;
|-&lt;br /&gt;
| 1901 || [4.0.0+] RequestDownloadApplicationPrepurchasedRights&lt;br /&gt;
|-&lt;br /&gt;
| 1902 || [5.0.0+] GetApplicationTicketInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2000 || [4.0.0+] GetSystemDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2001 || [4.0.0+] SelectLatestSystemDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2002 || [4.0.0+] VerifyDeliveryProtocolVersion&lt;br /&gt;
|-&lt;br /&gt;
| 2003 || [4.0.0+] GetApplicationDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2004 || [4.0.0+] HasAllContentsToDeliver&lt;br /&gt;
|-&lt;br /&gt;
| 2005 || [4.0.0+] CompareApplicationDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2006 || [4.0.0+] CanDeliverApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2007 || [4.0.0+] ListContentMetaKeyToDeliverApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2008 || [4.0.0+] NeedsSystemUpdateToDeliverApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2009 || [4.0.0+] EstimateRequiredSize&lt;br /&gt;
|-&lt;br /&gt;
| 2010 || [4.0.0+] RequestReceiveApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2011 || [4.0.0+] CommitReceiveApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2012 || [4.0.0+] GetReceiveApplicationProgress&lt;br /&gt;
|-&lt;br /&gt;
| 2013 || [4.0.0+] RequestSendApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2014 || [4.0.0+] GetSendApplicationProgress&lt;br /&gt;
|-&lt;br /&gt;
| 2015 || [4.0.0+] CompareSystemDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2016 || [4.0.0+] ListNotCommittedContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 2017 || [4.0.0+] RecoverDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 2018 || [5.0.0+] GetApplicationDeliveryInfoHash&lt;br /&gt;
|-&lt;br /&gt;
| 2050 || [6.0.0+] GetApplicationRightsOnClient&lt;br /&gt;
|-&lt;br /&gt;
| 2051 || [9.0.0+] InvalidateRightsIdCache&lt;br /&gt;
|-&lt;br /&gt;
| 2100 || [6.0.0+] GetApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 2101 || [6.0.0+] GetRawApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 2150 || [6.0.0+] CreateRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2151 || [6.0.0+] DestroyRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2152 || [6.0.0+] ActivateRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2153 || [6.0.0+] DeactivateRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2154 || [6.0.0+] ForceActivateRightsContextForExit&lt;br /&gt;
|-&lt;br /&gt;
| 2155 || [7.0.0+] UpdateRightsEnvironmentStatus&lt;br /&gt;
|-&lt;br /&gt;
| 2156 || [9.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 2160 || [6.0.0+] AddTargetApplicationToRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2161 || [6.0.0+] SetUsersToRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2170 || [6.0.0+] GetRightsEnvironmentStatus&lt;br /&gt;
|-&lt;br /&gt;
| 2171 || [6.0.0+] GetRightsEnvironmentStatusChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 2180 || [6.0.0+] RequestExtendExpirationInRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2181 || [6.0.0+] GetResultOfExtendExpirationInRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2182 || [6.0.0+] SetActiveRightsContextUsingStateToRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2190 || [6.0.0+] GetRightsEnvironmentHandleForApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2199 || [6.0.0+] GetRightsEnvironmentCountForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 2200 || [6.0.0+] GetGameCardApplicationCopyIdentifier&lt;br /&gt;
|-&lt;br /&gt;
| 2201 || [6.0.0+] GetInstalledApplicationCopyIdentifier&lt;br /&gt;
|-&lt;br /&gt;
| 2250 || [6.0.0-6.2.0] RequestReportActiveELicence&lt;br /&gt;
|-&lt;br /&gt;
| 2300 || [6.0.0-8.1.0] ListEventLog&lt;br /&gt;
|-&lt;br /&gt;
| 2350 || [7.0.0+] PerformAutoUpdateByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 2400 || [8.0.0+] GetPromotionInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2401 || [8.0.0+] CountPromotionInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2402 || [8.0.0+] ListPromotionInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2403 || [8.0.0+] ImportPromotionJsonForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 2404 || [8.0.0+] ClearPromotionInfoForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 2500 || [8.0.0+] ConfirmAvailableTime&lt;br /&gt;
|-&lt;br /&gt;
| 2510 || [9.0.0+] [[#CreateApplicationResource]]&lt;br /&gt;
|-&lt;br /&gt;
| 2511 || [9.0.0+] [[#GetApplicationResource]]&lt;br /&gt;
|-&lt;br /&gt;
| 2513 || [9.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 2514 || [9.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 2800 || [9.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[4.0.0+] RequestDownloadAddOnContent now takes an additional 8-bytes of input.&lt;br /&gt;
&lt;br /&gt;
==== LaunchDevMenu ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
This is used by AM cmd [[Applet_Manager_services#LaunchDevMenu|LaunchDevMenu]].&lt;br /&gt;
&lt;br /&gt;
This loads titleIDs from [[System_Settings|system-settings]] &amp;lt;code&amp;gt;ns.applet!devmenu_id&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ns.applet!devoverlaydisp_id&amp;lt;/code&amp;gt;, which only exists on devunits. An error is thrown if loading these fail.&lt;br /&gt;
&lt;br /&gt;
[[NCM_services|NCM]] OpenContentMetaDatabase is used with StorageId = NandSystem, then IContentMetaDatabase GetLatestContentMetaKey is used with both of the above titleIDs to verify that the cmd is successful.&lt;br /&gt;
&lt;br /&gt;
Then if the above succeeds, the above titles are launched with the above StorageId via [[Process_Manager_services|pmshell]] LaunchProgram, with a 0.5s sleep-thread afterwards on success.&lt;br /&gt;
&lt;br /&gt;
==== CreateApplicationResource ====&lt;br /&gt;
Returns an [[#NsSubinterface2510]].&lt;br /&gt;
&lt;br /&gt;
==== GetApplicationResource ====&lt;br /&gt;
Returns an [[#NsSubinterface2510]].&lt;br /&gt;
&lt;br /&gt;
=== IApplicationVersionInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IApplicationVersionInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [4.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetLaunchRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 1 || UpgradeLaunchRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 35 || UpdateVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 36 || PushLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| 37 || ListRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 800 || RequestVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 801 || ListVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 802 || RequestVersionListData&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || PerformAutoUpdate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IContentManagerInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IContentManagementInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 11 || CalculateApplicationOccupiedSize&lt;br /&gt;
|-&lt;br /&gt;
| 43 || CheckSdCardMountStatus&lt;br /&gt;
|-&lt;br /&gt;
| 47 || GetTotalSpaceSize&lt;br /&gt;
|-&lt;br /&gt;
| 48 || GetFreeSpaceSize&lt;br /&gt;
|-&lt;br /&gt;
| 600 || CountApplicationContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 601 || ListApplicationContentMetaStatus&lt;br /&gt;
|-&lt;br /&gt;
| 605 || ListApplicationContentMetaStatusWithRightsCheck&lt;br /&gt;
|-&lt;br /&gt;
| 607 || IsAnyApplicationRunning&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IDocumentInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IDocumentInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 21 || GetApplicationContentPath&lt;br /&gt;
|-&lt;br /&gt;
| 23 || ResolveApplicationContentPath&lt;br /&gt;
|-&lt;br /&gt;
| 92 || [5.0.0+] GetRunningApplicationProgramId&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IDownloadTaskInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IDownloadTaskInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 701 || ClearTaskStatusList&lt;br /&gt;
|-&lt;br /&gt;
| 702 || RequestDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 703 || RequestEnsureDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 704 || ListDownloadTaskStatus&lt;br /&gt;
|-&lt;br /&gt;
| 705 || RequestDownloadTaskListData&lt;br /&gt;
|-&lt;br /&gt;
| 706 || [4.0.0+] TryCommitCurrentApplicationDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 707 || [4.0.0+] EnableAutoCommit&lt;br /&gt;
|-&lt;br /&gt;
| 708 || [4.0.0+] DisableAutoCommit&lt;br /&gt;
|-&lt;br /&gt;
| 709 || [4.0.0+] TriggerDynamicCommitEvent&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IReadOnlyApplicationRecordInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IReadOnlyApplicationRecordInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [5.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || HasApplicationRecord || Same as [[#IApplicationManagerInterface]] cmd 910&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IReadOnlyApplicationControlDataInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IReadOnlyApplicationControlDataInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [5.1.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetApplicationControlData]] || Same as [[#IApplicationManagerInterface]] cmd 400&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetApplicationDesiredLanguage]] || Same as [[#IApplicationManagerInterface]] cmd 55&lt;br /&gt;
|-&lt;br /&gt;
| 2 || ConvertApplicationLanguageToLanguageCode || Same as [[#IApplicationManagerInterface]] cmd 59&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#ConvertLanguageCodeToApplicationLanguage]] || Same as [[#IApplicationManagerInterface]] cmd 60&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [9.0.0+] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IDynamicRightsInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IDynamicRightsInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [6.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RequestApplicationRightsOnServer || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || RequestAssignRights || &lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeprecatedRequestAssignRightsToResume || &lt;br /&gt;
|-&lt;br /&gt;
| 5 || VerifyActivatedRightsOwners || &lt;br /&gt;
|-&lt;br /&gt;
| 6 || DeprecatedGetApplicationRightsStatus || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || RequestPrefetchForDynamicRights || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || GetDynamicRightsState || &lt;br /&gt;
|-&lt;br /&gt;
| 9 || [7.0.0+] RequestApplicationRightsOnServerToResume || &lt;br /&gt;
|-&lt;br /&gt;
| 10 || [7.0.0+] RequestAssignRightsToResume || &lt;br /&gt;
|-&lt;br /&gt;
| 11 || [7.0.0+] GetActivatedRightsUsers || &lt;br /&gt;
|-&lt;br /&gt;
| 12 || [8.0.0+] GetApplicationRightsStatus ||&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [8.0.0+] GetRunningApplicationStatus ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IECommerceInterface===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IECommerceInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [4.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RequestLinkDevice || Takes a total of 0x10-bytes of input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [6.0.0+] RequestCleanupAllPreInstalledApplications || No input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [6.0.0+] RequestCleanupPreInstalledApplication || Takes a total of 0x8-bytes of input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [6.0.0+] RequestSyncRights || No input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [6.0.0+] RequestUnlinkDevice || Takes a total of 0x10-bytes of input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [6.1.0+] RequestRevokeAllELicense || Takes a total of 0x10-bytes of input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [9.0.0+] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IFactoryResetInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IFactoryResetInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 100 || ResetToFactorySettings&lt;br /&gt;
|-&lt;br /&gt;
| 101 || ResetToFactorySettingsWithoutUserSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 102 || ResetToFactorySettingsForRefurbishment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NsSubinterface2510 ===&lt;br /&gt;
This was added with [9.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ns:vm =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IVulnerabilityManagerInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 1200 || [3.0.0+] [[#NeedsUpdateVulnerability]]&lt;br /&gt;
|-&lt;br /&gt;
| 1201 || [4.0.0+] [[#UpdateSafeSystemVersionForDebug]]&lt;br /&gt;
|-&lt;br /&gt;
| 1202 || [4.0.0+] [[#GetSafeSystemVersion]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== NeedsUpdateVulnerability ==&lt;br /&gt;
No input, returns an output u8 bool flag.&lt;br /&gt;
&lt;br /&gt;
Web-applets use this command to check if the system needs an update.&lt;br /&gt;
&lt;br /&gt;
== UpdateSafeSystemVersionForDebug ==&lt;br /&gt;
Takes an input u64 &#039;&#039;&#039;titleID&#039;&#039;&#039; and an u32 &#039;&#039;&#039;version&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This command is not available for retail units. On a debug unit, if the [[System_Settings|system setting]] &amp;lt;code&amp;gt;vulnerability!enable_debug&amp;lt;/code&amp;gt; is set, this mounts the system savegame [[Flash_Filesystem#System_Savegames|0x8000000000000049]] as &amp;quot;ns_ssversion:/&amp;quot;, opens the file &amp;quot;ns_ssversion:/entry&amp;quot; and writes the supplied &#039;&#039;&#039;titleID&#039;&#039;&#039; and &#039;&#039;&#039;version&#039;&#039;&#039; in it.&lt;br /&gt;
&lt;br /&gt;
Finally, it calls [[NCM_services#ncm|OpenContentMetaDatabase]] with [[Filesystem_services#StorageId|StorageID]] 3, then calls [[NCM_services#IContentMetaDatabase|GetLatestContentMetaKey]] with the supplied &#039;&#039;&#039;titleID&#039;&#039;&#039; and compares the version field from the returned [[CNMT#Content_Meta_Records|Content Meta Record]] with the supplied &#039;&#039;&#039;version&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If the supplied &#039;&#039;&#039;version&#039;&#039;&#039; is higher than the one in NCM&#039;s database, the value returned by [[NS_Services#NeedsUpdateVulnerability|NeedsUpdateVulnerability]] is set to &amp;quot;true&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== GetSafeSystemVersion ==&lt;br /&gt;
No input, returns a 0x10 byte array with the cached contents of &amp;quot;ns_ssversion:/entry&amp;quot; (u64 &#039;&#039;&#039;titleID&#039;&#039;&#039;, u32 &#039;&#039;&#039;version&#039;&#039;&#039; and u32 &#039;&#039;&#039;policy&#039;&#039;&#039; from &amp;lt;code&amp;gt;vulnerability!needs_update_vulnerability_policy&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
= ns:su =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::ISystemUpdateInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetBackgroundNetworkUpdateState&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#ISystemUpdateControl|OpenSystemUpdateControl]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || NotifyExFatDriverRequired&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ClearExFatDriverStatusForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 4 || RequestBackgroundNetworkUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 5 || NotifyBackgroundNetworkUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 6 || NotifyExFatDriverDownloadedForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetSystemUpdateNotificationEventForContentDelivery&lt;br /&gt;
|-&lt;br /&gt;
| 10 || NotifySystemUpdateForContentDelivery&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [3.0.0+] PrepareShutdown&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [3.0.0-3.0.2]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [3.0.0-3.0.2]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [3.0.0-3.0.2]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [3.0.0-3.0.2]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [4.0.0+] DestroySystemUpdateTask&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [4.0.0+] RequestSendSystemUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 18 || [4.0.0+] GetSendSystemUpdateProgress&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ISystemUpdateControl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#HasDownloaded]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || RequestCheckLatestUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 2 || RequestDownloadLatestUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#GetDownloadProgress]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#ApplyDownloadedUpdate]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || RequestPrepareCardUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetPrepareCardUpdateProgress&lt;br /&gt;
|-&lt;br /&gt;
| 7 || HasPreparedCardUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 8 || ApplyCardUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#GetDownloadedEulaDataSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#GetDownloadedEulaData]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SetupCardUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetPreparedCardUpdateEulaDataSize&lt;br /&gt;
|-&lt;br /&gt;
| 13 || GetPreparedCardUpdateEulaData&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [4.0.0+] SetupCardUpdateViaSystemUpdater&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [4.0.0+] HasReceived&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [4.0.0+] RequestReceiveSystemUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [4.0.0+] GetReceiveProgress&lt;br /&gt;
|-&lt;br /&gt;
| 18 || [4.0.0+] ApplyReceivedUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [4.0.0+] GetReceivedEulaDataSize&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [4.0.0+] GetReceivedEulaData&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [4.0.0+] SetupToReceiveSystemUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [6.0.0+] RequestCheckLatestUpdateIncludesRebootlessUpdate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== HasDownloaded ===&lt;br /&gt;
No input, returns an output u8 bool flag.&lt;br /&gt;
&lt;br /&gt;
Gets whether a network sysupdate was downloaded, with install pending.&lt;br /&gt;
&lt;br /&gt;
Uses [[NIM_services|nim]] ListSystemUpdateTask and [[NIM_services|nim]] GetSystemUpdateTaskInfo. When ListSystemUpdateTask successfully returns a task and GetSystemUpdateTaskInfo is successful, the output flag is set to: &amp;lt;code&amp;gt;*((u8*)(taskinfo+0) == 0x3&amp;lt;/code&amp;gt;. Otherwise, flag=0.&lt;br /&gt;
&lt;br /&gt;
This always returns 0, however this will assert if GetSystemUpdateTaskInfo fails with ret!=0x3C89.&lt;br /&gt;
&lt;br /&gt;
=== GetDownloadProgress ===&lt;br /&gt;
No input, returns a 0x10-byte output struct.&lt;br /&gt;
&lt;br /&gt;
Similar to [[#HasDownloaded]] except instead of a flag, this returns the 0x10-bytes from taskinfo+8. The output struct is cleared when the task(info) isn&#039;t available.&lt;br /&gt;
&lt;br /&gt;
=== ApplyDownloadedUpdate ===&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
Runs code similar to [[#HasDownloaded]], throwing an error if a network sysupdate isn&#039;t ready for install. Then the sysupdate is installed:&lt;br /&gt;
&lt;br /&gt;
* Uses ListSystemUpdateTask again, then [[NIM_services|nim]] IsExFatDriverIncluded. Runs ExFat handling when the output flag is set.&lt;br /&gt;
* The two flags in [[Flash_Filesystem#System_Update_Control]] are set to 1.&lt;br /&gt;
* Uses [[NIM_services|nim]] CommitSystemUpdateTask and [[NIM_services|nim]] DestroySystemUpdateTask.&lt;br /&gt;
* Installs FIRM.&lt;br /&gt;
&lt;br /&gt;
=== GetDownloadedEulaDataSize ===&lt;br /&gt;
Takes a type-0x15 input buffer &#039;&#039;&#039;path&#039;&#039;&#039;, returns an output u64 &#039;&#039;&#039;filesize&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Runs code similar to [[#HasDownloaded]], throwing an error if a network sysupdate isn&#039;t ready for install.&lt;br /&gt;
&lt;br /&gt;
Uses ListSystemUpdateTask again. Then [[NIM_services|nim]] GetDownloadedSystemDataPath, with the output ContentPath being used to mount the EULA title with FS.&lt;br /&gt;
&lt;br /&gt;
Then &amp;quot;&amp;lt;mountname&amp;gt;:/&amp;lt;&#039;&#039;&#039;path&#039;&#039;&#039;&amp;gt;&amp;quot; is opened, gets the &#039;&#039;&#039;filesize&#039;&#039;&#039;, then runs cleanup.&lt;br /&gt;
&lt;br /&gt;
=== GetDownloadedEulaData ===&lt;br /&gt;
Takes a type-0x15 input buffer &#039;&#039;&#039;path&#039;&#039;&#039; and a type-0x6 output buffer, returns an output u64 &#039;&#039;&#039;filesize&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Similar to [[#GetDownloadedEulaDataSize]] except this reads the file instead, using the specified output buffer with size=filesize. This will throw an error if the filesize is larger than the buffer size.&lt;br /&gt;
&lt;br /&gt;
= IAsyncValue =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IAsyncValue&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetSize&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Get&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [4.0.0+] GetErrorContext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Cmd3: No input/output, takes a type-0x16 output buffer.&lt;br /&gt;
&lt;br /&gt;
= IAsyncResult =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IAsyncResult&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Get&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] GetErrorContext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Cmd2: No input/output, takes a type-0x16 output buffer.&lt;br /&gt;
&lt;br /&gt;
= ns:dev =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IDevelopInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#LaunchProgram]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#TerminateProcess]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#TerminateProgram]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#GetShellEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#GetShellEventInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [[#TerminateApplication]]&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#PrepareLaunchProgramFromHost]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [[#LaunchApplicationForDevelop]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#LaunchApplicationWithStorageIdForDevelop]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [6.0.0+] TerminateApplication2&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [6.0.0+] GetRunningApplicationProcessIdForDevelop&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [6.0.0+] SetCurrentApplicationRightsEnvironmentCanBeActiveForDevelop&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [9.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [9.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== LaunchProgram ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#LaunchProcess|LaunchProcess]].&lt;br /&gt;
&lt;br /&gt;
== TerminateProcess ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#TerminateTitleByPid|TerminateTitleByPid]].&lt;br /&gt;
&lt;br /&gt;
== TerminateProgram ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#TerminateTitleByTitleId|TerminateTitleByTitleId]].&lt;br /&gt;
&lt;br /&gt;
== GetShellEvent ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetProcessEventWaiter|GetProcessEventWaiter]].&lt;br /&gt;
&lt;br /&gt;
== GetShellEventInfo ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetProcessEventType|GetProcessEventType]].&lt;br /&gt;
&lt;br /&gt;
== TerminateApplication ==&lt;br /&gt;
Calls &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetCrashingProcessPid|GetCrashingProcessPid]] and sends PID to [[Process_Manager_services#TerminateTitleByPid|TerminateTitleByPid]].&lt;br /&gt;
&lt;br /&gt;
== PrepareLaunchProgramFromHost ==&lt;br /&gt;
Takes a type-0x5 input buffer containing the [[Filesystem_services|ContentPath]], returns an output 0x10-byte struct.&lt;br /&gt;
&lt;br /&gt;
Calls [[NCM_services#IPathResolverForStorage|IPathResolverForStorage]] Set...NcaPath functions.&lt;br /&gt;
&lt;br /&gt;
== LaunchApplicationForDevelop ==&lt;br /&gt;
Takes an input u32 [[Process_Manager_services#LaunchFlags|LaunchFlags]] and u64 titleID, returns an output u64 PID.&lt;br /&gt;
&lt;br /&gt;
Same as LaunchApplicationWithStorageId except the last two params passed to the internal vtable funcptr call are value 0x6, instead of from the command input.&lt;br /&gt;
&lt;br /&gt;
== LaunchApplicationWithStorageIdForDevelop ==&lt;br /&gt;
Takes 2 input u8s, an u32 [[Process_Manager_services#LaunchFlags|LaunchFlags]], and an u64 titleID. Returns an output u64 PID.&lt;br /&gt;
&lt;br /&gt;
Launches an application title which is registered with NS.&lt;br /&gt;
&lt;br /&gt;
== Cmd13 ==&lt;br /&gt;
Returns an [[#NsSubinterface2510]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Paeton</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=NCM_services&amp;diff=7760</id>
		<title>NCM services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=NCM_services&amp;diff=7760"/>
		<updated>2019-09-10T14:49:15Z</updated>

		<summary type="html">&lt;p&gt;Paeton: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NCM contains services for internal file path and content management.&lt;br /&gt;
&lt;br /&gt;
= Location Resolver services =&lt;br /&gt;
== lr ==&lt;br /&gt;
This is &amp;quot;nn::lr::ILocationResolverManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || OpenLocationResolver || [[Filesystem_services#StorageId|StorageID]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || OpenRegisteredLocationResolver || None || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || RefreshLocationResolver || [[Filesystem_services#StorageId|StorageID]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [2.0.0+] OpenAddOnContentLocationResolver || None  ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The only sysmodules which use this service are [[Filesystem_services|FS]], [[Loader_services|Loader]], and [[NS_Services|NS]]. [[boot2]] has access but doesn&#039;t use it.&lt;br /&gt;
&lt;br /&gt;
=== ILocationResolver ===&lt;br /&gt;
This is &amp;quot;nn::lr::ILocationResolver&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#ResolveProgramPath]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#RedirectProgramPath]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#ResolveApplicationControlPath]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#ResolveApplicationHtmlDocumentPath]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#ResolveDataPath]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#RedirectApplicationControlPath]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [[#RedirectApplicationHtmlDocumentPath]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#ResolveApplicationLegalInformationPath]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [[#RedirectApplicationLegalInformationPath]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#Refresh]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [5.0.0+] [[#RedirectApplicationProgramPath]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [5.0.0+] [[#ClearApplicationRedirection]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [5.0.0+] [[#EraseProgramRedirection]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [5.0.0+] [[#EraseApplicationControlRedirection]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [5.0.0+] [[#EraseApplicationHtmlDocumentRedirection]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [5.0.0+] [[#EraseApplicationLegalInformationRedirection]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [7.0.0+] [[#ResolveProgramPathForDebug]] || Unofficial name&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [7.0.0+] [[#RedirectProgramPathForDebug]] || Unofficial name&lt;br /&gt;
|-&lt;br /&gt;
| 18 || [7.0.0+] [[#RedirectApplicationProgramPathForDebug]] || Unofficial name&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [7.0.0+] [[#EraseProgramRedirectionForDebug]] || Unofficial name&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If the supplied [[Filesystem_services#StorageId|StorageID]] is 1 (Host), a different set of internal functions is used to handle these commands. In this more restricted set of functions, GetControlNcaPath is stubbed and only returns error 0x608.&lt;br /&gt;
&lt;br /&gt;
The Get* commands load the [[Filesystem_services|ContentPath]] from linked-lists&#039; [[#Location_List_Entry|entries]] in memory using the input TitleID. When the command fails to find an entry for the specified TitleID, 0x408 is returned for GetProgramNcaPath and 0xA08 is returned for the rest.&lt;br /&gt;
&lt;br /&gt;
The Set* commands always return 0 and add a new entry to the list. If a matching entry is found, it&#039;s removed first.&lt;br /&gt;
&lt;br /&gt;
==== ResolveProgramPath ====&lt;br /&gt;
Takes an u64 &#039;&#039;&#039;TitleID&#039;&#039;&#039; and a C descriptor. Used for [[NCA_Content_FS#NCA-type1|NCA-type1]].&lt;br /&gt;
&lt;br /&gt;
==== RedirectProgramPath ====&lt;br /&gt;
Takes an u64 &#039;&#039;&#039;TitleID&#039;&#039;&#039; and a X descriptor with a [[Filesystem_services#ContentPath|ContentPath]]. Used for [[NCA_Content_FS#NCA-type1|NCA-type1]].&lt;br /&gt;
&lt;br /&gt;
Inserts a new [[#Location_List_Entry|entry]] with &#039;&#039;&#039;flag&#039;&#039;&#039; set to 0.&lt;br /&gt;
&lt;br /&gt;
==== ResolveApplicationControlPath ====&lt;br /&gt;
Takes an u64 &#039;&#039;&#039;TitleID&#039;&#039;&#039; and a C descriptor. Used for [[NCA_Content_FS#NCA-type3|NCA-type3]].&lt;br /&gt;
&lt;br /&gt;
==== ResolveApplicationHtmlDocumentPath====&lt;br /&gt;
Takes an u64 &#039;&#039;&#039;TitleID&#039;&#039;&#039; and a C descriptor. Used for [[NCA_Content_FS#NCA-type4|NCA-type4]].&lt;br /&gt;
&lt;br /&gt;
==== ResolveDataPath ====&lt;br /&gt;
Takes an u64 &#039;&#039;&#039;TitleID&#039;&#039;&#039; and a C descriptor. Used for [[NCA_Content_FS#NCA-type3|NCA-type3]].&lt;br /&gt;
&lt;br /&gt;
==== RedirectApplicationControlPath ====&lt;br /&gt;
Takes an u64 &#039;&#039;&#039;TitleID&#039;&#039;&#039; and a X descriptor with a [[Filesystem_services#ContentPath|ContentPath]]. Used for [[NCA_Content_FS#NCA-type3|NCA-type3]].&lt;br /&gt;
&lt;br /&gt;
Inserts a new [[#Location_List_Entry|entry]] with &#039;&#039;&#039;flag&#039;&#039;&#039; set to 1.&lt;br /&gt;
&lt;br /&gt;
==== RedirectApplicationHtmlDocumentPath ====&lt;br /&gt;
Takes an u64 &#039;&#039;&#039;TitleID&#039;&#039;&#039; and a X descriptor with a [[Filesystem_services#ContentPath|ContentPath]]. Used for [[NCA_Content_FS#NCA-type4|NCA-type4]].&lt;br /&gt;
&lt;br /&gt;
Inserts a new [[#Location_List_Entry|entry]] with &#039;&#039;&#039;flag&#039;&#039;&#039; set to 1.&lt;br /&gt;
&lt;br /&gt;
==== ResolveApplicationLegalInformationPath ====&lt;br /&gt;
Takes an u64 &#039;&#039;&#039;TitleID&#039;&#039;&#039; and a C descriptor. Used for [[NCA_Content_FS#NCA-type5|NCA-type5]].&lt;br /&gt;
&lt;br /&gt;
==== RedirectApplicationLegalInformationPath ====&lt;br /&gt;
Takes an u64 &#039;&#039;&#039;TitleID&#039;&#039;&#039; and a X descriptor with a [[Filesystem_services#ContentPath|ContentPath]]. Used for [[NCA_Content_FS#NCA-type5|NCA-type5]].&lt;br /&gt;
&lt;br /&gt;
Inserts a new [[#Location_List_Entry|entry]] with &#039;&#039;&#039;flag&#039;&#039;&#039; set to 1.&lt;br /&gt;
&lt;br /&gt;
==== Refresh ====&lt;br /&gt;
Takes no input. Frees all linked-lists&#039; entries that have &#039;&#039;&#039;flag&#039;&#039;&#039; set to 0.&lt;br /&gt;
&lt;br /&gt;
==== RedirectApplicationProgramPath ====&lt;br /&gt;
Same as [[#RedirectProgramPath|RedirectProgramPath]], but inserts a new [[#Location_List_Entry|entry]] with &#039;&#039;&#039;flag&#039;&#039;&#039; set to 1.&lt;br /&gt;
&lt;br /&gt;
==== ClearApplicationRedirection ====&lt;br /&gt;
Takes no input. Frees all linked-lists&#039; entries that have &#039;&#039;&#039;flag&#039;&#039;&#039; set to 1.&lt;br /&gt;
&lt;br /&gt;
==== EraseProgramRedirection ====&lt;br /&gt;
Takes an u64 &#039;&#039;&#039;TitleID&#039;&#039;&#039;. Used for [[NCA_Content_FS#NCA-type1|NCA-type1]].&lt;br /&gt;
&lt;br /&gt;
Removes the [[#Location_List_Entry|entry]] that matches the input TitleID.&lt;br /&gt;
&lt;br /&gt;
==== EraseApplicationControlRedirection ====&lt;br /&gt;
Takes an u64 &#039;&#039;&#039;TitleID&#039;&#039;&#039;. Used for [[NCA_Content_FS#NCA-type3|NCA-type3]].&lt;br /&gt;
&lt;br /&gt;
Removes the [[#Location_List_Entry|entry]] that matches the input TitleID.&lt;br /&gt;
&lt;br /&gt;
==== EraseApplicationHtmlDocumentRedirection ====&lt;br /&gt;
Takes an u64 &#039;&#039;&#039;TitleID&#039;&#039;&#039;. Used for [[NCA_Content_FS#NCA-type4|NCA-type4]].&lt;br /&gt;
&lt;br /&gt;
Removes the [[#Location_List_Entry|entry]] that matches the input TitleID.&lt;br /&gt;
&lt;br /&gt;
==== EraseApplicationLegalInformationRedirection ====&lt;br /&gt;
Takes an u64 &#039;&#039;&#039;TitleID&#039;&#039;&#039;. Used for [[NCA_Content_FS#NCA-type5|NCA-type5]].&lt;br /&gt;
&lt;br /&gt;
Removes the [[#Location_List_Entry|entry]] that matches the input TitleID.&lt;br /&gt;
&lt;br /&gt;
==== ResolveProgramPathForDebug ====&lt;br /&gt;
Same as [[#ResolveProgramPath|ResolveProgramPath]], but uses a redirection shim on top of the real program path.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]] uses this command if [[System_Settings#ns.application|ns.application!redirected_rom_storage_id_for_debug]] is different than 0x00.&lt;br /&gt;
&lt;br /&gt;
==== RedirectProgramPathForDebug ====&lt;br /&gt;
Same as [[#RedirectProgramPath|RedirectProgramPath]], but uses a redirection shim on top of the real program path.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]] uses this command if [[System_Settings#ns.application|ns.application!redirected_rom_storage_id_for_debug]] is different than 0x00.&lt;br /&gt;
&lt;br /&gt;
==== RedirectApplicationProgramPathForDebug ====&lt;br /&gt;
Same as [[#RedirectApplicationProgramPath |RedirectApplicationProgramPath ]], but uses a redirection shim on top of the real program path.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]] uses this command if [[System_Settings#ns.application|ns.application!redirected_rom_storage_id_for_debug]] is different than 0x00.&lt;br /&gt;
&lt;br /&gt;
==== EraseProgramRedirectionForDebug ====&lt;br /&gt;
Same as [[#EraseProgramRedirection |EraseProgramRedirection ]], but uses a redirection shim on top of the real program path.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]] uses this command if [[System_Settings#ns.application|ns.application!redirected_rom_storage_id_for_debug]] is different than 0x00.&lt;br /&gt;
&lt;br /&gt;
=== IRegisteredLocationResolver ===&lt;br /&gt;
This is &amp;quot;nn::lr::IRegisteredLocationResolver&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This works like [[#ILocationResolver]], but only two types of NCA paths can be gotten/set. In addition, each type has a fallback path that can be set for a single title ID at a time.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ResolveProgramPath || u64 TitleID + C descriptor || Used for [[NCA_Content_FS#NCA-type1|NCA-type1]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || RegisterProgramPath || u64 TitleID + X descriptor [[Filesystem_services#ContentPath|ContentPath]] || Sets the Type 0 fallback TID and path to the provided arguments.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || UnregisterProgramPath || u64 TitleID || If the Type 0 fallback TID is == argument TID, unregisters the fallback path. Otherwise, noop.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || RedirectProgramPath || u64 TitleID + X descriptor [[Filesystem_services#ContentPath|ContentPath]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [2.0.0+] ResolveHtmlDocumentPath || u64 TitleID + C descriptor ||&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [2.0.0+] RegisterHtmlDocumentPath || u64 TitleID + X descriptor [[Filesystem_services#ContentPath|ContentPath]] || Sets the Type 1 fallback TID and path to the provided arguments.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [2.0.0+] UnregisterHtmlDocumentPath || u64 TitleID || If the Type 1 fallback TID is == argument TID, unregisters the fallback path. Otherwise, noop.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [2.0.0+] RedirectHtmlDocumentPath || u64 TitleID + X descriptor [[Filesystem_services#ContentPath|ContentPath]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [7.0.0+] Refresh || No input/output. || &lt;br /&gt;
|-&lt;br /&gt;
| 9 || [9.0.0+] || ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IAddOnContentLocationResolver ===&lt;br /&gt;
This is &amp;quot;nn::lr::IAddOnContentLocationResolver&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ResolveAddOnContentPath || u64 TitleID + C descriptor || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || RegisterAddOnContentStorage || [[Filesystem_services#StorageId|StorageID]] + u64 TitleID || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || UnregisterAllAddOnContentPath || None || Clears all registered titles here.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [9.0.0+] || ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [9.0.0+] || ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Location List Entry ===&lt;br /&gt;
Total size is 0x320 bytes. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8|| Pointer to previous entry&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8|| Pointer to next entry&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8|| TitleID&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x300 || [[Filesystem_services|ContentPath]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x318 || 0x4 || Flag&lt;br /&gt;
|-&lt;br /&gt;
| 0x31C || 0x4 || Padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Content Manager services =&lt;br /&gt;
== ncm ==&lt;br /&gt;
This is &amp;quot;nn::ncm::IContentManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || CreateContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]].&lt;br /&gt;
|-&lt;br /&gt;
| 2 || VerifyContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || VerifyContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]].&lt;br /&gt;
|-&lt;br /&gt;
| 4 || OpenContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]], [2.0.0+] Only returns a storage if one has previously been opened globally via OpenIContentStorage.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || OpenContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]], [2.0.0+] Only returns a storage if one has previously been opened globally via OpenIContentStorage.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [1.0.0] CloseContentStorageForcibly || Takes a [[Filesystem_services#StorageId|StorageID]]. Calls IContentStorage-&amp;gt;CloseAndFlushStorage().&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [1.0.0] CloseContentMetaDatabaseForcibly || Takes a [[Filesystem_services#StorageId|StorageID]].  Calls IContentMetaDatabase-&amp;gt;CloseMetaDatabase().&lt;br /&gt;
|-&lt;br /&gt;
| 8 || CleanupContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]], and deletes the associated savedata.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [2.0.0+] ActivateContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]], and opens an IContentStorage for the StorageID to be gotten with GetIContentStorage. Note: Name is not official.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [2.0.0+] InactivateContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]], and closes the associated IContentStorage. Note: Name is not official.&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [2.0.0+] ActivateContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]], and opens an IContentMetaDatabase for the StorageID to be gotten with GetIContentMetaDatabase. Note: Name is not official.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [2.0.0+] InactivateContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]], and closes the associated IContentMetaDatabase. Note: Name is not official.&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [9.0.0+] InvalidateRightsIdCache ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IContentStorage ===&lt;br /&gt;
This is &amp;quot;nn::ncm::IContentStorage&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GeneratePlaceHolderId]] || Returns a random UUID for the Content Storage.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || CreatePlaceHolder || Takes two [[#NcaID]]s, and a u64 filesize.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || DeletePlaceHolder || Takes a [[#NcaID]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || HasPlaceHolder ||  Takes a [[#NcaID]].&lt;br /&gt;
|-&lt;br /&gt;
| 4 || WritePlaceHolder || Takes a [[#NcaID]], a u64-offset, and type 5 buffer. Writes the buffer to the file for the NcaID&#039;s placeholder path at the specified offset.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Register || Takes two [[#NcaID]]s, moves the Placeholder NCA content to the registered NCA path.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Delete || Takes a [[#NcaID]].&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Has || Takes a [[#NcaID]].&lt;br /&gt;
|-&lt;br /&gt;
| 8 || GetPath || Takes a [[#NcaID]]. Returns a [[Filesystem_services#ContentPath|Content Path]].&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetPlaceHolderPath || Takes a [[#NcaID]]. Returns a [[Filesystem_services#ContentPath|Content Path]].&lt;br /&gt;
|-&lt;br /&gt;
| 10 || CleanupAllPlaceHolder || Deletes and re-creates the Placeholder directory.&lt;br /&gt;
|-&lt;br /&gt;
| 11 || ListPlaceHolder || This is like [[#GetNumberOfRegisteredEntries]], but for the Placeholder directory.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#GetContentCount]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [[#ListContentId]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [[#GetSizeFromContentId]] || &lt;br /&gt;
|-&lt;br /&gt;
| 15 || DisableForcibly || Closes/Flushes all resources for the storage, and causes all future IPC commands to the current session to return error 0xC805.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [2.0.0+] RevertToPlaceHolder || Takes three 0x10-sized [[#NcaID]]s. Creates the registered directory NCA path, and renames the placeholder path to the registered NCA path.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [2.0.0+] SetPlaceHolderSize || Takes a [[#NcaID]], and a u64 size&lt;br /&gt;
|-&lt;br /&gt;
| 18 || [2.0.0+] [[#ReadContentIdFile]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [2.0.0+] [[#GetRightsIdFromPlaceHolderId]] || &lt;br /&gt;
|-&lt;br /&gt;
| 20 || [2.0.0+] [[#GetRightsIdFromContentId]] || &lt;br /&gt;
|-&lt;br /&gt;
| 21 || [2.0.0+] WriteContentForDebug || Takes a [[#NcaID]], a u64 offset, and a type 5 buffer. On debug units, writes the buffer to the NCA&#039;s registered path. On retail units, this just aborts.&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [2.0.0+] GetFreeSpaceSize || Gets free space for the storage.&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [2.0.0+] GetTotalSpaceSize || Gets total space for the storage.&lt;br /&gt;
|-&lt;br /&gt;
| 24 || [3.0.0+] FlushPlaceHolder || Flushes resources for the storage without closing it.&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [4.0.0+] GetSizeFromPlaceHolderId || &lt;br /&gt;
|-&lt;br /&gt;
| 26 || [4.0.0+] RepairInvalidFileAttribute || &lt;br /&gt;
|-&lt;br /&gt;
| 27 || [8.0.0+] GetRightsIdFromPlaceHolderIdWithCache || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== GeneratePlaceHolderId ====&lt;br /&gt;
Generates a random [[#NcaID]] for use as a placeholder.&lt;br /&gt;
&lt;br /&gt;
Calls nn::util::GenerateUuid(), which internally calls nn::os::GenerateRandomBytes(16);&lt;br /&gt;
&lt;br /&gt;
==== GetContentCount ====&lt;br /&gt;
Writes the total number of entries which can be read by GetEntries, to cmdreply &amp;lt;SFCO_offset&amp;gt;+0x10.&lt;br /&gt;
&lt;br /&gt;
==== ListContentId====&lt;br /&gt;
Takes an output buffer, u32 offset and gets all entries starting at that offset.&lt;br /&gt;
Returns number of entries read.&lt;br /&gt;
&lt;br /&gt;
Each entry is a [[#NcaID]].&lt;br /&gt;
&lt;br /&gt;
The total read entries is exactly the same as the number of &amp;quot;&amp;lt;hex&amp;gt;.nca&amp;quot; directories in the storage FS(or at least under the &amp;quot;registered&amp;quot; directory?).&lt;br /&gt;
&lt;br /&gt;
==== GetSizeFromContentId ====&lt;br /&gt;
Takes a [[#NcaID]] as input.&lt;br /&gt;
&lt;br /&gt;
Returns the total size readable by [[#ReadContentIdFile]]. This is the same as the size-field in the [[NAX0]] &amp;quot;&amp;lt;NcaID&amp;gt;.nca/00&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
==== ReadContentIdFile ====&lt;br /&gt;
Takes an output buffer, a [[#NcaID]] as input, and a u64 file offset.&lt;br /&gt;
&lt;br /&gt;
Reads plaintext NCA file contents from the Registered path for the NcaID.&lt;br /&gt;
&lt;br /&gt;
==== GetRightsIdFromPlaceHolderId ====&lt;br /&gt;
Takes a total of 0x10-bytes of input, returns a total of 0x10-bytes of output.&lt;br /&gt;
&lt;br /&gt;
[3.0.0+] Returns an additional 8-bytes of output.&lt;br /&gt;
&lt;br /&gt;
Gets the Rights ID for the [[#NcaID]]&#039;s placeholder path.&lt;br /&gt;
&lt;br /&gt;
==== GetRightsIdFromContentId ====&lt;br /&gt;
Takes a total of 0x10-bytes of input, returns a total of 0x10-bytes of output.&lt;br /&gt;
&lt;br /&gt;
[3.0.0+] Returns an additional 8-bytes of output.&lt;br /&gt;
&lt;br /&gt;
Gets the Rights ID for the [[#NcaID]]&#039;s registered path&lt;br /&gt;
&lt;br /&gt;
=== IContentMetaDatabase ===&lt;br /&gt;
This is &amp;quot;nn::ncm::IContentMetaDatabase&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Set || Takes a [[#ContentMetaKey|Content Meta Key]], a type-5 [[CNMT#Content_records|Content Records]] buffer and a u64 size.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Get || Takes a [[#ContentMetaKey|Content Meta Key]], a type-6 buffer to write [[CNMT#Content_records|Content Records]] to and a u64 size. Returns the actual number of bytes read into the buffer. First 8 bytes of the data is header (u16 numExtraDataBytes, numContentRecords, numMetaRecords, padding). After the header is numExtraDataBytes of additional data, after which follow content records and content meta keys. Set takes this same data as input.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Remove || Takes a [[#ContentMetaKey|Content Meta Key]], and removes the associated record.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetContentIdByType || Takes a [[#ContentMetaKey|Content Meta Key]] and a u8 [[#ContentMetaType|Content Meta Type]]. Returns a [[#NcaID]].&lt;br /&gt;
|-&lt;br /&gt;
| 4 || ListContentInfo || Takes a type-6 buffer to write [[CNMT#Content_records|Content Record]] entries to, a [[#ContentMetaKey|Content Meta Key]], and a u32 index into the Content Record entries to start copying from. Returns a u32 entries_read.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || List || Takes a type-6 buffer to write [[#ContentMetaKey|Content Meta Key]]s to, a u32 [[#ContentMetaType|Content Meta Type]], a u64 TID, a u64 TID_LOW, and u64 TID_HIGH. Writes into the buffer all Content Meta Keys with low &amp;lt;= record-&amp;gt;title_id &amp;lt;= high, and record-&amp;gt;type == type. Returns u32 numEntriesTotal, numEntriesWritten. Additionally requires record-&amp;gt;title_id == TID, if record-&amp;gt;type is Application, Patch, Add-On, or Delta, otherwise, you can pass 0 for type to ignore the type and list them all in the range.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetLatestContentMetaKey || Takes a u64 title id, and returns the [[#ContentMetaKey|Content Meta Key]] with the highest version field for that title id.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#ListApplication]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Has || Takes a [[#ContentMetaKey|Content Meta Key]] and returns whether that record is present in the database.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || HasAll || Takes a type-5 buffer containing [[#ContentMetaKey|Content Meta Key]] (code assumes there are size/sizeof(meta_record) records in the buffer), and returns whether all of those records are present in the database.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || GetSize || Takes a [[#ContentMetaKey|Content Meta Key]], and returns the size of the associated [[CNMT#Content_records|Content Records]].&lt;br /&gt;
|-&lt;br /&gt;
| 11 || GetRequiredSystemVersion || Takes a [[#ContentMetaKey|Content Meta Key]], and returns u32 from ContentRecords + 16 (only if the content meta key has type Application or Patch).&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetPatchId || Takes a [[#ContentMetaKey|Content Meta Key]], and returns the update title id for that record.&lt;br /&gt;
|-&lt;br /&gt;
| 13 || DisableForcibly ||  Closes the meta database, and causes all future IPC commands to the current session to return error 0xDC05.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [[#LookupOrphanContent]] || Takes a type-6 byte buffer, and a type-5 buffer of [[#NcaID]]s.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || Commit || Flushes the in-memory database to savedata.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || HasContent || Takes a [[#ContentMetaKey|Content Meta Key]] and an [[#NcaID]]. Returns whether the content records for that content meta key contain the NcaID.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || ListContentMetaInfo || Takes a type-6 [[#ContentMetaKey|Content Meta Key]] output buffer, a u32 offset into that buffer, and an input [[#ContentMetaKey|Content Meta Key]].&lt;br /&gt;
|-&lt;br /&gt;
| 18 || GetAttributes || Takes a [[#ContentMetaKey|Content Meta Key]], and returns u8 from ContentRecords + 6.&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [2.0.0+] GetRequiredApplicationVersion || Does the same thing as GetEntryUnknownRecordSize, but for AddOnContents.&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [5.0.0+] GetContentIdByTypeAndIdOffset ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== ListApplication ====&lt;br /&gt;
Each 24-byte entry (officially &amp;quot;ApplicationContentMetaKey&amp;quot;) is as follows:&lt;br /&gt;
  [[CNMT#Meta_records|meta_record]] meta_record;&lt;br /&gt;
  u64    base_title_id;&lt;br /&gt;
&lt;br /&gt;
This function takes in a type 6 buffer to write entries to, and a u8 &amp;quot;filter&amp;quot; [[#Title_Types|type]]. If filter is zero, all update records will be copied to to the output buffer (space permitting). Otherwise, only titles with type == filter_type will be copied to the output buffer.&lt;br /&gt;
&lt;br /&gt;
This func returns a u32 num_entries_total, and a u32 num_entries_written.&lt;br /&gt;
&lt;br /&gt;
==== ReadEntryMetaRecords ====&lt;br /&gt;
Takes a type-6 [[#ContentMetaKey|Content Meta Key]] output buffer, a u32 offset into that buffer, and an input [[#ContentMetaKey|Content Meta Key]] entry. Returns a u32 for total_read_entries.&lt;br /&gt;
&lt;br /&gt;
Reads the content meta keys stored in the entry&#039;s content records into the output buffer.&lt;br /&gt;
&lt;br /&gt;
This is used, for example, with System Update title 0100000000000816, which contains content meta keys for all other systitles in its Content Records.&lt;br /&gt;
&lt;br /&gt;
==== LookupOrphanContent ====&lt;br /&gt;
Takes a type-6 byte buffer, and a type-5 buffer containing [[#NcaID]]s.&lt;br /&gt;
&lt;br /&gt;
This function was stubbed to return 0xDC05 in [[2.0.0]].&lt;br /&gt;
&lt;br /&gt;
On 1.0.0: Initialized the output buffer to all 1s. Then, for each [[#NcaID]] in the input buffer, it checks if that NcaID is present anywhere in the database, and if so writes 0 to the corresponding output byte.&lt;br /&gt;
&lt;br /&gt;
In pseudocode, the function basically does the following:&lt;br /&gt;
&lt;br /&gt;
for i in range(len(out_buf)):&lt;br /&gt;
    out_buf[i] = 1&lt;br /&gt;
&lt;br /&gt;
for i, NcaID in NcaIDs:&lt;br /&gt;
    if is_present_in_database(NcaID):&lt;br /&gt;
        out_buf[i] = 0&lt;br /&gt;
&lt;br /&gt;
=== NcaID ===&lt;br /&gt;
This is a 0x10-byte entry. This is originally from the hex portion of &amp;quot;&amp;lt;hex&amp;gt;.nca&amp;quot; directory-names from this storage FS(like [[SD_Filesystem|SD]]). This is also referred to as &amp;quot;ContentId&amp;quot; in the official SDK.&lt;br /&gt;
&lt;br /&gt;
The NcaID is the same as the first 0x10-bytes from the calculated SHA256 hash, from hashing the entire output from [[#ReadContentIdFile]].&lt;br /&gt;
&lt;br /&gt;
== ContentInstallType ==&lt;br /&gt;
This is &amp;quot;nn::ncm::ContentInstallType&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| Full&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| FragmentOnly&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Unknown (Invalid Content Install Type)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ContentMetaType ==&lt;br /&gt;
This is &amp;quot;nn::ncm::ContentMetaType&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| Unknown (Invalid Content Meta Type)&lt;br /&gt;
|-&lt;br /&gt;
| 0x01&lt;br /&gt;
| SystemProgram ([[Title_list#System_Modules|System Modules]] or [[Title_list#System_Applets|System Applets]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| SystemData ([[Title_list#System_Data_Archives|System Data Archives]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| SystemUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| BootImagePackage ([[Title_list|Firmware package A or C]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x05&lt;br /&gt;
| BootImagePackageSafe ([[Title_list|Firmware package B or D]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x80&lt;br /&gt;
| Application&lt;br /&gt;
|-&lt;br /&gt;
| 0x81&lt;br /&gt;
| Patch&lt;br /&gt;
|-&lt;br /&gt;
| 0x82&lt;br /&gt;
| AddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 0x83&lt;br /&gt;
| Delta&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ContentMetaKey ==&lt;br /&gt;
This is &amp;quot;nn::ncm::ContentMetaKey&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 &lt;br /&gt;
| 0x8 &lt;br /&gt;
| Title id&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 &lt;br /&gt;
| 0x4 &lt;br /&gt;
| Version&lt;br /&gt;
|-&lt;br /&gt;
| 0xC &lt;br /&gt;
| 0x1 &lt;br /&gt;
| [[#ContentMetaType|Content Meta Type]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD &lt;br /&gt;
| 0x1 &lt;br /&gt;
| [[#ContentInstallType|Content Install Type]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xE &lt;br /&gt;
| 0x2 &lt;br /&gt;
| Padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ncm:v ==&lt;br /&gt;
This service doesn&#039;t normally exist on retail.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Paeton</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Sockets_services&amp;diff=7758</id>
		<title>Sockets services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Sockets_services&amp;diff=7758"/>
		<updated>2019-09-10T14:44:59Z</updated>

		<summary type="html">&lt;p&gt;Paeton: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= bsd:u, bsd:s =&lt;br /&gt;
This is &amp;quot;nn::socket::sf::IClient&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
All the services commands but the first two return -1 on failure and set errno when that happens. Although Nintendo has the FreeBSD kernel&#039;s to socket stack, &#039;&#039;&#039;the errno macro definitions being in use actually come from Linux (and not from FreeBSD as one would expect!)&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0  || RegisterClient (Initialize)&lt;br /&gt;
|-&lt;br /&gt;
| 1  || StartMonitoring&lt;br /&gt;
|-&lt;br /&gt;
| 2  || [[#Socket]]&lt;br /&gt;
|-&lt;br /&gt;
| 3  || [[#Socket|#SocketExempt]]&lt;br /&gt;
|-&lt;br /&gt;
| 4  || [[#Open]]&lt;br /&gt;
|-&lt;br /&gt;
| 5  || Select&lt;br /&gt;
|-&lt;br /&gt;
| 6  || Poll&lt;br /&gt;
|-&lt;br /&gt;
| 7  || [[#Sysctl]]&lt;br /&gt;
|-&lt;br /&gt;
| 8  || Recv&lt;br /&gt;
|-&lt;br /&gt;
| 9  || RecvFrom&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Send&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SendTo&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Accept&lt;br /&gt;
|-&lt;br /&gt;
| 13 || Bind&lt;br /&gt;
|-&lt;br /&gt;
| 14 || Connect&lt;br /&gt;
|-&lt;br /&gt;
| 15 || GetPeerName&lt;br /&gt;
|-&lt;br /&gt;
| 16 || GetSockName&lt;br /&gt;
|-&lt;br /&gt;
| 17 || GetSockOpt&lt;br /&gt;
|-&lt;br /&gt;
| 18 || Listen&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [[#Ioctl]]&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [[#Fcntl]]&lt;br /&gt;
|-&lt;br /&gt;
| 21 || SetSockOpt&lt;br /&gt;
|-&lt;br /&gt;
| 22 || Shutdown&lt;br /&gt;
|-&lt;br /&gt;
| 23 || ShutdownAllSockets&lt;br /&gt;
|-&lt;br /&gt;
| 24 || Write&lt;br /&gt;
|-&lt;br /&gt;
| 25 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 26 || Close&lt;br /&gt;
|-&lt;br /&gt;
| 27 || [[#DuplicateSocket]]&lt;br /&gt;
|-&lt;br /&gt;
| 28 || [[#GetResourceStatistics]]&lt;br /&gt;
|-&lt;br /&gt;
| 29 || [3.0.0+] [[#RecvMMsg]]&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [3.0.0+] [[#SendMMsg]]&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [7.0.0+] EventFd&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [7.0.0+] RegisterResourceStatisticsName&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Initalize ==&lt;br /&gt;
Takes a [[#BsdBufferConfig]] (made-up name), the PID, the size of the transfer memory and a copy-handle of the latter.&lt;br /&gt;
&lt;br /&gt;
=== BsdBufferConfig ===&lt;br /&gt;
 /// Configuration structure for bsdInitalize&lt;br /&gt;
 typedef struct  {&lt;br /&gt;
     u32 version;                ///&amp;lt; Observed 1 on 2.0 LibAppletWeb, 2 on 3.0.&lt;br /&gt;
 &lt;br /&gt;
     u32 tcp_tx_buf_size;        ///&amp;lt; Size of the TCP transfer (send) buffer (initial or fixed).&lt;br /&gt;
     u32 tcp_rx_buf_size;        ///&amp;lt; Size of the TCP recieve buffer (initial or fixed).&lt;br /&gt;
     u32 tcp_tx_buf_max_size;    ///&amp;lt; Maximum size of the TCP transfer (send) buffer. If it is 0, the size of the buffer is fixed to its initial value.&lt;br /&gt;
     u32 tcp_rx_buf_max_size;    ///&amp;lt; Maximum size of the TCP receive buffer. If it is 0, the size of the buffer is fixed to its initial value.&lt;br /&gt;
 &lt;br /&gt;
     u32 udp_tx_buf_size;        ///&amp;lt; Size of the UDP transfer (send) buffer (typically 0x2400 bytes).&lt;br /&gt;
     u32 udp_rx_buf_size;        ///&amp;lt; Size of the UDP receive buffer (typically 0xA500 bytes).&lt;br /&gt;
 &lt;br /&gt;
     u32 sb_efficiency;          ///&amp;lt; Number of buffers for each socket (standard values range from 1 to 8).&lt;br /&gt;
 } BsdBufferConfig;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The transfer memory must be larger than a the computed size below. Should the transfer memory be smaller than that, the BSD sockets service would only send ZeroWindow packets (for TCP), resulting in a transfer rate not exceeding 1 byte/s.&lt;br /&gt;
&lt;br /&gt;
 static size_t _bsdGetTransferMemSizeForBufferConfig(const BsdBufferConfig *config)&lt;br /&gt;
 {&lt;br /&gt;
     u32 tcp_tx_buf_max_size = config-&amp;gt;tcp_tx_buf_max_size != 0 ? config-&amp;gt;tcp_tx_buf_max_size : config-&amp;gt;tcp_tx_buf_size;&lt;br /&gt;
     u32 tcp_rx_buf_max_size = config-&amp;gt;tcp_rx_buf_max_size != 0 ? config-&amp;gt;tcp_rx_buf_max_size : config-&amp;gt;tcp_rx_buf_size;&lt;br /&gt;
     u32 sum = tcp_tx_buf_max_size + tcp_rx_buf_max_size + config-&amp;gt;udp_tx_buf_size + config-&amp;gt;udp_rx_buf_size;&lt;br /&gt;
 &lt;br /&gt;
     sum = ((sum + 0xFFF) &amp;gt;&amp;gt; 12) &amp;lt;&amp;lt; 12; // page round-up&lt;br /&gt;
     return (size_t)(config-&amp;gt;sb_efficiency * sum);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Socket ==&lt;br /&gt;
FreeBSD&#039;s &amp;lt;code&amp;gt;socket&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&amp;lt;code&amp;gt;bsd:u&amp;lt;/code&amp;gt; disallows the usage of the &amp;lt;code&amp;gt;SOCK_SEQPACKET&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SOCK_RAW&amp;lt;/code&amp;gt; types, with the exception of &amp;lt;code&amp;gt;(AF_INET, SOCK_RAW, IPPROTO_ICMP)&amp;lt;/code&amp;gt; (IPv4 &amp;lt;code&amp;gt;ping&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;bsd:s&amp;lt;/code&amp;gt; needs to be used for those.&lt;br /&gt;
&lt;br /&gt;
The only registered domains are &amp;lt;code&amp;gt;AF_INET&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;AF_ROUTE&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
SocketExempt: same as socket but the socket is immediately shutdown (disconnected) on creation.&lt;br /&gt;
&lt;br /&gt;
== Open ==&lt;br /&gt;
FreeBSD&#039;s &amp;lt;code&amp;gt;open&amp;lt;/code&amp;gt; command, limited to opening &amp;lt;code&amp;gt;/dev/bpf&amp;lt;/code&amp;gt;. This can be used, for example, to enable promiscuous mode, see FreeBSD&#039;s &amp;lt;code&amp;gt;/dev/bpf&amp;lt;/code&amp;gt; for more details.&lt;br /&gt;
&lt;br /&gt;
== Sysctl ==&lt;br /&gt;
FreeBSD&#039;s &amp;lt;code&amp;gt;sysctl&amp;lt;/code&amp;gt; command. Privileged operations are reserved for &amp;lt;code&amp;gt;bsd:s&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;code&amp;gt;CTL_NET&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CTL_VM&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CTL_KERN&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;CTL_DEBUG&amp;lt;/code&amp;gt; commands are implemented (?).&lt;br /&gt;
&lt;br /&gt;
== Ioctl ==&lt;br /&gt;
FreeBSD&#039;s &amp;lt;code&amp;gt;ioctl&amp;lt;/code&amp;gt; function. The following ioctls are whitelisted, refer to FreeBSD&#039;s headers for more details: SIOCATMARK, BIOCGBLEN, BIOCSETF BIOCIMMEDIATE, BIOCSETIF, BIOCVERSION, FIONSPACE, FIONWRITE, FIONREAD, SIOCGETSGCNT, SIOCGIFMETRIC, SIOCSIFMETRIC, SIOCDIFADDR, SIOCGIFINDEX, SIOCGIFADDR, SIOCGIFCONF, SIOCGIFNETMASK, SIOCAIFADDR, SIOCGIFMTU, SIOCSIFMTU, SIOCGIFMEDIA, SIOCSIFLLADDR and SIOCGIFXMEDIA.&lt;br /&gt;
&lt;br /&gt;
Nintendo use the following definition (hence changing all ioctls using this structure):&lt;br /&gt;
 struct bpf_program {&lt;br /&gt;
 	u_int bf_len;&lt;br /&gt;
 	struct bpf_insn bf_insns[BPF_MAXINSNS]; // [512]. This is a pointer in the official structure&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
== Fcntl ==&lt;br /&gt;
FreeBSD&#039;s &amp;lt;code&amp;gt;fcntl&amp;lt;/code&amp;gt;, limited to &amp;lt;code&amp;gt;F_GETFL&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;F_SETFL&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;O_NONBLOCK&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== DuplicateSocket ==&lt;br /&gt;
Takes a socket file descriptor and an unused u64. Duplicates the socket (FreeBSD&#039;s &amp;lt;code&amp;gt;dup&amp;lt;/code&amp;gt;). Reserved to &amp;lt;code&amp;gt;bsd:s&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== GetResourceStatistics ==&lt;br /&gt;
Takes a total of 8-bytes of input, a PID, a type-0x22 output buffer, and returns a total of 8-bytes of output.&lt;br /&gt;
&lt;br /&gt;
[4.0.0+] Now takes an additional 8-bytes of input.&lt;br /&gt;
&lt;br /&gt;
[7.0.0+] Now takes an additional type-0x21 input buffer.&lt;br /&gt;
&lt;br /&gt;
== RecvMMsg ==&lt;br /&gt;
Takes a total of 0x20-bytes of input, a type-0x22 output buffer, and returns a total of 8-bytes of output.&lt;br /&gt;
&lt;br /&gt;
[7.0.0+] The buffer was replaced with a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
== SendMMsg ==&lt;br /&gt;
Takes a total of 0xC-bytes of input, two type-0x21 input buffers, and returns a total of 8-bytes of output.&lt;br /&gt;
&lt;br /&gt;
[7.0.0+] The buffers were replaced with a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
= bsdcfg =&lt;br /&gt;
This is &amp;quot;nn::bsdsocket::cfg::ServerInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0  || [[#SetIfUp]]&lt;br /&gt;
|-&lt;br /&gt;
| 1  || [[#SetIfUpWithEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 2  || CancelIf&lt;br /&gt;
|-&lt;br /&gt;
| 3  || SetIfDown&lt;br /&gt;
|-&lt;br /&gt;
| 4  || GetIfState&lt;br /&gt;
|-&lt;br /&gt;
| 5  || DhcpRenew&lt;br /&gt;
|-&lt;br /&gt;
| 6  || AddStaticArpEntry&lt;br /&gt;
|-&lt;br /&gt;
| 7  || RemoveArpEntry&lt;br /&gt;
|-&lt;br /&gt;
| 8  || LookupArpEntry&lt;br /&gt;
|-&lt;br /&gt;
| 9  || LookupArpEntry2&lt;br /&gt;
|-&lt;br /&gt;
| 10 || ClearArpEntries&lt;br /&gt;
|-&lt;br /&gt;
| 11 || ClearArpEntries2&lt;br /&gt;
|-&lt;br /&gt;
| 12 || PrintArpEntries&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SetIfUp ==&lt;br /&gt;
Takes a total of 0x28-bytes of input and a type-0x5 input buffer, no output.&lt;br /&gt;
&lt;br /&gt;
[3.0.0+] Takes an additional 4-bytes of input.&lt;br /&gt;
&lt;br /&gt;
== SetIfUpWithEvent ==&lt;br /&gt;
Takes a total of 0x28-bytes of input and a type-0x5 input buffer, returns an output handle.&lt;br /&gt;
&lt;br /&gt;
[3.0.0+] Takes an additional 4-bytes of input.&lt;br /&gt;
&lt;br /&gt;
= ethc:c =&lt;br /&gt;
This is &amp;quot;nn::eth::sf::IEthInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0  || Initialize&lt;br /&gt;
|-&lt;br /&gt;
| 1  || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 2  || GetResult&lt;br /&gt;
|-&lt;br /&gt;
| 3  || GetMediaList&lt;br /&gt;
|-&lt;br /&gt;
| 4  || SetMediaType&lt;br /&gt;
|-&lt;br /&gt;
| 5  || GetMediaType&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ethc:i =&lt;br /&gt;
This is &amp;quot;nn::eth::sf::IEthInterfaceGroup&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0  || GetReadableHandle&lt;br /&gt;
|-&lt;br /&gt;
| 1  || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 2  || GetResult&lt;br /&gt;
|-&lt;br /&gt;
| 3  || GetInterfaceList&lt;br /&gt;
|-&lt;br /&gt;
| 4  || GetInterfaceCount&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= sfdnsres =&lt;br /&gt;
This is &amp;quot;nn::socket::resolver::IResolver&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This service uses &amp;lt;code&amp;gt;bionic/libc/dns&amp;lt;/code&amp;gt; to perform its tasks.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetDnsAddressesPrivateRequest (stubbed, returns 0x7FE03)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetDnsAddressPrivateRequest (stubbed, returns 0x7FE03)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetHostByNameRequest&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetHostByAddrRequest&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetHostStringErrorRequest&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetGaiStringErrorRequest&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [[#GetAddrInfoRequest]]&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GetNameInfoRequest&lt;br /&gt;
|-&lt;br /&gt;
| 8 || GetCancelHandleRequest&lt;br /&gt;
|-&lt;br /&gt;
| 9 || CancelRequest&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [5.0.0+] GetHostByNameRequestWithOptions&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [5.0.0+] GetHostByAddrRequestWithOptions&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [5.0.0+] GetAddrInfoRequestWithOptions&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [5.0.0+] GetNameInfoRequestWithOptions&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [5.0.0+] ResolverSetOptionRequest&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [5.0.0+] ResolverGetOptionRequest&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetAddrInfoRequest ==&lt;br /&gt;
Takes three type 5 buffers (host, port, and hints), and a type 6 buffer (the output addrinfos). Also takes a u8 (padded to 4 bytes so the next raw parameter can align), a u32, and a u64. The u8 is a boolean for whether to enable &amp;quot;nsd resolve&amp;quot; (1) or not (0). Not sure what the u32 is. It seems to either come from a parameter to &amp;lt;tt&amp;gt;GetAddrInfo&amp;lt;/tt&amp;gt; or be zero. The u64 is most likely a placeholder for the server to copy the PID into and should be zero. Both hints and the output buffer contain serialized addrinfo chains. The hints buffer is sized 0x400 bytes long by default, and the output buffer 0x1000 bytes.&lt;br /&gt;
&lt;br /&gt;
=== Addrinfo Serialization Format ===&lt;br /&gt;
Each struct addrinfo in the linked list is serialized according to this format and then written to the buffer. All numbers are in network byte order.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Size (bytes) || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Magic || Needs to be 0xBEEFCAFE. Seriously.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || ai_flags ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || ai_family ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || ai_socktype ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || ai_protocol ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || ai_addrlen ||&lt;br /&gt;
|-&lt;br /&gt;
| ai_addrlen ? ai_addrlen : 4 || ai_addr ||&lt;br /&gt;
|-&lt;br /&gt;
| null-terminated string || ai_canonname ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;tt&amp;gt;ai_addrlen&amp;lt;/tt&amp;gt; is zero, &amp;lt;tt&amp;gt;ai_addr&amp;lt;/tt&amp;gt; will occupy 4 bytes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Size (bytes) || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 4 || ai_addr&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;tt&amp;gt;ai_family&amp;lt;/tt&amp;gt; is recognized as AF_INET6 (28) or AF_INET (2), &amp;lt;tt&amp;gt;ai_addr&amp;lt;/tt&amp;gt; is read as &amp;lt;tt&amp;gt;struct sockaddr_in&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;struct sockaddr_in6&amp;lt;/tt&amp;gt;. Otherwise, it&#039;s just read as &amp;lt;tt&amp;gt;u8[ai_addrlen]&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The list should be terminated with a sentinel four-byte zero value.&lt;br /&gt;
&lt;br /&gt;
= nsd:u, nsd:a =&lt;br /&gt;
This is &amp;quot;nn::nsd::detail::IManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 10 || GetSettingName&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#GetEnvironmentIdentifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 13 || DeleteSettings&lt;br /&gt;
|-&lt;br /&gt;
| 14 || ImportSettings&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [4.0.0+] SetChangeEnvironmentIdentifierDisabled&lt;br /&gt;
|-&lt;br /&gt;
| 20 || Resolve&lt;br /&gt;
|-&lt;br /&gt;
| 21 || ResolveEx&lt;br /&gt;
|-&lt;br /&gt;
| 30 || GetNasServiceSetting&lt;br /&gt;
|-&lt;br /&gt;
| 31 || GetNasServiceSettingEx&lt;br /&gt;
|-&lt;br /&gt;
| 40 || GetNasRequestFqdn&lt;br /&gt;
|-&lt;br /&gt;
| 41 || GetNasRequestFqdnEx&lt;br /&gt;
|-&lt;br /&gt;
| 42 || GetNasApiFqdn&lt;br /&gt;
|-&lt;br /&gt;
| 43 || GetNasApiFqdnEx&lt;br /&gt;
|-&lt;br /&gt;
| 50 || GetCurrentSetting&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [[#ReadSaveDataFromFsForTest]]&lt;br /&gt;
|-&lt;br /&gt;
| 61 || [[#WriteSaveDataToFsForTest]]&lt;br /&gt;
|-&lt;br /&gt;
| 62 || [[#DeleteSaveDataOfFsForTest]]&lt;br /&gt;
|-&lt;br /&gt;
| 63 || [4.0.0+] IsChangeEnvironmentIdentifierDisabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetEnvironmentIdentifier ==&lt;br /&gt;
Takes a type-0x16 buffer with size 8. Returns a string.&lt;br /&gt;
&lt;br /&gt;
The output string is used by [[NIM_services|NIM]] for the &amp;quot;eid:%s&amp;quot; in the User-Agent strings.&lt;br /&gt;
&lt;br /&gt;
This is the &amp;quot;lp1&amp;quot; string also used in domains.&lt;br /&gt;
&lt;br /&gt;
== ReadSaveDataFromFsForTest ==&lt;br /&gt;
Requires the &amp;lt;code&amp;gt;nsd!test_mode&amp;lt;/code&amp;gt; setting to be equal to 1.&lt;br /&gt;
&lt;br /&gt;
Mounts the system save data for bsdsockets as &amp;lt;code&amp;gt;nsdsave&amp;lt;/code&amp;gt; and reads from &amp;lt;code&amp;gt;nsd:/file&amp;lt;/code&amp;gt; to the specified buffer, at the specified size and offset with no checks whatsoever. &amp;lt;code&amp;gt;nsdsave&amp;lt;/code&amp;gt; is then unmounted.&lt;br /&gt;
&lt;br /&gt;
== WriteSaveDataToFsForTest ==&lt;br /&gt;
Requires the &amp;lt;code&amp;gt;nsd!test_mode&amp;lt;/code&amp;gt; setting to be equal to 1.&lt;br /&gt;
&lt;br /&gt;
Mounts the system save data for bsdsockets as &amp;lt;code&amp;gt;nsdsave&amp;lt;/code&amp;gt; and writes to &amp;lt;code&amp;gt;nsd:/file&amp;lt;/code&amp;gt; (appending is allowed) using the specified buffer, at the specified size and offset, with no checks whatsoever. &amp;lt;code&amp;gt;nsdsave&amp;lt;/code&amp;gt; is then commited and unmounted.&lt;br /&gt;
&lt;br /&gt;
== DeleteSaveDataOfFsForTest ==&lt;br /&gt;
Requires the &amp;lt;code&amp;gt;nsd!test_mode&amp;lt;/code&amp;gt; setting to be equal to 1.&lt;br /&gt;
&lt;br /&gt;
Deletes the system save data for bsdsockets.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Paeton</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=NS_services&amp;diff=7757</id>
		<title>NS services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=NS_services&amp;diff=7757"/>
		<updated>2019-09-10T14:41:27Z</updated>

		<summary type="html">&lt;p&gt;Paeton: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= aoc:u =&lt;br /&gt;
This is &amp;quot;nn::aocsrv::detail::IAddOnContentManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [1.0.0-6.2.0] CountAddOnContentByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [1.0.0-6.2.0] ListAddOnContentByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 2 || CountAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ListAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [1.0.0-6.2.0] GetAddOnContentBaseIdByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetAddOnContentBaseId&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [1.0.0-6.2.0] PrepareAddOnContentByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 7 || PrepareAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [4.0.0+] GetAddOnContentListChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [7.0.0+] [[#IPurchaseEventManager|CreateEcPurchasedEventManager]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IPurchaseEventManager ==&lt;br /&gt;
This is &amp;quot;nn::ec::IPurchaseEventManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetDefaultDeliveryTarget&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SetDeliveryTarget&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetPurchasedEventReadableHandle&lt;br /&gt;
|-&lt;br /&gt;
| 3 || PopPurchasedProductInfo&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ns:am =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IApplicationManagerInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[3.0.0+] This service was replaced by [[#ns:am2, ns:ec, ns:rid, ns:rt, ns:web|ns:am2]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#ListApplicationRecord]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GenerateApplicationRecordCount&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetApplicationRecordUpdateSystemEvent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetApplicationViewDeprecated&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeleteApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 5 || DeleteApplicationCompletely&lt;br /&gt;
|-&lt;br /&gt;
| 6 || IsAnyApplicationEntityRedundant&lt;br /&gt;
|-&lt;br /&gt;
| 7 || DeleteRedundantApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 8 || IsApplicationEntityMovable&lt;br /&gt;
|-&lt;br /&gt;
| 9 || MoveApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 11 || CalculateApplicationOccupiedSize&lt;br /&gt;
|-&lt;br /&gt;
| 16 || PushApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 17 || ListApplicationRecordContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 18 || &lt;br /&gt;
|-&lt;br /&gt;
| 19 || [[#LaunchApplication]]&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#GetApplicationContentPath]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || TerminateApplication&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [2.0.0+] ResolveApplicationContentPath&lt;br /&gt;
|-&lt;br /&gt;
| 26 || BeginInstallApplication&lt;br /&gt;
|-&lt;br /&gt;
| 27 || DeleteApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 30 || RequestApplicationUpdateInfo&lt;br /&gt;
|-&lt;br /&gt;
| 31 || RequestUpdateApplication&lt;br /&gt;
|-&lt;br /&gt;
| 32 || CancelApplicationDownload&lt;br /&gt;
|-&lt;br /&gt;
| 33 || ResumeApplicationDownload&lt;br /&gt;
|-&lt;br /&gt;
| 34 || &lt;br /&gt;
|-&lt;br /&gt;
| 35 || UpdateVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 36 || PushLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| 37 || ListRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 38 || CheckApplicationLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| 39 || CheckApplicationLaunchRights&lt;br /&gt;
|-&lt;br /&gt;
| 40 || GetApplicationLogoData&lt;br /&gt;
|-&lt;br /&gt;
| 41 || CalculateApplicationDownloadRequiredSize&lt;br /&gt;
|-&lt;br /&gt;
| 42 || CleanupSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 43 || CheckSdCardMountStatus&lt;br /&gt;
|-&lt;br /&gt;
| 44 || GetSdCardMountStatusChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 45 || GetGameCardAttachmentEvent&lt;br /&gt;
|-&lt;br /&gt;
| 46 || GetGameCardAttachmentInfo&lt;br /&gt;
|-&lt;br /&gt;
| 47 || [[#GetTotalSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 48 || [[#GetFreeSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 49 || GetSdCardRemovedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 52 || GetGameCardUpdateDetectionEvent&lt;br /&gt;
|-&lt;br /&gt;
| 53 || DisableApplicationAutoDelete&lt;br /&gt;
|-&lt;br /&gt;
| 54 || EnableApplicationAutoDelete&lt;br /&gt;
|-&lt;br /&gt;
| 55 || [[#GetApplicationDesiredLanguage]]&lt;br /&gt;
|-&lt;br /&gt;
| 56 || SetApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 57 || ClearApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 58 || GetLastSdCardMountUnexpectedResult&lt;br /&gt;
|-&lt;br /&gt;
| 59 || ConvertApplicationLanguageToLanguageCode&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [[#ConvertLanguageCodeToApplicationLanguage]]&lt;br /&gt;
|-&lt;br /&gt;
| 61 || GetBackgroundDownloadStressTaskInfo&lt;br /&gt;
|-&lt;br /&gt;
| 62 || GetGameCardStopper&lt;br /&gt;
|-&lt;br /&gt;
| 63 || IsSystemProgramInstalled&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [2.0.0+] StartApplyDeltaTask&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [2.0.0+] GetRequestServerStopper&lt;br /&gt;
|-&lt;br /&gt;
| 100 || ResetToFactorySettings&lt;br /&gt;
|-&lt;br /&gt;
| 101 || ResetToFactorySettingsWithoutUserSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 102 || [2.0.0+] ResetToFactorySettingsForRefurbishment&lt;br /&gt;
|-&lt;br /&gt;
| 200 || CalculateUserSaveDataStatistics&lt;br /&gt;
|-&lt;br /&gt;
| 201 || DeleteUserSaveDataAll&lt;br /&gt;
|-&lt;br /&gt;
| 210 || DeleteUserSystemSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 220 || UnregisterNetworkServiceAccount&lt;br /&gt;
|-&lt;br /&gt;
| 300 || GetApplicationShellEvent&lt;br /&gt;
|-&lt;br /&gt;
| 301 || PopApplicationShellEventInfo&lt;br /&gt;
|-&lt;br /&gt;
| 302 || LaunchLibraryApplet&lt;br /&gt;
|-&lt;br /&gt;
| 303 || TerminateLibraryApplet&lt;br /&gt;
|-&lt;br /&gt;
| 304 || LaunchSystemApplet&lt;br /&gt;
|-&lt;br /&gt;
| 305 || TerminateSystemApplet&lt;br /&gt;
|-&lt;br /&gt;
| 306 || LaunchOverlayApplet&lt;br /&gt;
|-&lt;br /&gt;
| 307 || TerminateOverlayApplet&lt;br /&gt;
|-&lt;br /&gt;
| 400 || [[#GetApplicationControlData]]&lt;br /&gt;
|-&lt;br /&gt;
| 401 || InvalidateAllApplicationControlCache&lt;br /&gt;
|-&lt;br /&gt;
| 402 || RequestDownloadApplicationControlData&lt;br /&gt;
|-&lt;br /&gt;
| 403 || GetMaxApplicationControlCacheCount&lt;br /&gt;
|-&lt;br /&gt;
| 404 || [2.0.0+] InvalidateApplicationControlCache&lt;br /&gt;
|-&lt;br /&gt;
| 405 || [2.0.0+] ListApplicationControlCacheEntryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 502 || [2.0.0+] RequestCheckGameCardRegistration&lt;br /&gt;
|-&lt;br /&gt;
| 503 || [2.0.0+] RequestGameCardRegistrationGoldPoint&lt;br /&gt;
|-&lt;br /&gt;
| 504 || [2.0.0+] RequestRegisterGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 600 || [2.0.0+] CountApplicationContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 601 || [2.0.0+] [[#ListApplicationContentMetaStatus]]&lt;br /&gt;
|-&lt;br /&gt;
| 602 || [2.0.0+] ListAvailableAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 603 || [2.0.0+] GetOwnedApplicationContentMetaStatus&lt;br /&gt;
|-&lt;br /&gt;
| 604 || [2.0.0+] RegisterContentsExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 605 || [2.0.0+] ListApplicationContentMetaStatusWithRightsCheck&lt;br /&gt;
|-&lt;br /&gt;
| 700 || [2.0.0+] PushDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 701 || [2.0.0+] ClearTaskStatusList&lt;br /&gt;
|-&lt;br /&gt;
| 702 || [2.0.0+] RequestDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 703 || [2.0.0+] RequestEnsureDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 704 || [2.0.0+] ListDownloadTaskStatus&lt;br /&gt;
|-&lt;br /&gt;
| 705 || [2.0.0+] RequestDownloadTaskListData&lt;br /&gt;
|-&lt;br /&gt;
| 800 || [2.0.0+] RequestVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 801 || [2.0.0+] ListVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 900 || [2.0.0+] GetApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 901 || [2.0.0+] GetApplicationRecordProperty&lt;br /&gt;
|-&lt;br /&gt;
| 902 || [2.0.0+] EnableApplicationAutoUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 903 || [2.0.0+] DisableApplicationAutoUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 904 || [2.0.0+] TouchApplication&lt;br /&gt;
|-&lt;br /&gt;
| 905 || [2.0.0+] RequestApplicationUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 906 || [2.0.0+] IsApplicationUpdateRequested&lt;br /&gt;
|-&lt;br /&gt;
| 907 || [2.0.0+] WithdrawApplicationUpdateRequest&lt;br /&gt;
|-&lt;br /&gt;
| 908 || [2.0.0+] ListApplicationRecordInstalledContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || [2.0.0+] RequestVerifyApplicationDeprecated&lt;br /&gt;
|-&lt;br /&gt;
| 1001 || [2.0.0+] CorruptApplicationForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 1200 || [2.0.0+] [[#NeedsUpdateVulnerability]]&lt;br /&gt;
|-&lt;br /&gt;
| 1300 || [2.0.0+] IsAnyApplicationEntityInstalled&lt;br /&gt;
|-&lt;br /&gt;
| 1301 || [2.0.0+] DeleteApplicationContentEntities&lt;br /&gt;
|-&lt;br /&gt;
| 1302 || [2.0.0+] CleanupUnrecordedApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 1400 || [2.0.0+] PrepareShutdown&lt;br /&gt;
|-&lt;br /&gt;
| 1500 || [2.0.0+] FormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1501 || [2.0.0+] NeedsSystemUpdateToFormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1502 || [2.0.0+] GetLastSdCardFormatUnexpectedResult&lt;br /&gt;
|-&lt;br /&gt;
| 1503 || [2.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 1600 || [2.0.0+] GetSystemSeedForPseudoDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 1700 || [2.0.0+] ListApplicationDownloadingContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 1800 || [2.0.0+] IsNotificationSetupCompleted&lt;br /&gt;
|-&lt;br /&gt;
| 1801 || [2.0.0+] GetLastNotificationInfoCount&lt;br /&gt;
|-&lt;br /&gt;
| 1802 || [2.0.0+] ListLastNotificationInfo&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ListApplicationRecord ==&lt;br /&gt;
Takes a type-6 output buffer and an u32 entry_offset.&lt;br /&gt;
&lt;br /&gt;
Returns an array of title-info entries using the specified offset and size. No input titleID is passed to this.&lt;br /&gt;
&lt;br /&gt;
=== Application Record Format ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| Title ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x1&lt;br /&gt;
| Type? (Known values: 2=Installing?, 3=Gamecard?, 4=Installed?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown, usually 0x02&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| 0x6&lt;br /&gt;
| Unknown, usually zeros?&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown, seems to change between reboots and removing/reinserting gamecards&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| 0x7&lt;br /&gt;
| Unknown, usually zeros?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== LaunchApplication ==&lt;br /&gt;
Takes an input u64 titleID, returns an output u64 PID.&lt;br /&gt;
&lt;br /&gt;
Launches an application title which is registered with NS.&lt;br /&gt;
&lt;br /&gt;
== GetApplicationContentPath ==&lt;br /&gt;
Takes a 0x16-type output buffer, an u8 [[NCM_services#Title_Types|title type]], and an u64 titleID.&lt;br /&gt;
&lt;br /&gt;
The input titleID is used with the application-title table like various other cmds, anything not in that table can&#039;t be used with this.&lt;br /&gt;
&lt;br /&gt;
Returns a string path for the specified type of patch content with this titleID, otherwise returns regular-application paths when update-title not installed. Returns an error when the specified type of content doesn&#039;t exist for this title. Starts with &amp;quot;@{SdCardContent,UserContent}://&amp;quot; and ends in &amp;quot;.nca&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For gamecard content, the output path is: &amp;quot;@GcSXXXXXXXX:/&amp;lt;NcaId&amp;gt;.nca&amp;quot;. NCA-type0 with gamecard returns 0 with an empty output string.&lt;br /&gt;
&lt;br /&gt;
The output string is then used by the user-process with [[Filesystem_services|FS]] to mount the content.&lt;br /&gt;
&lt;br /&gt;
== GetTotalSpaceSize ==&lt;br /&gt;
Takes an input media-id that must be 5.&lt;br /&gt;
&lt;br /&gt;
Returns the u64 from [[Content_Manager_services#IContentStorage]] cmd22.&lt;br /&gt;
&lt;br /&gt;
== GetFreeSpaceSize ==&lt;br /&gt;
Takes an input media-id that must be 5.&lt;br /&gt;
&lt;br /&gt;
Returns the u64 from [[Content_Manager_services#IContentStorage]] cmd23.&lt;br /&gt;
&lt;br /&gt;
== GetApplicationDesiredLanguage ==&lt;br /&gt;
Takes an input u8 language-bitmask, returns an output u8 [[control.nacp]] langentry index.&lt;br /&gt;
&lt;br /&gt;
User-processes generate the language-bitmask with the following for all 16 lang-entries: &amp;lt;code&amp;gt;if(&amp;lt;either string in langentry[i] is non-empty&amp;gt;)bitmask |= 1&amp;lt;&amp;lt;i&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ConvertLanguageCodeToApplicationLanguage ==&lt;br /&gt;
Takes an input u8 pointer for the resulting Id to be written to and a string represented as a u64 (i.e 0x53552D6E65 for &#039;en-US&#039;).&lt;br /&gt;
&lt;br /&gt;
Returns 0 if an ID was successfully found, otherwise returns 0x25810.&lt;br /&gt;
&lt;br /&gt;
== GetApplicationControlData ==&lt;br /&gt;
Takes an input u8 flag, an u64 titleID, and a type-0x6 output buffer. Returns an output u32 for actual_size. Official user-processes use buffer size 0x24000. [[qlaunch]] only uses flag value 0x1.&lt;br /&gt;
&lt;br /&gt;
Loads cached [[control.nacp]] to buf+0 and the cached icon to buf+0x4000. Returns an error if the buffer is too small.&lt;br /&gt;
&lt;br /&gt;
== ListApplicationContentMetaStatus ==&lt;br /&gt;
Returns 0x10-byte entries using the specified titleID starting at the specified u32 entryindex. Can only return game titles. The second entry if any is the update-title usually. When the input entryindex is &amp;gt;= totalentries, this will return 0 with out_entrycount=0.&lt;br /&gt;
&lt;br /&gt;
Entry structure:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8 &amp;quot;type&amp;quot;. [[Content_Manager_services|Title type]] (String is from web-applet)&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| u8 &amp;quot;installedStorage&amp;quot; / [[Filesystem_services|StorageId]] (String is from web-applet)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown. Non-zero with output from cmd 605, differs for app/update titles.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| u32 Title-version&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| u64 titleID&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ns:am2, ns:ec, ns:rid, ns:rt, ns:web =&lt;br /&gt;
These services are all, at the top level, &amp;quot;nn::ns::detail::IServiceGetterInterface&amp;quot;. These commands check a state field for a command-specific bit and returns an error if not set, this is likely a permissions check for service+command.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 7988 || [6.0.0+] Returns an output [[#IDynamicRightsInterface]].&lt;br /&gt;
|-&lt;br /&gt;
| 7989 || [5.1.0+] Returns an output [[#IReadOnlyApplicationControlDataInterface]].&lt;br /&gt;
|-&lt;br /&gt;
| 7991 || [5.0.0+] Returns an output [[#IReadOnlyApplicationRecordInterface]].&lt;br /&gt;
|-&lt;br /&gt;
| 7992 || [4.0.0+] [[#IECommerceInterface|GetECommerceInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7993 || [4.0.0+] [[#IApplicationVersionInterface|GetApplicationVersionInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7994 || [[#IFactoryResetInterface|GetFactoryResetInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7995 || [[#IAccountProxyInterface|GetAccountProxyInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7996 || [[#IApplicationManagerInterface|GetApplicationManagerInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7997 || [[#IDownloadTaskInterface|GetDownloadTaskInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7998 || [[#IContentManagementInterface|GetContentManagementInterface]]&lt;br /&gt;
|-&lt;br /&gt;
| 7999 || [[#IDocumentInterface|GetDocumentInterface]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IAccountProxyInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IAccountProxyInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateUserAccount&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IApplicationManagerInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IApplicationManagerInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#ListApplicationRecord]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GenerateApplicationRecordCount&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetApplicationRecordUpdateSystemEvent&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetApplicationViewDeprecated&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeleteApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 5 || DeleteApplicationCompletely&lt;br /&gt;
|-&lt;br /&gt;
| 6 || IsAnyApplicationEntityRedundant&lt;br /&gt;
|-&lt;br /&gt;
| 7 || DeleteRedundantApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 8 || IsApplicationEntityMovable&lt;br /&gt;
|-&lt;br /&gt;
| 9 || MoveApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 11 || CalculateApplicationOccupiedSize&lt;br /&gt;
|-&lt;br /&gt;
| 16 || PushApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 17 || ListApplicationRecordContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [1.0.0-5.1.0] LaunchApplicationOld&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#GetApplicationContentPath]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || TerminateApplication&lt;br /&gt;
|-&lt;br /&gt;
| 23 || ResolveApplicationContentPath&lt;br /&gt;
|-&lt;br /&gt;
| 26 || BeginInstallApplication&lt;br /&gt;
|-&lt;br /&gt;
| 27 || DeleteApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 30 || RequestApplicationUpdateInfo&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-3.0.2] 31 || &lt;br /&gt;
|-&lt;br /&gt;
| 32 || CancelApplicationDownload&lt;br /&gt;
|-&lt;br /&gt;
| 33 || ResumeApplicationDownload&lt;br /&gt;
|-&lt;br /&gt;
| 35 || UpdateVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 36 || PushLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| 37 || ListRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 38 || CheckApplicationLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 39 || CheckApplicationLaunchRights&lt;br /&gt;
|-&lt;br /&gt;
| 40 || GetApplicationLogoData&lt;br /&gt;
|-&lt;br /&gt;
| 41 || CalculateApplicationDownloadRequiredSize&lt;br /&gt;
|-&lt;br /&gt;
| 42 || CleanupSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 43 || CheckSdCardMountStatus&lt;br /&gt;
|-&lt;br /&gt;
| 44 || GetSdCardMountStatusChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 45 || GetGameCardAttachmentEvent&lt;br /&gt;
|-&lt;br /&gt;
| 46 || GetGameCardAttachmentInfo&lt;br /&gt;
|-&lt;br /&gt;
| 47 || [[#GetTotalSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 48 || [[#GetFreeSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 49 || GetSdCardRemovedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 52 || GetGameCardUpdateDetectionEvent&lt;br /&gt;
|-&lt;br /&gt;
| 53 || DisableApplicationAutoDelete&lt;br /&gt;
|-&lt;br /&gt;
| 54 || EnableApplicationAutoDelete&lt;br /&gt;
|-&lt;br /&gt;
| 55 || GetApplicationDesiredLanguage&lt;br /&gt;
|-&lt;br /&gt;
| 56 || SetApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 57 || ClearApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 58 || GetLastSdCardMountUnexpectedResult&lt;br /&gt;
|-&lt;br /&gt;
| 59 || ConvertApplicationLanguageToLanguageCode&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [[#ConvertLanguageCodeToApplicationLanguage]]&lt;br /&gt;
|-&lt;br /&gt;
| 61 || GetBackgroundDownloadStressTaskInfo&lt;br /&gt;
|-&lt;br /&gt;
| 62 || GetGameCardStopper&lt;br /&gt;
|-&lt;br /&gt;
| 63 || IsSystemProgramInstalled&lt;br /&gt;
|-&lt;br /&gt;
| 64 || StartApplyDeltaTask&lt;br /&gt;
|-&lt;br /&gt;
| 65 || GetRequestServerStopper&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [3.0.0+] GetBackgroundApplyDeltaStressTaskInfo&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [3.0.0+] CancelApplicationApplyDelta&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [3.0.0+] ResumeApplicationApplyDelta&lt;br /&gt;
|-&lt;br /&gt;
| 69 || [3.0.0+] CalculateApplicationApplyDeltaRequiredSize&lt;br /&gt;
|-&lt;br /&gt;
| 70 || [3.0.0+] ResumeAll&lt;br /&gt;
|-&lt;br /&gt;
| 71 || [3.0.0+] GetStorageSize&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [3.0.0+] RequestDownloadApplication&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [3.0.0+] RequestDownloadAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 82 || [3.0.0+] DownloadApplication&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0-6.2.0] 83 || CheckApplicationResumeRights&lt;br /&gt;
|-&lt;br /&gt;
| 84 || [4.0.0+] GetDynamicCommitEvent&lt;br /&gt;
|-&lt;br /&gt;
| 85 || [4.0.0+] RequestUpdateApplication2&lt;br /&gt;
|-&lt;br /&gt;
| 86 || [4.0.0+] EnableApplicationCrashReport&lt;br /&gt;
|-&lt;br /&gt;
| 87 || [4.0.0+] IsApplicationCrashReportEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 90 || [4.0.0+] BoostSystemMemoryResourceLimit&lt;br /&gt;
|-&lt;br /&gt;
| 91 || [5.0.0+] DeprecatedLaunchApplication&lt;br /&gt;
|-&lt;br /&gt;
| 92 || [5.0.0+] GetRunningApplicationProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 93 || [5.0.0+] GetMainApplicationProgramIndex&lt;br /&gt;
|-&lt;br /&gt;
| 94 || [6.0.0+] LaunchApplication&lt;br /&gt;
|-&lt;br /&gt;
| 95 || [6.0.0+] GetApplicationLaunchInfo&lt;br /&gt;
|-&lt;br /&gt;
| 96 || [6.0.0+] AcquireApplicationLaunchInfo&lt;br /&gt;
|-&lt;br /&gt;
| 97 || [6.0.0+] GetMainApplicationProgramIndexByApplicationLaunchInfo&lt;br /&gt;
|-&lt;br /&gt;
| 98 || [6.0.0+] EnableApplicationAllThreadDumpOnCrash&lt;br /&gt;
|-&lt;br /&gt;
| 99 || [8.0.0+] LaunchDevMenu&lt;br /&gt;
|-&lt;br /&gt;
| 100 || ResetToFactorySettings&lt;br /&gt;
|-&lt;br /&gt;
| 101 || ResetToFactorySettingsWithoutUserSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 102 || ResetToFactorySettingsForRefurbishment&lt;br /&gt;
|-&lt;br /&gt;
| 200 || CalculateUserSaveDataStatistics&lt;br /&gt;
|-&lt;br /&gt;
| 201 || DeleteUserSaveDataAll&lt;br /&gt;
|-&lt;br /&gt;
| 210 || DeleteUserSystemSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 211 || [6.0.0+] DeleteSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 220 || UnregisterNetworkServiceAccount&lt;br /&gt;
|-&lt;br /&gt;
| 221 || [6.0.0+] UnregisterNetworkServiceAccountWithUserSaveDataDeletion&lt;br /&gt;
|-&lt;br /&gt;
| 300 || GetApplicationShellEvent&lt;br /&gt;
|-&lt;br /&gt;
| 301 || PopApplicationShellEventInfo&lt;br /&gt;
|-&lt;br /&gt;
| 302 || LaunchLibraryApplet&lt;br /&gt;
|-&lt;br /&gt;
| 303 || TerminateLibraryApplet&lt;br /&gt;
|-&lt;br /&gt;
| 304 || LaunchSystemApplet&lt;br /&gt;
|-&lt;br /&gt;
| 305 || TerminateSystemApplet&lt;br /&gt;
|-&lt;br /&gt;
| 306 || LaunchOverlayApplet&lt;br /&gt;
|-&lt;br /&gt;
| 307 || TerminateOverlayApplet&lt;br /&gt;
|-&lt;br /&gt;
| 400 || GetApplicationControlData&lt;br /&gt;
|-&lt;br /&gt;
| 401 || InvalidateAllApplicationControlCache&lt;br /&gt;
|-&lt;br /&gt;
| 402 || RequestDownloadApplicationControlData&lt;br /&gt;
|-&lt;br /&gt;
| 403 || GetMaxApplicationControlCacheCount&lt;br /&gt;
|-&lt;br /&gt;
| 404 || InvalidateApplicationControlCache&lt;br /&gt;
|-&lt;br /&gt;
| 405 || ListApplicationControlCacheEntryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 406 || [6.0.0+] GetApplicationControlProperty&lt;br /&gt;
|-&lt;br /&gt;
| 407 || [8.0.0+] ListApplicationTitle&lt;br /&gt;
|-&lt;br /&gt;
| 408 || [8.0.0+] ListApplicationIcon&lt;br /&gt;
|-&lt;br /&gt;
| 502 || RequestCheckGameCardRegistration&lt;br /&gt;
|-&lt;br /&gt;
| 503 || RequestGameCardRegistrationGoldPoint&lt;br /&gt;
|-&lt;br /&gt;
| 504 || RequestRegisterGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 505 || [3.0.0+] GetGameCardMountFailureEvent&lt;br /&gt;
|-&lt;br /&gt;
| 506 || [3.0.0+] IsGameCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 507 || [3.0.0+] EnsureGameCardAccess&lt;br /&gt;
|-&lt;br /&gt;
| 508 || [3.0.0+] GetLastGameCardMountFailureResult&lt;br /&gt;
|-&lt;br /&gt;
| 509 || [5.0.0+] ListApplicationIdOnGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 600 || CountApplicationContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 601 || [[#ListApplicationContentMetaStatus]]&lt;br /&gt;
|-&lt;br /&gt;
| 602 || [2.0.0-5.1.0] ListAvailableAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 603 || GetOwnedApplicationContentMetaStatus&lt;br /&gt;
|-&lt;br /&gt;
| 604 || RegisterContentsExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 605 || ListApplicationContentMetaStatusWithRightsCheck&lt;br /&gt;
|-&lt;br /&gt;
| 606 || [3.0.0+] GetContentMetaStorage&lt;br /&gt;
|-&lt;br /&gt;
| 607 || [6.0.0+] ListAvailableAddOnContent&lt;br /&gt;
|-&lt;br /&gt;
| 700 || PushDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 701 || ClearTaskStatusList&lt;br /&gt;
|-&lt;br /&gt;
| 702 || RequestDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 703 || RequestEnsureDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 704 || ListDownloadTaskStatus&lt;br /&gt;
|-&lt;br /&gt;
| 705 || RequestDownloadTaskListData&lt;br /&gt;
|-&lt;br /&gt;
| 800 || RequestVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 801 || ListVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 802 || [3.0.0+] RequestVersionListData&lt;br /&gt;
|-&lt;br /&gt;
| 900 || GetApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 901 || GetApplicationRecordProperty&lt;br /&gt;
|-&lt;br /&gt;
| 902 || EnableApplicationAutoUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 903 || DisableApplicationAutoUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 904 || TouchApplication&lt;br /&gt;
|-&lt;br /&gt;
| 905 || RequestApplicationUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 906 || IsApplicationUpdateRequested&lt;br /&gt;
|-&lt;br /&gt;
| 907 || WithdrawApplicationUpdateRequest&lt;br /&gt;
|-&lt;br /&gt;
| 908 || ListApplicationRecordInstalledContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 909 || [3.0.0+] WithdrawCleanupAddOnContentsWithNoRightsRecommendation&lt;br /&gt;
|-&lt;br /&gt;
| 910 || [5.0.0+] HasApplicationRecord&lt;br /&gt;
|-&lt;br /&gt;
| 911 || [5.1.0+] SetPreInstalledApplication&lt;br /&gt;
|-&lt;br /&gt;
| 912 || [5.1.0+] ClearPreInstalledApplicationFlag&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || RequestVerifyApplicationDeprecated&lt;br /&gt;
|-&lt;br /&gt;
| 1001 || CorruptApplicationForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 1002 || [3.0.0+] RequestVerifyAddOnContentsRights&lt;br /&gt;
|-&lt;br /&gt;
| 1003 || [5.0.0+] RequestVerifyApplication&lt;br /&gt;
|-&lt;br /&gt;
| 1004 || [5.0.0+] CorruptContentForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 1200 || [[#NeedsUpdateVulnerability]]&lt;br /&gt;
|-&lt;br /&gt;
| 1300 || IsAnyApplicationEntityInstalled&lt;br /&gt;
|-&lt;br /&gt;
| 1301 || DeleteApplicationContentEntities&lt;br /&gt;
|-&lt;br /&gt;
| 1302 || CleanupUnrecordedApplicationEntity&lt;br /&gt;
|-&lt;br /&gt;
| 1303 || [3.0.0+] CleanupAddOnContentsWithNoRights&lt;br /&gt;
|-&lt;br /&gt;
| 1304 || [3.0.0+] DeleteApplicationContentEntity&lt;br /&gt;
|-&lt;br /&gt;
| 1308 || [5.0.0+] DeleteApplicationCompletelyForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 1309 || [6.0.0+] CleanupUnavailableAddOnContents&lt;br /&gt;
|-&lt;br /&gt;
| 1400 || PrepareShutdown&lt;br /&gt;
|-&lt;br /&gt;
| 1500 || FormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1501 || NeedsSystemUpdateToFormatSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1502 || GetLastSdCardFormatUnexpectedResult&lt;br /&gt;
|-&lt;br /&gt;
| 1504 || [3.0.0+] InsertSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1505 || [3.0.0+] RemoveSdCard&lt;br /&gt;
|-&lt;br /&gt;
| 1600 || GetSystemSeedForPseudoDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 1601 || [3.0.0+] ResetSystemSeedForPseudoDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 1700 || ListApplicationDownloadingContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 1701 || [3.0.0+] GetApplicationView&lt;br /&gt;
|-&lt;br /&gt;
| 1702 || [3.0.0+] GetApplicationDownloadTaskStatus&lt;br /&gt;
|-&lt;br /&gt;
| 1703 || [4.0.0+] GetApplicationViewDownloadErrorContext&lt;br /&gt;
|-&lt;br /&gt;
| 1704 || [8.0.0+] GetApplicationViewWithPromotionInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1800 || IsNotificationSetupCompleted&lt;br /&gt;
|-&lt;br /&gt;
| 1801 || GetLastNotificationInfoCount&lt;br /&gt;
|-&lt;br /&gt;
| 1802 || ListLastNotificationInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1803 || [3.0.0+] ListNotificationTask&lt;br /&gt;
|-&lt;br /&gt;
| 1900 || [3.0.0+] IsActiveAccount&lt;br /&gt;
|-&lt;br /&gt;
| 1901 || [4.0.0+] RequestDownloadApplicationPrepurchasedRights&lt;br /&gt;
|-&lt;br /&gt;
| 1902 || [5.0.0+] GetApplicationTicketInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2000 || [4.0.0+] GetSystemDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2001 || [4.0.0+] SelectLatestSystemDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2002 || [4.0.0+] VerifyDeliveryProtocolVersion&lt;br /&gt;
|-&lt;br /&gt;
| 2003 || [4.0.0+] GetApplicationDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2004 || [4.0.0+] HasAllContentsToDeliver&lt;br /&gt;
|-&lt;br /&gt;
| 2005 || [4.0.0+] CompareApplicationDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2006 || [4.0.0+] CanDeliverApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2007 || [4.0.0+] ListContentMetaKeyToDeliverApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2008 || [4.0.0+] NeedsSystemUpdateToDeliverApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2009 || [4.0.0+] EstimateRequiredSize&lt;br /&gt;
|-&lt;br /&gt;
| 2010 || [4.0.0+] RequestReceiveApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2011 || [4.0.0+] CommitReceiveApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2012 || [4.0.0+] GetReceiveApplicationProgress&lt;br /&gt;
|-&lt;br /&gt;
| 2013 || [4.0.0+] RequestSendApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2014 || [4.0.0+] GetSendApplicationProgress&lt;br /&gt;
|-&lt;br /&gt;
| 2015 || [4.0.0+] CompareSystemDeliveryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2016 || [4.0.0+] ListNotCommittedContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 2017 || [4.0.0+] RecoverDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 2018 || [5.0.0+] GetApplicationDeliveryInfoHash&lt;br /&gt;
|-&lt;br /&gt;
| 2050 || [6.0.0+] GetApplicationRightsOnClient&lt;br /&gt;
|-&lt;br /&gt;
| 2100 || [6.0.0+] GetApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 2101 || [6.0.0+] GetRawApplicationTerminateResult&lt;br /&gt;
|-&lt;br /&gt;
| 2150 || [6.0.0+] CreateRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2151 || [6.0.0+] DestroyRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2152 || [6.0.0+] ActivateRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2153 || [6.0.0+] DeactivateRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2154 || [6.0.0+] ForceActivateRightsContextForExit&lt;br /&gt;
|-&lt;br /&gt;
| 2155 || [7.0.0+] UpdateRightsEnvironmentStatus&lt;br /&gt;
|-&lt;br /&gt;
| 2160 || [6.0.0+] AddTargetApplicationToRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2161 || [6.0.0+] SetUsersToRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2170 || [6.0.0+] GetRightsEnvironmentStatus&lt;br /&gt;
|-&lt;br /&gt;
| 2171 || [6.0.0+] GetRightsEnvironmentStatusChangedEvent&lt;br /&gt;
|-&lt;br /&gt;
| 2180 || [6.0.0+] RequestExtendExpirationInRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2181 || [6.0.0+] GetResultOfExtendExpirationInRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2182 || [6.0.0+] SetActiveRightsContextUsingStateToRightsEnvironment&lt;br /&gt;
|-&lt;br /&gt;
| 2190 || [6.0.0+] GetRightsEnvironmentHandleForApplication&lt;br /&gt;
|-&lt;br /&gt;
| 2199 || [6.0.0+] GetRightsEnvironmentCountForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 2200 || [6.0.0+] GetGameCardApplicationCopyIdentifier&lt;br /&gt;
|-&lt;br /&gt;
| 2201 || [6.0.0+] GetInstalledApplicationCopyIdentifier&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0-6.2.0] 2250 || RequestReportActiveELicence&lt;br /&gt;
|-&lt;br /&gt;
| 2300 || [6.0.0+] ListEventLog&lt;br /&gt;
|-&lt;br /&gt;
| 2350 || [7.0.0+] PerformAutoUpdateByApplicationId&lt;br /&gt;
|-&lt;br /&gt;
| 2400 || [8.0.0+] GetPromotionInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2401 || [8.0.0+] CountPromotionInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2402 || [8.0.0+] ListPromotionInfo&lt;br /&gt;
|-&lt;br /&gt;
| 2403 || [8.0.0+] ImportPromotionJsonForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 2404 || [8.0.0+] ClearPromotionInfoForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 2500 || [8.0.0+] ConfirmAvailableTime&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[4.0.0+] RequestDownloadAddOnContent now takes an additional 8-bytes of input.&lt;br /&gt;
&lt;br /&gt;
==== Cmd99 ====&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
This is used by AM cmd [[Applet_Manager_services#LaunchDevMenu|LaunchDevMenu]].&lt;br /&gt;
&lt;br /&gt;
This loads titleIDs from [[System_Settings|system-settings]] &amp;lt;code&amp;gt;ns.applet!devmenu_id&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ns.applet!devoverlaydisp_id&amp;lt;/code&amp;gt;, which only exists on devunits. An error is thrown if loading these fail.&lt;br /&gt;
&lt;br /&gt;
[[NCM_Services|NCM]] OpenContentMetaDatabase is used with StorageId = NandSystem, then IContentMetaDatabase GetLatestContentMetaKey is used with both of the above titleIDs to verify that the cmd is successful.&lt;br /&gt;
&lt;br /&gt;
Then if the above succeeds, the above titles are launched with the above StorageId via [[Process_Manager_services|pmshell]] LaunchProgram, with a 0.5s sleep-thread afterwards on success.&lt;br /&gt;
&lt;br /&gt;
=== IApplicationVersionInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IApplicationVersionInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [4.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetLaunchRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 1 || UpgradeLaunchRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 35 || UpdateVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 36 || PushLaunchVersion&lt;br /&gt;
|-&lt;br /&gt;
| 37 || ListRequiredVersion&lt;br /&gt;
|-&lt;br /&gt;
| 800 || RequestVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 801 || ListVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 802 || RequestVersionListData&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || PerformAutoUpdate&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IContentManagerInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IContentManagementInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 11 || CalculateApplicationOccupiedSize&lt;br /&gt;
|-&lt;br /&gt;
| 43 || CheckSdCardMountStatus&lt;br /&gt;
|-&lt;br /&gt;
| 47 || GetTotalSpaceSize&lt;br /&gt;
|-&lt;br /&gt;
| 48 || GetFreeSpaceSize&lt;br /&gt;
|-&lt;br /&gt;
| 600 || CountApplicationContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 601 || ListApplicationContentMetaStatus&lt;br /&gt;
|-&lt;br /&gt;
| 605 || ListApplicationContentMetaStatusWithRightsCheck&lt;br /&gt;
|-&lt;br /&gt;
| 607 || IsAnyApplicationRunning&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IDocumentInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IDocumentInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 21 || GetApplicationContentPath&lt;br /&gt;
|-&lt;br /&gt;
| 23 || ResolveApplicationContentPath&lt;br /&gt;
|-&lt;br /&gt;
| 92 || [5.0.0+] GetRunningApplicationProgramId&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IDownloadTaskInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IDownloadTaskInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 701 || ClearTaskStatusList&lt;br /&gt;
|-&lt;br /&gt;
| 702 || RequestDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 703 || RequestEnsureDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 704 || ListDownloadTaskStatus&lt;br /&gt;
|-&lt;br /&gt;
| 705 || RequestDownloadTaskListData&lt;br /&gt;
|-&lt;br /&gt;
| 706 || [4.0.0+] TryCommitCurrentApplicationDownloadTask&lt;br /&gt;
|-&lt;br /&gt;
| 707 || [4.0.0+] EnableAutoCommit&lt;br /&gt;
|-&lt;br /&gt;
| 708 || [4.0.0+] DisableAutoCommit&lt;br /&gt;
|-&lt;br /&gt;
| 709 || [4.0.0+] TriggerDynamicCommitEvent&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IReadOnlyApplicationRecordInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IReadOnlyApplicationRecordInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [5.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || HasApplicationRecord || Same as [[#IApplicationManagerInterface]] cmd 910&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IReadOnlyApplicationControlDataInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IReadOnlyApplicationControlDataInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [5.1.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetApplicationControlData]] || Same as [[#IApplicationManagerInterface]] cmd 400&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetApplicationDesiredLanguage]] || Same as [[#IApplicationManagerInterface]] cmd 55&lt;br /&gt;
|-&lt;br /&gt;
| 2 || ConvertApplicationLanguageToLanguageCode || Same as [[#IApplicationManagerInterface]] cmd 59&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#ConvertLanguageCodeToApplicationLanguage]] || Same as [[#IApplicationManagerInterface]] cmd 60&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IDynamicRightsInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IDynamicRightsInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [6.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RequestApplicationRightsOnServer || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || RequestAssignRights || &lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeprecatedRequestAssignRightsToResume || &lt;br /&gt;
|-&lt;br /&gt;
| 5 || VerifyActivatedRightsOwners || &lt;br /&gt;
|-&lt;br /&gt;
| 6 || DeprecatedGetApplicationRightsStatus || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || RequestPrefetchForDynamicRights || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || GetDynamicRightsState || &lt;br /&gt;
|-&lt;br /&gt;
| 9 || [7.0.0+] RequestApplicationRightsOnServerToResume || &lt;br /&gt;
|-&lt;br /&gt;
| 10 || [7.0.0+] RequestAssignRightsToResume || &lt;br /&gt;
|-&lt;br /&gt;
| 11 || [7.0.0+] GetActivatedRightsUsers || &lt;br /&gt;
|-&lt;br /&gt;
| 12 || [8.0.0+] GetApplicationRightsStatus&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [8.0.0+] GetRunningApplicationStatus&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IECommerceInterface===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IECommerceInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [4.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RequestLinkDevice || Takes a total of 0x10-bytes of input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [6.0.0+] RequestCleanupAllPreInstalledApplications || No input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [6.0.0+] RequestCleanupPreInstalledApplication || Takes a total of 0x8-bytes of input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [6.0.0+] RequestSyncRights || No input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [6.0.0+] RequestUnlinkDevice || Takes a total of 0x10-bytes of input, returns an [[#IAsyncResult]].&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [6.1.0+] RequestRevokeAllELicense || Takes a total of 0x10-bytes of input, returns an [[#IAsyncResult]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IFactoryResetInterface ===&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IFactoryResetInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 100 || ResetToFactorySettings&lt;br /&gt;
|-&lt;br /&gt;
| 101 || ResetToFactorySettingsWithoutUserSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 102 || ResetToFactorySettingsForRefurbishment&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ns:vm =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IVulnerabilityManagerInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 1200 || [3.0.0+] [[#NeedsUpdateVulnerability]]&lt;br /&gt;
|-&lt;br /&gt;
| 1201 || [4.0.0+] [[#UpdateSafeSystemVersionForDebug]]&lt;br /&gt;
|-&lt;br /&gt;
| 1202 || [4.0.0+] [[#GetSafeSystemVersion]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== NeedsUpdateVulnerability ==&lt;br /&gt;
No input, returns an output u8 bool flag.&lt;br /&gt;
&lt;br /&gt;
Web-applets use this command to check if the system needs an update.&lt;br /&gt;
&lt;br /&gt;
== UpdateSafeSystemVersionForDebug ==&lt;br /&gt;
Takes an input u64 &#039;&#039;&#039;titleID&#039;&#039;&#039; and an u32 &#039;&#039;&#039;version&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This command is not available for retail units. On a debug unit, if the [[System_Settings|system setting]] &amp;lt;code&amp;gt;vulnerability!enable_debug&amp;lt;/code&amp;gt; is set, this mounts the system savegame [[Flash_Filesystem#System_Savegames|0x8000000000000049]] as &amp;quot;ns_ssversion:/&amp;quot;, opens the file &amp;quot;ns_ssversion:/entry&amp;quot; and writes the supplied &#039;&#039;&#039;titleID&#039;&#039;&#039; and &#039;&#039;&#039;version&#039;&#039;&#039; in it.&lt;br /&gt;
&lt;br /&gt;
Finally, it calls [[NCM_services#ncm|OpenContentMetaDatabase]] with [[Filesystem_services#StorageId|StorageID]] 3, then calls [[NCM_services#IContentMetaDatabase|GetLatestContentMetaKey]] with the supplied &#039;&#039;&#039;titleID&#039;&#039;&#039; and compares the version field from the returned [[CNMT#Content_Meta_Records|Content Meta Record]] with the supplied &#039;&#039;&#039;version&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If the supplied &#039;&#039;&#039;version&#039;&#039;&#039; is higher than the one in NCM&#039;s database, the value returned by [[NS_Services#NeedsUpdateVulnerability|NeedsUpdateVulnerability]] is set to &amp;quot;true&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== GetSafeSystemVersion ==&lt;br /&gt;
No input, returns a 0x10 byte array with the cached contents of &amp;quot;ns_ssversion:/entry&amp;quot; (u64 &#039;&#039;&#039;titleID&#039;&#039;&#039;, u32 &#039;&#039;&#039;version&#039;&#039;&#039; and u32 &#039;&#039;&#039;policy&#039;&#039;&#039; from &amp;lt;code&amp;gt;vulnerability!needs_update_vulnerability_policy&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
= ns:su =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::ISystemUpdateInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetBackgroundNetworkUpdateState&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#ISystemUpdateControl|OpenSystemUpdateControl]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || NotifyExFatDriverRequired&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ClearExFatDriverStatusForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 4 || RequestBackgroundNetworkUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 5 || NotifyBackgroundNetworkUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 6 || NotifyExFatDriverDownloadedForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetSystemUpdateNotificationEventForContentDelivery&lt;br /&gt;
|-&lt;br /&gt;
| 10 || NotifySystemUpdateForContentDelivery&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [3.0.0+] PrepareShutdown&lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0-3.0.2] 12 || &lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0-3.0.2] 13 || &lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0-3.0.2] 14 || &lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0-3.0.2] 15 || &lt;br /&gt;
|-&lt;br /&gt;
| 16 || [4.0.0+] DestroySystemUpdateTask&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [4.0.0+] RequestSendSystemUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 18 || [4.0.0+] GetSendSystemUpdateProgress&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ISystemUpdateControl ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#HasDownloaded]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || RequestCheckLatestUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 2 || RequestDownloadLatestUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#GetDownloadProgress]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#ApplyDownloadedUpdate]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || RequestPrepareCardUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetPrepareCardUpdateProgress&lt;br /&gt;
|-&lt;br /&gt;
| 7 || HasPreparedCardUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 8 || ApplyCardUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#GetDownloadedEulaDataSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#GetDownloadedEulaData]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SetupCardUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetPreparedCardUpdateEulaDataSize&lt;br /&gt;
|-&lt;br /&gt;
| 13 || GetPreparedCardUpdateEulaData&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [4.0.0+] SetupCardUpdateViaSystemUpdater&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [4.0.0+] HasReceived&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [4.0.0+] RequestReceiveSystemUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [4.0.0+] GetReceiveProgress&lt;br /&gt;
|-&lt;br /&gt;
| 18 || [4.0.0+] ApplyReceivedUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [4.0.0+] GetReceivedEulaDataSize&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [4.0.0+] GetReceivedEulaData&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [4.0.0+] SetupToReceiveSystemUpdate&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [6.0.0+] RequestCheckLatestUpdateIncludesRebootlessUpdate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== HasDownloaded ===&lt;br /&gt;
No input, returns an output u8 bool flag.&lt;br /&gt;
&lt;br /&gt;
Gets whether a network sysupdate was downloaded, with install pending.&lt;br /&gt;
&lt;br /&gt;
Uses [[NIM_services|nim]] ListSystemUpdateTask and [[NIM_services|nim]] GetSystemUpdateTaskInfo. When ListSystemUpdateTask successfully returns a task and GetSystemUpdateTaskInfo is successful, the output flag is set to: &amp;lt;code&amp;gt;*((u8*)(taskinfo+0) == 0x3&amp;lt;/code&amp;gt;. Otherwise, flag=0.&lt;br /&gt;
&lt;br /&gt;
This always returns 0, however this will assert if GetSystemUpdateTaskInfo fails with ret!=0x3C89.&lt;br /&gt;
&lt;br /&gt;
=== GetDownloadProgress ===&lt;br /&gt;
No input, returns a 0x10-byte output struct.&lt;br /&gt;
&lt;br /&gt;
Similar to [[#HasDownloaded]] except instead of a flag, this returns the 0x10-bytes from taskinfo+8. The output struct is cleared when the task(info) isn&#039;t available.&lt;br /&gt;
&lt;br /&gt;
=== ApplyDownloadedUpdate ===&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
Runs code similar to [[#HasDownloaded]], throwing an error if a network sysupdate isn&#039;t ready for install. Then the sysupdate is installed:&lt;br /&gt;
&lt;br /&gt;
* Uses ListSystemUpdateTask again, then [[NIM_services|nim]] IsExFatDriverIncluded. Runs ExFat handling when the output flag is set.&lt;br /&gt;
* The two flags in [[Flash_Filesystem#System_Update_Control]] are set to 1.&lt;br /&gt;
* Uses [[NIM_services|nim]] CommitSystemUpdateTask and [[NIM_services|nim]] DestroySystemUpdateTask.&lt;br /&gt;
* Installs FIRM.&lt;br /&gt;
&lt;br /&gt;
=== GetDownloadedEulaDataSize ===&lt;br /&gt;
Takes a type-0x15 input buffer &#039;&#039;&#039;path&#039;&#039;&#039;, returns an output u64 &#039;&#039;&#039;filesize&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Runs code similar to [[#HasDownloaded]], throwing an error if a network sysupdate isn&#039;t ready for install.&lt;br /&gt;
&lt;br /&gt;
Uses ListSystemUpdateTask again. Then [[NIM_services|nim]] GetDownloadedSystemDataPath, with the output ContentPath being used to mount the EULA title with FS.&lt;br /&gt;
&lt;br /&gt;
Then &amp;quot;&amp;lt;mountname&amp;gt;:/&amp;lt;&#039;&#039;&#039;path&#039;&#039;&#039;&amp;gt;&amp;quot; is opened, gets the &#039;&#039;&#039;filesize&#039;&#039;&#039;, then runs cleanup.&lt;br /&gt;
&lt;br /&gt;
=== GetDownloadedEulaData ===&lt;br /&gt;
Takes a type-0x15 input buffer &#039;&#039;&#039;path&#039;&#039;&#039; and a type-0x6 output buffer, returns an output u64 &#039;&#039;&#039;filesize&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Similar to [[#GetDownloadedEulaDataSize]] except this reads the file instead, using the specified output buffer with size=filesize. This will throw an error if the filesize is larger than the buffer size.&lt;br /&gt;
&lt;br /&gt;
= IAsyncValue =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IAsyncValue&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetSize&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Get&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [4.0.0+] GetErrorContext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Cmd3: No input/output, takes a type-0x16 output buffer.&lt;br /&gt;
&lt;br /&gt;
= IAsyncResult =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IAsyncResult&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Get&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] GetErrorContext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Cmd2: No input/output, takes a type-0x16 output buffer.&lt;br /&gt;
&lt;br /&gt;
= ns:dev =&lt;br /&gt;
This is &amp;quot;nn::ns::detail::IDevelopInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#LaunchProgram]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#TerminateProcess]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#TerminateProgram]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#GetShellEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#GetShellEventInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [[#TerminateApplication]]&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#PrepareLaunchProgramFromHost]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [[#LaunchApplicationForDevelop]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#LaunchApplicationWithStorageIdForDevelop]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [6.0.0+] TerminateApplication2&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [6.0.0+] GetRunningApplicationProcessIdForDevelop&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [6.0.0+] SetCurrentApplicationRightsEnvironmentCanBeActiveForDevelop&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== LaunchProgram ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#LaunchProcess|LaunchProcess]].&lt;br /&gt;
&lt;br /&gt;
== TerminateProcess ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#TerminateTitleByPid|TerminateTitleByPid]].&lt;br /&gt;
&lt;br /&gt;
== TerminateProgram ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#TerminateTitleByTitleId|TerminateTitleByTitleId]].&lt;br /&gt;
&lt;br /&gt;
== GetShellEvent ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetProcessEventWaiter|GetProcessEventWaiter]].&lt;br /&gt;
&lt;br /&gt;
== GetShellEventInfo ==&lt;br /&gt;
Wrapper for &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetProcessEventType|GetProcessEventType]].&lt;br /&gt;
&lt;br /&gt;
== TerminateApplication ==&lt;br /&gt;
Calls &amp;quot;pm:shell&amp;quot; [[Process_Manager_services#GetCrashingProcessPid|GetCrashingProcessPid]] and sends PID to [[Process_Manager_services#TerminateTitleByPid|TerminateTitleByPid]].&lt;br /&gt;
&lt;br /&gt;
== PrepareLaunchProgramFromHost ==&lt;br /&gt;
Takes a type-0x5 input buffer containing the [[Filesystem_services|ContentPath]], returns an output 0x10-byte struct.&lt;br /&gt;
&lt;br /&gt;
Calls [[NCM_services#IPathResolverForStorage|IPathResolverForStorage]] Set...NcaPath functions.&lt;br /&gt;
&lt;br /&gt;
== LaunchApplicationForDevelop ==&lt;br /&gt;
Takes an input u32 [[Process_Manager_services#LaunchFlags|LaunchFlags]] and u64 titleID, returns an output u64 PID.&lt;br /&gt;
&lt;br /&gt;
Same as LaunchApplicationWithStorageId except the last two params passed to the internal vtable funcptr call are value 0x6, instead of from the command input.&lt;br /&gt;
&lt;br /&gt;
== LaunchApplicationWithStorageIdForDevelop ==&lt;br /&gt;
Takes 2 input u8s, an u32 [[Process_Manager_services#LaunchFlags|LaunchFlags]], and an u64 titleID. Returns an output u64 PID.&lt;br /&gt;
&lt;br /&gt;
Launches an application title which is registered with NS. &lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Paeton</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Settings_services&amp;diff=7756</id>
		<title>Settings services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Settings_services&amp;diff=7756"/>
		<updated>2019-09-10T14:39:35Z</updated>

		<summary type="html">&lt;p&gt;Paeton: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= set =&lt;br /&gt;
This is &amp;quot;nn::settings::ISettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetLanguageCode || No input, returns an output [[#LanguageCode]]. This is the current system language.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetAvailableLanguageCodes || Takes a type-0xA buffer containing the [[#LanguageCode]] output array, returns an output s32.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] MakeLanguageCode || Takes an input [[#Language]], returns an output [[#LanguageCode]].&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetAvailableLanguageCodeCount || No input, returns an output s32.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetRegionCode || No input, returns a [[#RegionCode]].&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+] GetAvailableLanguageCodes2 || Takes a type-0x6 buffer containing the [[#LanguageCode]] output array, returns an output s32.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [4.0.0+] GetAvailableLanguageCodeCount2 || No input, returns an output s32.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [4.0.0+] GetKeyCodeMap || &lt;br /&gt;
|-&lt;br /&gt;
| 8 || [5.0.0+] GetQuestFlag || Identical to &amp;quot;set:sys&amp;quot; [[#set:sys|GetQuestFlag]].&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [6.0.0+] GetKeyCodeMap2 || &lt;br /&gt;
|-&lt;br /&gt;
| 10 || [9.0.0+] GetFirmwareVersionForDebug ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[4.0.0+] Official user-processes now use GetAvailableLanguageCodes2/GetAvailableLanguageCodeCount2 instead of {original commands}.&lt;br /&gt;
&lt;br /&gt;
In official user-processes in the [[#Language]]-&amp;gt;[[#LanguageCode]] conversion function (MakeLanguageCode):&lt;br /&gt;
* During one-time init, GetAvailableLanguageCodes is used to initialize the LanguageCodes array cache, with max_entries=0xF (buffer size in u64s). [4.0.0+] GetAvailableLanguageCodes2 is now used with max_entries 0x40.&lt;br /&gt;
* [4.0.0+] When the input [[#Language]] is larger than the cached total_entries from the above command output, or [[#Language]] is negative, command MakeLanguageCode is used instead of the array.&lt;br /&gt;
&lt;br /&gt;
== GetKeyCodeMap ==&lt;br /&gt;
Takes a type-0x16 output buffer containing KeyCodeMap, official sw uses fixed size 0x1000. This is probably related to HID keyboard.&lt;br /&gt;
&lt;br /&gt;
== Language ==&lt;br /&gt;
&amp;quot;nn::settings::Language&amp;quot; (s32) is basically array indices in the output array from GetAvailableLanguageCodes.&lt;br /&gt;
&lt;br /&gt;
== LanguageCode ==&lt;br /&gt;
This is &amp;quot;nn::settings::LanguageCode&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This is an u64, which is a NUL-terminated string.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Array-index / [[#Language]] || [[#LanguageCode]] || Icon [[NCA_Content_FS#FS-type3|language]] filename&lt;br /&gt;
|-&lt;br /&gt;
| 0 || ja || &amp;quot;Japanese&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || en-US || &amp;quot;AmericanEnglish&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2 || fr || &amp;quot;French&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || de || &amp;quot;German&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 4 || it || &amp;quot;Italian&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 5 || es || &amp;quot;Spanish&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 6 || zh-CN || &amp;quot;Chinese&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 7 || ko || &amp;quot;Korean&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 8 || nl || &amp;quot;Dutch&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 9 || pt || &amp;quot;Portuguese&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 10 || ru || &amp;quot;Russian&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 11 || zh-TW || &amp;quot;Taiwanese&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 12 || en-GB || &amp;quot;BritishEnglish&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 13 || fr-CA || &amp;quot;CanadianFrench&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 14 || es-419 || &amp;quot;LatinAmericanSpanish&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 15 || zh-Hans || &amp;quot;SimplifiedChinese&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 16 || zh-Hant || &amp;quot;TraditionalChinese&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RegionCode ==&lt;br /&gt;
A region code is a signed 32-bit value representing a particular region. Currently the available regions defined by the system are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Region&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Japan&lt;br /&gt;
|-&lt;br /&gt;
| 1 || USA&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Europe&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Australia&lt;br /&gt;
|-&lt;br /&gt;
| 4 || China&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Korea&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Taiwan&lt;br /&gt;
|-&lt;br /&gt;
| Any other value || Considered an unknown region&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= set:fd =&lt;br /&gt;
This is &amp;quot;nn::settings::IFirmwareDebugSettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[4.0.0+] Only exposed if in [[SPL_services#IsDebugMode|debug mode]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SetSettingsItemValue ||&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ResetSettingsItemValue ||&lt;br /&gt;
|-&lt;br /&gt;
| 4 || CreateSettingsItemKeyIterator || Returns an [[#ISettingsItemKeyIterator]].&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [4.0.0+] ReadSettings ||&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [4.0.0+] ResetSettings ||&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [4.0.0+] SetWebInspectorFlag ||&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [4.0.0+] SetAllowedSslHosts ||&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [4.0.0+] SetHostFsMountPoint ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ISettingsItemKeyIterator ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GoNext&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetKeySize&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetKey&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= set:cal =&lt;br /&gt;
This is &amp;quot;nn::settings::IFactorySettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetBluetoothBdAddress&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetConfigurationId1&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetAccelerometerOffset&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetAccelerometerScale&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetGyroscopeOffset&lt;br /&gt;
|-&lt;br /&gt;
| 5 || GetGyroscopeScale&lt;br /&gt;
|-&lt;br /&gt;
| 6 || GetWirelessLanMacAddress&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GetWirelessLanCountryCodeCount&lt;br /&gt;
|-&lt;br /&gt;
| 8 || GetWirelessLanCountryCodes&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetSerialNumber&lt;br /&gt;
|-&lt;br /&gt;
| 10 || SetInitialSystemAppletProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SetOverlayDispProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [[#GetEciDeviceCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [[#GetEticketDeviceCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#GetSslKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [[#GetSslCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 18 || [[#GetGameCardKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [[#GetGameCardCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 20 || [[#GetEciDeviceKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#GetEticketDeviceKey]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || GetSpeakerParameter&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [4.0.0+] GetLcdVendorId&lt;br /&gt;
|-&lt;br /&gt;
| 24 || [5.0.0+] [[#GetEciDeviceCertificate2]]&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [5.0.0+] [[#GetEciDeviceKey2]]&lt;br /&gt;
|-&lt;br /&gt;
| 26 || [5.0.0+] GetAmiiboKey&lt;br /&gt;
|-&lt;br /&gt;
| 27 || [5.0.0+] GetAmiiboEcqvCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 28 || [5.0.0+] GetAmiiboEcdsaCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 29 || [5.0.0+] GetAmiiboEcqvBlsKey&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [5.0.0+] GetAmiiboEcqvBlsCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [5.0.0+] GetAmiiboEcqvBlsRootCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [5.0.0+] GetUsbTypeCPowerSourceCircuitVersion&lt;br /&gt;
|-&lt;br /&gt;
| 41 || [6.0.0+] GetBatteryVersion&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Used for accessing data calibrated at the factory.&lt;br /&gt;
&lt;br /&gt;
== GetEciDeviceCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x180.&lt;br /&gt;
&lt;br /&gt;
Returns the device certificate (ECC signed). This is identical to 3DS DeviceCert/CTCert besides the strings. NIM loads the DeviceId from this.&lt;br /&gt;
&lt;br /&gt;
== GetEticketDeviceCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x240.&lt;br /&gt;
&lt;br /&gt;
Returns the ETicket certificate (RSA signed).&lt;br /&gt;
&lt;br /&gt;
== GetSslKey ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x134.&lt;br /&gt;
&lt;br /&gt;
Returns the extended SSL key (0x130 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal SSL key (0x110 bytes).&lt;br /&gt;
&lt;br /&gt;
Used by SSL-sysmodule, see [[SSL_services|here]].&lt;br /&gt;
&lt;br /&gt;
== GetSslCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x804.&lt;br /&gt;
&lt;br /&gt;
Returns a [[Settings_services#setcal_Container_Structure|container]] with the plaintext SSL certificate.&lt;br /&gt;
&lt;br /&gt;
Used by SSL-sysmodule, see [[SSL_services|here]].&lt;br /&gt;
&lt;br /&gt;
== GetGameCardKey ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x134.&lt;br /&gt;
&lt;br /&gt;
Returns the extended GameCard key (0x130 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal GameCard key (0x110 bytes).&lt;br /&gt;
&lt;br /&gt;
== GetGameCardCertificate ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x404.&lt;br /&gt;
&lt;br /&gt;
Returns a [[Settings_services#setcal_Container_Structure|container]] with the GameCard certificate.&lt;br /&gt;
&lt;br /&gt;
== GetEciDeviceKey ==&lt;br /&gt;
Returns the extended device ECC-B233 key (0x50 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal device ECC-B233 key (0x30 bytes).&lt;br /&gt;
&lt;br /&gt;
[5.0.0+] Now returns an additional 4-bytes.&lt;br /&gt;
&lt;br /&gt;
== GetEticketDeviceKey ==&lt;br /&gt;
Takes a type-0x16 output buffer with fixed size 0x244.&lt;br /&gt;
&lt;br /&gt;
Returns the extended ETicket RSA-2048 key (0x240 bytes) from [[Calibration#CAL0|CAL0]]. If the extended key is not programmed then it falls back to the normal ETicket RSA-2048 key (0x220 bytes).&lt;br /&gt;
&lt;br /&gt;
== GetEciDeviceCertificate2 ==&lt;br /&gt;
Same as [[#GetEciDeviceCertificate]], but returns a RSA-2048 variant of the device certificate.&lt;br /&gt;
&lt;br /&gt;
== GetEciDeviceKey2 ==&lt;br /&gt;
Same as [[#GetEciDeviceKey]], but returns a RSA-2048 variant of the device key.&lt;br /&gt;
&lt;br /&gt;
== setcal Container Structure ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Name&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| Size (same size used for decryption if needed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| {above size}&lt;br /&gt;
| Actual data starts here.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This container is used for returning data with variable sizes.&lt;br /&gt;
&lt;br /&gt;
= set:sys =&lt;br /&gt;
This is &amp;quot;nn::settings::ISystemSettingsServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetLanguageCode&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SetNetworkSettings&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetNetworkSettings&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#GetFirmwareVersion]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [3.0.0+] GetFirmwareVersion2&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [5.0.0+] GetFirmwareVersionDigest&lt;br /&gt;
|-&lt;br /&gt;
| 7 || GetLockScreenFlag&lt;br /&gt;
|-&lt;br /&gt;
| 8 || SetLockScreenFlag&lt;br /&gt;
|-&lt;br /&gt;
| 9 || GetBacklightSettings&lt;br /&gt;
|-&lt;br /&gt;
| 10 || SetBacklightSettings&lt;br /&gt;
|-&lt;br /&gt;
| 11 || SetBluetoothDevicesSettings&lt;br /&gt;
|-&lt;br /&gt;
| 12 || GetBluetoothDevicesSettings&lt;br /&gt;
|-&lt;br /&gt;
| 13 || GetExternalSteadyClockSourceId&lt;br /&gt;
|-&lt;br /&gt;
| 14 || SetExternalSteadyClockSourceId&lt;br /&gt;
|-&lt;br /&gt;
| 15 || GetUserSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 16 || SetUserSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 17 || GetAccountSettings&lt;br /&gt;
|-&lt;br /&gt;
| 18 || SetAccountSettings&lt;br /&gt;
|-&lt;br /&gt;
| 19 || GetAudioVolume&lt;br /&gt;
|-&lt;br /&gt;
| 20 || SetAudioVolume&lt;br /&gt;
|-&lt;br /&gt;
| 21 || GetEulaVersions&lt;br /&gt;
|-&lt;br /&gt;
| 22 || SetEulaVersions&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [[#GetColorSetId]]&lt;br /&gt;
|-&lt;br /&gt;
| 24 || [[#SetColorSetId]]&lt;br /&gt;
|-&lt;br /&gt;
| 25 || GetConsoleInformationUploadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 26 || SetConsoleInformationUploadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 27 || GetAutomaticApplicationDownloadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 28 || SetAutomaticApplicationDownloadFlag&lt;br /&gt;
|-&lt;br /&gt;
| 29 || GetNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 30 || SetNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 31 || GetAccountNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 32 || SetAccountNotificationSettings&lt;br /&gt;
|-&lt;br /&gt;
| 35 || GetVibrationMasterVolume&lt;br /&gt;
|-&lt;br /&gt;
| 36 || SetVibrationMasterVolume&lt;br /&gt;
|-&lt;br /&gt;
| 37 || GetSettingsItemValueSize&lt;br /&gt;
|-&lt;br /&gt;
| 38 || [[#GetSettingsItemValue]]&lt;br /&gt;
|-&lt;br /&gt;
| 39 || GetTvSettings&lt;br /&gt;
|-&lt;br /&gt;
| 40 || SetTvSettings&lt;br /&gt;
|-&lt;br /&gt;
| 41 || GetEdid&lt;br /&gt;
|-&lt;br /&gt;
| 42 || SetEdid&lt;br /&gt;
|-&lt;br /&gt;
| 43 || GetAudioOutputMode&lt;br /&gt;
|-&lt;br /&gt;
| 44 || SetAudioOutputMode&lt;br /&gt;
|-&lt;br /&gt;
| 45 || IsForceMuteOnHeadphoneRemoved&lt;br /&gt;
|-&lt;br /&gt;
| 46 || SetForceMuteOnHeadphoneRemoved&lt;br /&gt;
|-&lt;br /&gt;
| 47 || [[#GetQuestFlag]]&lt;br /&gt;
|-&lt;br /&gt;
| 48 || SetQuestFlag&lt;br /&gt;
|-&lt;br /&gt;
| 49 || GetDataDeletionSettings&lt;br /&gt;
|-&lt;br /&gt;
| 50 || SetDataDeletionSettings&lt;br /&gt;
|-&lt;br /&gt;
| 51 || GetInitialSystemAppletProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 52 || GetOverlayDispProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 53 || GetDeviceTimeZoneLocationName&lt;br /&gt;
|-&lt;br /&gt;
| 54 || SetDeviceTimeZoneLocationName&lt;br /&gt;
|-&lt;br /&gt;
| 55 || GetWirelessCertificationFileSize&lt;br /&gt;
|-&lt;br /&gt;
| 56 || [[Flash_Filesystem#PRODINFOF|GetWirelessCertificationFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 57 || SetRegionCode&lt;br /&gt;
|-&lt;br /&gt;
| 58 || GetNetworkSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 59 || SetNetworkSystemClockContext&lt;br /&gt;
|-&lt;br /&gt;
| 60 || IsUserSystemClockAutomaticCorrectionEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 61 || SetUserSystemClockAutomaticCorrectionEnabled&lt;br /&gt;
|-&lt;br /&gt;
| 62 || [[#GetDebugModeFlag]]&lt;br /&gt;
|-&lt;br /&gt;
| 63 || GetPrimaryAlbumStorage&lt;br /&gt;
|-&lt;br /&gt;
| 64 || SetPrimaryAlbumStorage&lt;br /&gt;
|-&lt;br /&gt;
| 65 || GetUsb30EnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 66 || SetUsb30EnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 67 || GetBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [[#GetSerialNumber]]&lt;br /&gt;
|-&lt;br /&gt;
| 69 || GetNfcEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 70 || SetNfcEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 71 || GetSleepSettings&lt;br /&gt;
|-&lt;br /&gt;
| 72 || SetSleepSettings&lt;br /&gt;
|-&lt;br /&gt;
| 73 || GetWirelessLanEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 74 || SetWirelessLanEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 75 || GetInitialLaunchSettings&lt;br /&gt;
|-&lt;br /&gt;
| 76 || SetInitialLaunchSettings&lt;br /&gt;
|-&lt;br /&gt;
| 77 || GetDeviceNickName&lt;br /&gt;
|-&lt;br /&gt;
| 78 || SetDeviceNickName&lt;br /&gt;
|-&lt;br /&gt;
| 79 || GetProductModel&lt;br /&gt;
|-&lt;br /&gt;
| 80 || GetLdnChannel&lt;br /&gt;
|-&lt;br /&gt;
| 81 || SetLdnChannel&lt;br /&gt;
|-&lt;br /&gt;
| 82 || AcquireTelemetryDirtyFlagEventHandle&lt;br /&gt;
|-&lt;br /&gt;
| 83 || GetTelemetryDirtyFlags&lt;br /&gt;
|-&lt;br /&gt;
| 84 || GetPtmBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 85 || SetPtmBatteryLot&lt;br /&gt;
|-&lt;br /&gt;
| 86 || GetPtmFuelGaugeParameter&lt;br /&gt;
|-&lt;br /&gt;
| 87 || SetPtmFuelGaugeParameter&lt;br /&gt;
|-&lt;br /&gt;
| 88 || GetBluetoothEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 89 || SetBluetoothEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 90 || GetMiiAuthorId&lt;br /&gt;
|-&lt;br /&gt;
| 91 || SetShutdownRtcValue&lt;br /&gt;
|-&lt;br /&gt;
| 92 || GetShutdownRtcValue&lt;br /&gt;
|-&lt;br /&gt;
| 93 || AcquireFatalDirtyFlagEventHandle&lt;br /&gt;
|-&lt;br /&gt;
| 94 || GetFatalDirtyFlags&lt;br /&gt;
|-&lt;br /&gt;
| 95 || [2.0.0+] GetAutoUpdateEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 96 || [2.0.0+] SetAutoUpdateEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 97 || [2.0.0+] GetNxControllerSettings&lt;br /&gt;
|-&lt;br /&gt;
| 98 || [2.0.0+] SetNxControllerSettings&lt;br /&gt;
|-&lt;br /&gt;
| 99 || [2.0.0+] GetBatteryPercentageFlag&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [2.0.0+] SetBatteryPercentageFlag&lt;br /&gt;
|-&lt;br /&gt;
| 101 || [2.0.0+] GetExternalRtcResetFlag&lt;br /&gt;
|-&lt;br /&gt;
| 102 || [2.0.0+] SetExternalRtcResetFlag&lt;br /&gt;
|-&lt;br /&gt;
| 103 || [3.0.0+] GetUsbFullKeyEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 104 || [3.0.0+] SetUsbFullKeyEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 105 || [3.0.0+] SetExternalSteadyClockInternalOffset&lt;br /&gt;
|-&lt;br /&gt;
| 106 || [3.0.0+] GetExternalSteadyClockInternalOffset&lt;br /&gt;
|-&lt;br /&gt;
| 107 || [3.0.0+] GetBacklightSettingsEx&lt;br /&gt;
|-&lt;br /&gt;
| 108 || [3.0.0+] SetBacklightSettingsEx&lt;br /&gt;
|-&lt;br /&gt;
| 109 || [3.0.0+] GetHeadphoneVolumeWarningCount&lt;br /&gt;
|-&lt;br /&gt;
| 110 || [3.0.0+] SetHeadphoneVolumeWarningCount&lt;br /&gt;
|-&lt;br /&gt;
| 111 || [3.0.0+] GetBluetoothAfhEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 112 || [3.0.0+] SetBluetoothAfhEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 113 || [3.0.0+] GetBluetoothBoostEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 114 || [3.0.0+] SetBluetoothBoostEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 115 || [3.0.0+] GetInRepairProcessEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 116 || [3.0.0+] SetInRepairProcessEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 117 || [3.0.0+] GetHeadphoneVolumeUpdateFlag&lt;br /&gt;
|-&lt;br /&gt;
| 118 || [3.0.0+] SetHeadphoneVolumeUpdateFlag&lt;br /&gt;
|-&lt;br /&gt;
| 119 || [3.0.0+] NeedsToUpdateHeadphoneVolume&lt;br /&gt;
|-&lt;br /&gt;
| 120 || [3.0.0+] GetPushNotificationActivityModeOnSleep&lt;br /&gt;
|-&lt;br /&gt;
| 121 || [3.0.0+] SetPushNotificationActivityModeOnSleep&lt;br /&gt;
|-&lt;br /&gt;
| 122 || [4.0.0+] [[#GetServiceDiscoveryControlSettings]]&lt;br /&gt;
|-&lt;br /&gt;
| 123 || [4.0.0+] SetServiceDiscoveryControlSettings&lt;br /&gt;
|-&lt;br /&gt;
| 124 || [4.0.0+] GetErrorReportSharePermission&lt;br /&gt;
|-&lt;br /&gt;
| 125 || [4.0.0+] SetErrorReportSharePermission&lt;br /&gt;
|-&lt;br /&gt;
| 126 || [4.0.0+] GetAppletLaunchFlags&lt;br /&gt;
|-&lt;br /&gt;
| 127 || [4.0.0+] SetAppletLaunchFlags&lt;br /&gt;
|-&lt;br /&gt;
| 128 || [4.0.0+] GetConsoleSixAxisSensorAccelerationBias&lt;br /&gt;
|-&lt;br /&gt;
| 129 || [4.0.0+] SetConsoleSixAxisSensorAccelerationBias&lt;br /&gt;
|-&lt;br /&gt;
| 130 || [4.0.0+] GetConsoleSixAxisSensorAngularVelocityBias&lt;br /&gt;
|-&lt;br /&gt;
| 131 || [4.0.0+] SetConsoleSixAxisSensorAngularVelocityBias&lt;br /&gt;
|-&lt;br /&gt;
| 132 || [4.0.0+] GetConsoleSixAxisSensorAccelerationGain&lt;br /&gt;
|-&lt;br /&gt;
| 133 || [4.0.0+] SetConsoleSixAxisSensorAccelerationGain&lt;br /&gt;
|-&lt;br /&gt;
| 134 || [4.0.0+] GetConsoleSixAxisSensorAngularVelocityGain&lt;br /&gt;
|-&lt;br /&gt;
| 135 || [4.0.0+] SetConsoleSixAxisSensorAngularVelocityGain&lt;br /&gt;
|-&lt;br /&gt;
| 136 || [4.0.0+] GetKeyboardLayout&lt;br /&gt;
|-&lt;br /&gt;
| 137 || [4.0.0+] SetKeyboardLayout&lt;br /&gt;
|-&lt;br /&gt;
| 138 || [4.0.0+] GetWebInspectorFlag&lt;br /&gt;
|-&lt;br /&gt;
| 139 || [4.0.0+] [[#GetAllowedSslHosts]]&lt;br /&gt;
|-&lt;br /&gt;
| 140 || [4.0.0+] GetHostFsMountPoint&lt;br /&gt;
|-&lt;br /&gt;
| 141 || [5.0.0+] GetRequiresRunRepairTimeReviser&lt;br /&gt;
|-&lt;br /&gt;
| 142 || [5.0.0+] SetRequiresRunRepairTimeReviser&lt;br /&gt;
|-&lt;br /&gt;
| 143 || [5.0.0+] SetBlePairingSettings&lt;br /&gt;
|-&lt;br /&gt;
| 144 || [5.0.0+] GetBlePairingSettings&lt;br /&gt;
|-&lt;br /&gt;
| 145 || [5.0.0+] GetConsoleSixAxisSensorAngularVelocityTimeBias&lt;br /&gt;
|-&lt;br /&gt;
| 146 || [5.0.0+] SetConsoleSixAxisSensorAngularVelocityTimeBias&lt;br /&gt;
|-&lt;br /&gt;
| 147 || [5.0.0+] GetConsoleSixAxisSensorAngularAcceleration&lt;br /&gt;
|-&lt;br /&gt;
| 148 || [5.0.0+] SetConsoleSixAxisSensorAngularAcceleration&lt;br /&gt;
|-&lt;br /&gt;
| 149 || [5.0.0+] GetRebootlessSystemUpdateVersion&lt;br /&gt;
|-&lt;br /&gt;
| 150 || [5.0.0+] GetDeviceTimeZoneLocationUpdatedTime&lt;br /&gt;
|-&lt;br /&gt;
| 151 || [5.0.0+] SetDeviceTimeZoneLocationUpdatedTime&lt;br /&gt;
|-&lt;br /&gt;
| 152 || [6.0.0+] GetUserSystemClockAutomaticCorrectionUpdatedTime&lt;br /&gt;
|-&lt;br /&gt;
| 153 || [6.0.0+] SetUserSystemClockAutomaticCorrectionUpdatedTime&lt;br /&gt;
|-&lt;br /&gt;
| 154 || [6.0.0+] GetAccountOnlineStorageSettings&lt;br /&gt;
|-&lt;br /&gt;
| 155 || [6.0.0+] SetAccountOnlineStorageSettings&lt;br /&gt;
|-&lt;br /&gt;
| 156 || [6.0.0+] GetPctlReadyFlag&lt;br /&gt;
|-&lt;br /&gt;
| 157 || [6.0.0+] SetPctlReadyFlag&lt;br /&gt;
|-&lt;br /&gt;
| 162 || [6.0.0+] GetPtmBatteryVersion&lt;br /&gt;
|-&lt;br /&gt;
| 163 || [6.0.0+] SetPtmBatteryVersion&lt;br /&gt;
|-&lt;br /&gt;
| 164 || [6.0.0+] GetUsb30HostEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 165 || [6.0.0+] SetUsb30HostEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 166 || [6.0.0+] GetUsb30DeviceEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 167 || [6.0.0+] SetUsb30DeviceEnableFlag&lt;br /&gt;
|-&lt;br /&gt;
| 168 || [7.0.0+] GetThemeId&lt;br /&gt;
|-&lt;br /&gt;
| 169 || [7.0.0+] SetThemeId&lt;br /&gt;
|-&lt;br /&gt;
| 170 || [7.0.0+] GetChineseTraditionalInputMethod&lt;br /&gt;
|-&lt;br /&gt;
| 171 || [7.0.0+] SetChineseTraditionalInputMethod&lt;br /&gt;
|-&lt;br /&gt;
| 172 || [7.0.0+] GetPtmCycleCountReliability&lt;br /&gt;
|-&lt;br /&gt;
| 173 || [7.0.0+] SetPtmCycleCountReliability&lt;br /&gt;
|-&lt;br /&gt;
| 175 || [7.0.0+] GetThemeSettings&lt;br /&gt;
|-&lt;br /&gt;
| 176 || [7.0.0+] SetThemeSettings&lt;br /&gt;
|-&lt;br /&gt;
| 177 || [7.0.0+] GetThemeKey&lt;br /&gt;
|-&lt;br /&gt;
| 178 || [7.0.0+] SetThemeKey&lt;br /&gt;
|-&lt;br /&gt;
| 179 || [8.0.0+] GetZoomFlag&lt;br /&gt;
|-&lt;br /&gt;
| 180 || [8.0.0+] SetZoomFlag&lt;br /&gt;
|-&lt;br /&gt;
| 181 || [8.0.0+] GetT&lt;br /&gt;
|-&lt;br /&gt;
| 182 || [8.0.0+] SetT&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Official user-processes get a new service session handle each time a set:sys cmd is used, with the session being closed aftewards.&lt;br /&gt;
&lt;br /&gt;
== GetFirmwareVersion ==&lt;br /&gt;
Takes a type-0x1A output buffer. User-processes use hard-coded size 0x100.&lt;br /&gt;
&lt;br /&gt;
If needed, reads the content of the [[System_Version_Title]] &amp;quot;/file&amp;quot; into state. This is only done once.&lt;br /&gt;
&lt;br /&gt;
Then the above 0x100-byte data is copied to the output buffer.&lt;br /&gt;
&lt;br /&gt;
== GetColorSetId ==&lt;br /&gt;
No input, returns an output s32.&lt;br /&gt;
&lt;br /&gt;
This is the current Theme set by System Settings.&lt;br /&gt;
&lt;br /&gt;
* 0: &amp;quot;Basic White&amp;quot;&lt;br /&gt;
* 1: &amp;quot;Basic Black&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== SetColorSetId ==&lt;br /&gt;
Takes an input s32, no output.&lt;br /&gt;
&lt;br /&gt;
== GetSettingsItemValue ==&lt;br /&gt;
Takes two type-0x19 input buffers and a type-0x6 output buffer. Returns an output u64 for the actual size written to the outbuf.&lt;br /&gt;
&lt;br /&gt;
The outbuf_size is compared with the config_size. When config_size is larger than outbuf_size, outbuf_size is used for the memcpy, otherwise config_size is used. Afterwards the size used for the memcpy is written to output(see above).&lt;br /&gt;
&lt;br /&gt;
If loading from main config fails, it will also attempt to load config from various state if the input strings match hard-coded strings.&lt;br /&gt;
&lt;br /&gt;
== GetDebugModeFlag ==&lt;br /&gt;
Returns an output u8.&lt;br /&gt;
&lt;br /&gt;
Loads the 1-byte config for &amp;lt;&amp;quot;settings_debug&amp;quot;, &amp;quot;is_debug_mode_enabled&amp;quot;&amp;gt;. If that fails, value 0x1 is written to output. This uses the same func as ReadSetting internally.&lt;br /&gt;
&lt;br /&gt;
Returned retval is always 0.&lt;br /&gt;
&lt;br /&gt;
== GetSerialNumber ==&lt;br /&gt;
Returns the 0x18-byte SerialNumber string.&lt;br /&gt;
&lt;br /&gt;
== GetServiceDiscoveryControlSettings ==&lt;br /&gt;
Returns 0x01 if [[Safemode|safemode]] needs to be launched.&lt;br /&gt;
&lt;br /&gt;
== GetAllowedSslHosts ==&lt;br /&gt;
Takes a type-0x6 output buffer, returns an output s32. This buffer contains an array of 0x8-byte &amp;quot;nn::settings::system::AllowedSslHost&amp;quot; entries.&lt;br /&gt;
&lt;br /&gt;
== GetQuestFlag ==&lt;br /&gt;
Gets a flag determining whether the console is a kiosk unit (codenamed &amp;quot;Quest&amp;quot;). Used by qlaunch to determine whether to launch Retail Interactive Display Menu.&lt;br /&gt;
&lt;br /&gt;
= System Config =&lt;br /&gt;
There&#039;s a common config title (*818), and a config title for each [[SPL_services|HardwareType]].&lt;br /&gt;
&lt;br /&gt;
[5.0.0+] New config fields were added to the HardwareType-specific config:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;systeminitializer!eks_enabled&amp;quot; 1 for non-Mariko, 0 otherwise.&lt;br /&gt;
* &amp;quot;systeminitializer!bct_eks_offset&amp;quot; Offset within the [[BCT]] where the [[Flash_Filesystem|keyblob]]/&amp;quot;EKS&amp;quot; is stored.&lt;br /&gt;
* &amp;quot;systeminitializer!bct_version_offset&amp;quot; Offset within the [[BCT]] where the keyblob version is stored (bootloader0_info.version).&lt;br /&gt;
* &amp;quot;systeminitializer!boot_image_update_type&amp;quot; 0 for non-Mariko, 1 otherwise.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;bct_eks_offset&amp;quot; and &amp;quot;bct_version_offset&amp;quot; are only present in non-Mariko config, since (?) Mariko &amp;quot;eks_enabled&amp;quot; is 0. This presumably means the [[Flash_Filesystem|keyblob]]/&amp;quot;EKS&amp;quot; is not embedded in [[BCT]] with Mariko?&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Paeton</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=NIM_services&amp;diff=7650</id>
		<title>NIM services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=NIM_services&amp;diff=7650"/>
		<updated>2019-09-05T18:14:08Z</updated>

		<summary type="html">&lt;p&gt;Paeton: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= nim =&lt;br /&gt;
This is &amp;quot;nn::nim::detail::INetworkInstallManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateSystemUpdateTask&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#DestroySystemUpdateTask]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#ListSystemUpdateTask]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || RequestSystemUpdateTaskRun&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#GetSystemUpdateTaskInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#CommitSystemUpdateTask]]&lt;br /&gt;
|-&lt;br /&gt;
| 6 || CreateNetworkInstallTask&lt;br /&gt;
|-&lt;br /&gt;
| 7 || DestroyNetworkInstallTask&lt;br /&gt;
|-&lt;br /&gt;
| 8 || ListNetworkInstallTask&lt;br /&gt;
|-&lt;br /&gt;
| 9 || RequestNetworkInstallTaskRun&lt;br /&gt;
|-&lt;br /&gt;
| 10 || GetNetworkInstallTaskInfo&lt;br /&gt;
|-&lt;br /&gt;
| 11 || CommitNetworkInstallTask&lt;br /&gt;
|-&lt;br /&gt;
| 12 || RequestLatestSystemUpdateMeta&lt;br /&gt;
|-&lt;br /&gt;
| 14 || ListApplicationNetworkInstallTask&lt;br /&gt;
|-&lt;br /&gt;
| 15 || ListNetworkInstallTaskContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 16 || RequestLatestVersion&lt;br /&gt;
|-&lt;br /&gt;
| 17 || SetNetworkInstallTaskAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 18 || AddNetworkInstallTaskContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [[#GetDownloadedSystemDataPath]]&lt;br /&gt;
|-&lt;br /&gt;
| 20 || CalculateNetworkInstallTaskRequiredSize&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#IsExFatDriverIncluded]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || GetBackgroundDownloadStressTaskInfo&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [2.0.0+] RequestDeviceAuthenticationToken&lt;br /&gt;
|-&lt;br /&gt;
| 24 || [2.0.0+] RequestGameCardRegistrationStatus&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [2.0.0+] RequestRegisterGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 26 || [2.0.0+] RequestRegisterNotificationToken&lt;br /&gt;
|-&lt;br /&gt;
| 27 || [2.0.0+] RequestDownloadTaskList&lt;br /&gt;
|-&lt;br /&gt;
| 28 || [2.0.0+] RequestApplicationControl&lt;br /&gt;
|-&lt;br /&gt;
| 29 || [2.0.0+] RequestLatestApplicationControl&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [2.0.0+] RequestVersionList&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [2.0.0+] CreateApplyDeltaTask&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [2.0.0+] DestroyApplyDeltaTask&lt;br /&gt;
|-&lt;br /&gt;
| 33 || [2.0.0+] ListApplicationApplyDeltaTask&lt;br /&gt;
|-&lt;br /&gt;
| 34 || [2.0.0+] RequestApplyDeltaTaskRun&lt;br /&gt;
|-&lt;br /&gt;
| 35 || [2.0.0+] GetApplyDeltaTaskInfo&lt;br /&gt;
|-&lt;br /&gt;
| 36 || [2.0.0+] ListApplyDeltaTask&lt;br /&gt;
|-&lt;br /&gt;
| 37 || [2.0.0+] CommitApplyDeltaTask&lt;br /&gt;
|-&lt;br /&gt;
| 38 || [2.0.0+] CalculateApplyDeltaTaskRequiredSize&lt;br /&gt;
|-&lt;br /&gt;
| 39 || [2.0.0+] PrepareShutdown&lt;br /&gt;
|-&lt;br /&gt;
| 40 || [2.0.0+] ListApplyDeltaTask2&lt;br /&gt;
|-&lt;br /&gt;
| 41 || [2.0.0+] ClearNotEnoughSpaceStateOfApplyDeltaTask&lt;br /&gt;
|-&lt;br /&gt;
| 42 || [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 43 || [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 44 || [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 45 || [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 46 || [3.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 47 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 48 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 49 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 50 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 51 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 52 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 53 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 54 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 55 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 56 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 57 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 58 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 59 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 61 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 62 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 63 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 69 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 70 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 71 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 72 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 73 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 74 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 75 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 76 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 77 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 78 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 79 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 82 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 83 || [4.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 84 || [5.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 85 || [5.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 86 || [5.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 87 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 88 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 89 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 90 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 91 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 92 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 93 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 94 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 95 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 96 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 97 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 98 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 99 || [7.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[3.0.0+] GetSystemUpdateTaskInfo now returns an additional 0x10-bytes of output. GetNetworkInstallTaskInfo now returns an additional 0x18-bytes of output. GetApplyDeltaTaskInfo now returns an additional 0x10-bytes of output.&lt;br /&gt;
&lt;br /&gt;
[5.0.0+] GetSystemUpdateTaskInfo now returns an additional 8-bytes of output. RequestGameCardRegistrationStatus/RequestRegisterGameCard removed 8-bytes of input, and now takes an additional type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
[8.0.0+] Cmd76 now takes an additional 0x8-bytes of input.&lt;br /&gt;
&lt;br /&gt;
== DestroySystemUpdateTask ==&lt;br /&gt;
Takes an input [[#SystemUpdateTask]], no output.&lt;br /&gt;
&lt;br /&gt;
== ListSystemUpdateTask ==&lt;br /&gt;
Takes a type-0x6 output buffer, for an array of [[#SystemUpdateTask]]. Returns an u32 for total output entries.&lt;br /&gt;
&lt;br /&gt;
== GetSystemUpdateTaskInfo ==&lt;br /&gt;
Takes an input [[#SystemUpdateTask]], returns an output [[#SystemUpdateTaskInfo]].&lt;br /&gt;
&lt;br /&gt;
== CommitSystemUpdateTask ==&lt;br /&gt;
Takes an input [[#SystemUpdateTask]], no output.&lt;br /&gt;
&lt;br /&gt;
== GetDownloadedSystemDataPath ==&lt;br /&gt;
Takes an input u64 titleID, a [[#SystemUpdateTask]], and an type-0x16 output buffer containing the [[Filesystem_services|ContentPath]].&lt;br /&gt;
&lt;br /&gt;
Gets the FS ContentPath for the specified task and title.&lt;br /&gt;
&lt;br /&gt;
== IsExFatDriverIncluded ==&lt;br /&gt;
Takes an input [[#SystemUpdateTask]], returns an output u8 bool flag.&lt;br /&gt;
&lt;br /&gt;
== SystemUpdateTask ==&lt;br /&gt;
This is a 0x10-byte struct.&lt;br /&gt;
&lt;br /&gt;
== SystemUpdateTaskInfo ==&lt;br /&gt;
This is a 0x28-byte struct.&lt;br /&gt;
&lt;br /&gt;
= nim:shp =&lt;br /&gt;
This is &amp;quot;nn::nim::detail::IShopServiceManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RequestDeviceAuthenticationToken&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [3.0.0+] RequestCachedDeviceAuthenticationToken&lt;br /&gt;
|-&lt;br /&gt;
| 100 || RequestRegisterDeviceAccount&lt;br /&gt;
|-&lt;br /&gt;
| 101 || RequestUnregisterDeviceAccount&lt;br /&gt;
|-&lt;br /&gt;
| 102 || RequestDeviceAccountStatus&lt;br /&gt;
|-&lt;br /&gt;
| 103 || GetDeviceAccountInfo&lt;br /&gt;
|-&lt;br /&gt;
| 104 || RequestDeviceRegistrationInfo&lt;br /&gt;
|-&lt;br /&gt;
| 105 || RequestTransferDeviceAccount&lt;br /&gt;
|-&lt;br /&gt;
| 106 || [3.0.0+] RequestSyncRegistration&lt;br /&gt;
|-&lt;br /&gt;
| 107 || [3.0.0+] IsOwnDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 200 || RequestRegisterNotificationToken&lt;br /&gt;
|-&lt;br /&gt;
| 300 || RequestUnlinkDevice&lt;br /&gt;
|-&lt;br /&gt;
| 301 || RequestUnlinkDeviceIntegrated&lt;br /&gt;
|-&lt;br /&gt;
| 302 || RequestLinkDevice&lt;br /&gt;
|-&lt;br /&gt;
| 303 || HasDeviceLink&lt;br /&gt;
|-&lt;br /&gt;
| 304 || [4.0.0+] RequestUnlinkDeviceAll&lt;br /&gt;
|-&lt;br /&gt;
| 305 || [4.0.0+] RequestCreateVirtualAccount&lt;br /&gt;
|-&lt;br /&gt;
| 306 || [4.0.0+] RequestDeviceLinkStatus&lt;br /&gt;
|-&lt;br /&gt;
| 400 || GetAccountByVirtualAccount&lt;br /&gt;
|-&lt;br /&gt;
| 401 || [6.0.0+] GetVirtualAccount&lt;br /&gt;
|-&lt;br /&gt;
| 500 || RequestSyncTicket&lt;br /&gt;
|-&lt;br /&gt;
| 501 || RequestDownloadTicket&lt;br /&gt;
|-&lt;br /&gt;
| 502 || [4.0.0+] RequestDownloadTicketForPrepurchasedContents. [6.0.0+]: Now takes an additional 4-bytes of input.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= nim:eca =&lt;br /&gt;
This is &amp;quot;nn::nim::detail::IShopServiceAccessServerInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [5.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateServerInterface&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [6.0.0+] RefreshDebugAvailability&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [6.0.0+] ClearDebugResponse&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [6.0.0+] RegisterDebugResponse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IShopServiceAccessServer ==&lt;br /&gt;
This is &amp;quot;nn::nim::detail::IShopServiceAccessServer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [5.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateAccessorInterface&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== IShopServiceAccessor ===&lt;br /&gt;
This is &amp;quot;nn::nim::detail::IShopServiceAccessor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [5.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateAsyncInterface&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== IShopServiceAsync ====&lt;br /&gt;
This is &amp;quot;nn::nim::detail::IShopServiceAsync&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [5.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetSize&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 3 || GetErrorCode&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Request&lt;br /&gt;
|-&lt;br /&gt;
| 5 || Prepare&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= nim:ecas =&lt;br /&gt;
This is &amp;quot;nn::nim::detail::IShopServiceAccessSystemInterface&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [7.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || RegisterSpecialClient&lt;br /&gt;
|-&lt;br /&gt;
| 1 || UnregisterSpecialClient&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ntc =&lt;br /&gt;
This is &amp;quot;nn::ntc::detail::service::IStaticService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || OpenEnsureNetworkClockAvailabilityService&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [3.0.0+] SuspendAutonomicTimeCorrection&lt;br /&gt;
|-&lt;br /&gt;
| 101 || [3.0.0+] ResumeAutonomicTimeCorrection&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Network-time-sync uses the &amp;quot;&amp;lt;...&amp;gt;/time&amp;quot; HTTPS URL listed in the below Network section. This just returns an UTC Unix time string.&lt;br /&gt;
&lt;br /&gt;
== IEnsureNetworkClockAvailabilityService ==&lt;br /&gt;
This is &amp;quot;nn::ntc::detail::service::IEnsureNetworkClockAvailabilityService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || StartTask&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetFinishNotificationEvent&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetResult&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 4 || IsProcessing&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [3.0.0+] GetServerTime&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IAsyncValue =&lt;br /&gt;
This is &amp;quot;nn::nim::detail::IAsyncValue&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetSize&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Get&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [4.0.0+] GetErrorContext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IAsyncResult =&lt;br /&gt;
This is &amp;quot;nn::nim::detail::IAsyncResult&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Get&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] GetErrorContext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IAsyncProgressResult =&lt;br /&gt;
This is &amp;quot;nn::nim::detail::IAsyncProgressResult&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Get&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Cancel&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetProgress&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [4.0.0+] GetErrorContext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IAsyncData =&lt;br /&gt;
This is &amp;quot;nn::nim::detail::IAsyncData&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || &lt;br /&gt;
|-&lt;br /&gt;
| 4 || &lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Paeton</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=7649</id>
		<title>Filesystem services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Filesystem_services&amp;diff=7649"/>
		<updated>2019-09-05T18:12:31Z</updated>

		<summary type="html">&lt;p&gt;Paeton: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= fsp-ldr =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IFileSystemProxyForLoader&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || OpenCodeFileSystem || u64 TitleId + X descriptor [[#ContentPath]] || Returns an [[#IFileSystem]].&lt;br /&gt;
|-&lt;br /&gt;
| 1 || IsArchivedProgram || u64 ProcessId || Returns a bool (1 if the process id&#039;s [[#ContentPath]] ends in &amp;quot;.nca&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] SetCurrentProcess || PID descriptor ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= fsp-pr =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IProgramRegistry&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#RegisterProgram]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#UnregisterProgram]] ||&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [4.0.0+] SetCurrentProcess ||&lt;br /&gt;
|-&lt;br /&gt;
| 256 || [[#SetEnabledProgramVerification]] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RegisterProgram ==&lt;br /&gt;
Takes a storageID, a pid, a titleID, a 0x1C type-A buffer for the [[NPDM#FS_Access_Header| FS Access Header]], and a 0x2C type-A buffer for the [[NPDM#FS_Access_Control| FS Access Control]]&lt;br /&gt;
&lt;br /&gt;
Final FS permissions are stored as (ACI0_perms &amp;amp; ACID_perms). Will panic(svcBreak) when buffer sizes from ipc-rawdata are invalid.&lt;br /&gt;
&lt;br /&gt;
== UnregisterProgram ==&lt;br /&gt;
Takes a pid. Removes registered FS permissions for that PID.&lt;br /&gt;
&lt;br /&gt;
== SetEnabledProgramVerification ==&lt;br /&gt;
Seems to sets a global flag to inputval &amp;amp; 1.&lt;br /&gt;
&lt;br /&gt;
When the flag is zero, it will set ret=0 instead of ret={error} when verifying the fixed-key [[NPDM]] ACID signature fails. This also skips verifying the [[NCA_Format|NCA Header]] signature using the ACID key. Note that if verifying the fixed-key ACID signature is successful, and verifying the ACID-key NCA header signature fails, it will throw an error and abort.&lt;br /&gt;
&lt;br /&gt;
= fsp-srv =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IFileSystemProxy&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [1.0.0] [[#OpenFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#SetCurrentProcess]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || OpenDataFileSystemByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [2.0.0+] [[#OpenFileSystemWithPatch]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [2.0.0+] [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [3.0.0+] OpenDataFileSystemByProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || InvalidateBisCache&lt;br /&gt;
|-&lt;br /&gt;
| 17 || OpenHostFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 18 || OpenSdCardFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 19 || [2.0.0+] FormatSdCardFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 21 || [[#DeleteSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [[#CreateSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [[#CreateSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 24 || RegisterSaveDataFileSystemAtomicDeletion&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [2.0.0+] DeleteSaveDataFileSystemBySaveDataSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 26 || [2.0.0+] FormatSdCardDryRun&lt;br /&gt;
|-&lt;br /&gt;
| 27 || [2.0.0+] IsExFatSupported&lt;br /&gt;
|-&lt;br /&gt;
| 28 || [4.0.0+] DeleteSaveDataFileSystemBySaveDataAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 30 || [[#OpenGameCardStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 31 || [[#OpenGameCardFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [3.0.0+] ExtendSaveDataFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 33 || [5.0.0+] DeleteCacheStorage&lt;br /&gt;
|-&lt;br /&gt;
| 34 || [5.0.0+] GetCacheStorageSize&lt;br /&gt;
|-&lt;br /&gt;
| 35 || [6.0.0+] CreateSaveDataFileSystemByHashSalt (Unofficial name, takes a total of 0xB0-bytes of input, no output)&lt;br /&gt;
|-&lt;br /&gt;
| 51 || [[#OpenSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 52 || [[#OpenSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 53 || [2.0.0+] OpenReadOnlySaveDataFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 57 || [3.0.0+] [[#ReadSaveDataFileSystemExtraDataBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| 58 || [[#ReadSaveDataFileSystemExtraData]]&lt;br /&gt;
|-&lt;br /&gt;
| 59 || [2.0.0+] WriteSaveDataFileSystemExtraData&lt;br /&gt;
|-&lt;br /&gt;
| 60 || [[#OpenSaveDataInfoReader]]&lt;br /&gt;
|-&lt;br /&gt;
| 61 || [[#OpenSaveDataInfoReaderBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| 62 || [5.0.0+] OpenSaveDataInfoReaderOnlyCacheStorage&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [5.0.0+] OpenSaveDataInternalStorageFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [5.0.0+] UpdateSaveDataMacForDebug&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [5.0.0+] WriteSaveDataFileSystemExtraDataWithMask&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [6.0.0+] FindSaveDataWithFilter (Takes a total of 0x50-bytes of input, returns 8-bytes of output, and a type-0x6 output buffer)&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [6.0.0+] OpenSaveDataInfoReaderWithFilter (Takes a total of 0x50-bytes of input, returns an #ISaveDataInfoReader)&lt;br /&gt;
|-&lt;br /&gt;
| 69 || [8.0.0+] ReadSaveDataFileSystemExtraDataBySaveDataAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 70 || [8.0.0+] WriteSaveDataFileSystemExtraDataBySaveDataAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 80 || OpenSaveDataMetaFile&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [4.0.0+] OpenSaveDataTransferManager (No input, returns an [[#ISaveDataTransferManager]])&lt;br /&gt;
|-&lt;br /&gt;
| 82 || [5.0.0+] OpenSaveDataTransferManagerVersion2 (No input, returns an [[#ISaveDataTransferManagerWithDivision]])&lt;br /&gt;
|-&lt;br /&gt;
| 83 || [6.0.0+] OpenSaveDataTransferProhibiterForCloudBackUp (Takes an input u64, returns an [[#ISaveDataTransferProhibiter]])&lt;br /&gt;
|-&lt;br /&gt;
| 84 || [6.0.0+] ListApplicationAccessibleSaveDataOwnerId (Takes a total of 0x10-bytes of input, returns 4-bytes of output, and a type-0x6 output buffer)&lt;br /&gt;
|-&lt;br /&gt;
| 100 || OpenImageDirectoryFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 110 || [[#OpenContentStorageFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 120 || [6.0.0+] OpenCloudBackupWorkStorageFileSystem (Takes 4-bytes of input, returns an [[#IFileSystem]])&lt;br /&gt;
|-&lt;br /&gt;
| 130 || [7.0.0+] [[#OpenCustomStorageFileSystem]] (Takes 4-bytes of input, returns an [[#IFileSystem]])&lt;br /&gt;
|-&lt;br /&gt;
| 200 || OpenDataStorageByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 201 || [3.0.0+] OpenDataStorageByProgramId&lt;br /&gt;
|-&lt;br /&gt;
| 202 || [[#OpenDataStorageByDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 203 || OpenPatchDataStorageByCurrentProcess&lt;br /&gt;
|-&lt;br /&gt;
| 204 || [7.0.0+] OpenDataFileSystemWithProgramIndex (Takes an input u8, returns an [[#IFileSystem]])&lt;br /&gt;
|-&lt;br /&gt;
| 205 || [7.0.0+] OpenDataStorageWithProgramIndex (Takes an input u8, returns an [[#IStorage]])&lt;br /&gt;
|-&lt;br /&gt;
| 400 || [[#OpenDeviceOperator]]&lt;br /&gt;
|-&lt;br /&gt;
| 500 || [[#OpenSdCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 501 || [[#OpenGameCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 510 || [5.0.0+] OpenSystemDataUpdateEventNotifier&lt;br /&gt;
|-&lt;br /&gt;
| 511 || [5.0.0+] NotifySystemDataUpdateEvent&lt;br /&gt;
|-&lt;br /&gt;
| 520 || [6.0.0+] SimulateDeviceDetectionEvent (Takes a total of 0xC-bytes of input, no output)&lt;br /&gt;
|-&lt;br /&gt;
| 600 || [1.0.0-3.0.2] SetCurrentPosixTime&lt;br /&gt;
|-&lt;br /&gt;
| 601 || QuerySaveDataTotalSize&lt;br /&gt;
|-&lt;br /&gt;
| 602 || [[#VerifySaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 603 || CorruptSaveDataFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 604 || CreatePaddingFile&lt;br /&gt;
|-&lt;br /&gt;
| 605 || DeleteAllPaddingFiles&lt;br /&gt;
|-&lt;br /&gt;
| 606 || [2.0.0+] GetRightsId&lt;br /&gt;
|-&lt;br /&gt;
| 607 || [2.0.0+] RegisterExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 608 || [2.0.0+] UnregisterAllExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 609 || [2.0.0+] GetRightsIdByPath&lt;br /&gt;
|-&lt;br /&gt;
| 610 || [3.0.0+] GetRightsIdAndKeyGenerationByPath&lt;br /&gt;
|-&lt;br /&gt;
| 611 || [4.0.0+] SetCurrentPosixTimeWithTimeDifference&lt;br /&gt;
|-&lt;br /&gt;
| 612 || [4.0.0+] GetFreeSpaceSizeForSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 613 || [4.0.0+] VerifySaveDataFileSystemBySaveDataSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 614 || [4.0.0+] CorruptSaveDataFileSystemBySaveDataSpaceId&lt;br /&gt;
|-&lt;br /&gt;
| 615 || [5.0.0+] QuerySaveDataInternalStorageTotalSize&lt;br /&gt;
|-&lt;br /&gt;
| 616 || [6.0.0+] [[#GetSaveDataCommitId]]&lt;br /&gt;
|-&lt;br /&gt;
| 617 || [7.0.0+] UnregisterExternalKey&lt;br /&gt;
|-&lt;br /&gt;
| 620 || [2.0.0+] [[#SetSdCardEncryptionSeed]]&lt;br /&gt;
|-&lt;br /&gt;
| 630 || [4.0.0+] SetSdCardAccessibility&lt;br /&gt;
|-&lt;br /&gt;
| 631 || [4.0.0+] IsSdCardAccessible&lt;br /&gt;
|-&lt;br /&gt;
| 640 || [4.0.0-7.0.1] IsSignedSystemPartitionOnSdCardValid&lt;br /&gt;
|-&lt;br /&gt;
| 700 || [5.0.0+] [[#OpenAccessFailureDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| 701 || [5.0.0+] GetAccessFailureDetectionEvent&lt;br /&gt;
|-&lt;br /&gt;
| 702 || [5.0.0+] IsAccessFailureDetected&lt;br /&gt;
|-&lt;br /&gt;
| 710 || [5.0.0+] ResolveAccessFailure&lt;br /&gt;
|-&lt;br /&gt;
| 720 || [5.0.0+] AbandonAccessFailure&lt;br /&gt;
|-&lt;br /&gt;
| 800 || [2.0.0+] GetAndClearErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 810 || [7.0.0+] RegisterProgramIndexMapInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1000 || SetBisRootForHost&lt;br /&gt;
|-&lt;br /&gt;
| 1001 || [[#SetSaveDataSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 1002 || [[#SetSaveDataRootPath]]&lt;br /&gt;
|-&lt;br /&gt;
| 1003 || DisableAutoSaveDataCreation&lt;br /&gt;
|-&lt;br /&gt;
| 1004 || [[#SetGlobalAccessLogMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 1005 || [[#GetGlobalAccessLogMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 1006 || [[#OutputAccessLogToSdCard]]&lt;br /&gt;
|-&lt;br /&gt;
| 1007 || [4.0.0+] RegisterUpdatePartition&lt;br /&gt;
|-&lt;br /&gt;
| 1008 || [4.0.0+] OpenRegisteredUpdatePartition&lt;br /&gt;
|-&lt;br /&gt;
| 1009 || [4.0.0+] GetAndClearMemoryReportInfo&lt;br /&gt;
|-&lt;br /&gt;
| 1010 || [5.1.0-6.2.0] SetDataStorageRedirectTarget&lt;br /&gt;
|-&lt;br /&gt;
| 1011 || [7.0.0+] GetProgramIndexForAccessLog (No input, returns two 32-bit values &amp;quot;version&amp;quot; and &amp;quot;program_index&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| 1100 || [4.0.0+] OverrideSaveDataTransferTokenSignVerificationKey&lt;br /&gt;
|-&lt;br /&gt;
| 1110 || [6.0.0+] CorruptSaveDataFileSystemByOffset&lt;br /&gt;
|-&lt;br /&gt;
| 1200 || [6.0.0+] OpenMultiCommitManager (No input, returns an output #IMultiCommitManager)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Permissions ==&lt;br /&gt;
Every time permissions are checked, the process registration [[#fsp-pr]] is loaded using the session processID. The permission data is populated with data from the [[NPDM]].&lt;br /&gt;
&lt;br /&gt;
If the processID is &amp;lt;= 6 (which happens only for built-in sysmodules), it will use a hardcoded registration data. The default mask in this case is 0x8000000000000000.&lt;br /&gt;
&lt;br /&gt;
Note that the functions check whether or not at least one bit is set in the mask. This means that, you don&#039;t need to set 0xFFFFFFFFFFFFFFFF to get all permissions: it suffices to set 0x8000000000000000.&lt;br /&gt;
&lt;br /&gt;
If the code were to request an invalid input type, panic. But this never happens.&lt;br /&gt;
&lt;br /&gt;
=== RwPermissions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Name || Value || Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8000000000000801 || CanMountLogo || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1 || 0x8000000000000801 || CanMountContentMeta || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x2 || 0x8000000000000801 || CanMountContentControl || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x3 || 0x8000000000000801 || CanMountContentManual || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x8000000000000801 || CanMountContentData || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5 || 0x8000000000000801 || CanMountApplicationPackage || 1 || [[#OpenFileSystem]], [[#OpenFileSystemWithPatch]], [[#OpenFileSystemWithId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || 0x8000000000000000 || CanMountSaveDataStorage || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0x7 || 0x8000000000000800 || CanMountContentStorage || 3 || [[#OpenContentStorageFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000001000 || CanMountImageAndVideoStorage || 3 || [[#OpenImageDirectoryFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x8000000200000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000084) || CanMountCloudBackupWorkStorage || 3 || OpenCloudBackupWorkStorageFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x8000000000000000&amp;lt;br/&amp;gt;([7.0.0-7.0.1] 0x4000000000000000)&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000084)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000080) || CanMountCustomStorage || 3 || OpenCustomStorageFileSystem&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || 0x8000000000000084&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000080)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000008080) || CanMountBisCalibrationFile || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x8000000000000080&amp;lt;br/&amp;gt;([1.0.0-6.2.0] 0x8000000000008080) || CanMountBisSafeMode || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x8000000000008080&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000080) || CanMountBisUser || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0x8000000000008080&amp;lt;br/&amp;gt;([3.0.0-6.2.0] 0x8000000000000080)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0xC000000000200000) || CanMountBisSystem || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000000080&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0xC000000000200000)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000010) || CanMountBisSystemProperEncryption || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8000000000000080&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0xC000000000200000&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000000010)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000040020) || CanMountBisSystemProperPartition || 3 || [[#OpenBisFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0xC000000000200000&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000010)&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000040020)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000028) || CanMountSdCard || 3 || [[#OpenSdCardFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 0x8000000000000010&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000040020)&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000000028)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000020) || CanMountGameCard || 3 || [[#OpenGameCardFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || 0x8000000000040020&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000028)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000020) || CanMountDeviceSaveData || 3 || [[#OpenSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x8000000000000028&amp;lt;br/&amp;gt;([3.0.0-6.2.0] 0x8000000000000020)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000010082) || CanMountSystemSaveData || 3 || [[#OpenSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0x8000000000000020&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000010082)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000010080) || CanMountOthersSaveData || 3 || [[#OpenSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || 0x8000000000000020&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000010082)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000010080) || CanMountOthersSystemSaveData || 3 || [[#OpenSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || 0x8000000000010082&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000010080)&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000000080)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000010080) || CanOpenBisPartitionBootPartition1Root || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x8000000000010080&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000080)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000010080) || CanOpenBisPartitionBootPartition2Root || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || 0x8000000000000080&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000010080) || CanOpenBisPartitionUserDataRoot || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || 0x8000000000010080 || CanOpenBisPartitionBootConfigAndPackage2Part1 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || 0x8000000000010080 || CanOpenBisPartitionBootConfigAndPackage2Part2 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || 0x8000000000010080 || CanOpenBisPartitionBootConfigAndPackage2Part3 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || 0x8000000000010080&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000084) || CanOpenBisPartitionBootConfigAndPackage2Part4 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E || 0x8000000000010080&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000084) || CanOpenBisPartitionBootConfigAndPackage2Part5 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1F || 0x8000000000010080&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000084)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000080) || CanOpenBisPartitionBootConfigAndPackage2Part6 || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x8000000000000084&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000080) || CanOpenBisPartitionCalibrationBinary || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x21 || 0x8000000000000084&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000080) || CanOpenBisPartitionCalibrationFile || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x22 || 0x8000000000000080 || CanOpenBisPartitionSafeMode || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x23 || 0x8000000000000080&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0xC000000000200000) || CanOpenBisPartitionUser || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || 0x8000000000000080&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000000100) || CanOpenBisPartitionSystem || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x25 || 0x8000000000000080&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0xC000000000200000)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0x8000000000100008) || CanOpenBisPartitionSystemProperEncryption || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x26 || 0x8000000000000080&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0xC000000000200000)&amp;lt;br/&amp;gt;([3.0.0-5.1.0] 0x8000000000000100)&amp;lt;br/&amp;gt;([1.0.0-2.3.0] 0xC000000000400000) || CanOpenBisPartitionSystemProperPartition || 3 || [[#OpenBisStorage]]&lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0+] 0x27 || 0xC000000000200000&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000100)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000100008) || CanOpenSdCardStorage || ||&lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0+] 0x28 || 0x8000000000000100&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000100008)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0xC000000000400000) || CanOpenGameCardStorage || 3 || [[#OpenGameCardStorage]], [[#EraseGameCard]] (bit1), [[#WriteToGameCard]] (bit1), [[#GetGameCardErrorInfo]] (bit1), [[#EraseAndWriteParamDirectly]] (bit1), [[#ReadParamDirectly]] (bit1), [[#ForceEraseGameCard]] (bit1) &lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x29 || 0x8000000000100008&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0xC000000000400000)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000010000) || CanMountSystemDataPrivate || 1 || [[#OpenFileSystem]], [[#OpenDataStorageByDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2A || 0xC000000000400000&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000010000)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000000) || CanMountHost || 3 || [[#OpenHostFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x2B || 0x8000000000010000&amp;lt;br/&amp;gt;([1.0.0-6.2.0]0x8000000000000000) || CanMountRegisteredUpdatePartition || 1 || [[#OpenRegisteredUpdatePartition]]&lt;br /&gt;
|-&lt;br /&gt;
| [7.0.0+] 0x2C || 0x8000000000000000 || CanOpenSaveDataInternalStorage || 3 || [[#OpenSaveDataInternalStorageFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| [7.0.0+] 0x2D || 0x0000000000000000 || CanNotMountCustomStorage || 3 || OpenCustomStorageFileSystem&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== BoolPermissions ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type(s) || Mask || Name || Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8000000000000080 || CanInvalidateBisCache || [[#InvalidateBisCache]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1 || 0x8000000000000080 || CanEraseMmc || [[#EraseMmc]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x2 || 0x8000000000000010 || CanGetGameCardDeviceCertificate || [[#GetGameCardDeviceCertificate]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x3 || 0x8000000000000010 || CanGetGameCardIdSet || [[#GetGameCardIdSet]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x8000000000000200 || CanFinalizeGameCardDriver || [[#FinalizeGameCardDriver]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5 || 0x8000000000000200 || CanGetGameCardAsicInfo || [[#GetGameCardAsicInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x6 || 0x8000000000002020 || CanCreateSaveData || [[#CreateSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x7 || 0x8000000000000060 || CanDeleteSaveData || [[#DeleteSaveDataFileSystem]], [[#RegisterSaveDataFileSystemAtomicDeletion]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8000000000000028 || CanCreateSystemSaveData || [[#CreateSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x8000000000000020 || CanCreateOthersSystemSaveData || [[#CreateSaveDataFileSystemBySystemSaveDataId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xA || 0x8000000000004028 || CanDeleteSystemSaveData || [[#DeleteSaveDataFileSystem]], [[#RegisterSaveDataFileSystemAtomicDeletion]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB || 0x8000000000000060 || CanOpenSaveDataInfoReader || [[#OpenSaveDataInfoReaderBySaveDataSpaceId]], [[#OpenSaveDataInfoReader]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x8000000000004020 || CanOpenSaveDataInfoReaderForSystem || [[#OpenSaveDataInfoReaderBySaveDataSpaceId]], [[#OpenSaveDataInfoReader]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x8000000000000040&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000020000) || CanOpenSaveDataInfoReaderForInternal || OpenSaveDataInfoReaderWithFilter&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0x8000000000020000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000400) || CanOpenSaveDataMetaFile || [[#OpenSaveDataMetaFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x8000000000000400&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000004060) || CanSetCurrentPosixTime || [[#SetCurrentPosixTime]], [[#SetCurrentPosixTimeWithTimeDifference]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8000000000004060&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000080000) || CanReadSaveDataFileSystemExtraData || [[#ReadSaveDataFileSystemExtraData]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || 0x8000000000080000 || CanSetGlobalAccessLogMode || [[#SetGlobalAccessMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || 0x8000000000080000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] Invalid) || CanSetSpeedEmulationMode || [[#SetSpeedEmulationMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || Invalid&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0xC000000000800000) || || &lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0xC000000000800000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0xC000000001000000) || CanFillBis || [[#CreatePaddingFile]], [[#DeleteAllPaddingFiles]] &lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0xC000000001000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000001000060)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0xC000000002000000) || CanCorruptSaveData || [[#CorruptSaveDataFileSystem]], [[#CorruptSaveDataFileSystemBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x16 || 0x8000000001000060&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000000060)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000004000000) || CanCorruptSystemSaveData || [[#CorruptSaveDataFileSystem]], [[#CorruptSaveDataFileSystemBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x17 || 0x8000000000000060&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0xC000000002000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000008000000) || CanVerifySaveData || [[#VerifySaveDataFileSystem]], [[#VerifySaveDataFileSystemBySaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x18 || 0xC000000002000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000004000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000010000000) || CanDebugSaveData || [[#CreateSaveDataFileSystem]], [[#OpenSaveDataFileSystem]], [[#SetSaveDataRootPath]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x19 || 0x8000000004000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000008000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000000800) || CanFormatSdCard || [[#FormatSdCardFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| [2.0.0+] 0x1A || 0x8000000008000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000010000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000004020) || CanGetRightsId || [[#GetRightsId]], [[#GetRightsIdAndKeyGenerationByPath]], [[#GetRightsIdByPath]]&lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0+] 0x1B || 0x8000000010000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000000800)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000002020) || CanRegisterExternalKey || [[#RegisterExternalKey]], [[#UnregisterAllExternalKey]]&lt;br /&gt;
|-&lt;br /&gt;
| [3.0.0+] 0x1C || 0x8000000000000800&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000004020)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000000028) || CanSetEncryptionSeed || [[#SetSdCardEncryptionSeed]]&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x1D || 0x8000000000000020&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000020000000) || SaveDataExtraData_Write0 || [[#WriteSaveDataFileSystemExtraData]], [[#WriteSaveDataFileSystemExtraDataWithMask]]&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x1E || 0x8000000000004020&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000002020)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000040000000) || CanWriteSaveDataFileSystemExtraDataFlags || [[#WriteSaveDataFileSystemExtraData]], [[#WriteSaveDataFileSystemExtraDataWithMask]]&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x1F || 0x8000000000000020&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000000000028)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000000000) || SaveDataExtraData_Write1 || [[#WriteSaveDataFileSystemExtraData]], [[#WriteSaveDataFileSystemExtraDataWithMask]]&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] 0x20 || 0x8000000000000000&amp;lt;br/&amp;gt;([5.0.0-5.1.0] 0x8000000020000000)&amp;lt;br/&amp;gt;([1.0.0-4.1.0] 0x8000000000000000) || CanWriteSaveDataFileSystemExtraDataAll || [[#WriteSaveDataFileSystemExtraData]], [[#WriteSaveDataFileSystemExtraDataWithMask]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x21 || 0x8000000000002020&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000040000000) || CanExtendSaveData || [[#ExtendSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x22 || 0x8000000000000028&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000002) || CanExtendSystemSaveData || [[#ExtendSaveDataFileSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x23 || 0x8000000020000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000000) || CanRegisterUpdatePartition || [[#RegisterUpdatePartition]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x24 || 0x8000000040000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000000000) || CanOpenSaveDataTransferManager || [[#OpenSaveDataTransferManager]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x25 || 0x8000000200000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080200000) || CanOpenSaveDataTransferManagerVersion2 || [[#OpenSaveDataTransferManagerVersion2]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x26 || 0x8000000200002000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080000110) || CanOpenOpenSaveDataTransferProhibiter || [[#OpenSaveDataTransferProhibiter]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x27 || 0x8000000240002000 &amp;lt;br/&amp;gt;([6.0.0-7.0.1] 0x8000000200002000)&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000000100008) || CanListAccessibleSaveDataOwnerId || ListAccessibleSaveDataOwnerId&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x28 || 0x8000000000000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080010000) || CanControlMmcPatrol || [[#SuspendMmcPatrol]], [[#ResumeMmcPatrol]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x29 || 0x8000000000000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanOverrideSaveDataTransferTokenSignVerificationKey || [[#OverrideSaveDataTransferTokenSignVerificationKey]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2A || 0x8000000080200000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanOpenSdCardDetectionEventNotifier || [[#OpenSdCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2B || 0x8000000080000110&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanOpenGameCardDetectionEventNotifier || [[#OpenGameCardDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2C || 0x8000000000100008&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanOpenSystemDataUpdateEventNotifier || [[#OpenSystemDataUpdateEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2D || 0x8000000000010000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x0000000080000001) || CanNotifySystemDataUpdateEvent || [[#NotifySystemDataUpdateEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2E || 0x8000000100000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000040000000) || CanOpenAccessFailureDetectionEventNotifier || [[#OpenAccessFailureDetectionEventNotifier]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.0.0+] 0x2F || 0x8000000100000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080200000) || CanGetAccessFailureDetectionEvent || [[#GetAccessFailureDetectionEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| [5.1.0+] 0x30 || 0x8000000100000000&amp;lt;br/&amp;gt;([1.0.0-5.1.0] 0x8000000080080000) || CanIsAccessFailureDetected || [[#IsAccessFailureDetected]] &lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x31 || 0x8000000100000000 || CanResolveAccessFailure || [[#ResolveAccessFailure]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x32 || 0x8000000100000000 || CanAbandonAccessFailure || [[#AbandonAccessFailure]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x33 || 0x8000000040000000 || CanQuerySaveDataInternalStorageTotalSize || [[#QuerySaveDataInternalStorageTotalSize]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x34 || 0x8000000200000020 || CanGetSaveDataCommitId || [[#GetSaveDataCommitId]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x35 || 0x8000000000200000 || CanSetSdCardAccessibility || [[#SetSdCardAccessibility]]&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x36 || 0x4000000000000000 || CanSimulateGameCardDetectionEvent || SimulateDeviceDetectionEvent, SetSimulationEvent, ClearSimulationEvent&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x37 || 0x8000000000000000&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000080000) || CanSetDataStorageRedirectTarget || SetDataStorageRedirectTarget&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] 0x38 || 0x8000000400000000&amp;lt;br/&amp;gt;([6.0.0-6.2.0] 0x8000000000000000) || || [[#CreateSaveDataFileSystem]], CreateSaveDataFileSystemByHashSalt&lt;br /&gt;
|-&lt;br /&gt;
| [8.0.0+] 0x39 || 0x8000000000000010 || CanChallengeCardExistence || ChallengeCardExistence&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== OpenFileSystem ==&lt;br /&gt;
Takes a type-0x19 input buffer (ContentPath) and a [[#FileSystemType]] as parameters. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
[2.0.0+] This function was removed.&lt;br /&gt;
&lt;br /&gt;
== SetCurrentProcess ==&lt;br /&gt;
Takes a pid-descriptor.&lt;br /&gt;
&lt;br /&gt;
== OpenFileSystemWithPatch ==&lt;br /&gt;
Takes an input [[#FileSystemType]] and an u64 title-id. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Web-applet loads the [[#FileSystemType]] (which must be &#039;&#039;&#039;ContentManual&#039;&#039;&#039;) from u32_table[inparam].&lt;br /&gt;
&lt;br /&gt;
Note: web-applet strings refer to both this cmd and [[#OpenFileSystemWithId]] as &amp;quot;MountContent&amp;quot;, but official nn_sf_sync symbols use &amp;quot;OpenXX&amp;quot; names.&lt;br /&gt;
&lt;br /&gt;
== OpenFileSystemWithId ==&lt;br /&gt;
Takes a type-0x19 input buffer, an [[#FileSystemType]] and an u64 title-id. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
The [[#IFileSystem]] must be &#039;&#039;&#039;ContentMeta&#039;&#039;&#039; if the NCA type is 0 (control).&lt;br /&gt;
&lt;br /&gt;
The input buffer is the output string path from [[NS_Services#GetApplicationContentPath|GetApplicationContentPath]].&lt;br /&gt;
&lt;br /&gt;
May return errors when attempting to access NCA-paths for an update-title with a gamecard, when the gamecard isn&#039;t inserted. May return error 0x7D402 in some cases with update-titles. Non-val2 in32 values with NCA-type1 are unusable, even for normal titles.&lt;br /&gt;
&lt;br /&gt;
The official &amp;quot;MountApplicationPackage&amp;quot; func uses this with in64=0 and [[#FileSystemType]] &#039;&#039;&#039;ApplicationPackage&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
After the [[#FileSystemType]] specific permissions are checked, it then gets the func retval for permissions-type 0x25 and func0.&lt;br /&gt;
&lt;br /&gt;
When [[#FileSystemType]] is &#039;&#039;&#039;ContentMeta&#039;&#039;&#039;, it uses in64=0xffffffffffffffff internally, otherwise it checks if in64 is set to 0xffffffffffffffff then throws an error if so. When the in64 used internally is not 0xffffffffffffffff, it&#039;s compared with the NCA titleID, then an error is thrown on mismatch.&lt;br /&gt;
&lt;br /&gt;
== OpenBisFileSystem ==&lt;br /&gt;
Takes a type-0x19 input buffer string and a u32 [[Flash_Filesystem|Bis partitionID]]. Official user-process code sets instr[0] = 0 normally. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Only partitionIDs for FAT partitions are usable with this, otherwise error 0x2EE202 is returned. Seems to be about the same as [[#OpenBisStorage]] except this mounts the partition filesystem instead of allowing direct access to the partition sectors.&lt;br /&gt;
&lt;br /&gt;
== OpenBisStorage ==&lt;br /&gt;
Takes a u32 partition ID, returns 0x2EE202 for partitions which do not exist, 0x320002 for partitions which cannot be opened and a valid [[#IStorage]] handle otherwise.&lt;br /&gt;
&lt;br /&gt;
== InvalidateBisCache ==&lt;br /&gt;
Seems to invalidate the Bis cache for MBR/GPT after overwriting that data via the OpenBisStorage IStorage. Used by [[SystemInitializer]].&lt;br /&gt;
&lt;br /&gt;
== DeleteSaveDataFileSystem ==&lt;br /&gt;
Takes an input u64.&lt;br /&gt;
&lt;br /&gt;
== CreateSaveDataFileSystem ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry, a 0x40-byte SaveCreate-struct entry, and a 0x10-byte input struct.&lt;br /&gt;
&lt;br /&gt;
Only the first 0x5-bytes in the 0x10-byte struct are initialized: all-zero when automatically creating savedata during savecommon mount by official user-processes. In the dedicated save-creation code in official user-processes: +0 u32 = 0x40060, +4 u8 = 1.&lt;br /&gt;
&lt;br /&gt;
Creates regular savedata.&lt;br /&gt;
&lt;br /&gt;
== CreateSaveDataFileSystemBySystemSaveDataId ==&lt;br /&gt;
Takes a 0x40-byte Save-struct entry and a 0x40-byte SaveCreate-struct entry.&lt;br /&gt;
&lt;br /&gt;
Creates savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardStorage ==&lt;br /&gt;
Takes two input u32s (gamecard handle, partition ID), and returns an [[#IStorage]] for the [[Gamecard_Format|partition]].&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardFileSystem ==&lt;br /&gt;
Takes two input u32s, with the second u32 located at +4 in rawdata after the first u32. Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts a [[Gamecard_Partition|gamecard partition]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataFileSystem ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and a 0x40-byte Save-struct entry. Official user-process code is only known to use value 1 for the u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Permissions aren&#039;t checked until the specified save is successfully found.&lt;br /&gt;
&lt;br /&gt;
Only one process (specifically only one [[#IFileSystem]] session) can mount a given savedata at any given time (this includes SystemSaveData).&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataFileSystemBySystemSaveDataId ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and a 0x40-byte Save-struct entry. Web-applet only uses value0 for the input u8.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]].&lt;br /&gt;
&lt;br /&gt;
Mounts savedata in the SYSTEM [[Flash_Filesystem|NAND]] partition.&lt;br /&gt;
&lt;br /&gt;
== ReadSaveDataFileSystemExtraDataBySaveDataSpaceId ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], an input u64 saveID, and a type-0x6 output buffer containing the [[#SaveDataFileSystemExtraData]].&lt;br /&gt;
&lt;br /&gt;
== ReadSaveDataFileSystemExtraData ==&lt;br /&gt;
Takes an input u64 saveID and a type-0x6 output buffer containing the [[#SaveDataFileSystemExtraData]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataInfoReader ==&lt;br /&gt;
No input, returns an output [[#ISaveDataInfoReader]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataInfoReaderBySaveDataSpaceId ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], returns an output [[#ISaveDataInfoReader]].&lt;br /&gt;
&lt;br /&gt;
== OpenContentStorageFileSystem ==&lt;br /&gt;
Takes a [[#ContentStorageId]]. Invalid values return 0x2EE202.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]] with NCA files. The read data from these files is identical to the data read by [[NCM_services#ReadContentIdFile]].&lt;br /&gt;
&lt;br /&gt;
== OpenCustomStorageFileSystem ==&lt;br /&gt;
Takes a [[#CustomStorageId]]. Invalid values return 0x2EE202.&lt;br /&gt;
&lt;br /&gt;
Returns an [[#IFileSystem]] from either User:/CustomStorage0 or Sdcard:/Nintendo/CustomStorage0. If on the SD card, an AesXtsFileSystem is created using a key source specifically for custom storage.&lt;br /&gt;
&lt;br /&gt;
== OpenDataStorageByDataId ==&lt;br /&gt;
Takes a [[#StorageId]] and a TitleID.&lt;br /&gt;
&lt;br /&gt;
Returns a [[IPC_Marshalling#Domain_message|domain object ID]] implementing the [[#IStorage]] interface for data archives.&lt;br /&gt;
&lt;br /&gt;
== OpenDeviceOperator ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IDeviceOperator]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenSdCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== OpenGameCardDetectionEventNotifier ==&lt;br /&gt;
This command returns a session to a port implementing the [[#IEventNotifier]] interface.&lt;br /&gt;
&lt;br /&gt;
== VerifySaveDataFileSystem ==&lt;br /&gt;
Takes an unknown input u64 and a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
The input u64 high-byte must be non-zero, otherwise an [[Error_codes|error]] is returned(0xE02).&lt;br /&gt;
&lt;br /&gt;
== GetSaveDataCommitId ==&lt;br /&gt;
Takes an input u8 and u64, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== SetSdCardEncryptionSeed ==&lt;br /&gt;
Takes in the 0x10 byte SD card encryption seed, and loads it into FS-module state.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]]-module reads the 0x10 bytes from SdCard:/Nintendo/Contents/private, and compares them to the first 0x10 bytes of the ns_appman:/private (in [[Flash_Filesystem#System_Savegames|system savedata]] 0x8000000000000043). If they match, NS calls this command using bytes 0x10-0x20 from ns_appman:/private. The rest of this file (0x1F0 bytes total) is (usually/always?) all-zero (however in some cases the byte at offset 0x20 is value 0x1).&lt;br /&gt;
&lt;br /&gt;
== OpenAccessFailureDetectionEventNotifier ==&lt;br /&gt;
Takes 8-bytes of input and returns an [[#IEventNotifier]].&lt;br /&gt;
&lt;br /&gt;
[8.0.0+] Now takes an additional 8-bytes of input.&lt;br /&gt;
&lt;br /&gt;
== SetSaveDataSize ==&lt;br /&gt;
Takes two input u64s &amp;quot;size&amp;quot; and &amp;quot;journal_size&amp;quot;, and writes them to fsp-srv object member variables.&lt;br /&gt;
&lt;br /&gt;
These variables are normally initialized with 32 MiB (0x2000000) and 16 MiB (0x1000000), respectively.&lt;br /&gt;
&lt;br /&gt;
These variables don&#039;t seem to be actually used anywhere else (?)&lt;br /&gt;
&lt;br /&gt;
== SetSaveDataRootPath ==&lt;br /&gt;
Takes an input path, and does snprintf(&amp;lt;fsp-srv object&amp;gt;-&amp;gt;m_save_data_root_path, FS_MAX_PATH-1, &amp;quot;/%s&amp;quot;, input_path);&lt;br /&gt;
&lt;br /&gt;
This path is normally all-zero. When this path is non-zero, the internal OpenSaveDataFileSystem function will create a DirectorySaveDataFileSystem if the target save is a user-save + a directory exists, instead of the normal savedata filesystem object.&lt;br /&gt;
&lt;br /&gt;
== SetGlobalAccessLogMode ==&lt;br /&gt;
Takes an input u32.&lt;br /&gt;
&lt;br /&gt;
== SetGlobalAccessLogMode ==&lt;br /&gt;
Takes an input u32.&lt;br /&gt;
&lt;br /&gt;
== GetGlobalAccessLogMode ==&lt;br /&gt;
Returns an output u32.&lt;br /&gt;
&lt;br /&gt;
GlobalAccessLogMode is normally 0.&lt;br /&gt;
&lt;br /&gt;
== OutputAccessLogToSdCard ==&lt;br /&gt;
Takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
The input buffer is the string to output to the log. User-processes normally include a newline at the end.&lt;br /&gt;
&lt;br /&gt;
User-processes only use this when the value previously loaded from [[#GetGlobalAccessLogMode]] has bit1 set.&lt;br /&gt;
&lt;br /&gt;
When bit1 in GlobalAccessLogMode is clear, FS-module will just return 0 for OutputAccessLogToSdCard. However even with that set the log doesn&#039;t show up SD, unknown why.&lt;br /&gt;
&lt;br /&gt;
The input buffer is written to the &amp;quot;$FsAccessLog:/FsAccessLog.txt&amp;quot; file, where &amp;quot;$FsAccessLog&amp;quot; is the SD-card mount-name. It&#039;s written to the current end of the file(appended).&lt;br /&gt;
&lt;br /&gt;
= IStorage =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IStorage&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This is the interface for a raw device, usually a block device.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name || Arguments&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read || Takes a type-0x46 buffer, an offset and length &lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write || Takes a type-0x45 buffer, an offset and length &lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush || None&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize || Takes a size&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize || None&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+] OperateRange ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IFileSystem =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IFileSystem&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are two main implementations of this interface:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;RomFS&#039;&#039;&#039;: Filesystem implementation statically linked in the binary. Uses an [[#IStorage]] interface as underlying raw device.&lt;br /&gt;
* &#039;&#039;&#039;IPC proxy&#039;&#039;&#039;: Used for all non-RomFS filesystems. In this case, actual filesystem implementation is in the FS process.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || CreateFile&lt;br /&gt;
|-&lt;br /&gt;
| 1 || DeleteFile&lt;br /&gt;
|-&lt;br /&gt;
| 2 || CreateDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 3 || DeleteDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 4 || DeleteDirectoryRecursively&lt;br /&gt;
|-&lt;br /&gt;
| 5 || RenameFile&lt;br /&gt;
|-&lt;br /&gt;
| 6 || RenameDirectory&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#GetEntryType]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [[#OpenFile]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#OpenDirectory]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#Commit]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [[#GetFreeSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [[#GetTotalSpaceSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [3.0.0+] [[#CleanDirectoryRecursively]]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [3.0.0+] [[#GetFileTimeStampRaw]]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [4.0.0+] QueryEntry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetEntryType ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns [[#DirectoryEntryType]] as an output u32.&lt;br /&gt;
&lt;br /&gt;
== OpenFile ==&lt;br /&gt;
Takes a type-0x19 input buffer for the path, and an u32 &#039;&#039;&#039;mode&#039;&#039;&#039;. &#039;&#039;&#039;mode&#039;&#039;&#039; controls how the file is opened, based on which bits are set:&lt;br /&gt;
&lt;br /&gt;
* When bit 0 is set, the file is Readable: you can use the Read operation.&lt;br /&gt;
* When bit 1 is set, the file is Writable: you can use the Write operation.&lt;br /&gt;
* When bit 2 is set, the file is Appendable: unless this bit is set, you will not be able to write beyond the end of a file (such writes will result in an error 0x307202)&lt;br /&gt;
&lt;br /&gt;
== OpenDirectory ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and an u64 &#039;&#039;&#039;filter_flags&#039;&#039;&#039;. &#039;&#039;&#039;filter_flags&#039;&#039;&#039; controls what type of entries are read by the [[#IDirectory]]: bitmask 0x1 = directories, bitmask 0x2 = files.&lt;br /&gt;
&lt;br /&gt;
== Commit ==&lt;br /&gt;
Like [https://3dbrew.org/wiki/FS:ControlArchive 3DS], this has to be used after writing to savedata for the changes to take affect.&lt;br /&gt;
&lt;br /&gt;
== GetFreeSpaceSize ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns an output byte-size u64 for the total free space with this FS.&lt;br /&gt;
&lt;br /&gt;
== GetTotalSpaceSize ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and returns an output byte-size u64 for the total space available with this FS(free+used).&lt;br /&gt;
&lt;br /&gt;
== CleanDirectoryRecursively ==&lt;br /&gt;
Takes a type-0x9 input buffer for the path and clears the contents of the directory specified in the path.&lt;br /&gt;
&lt;br /&gt;
== GetFileTimeStampRaw ==&lt;br /&gt;
Takes a type-0x19 input buffer for the path and returns a 0x20-byte struct. This contains 3 u64s and an u8.&lt;br /&gt;
&lt;br /&gt;
= IDirectory =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IDirectory&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#Read]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetEntryCount]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Read ==&lt;br /&gt;
Takes a type-0x6 output buffer. Returns an output u64(?) for the total number of read entries, this is 0 when no more entries are available.&lt;br /&gt;
&lt;br /&gt;
The output buffer contains the read array of [[#DirectoryEntry]]. This doesn&#039;t include entries for &amp;quot;.&amp;quot; and &amp;quot;..&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== GetEntryCount ==&lt;br /&gt;
Returns an u64 for the total number of readable entries.&lt;br /&gt;
&lt;br /&gt;
= DirectoryEntry =&lt;br /&gt;
This is &amp;quot;nn::fs::DirectoryEntry&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset || Size || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x301 || Path&lt;br /&gt;
|-&lt;br /&gt;
| 0x301 || 0x1 || File attributes (bit 0 = is directory; bit 1 = archive bit)&lt;br /&gt;
|-&lt;br /&gt;
| 0x302 || 0x2 || Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x304 || 0x1 || [[#DirectoryEntryType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x305 || 0x3 || Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x308 || 0x8 || Filesize, 0 for directories.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= DirectoryEntryType =&lt;br /&gt;
This is &amp;quot;nn::fs::DirectoryEntryType&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
An s8 value indicating a directory entry type. The current values are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Directory&lt;br /&gt;
|-&lt;br /&gt;
| 1 || File&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= IFile =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IFile&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Read&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Write&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Flush&lt;br /&gt;
|-&lt;br /&gt;
| 3 || SetSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || GetSize&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [4.0.0+] OperateRange&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ISaveDataInfoReader =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataInfoReader&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#ReadSaveDataInfo]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ReadSaveDataInfo ==&lt;br /&gt;
Takes a type-0x6 output buffer. Returns an output u64 for total output entries. This buffer contains an array of [[#SaveDataInfo]].&lt;br /&gt;
&lt;br /&gt;
This is used to get [[#SaveDataInfo]] for all savedata on the system (or all savedata for the current [[#SaveDataSpaceId]]). When used multiple times, it will resume reading where it left off, until no more entries are available (in that case the out u64 is value 0).&lt;br /&gt;
&lt;br /&gt;
= IDeviceOperator =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IDeviceOperator&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || IsSdCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 1 || GetSdCardSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [2.0.0+] GetSdCardCid&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [2.0.0+] GetSdCardUserAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [2.0.0+] GetSdCardProtectedAreaSize&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [2.0.0+] GetAndClearSdCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 100 || GetMmcCid&lt;br /&gt;
|-&lt;br /&gt;
| 101 || GetMmcSpeedMode&lt;br /&gt;
|-&lt;br /&gt;
| 110 || EraseMmc&lt;br /&gt;
|-&lt;br /&gt;
| 111 || GetMmcPartitionSize&lt;br /&gt;
|-&lt;br /&gt;
| 112 || [2.0.0+] GetMmcPatrolCount&lt;br /&gt;
|-&lt;br /&gt;
| 113 || [2.0.0+] GetAndClearMmcErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 114 || [2.0.0+] GetMmcExtendedCsd&lt;br /&gt;
|-&lt;br /&gt;
| 115 || [4.0.0+] SuspendMmcPatrol&lt;br /&gt;
|-&lt;br /&gt;
| 116 || [4.0.0+] ResumeMmcPatrol&lt;br /&gt;
|-&lt;br /&gt;
| 200 || IsGameCardInserted&lt;br /&gt;
|-&lt;br /&gt;
| 201 || EraseGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 202 || GetGameCardHandle&lt;br /&gt;
|-&lt;br /&gt;
| 203 || [[#GetGameCardUpdatePartitionInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 204 || FinalizeGameCardDriver&lt;br /&gt;
|-&lt;br /&gt;
| 205 || GetGameCardAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 206 || GetGameCardDeviceCertificate&lt;br /&gt;
|-&lt;br /&gt;
| 207 || GetGameCardAsicInfo&lt;br /&gt;
|-&lt;br /&gt;
| 208 || GetGameCardIdSet&lt;br /&gt;
|-&lt;br /&gt;
| 209 || WriteToGameCardDirectly&lt;br /&gt;
|-&lt;br /&gt;
| 210 || SetVerifyWriteEnalbleFlag&lt;br /&gt;
|-&lt;br /&gt;
| 211 || GetGameCardImageHash&lt;br /&gt;
|-&lt;br /&gt;
| 212 || [2.0.0+] GetGameCardDeviceIdForProdCard&lt;br /&gt;
|-&lt;br /&gt;
| 213 || [2.0.0+] EraseAndWriteParamDirectly&lt;br /&gt;
|-&lt;br /&gt;
| 214 || [2.0.0+] ReadParamDirectly&lt;br /&gt;
|-&lt;br /&gt;
| 215 || [2.0.0+] ForceEraseGameCard&lt;br /&gt;
|-&lt;br /&gt;
| 216 || [2.0.0+] GetGameCardErrorInfo&lt;br /&gt;
|-&lt;br /&gt;
| 217 || [2.1.0+] GetGameCardErrorReportInfo&lt;br /&gt;
|-&lt;br /&gt;
| 218 || [3.0.0+] GetGameCardDeviceId&lt;br /&gt;
|-&lt;br /&gt;
| 219 || [8.0.0+] ChallengeCardExistence&lt;br /&gt;
|-&lt;br /&gt;
| 300 || SetSpeedEmulationMode&lt;br /&gt;
|-&lt;br /&gt;
| 301 || GetSpeedEmulationMode&lt;br /&gt;
|-&lt;br /&gt;
| 400 || [5.0.0+] SuspendSdmmcControl&lt;br /&gt;
|-&lt;br /&gt;
| 401 || [5.0.0+] ResumeSdmmcControl&lt;br /&gt;
|-&lt;br /&gt;
| 402 || [6.0.0+] GetSdmmcConnectionStatus (Takes a total of 4-bytes of input, returns a total of 8-bytes of output)&lt;br /&gt;
|-&lt;br /&gt;
| 500 || [6.0.0+] SetDeviceSimulationEvent (Takes a total of 0x14-bytes of input, no output)&lt;br /&gt;
|-&lt;br /&gt;
| 501 || [6.0.0+] ClearDeviceSimulationEvent (Takes a total of 4-bytes of input, no output)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetGameCardUpdatePartitionInfo ==&lt;br /&gt;
Returns a titleID and the title-version for it.&lt;br /&gt;
&lt;br /&gt;
* Output u32 with ARMS-gamecard: title-version v131162. This is the title-version for [[2.1.0]], which is the sysupdate included with this gamecard. Launch-day gamecards return title-version v450.&lt;br /&gt;
* Output u64 with ARMS-gamecard: titleID 0100000000000816.&lt;br /&gt;
&lt;br /&gt;
[[NS_Services|NS]] appears to only use this with [[Content_Manager_services#GetTitleIdInfo]] and [[Content_Manager_services#GetUpdateTitleList]] with storageid=nandsys, for checking whether a sysupdate is required.&lt;br /&gt;
&lt;br /&gt;
= IEventNotifier =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::IEventNotifier&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetEventHandle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ISaveDataTransferManager =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataTransferManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetChallenge]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#SetToken]]&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [[#OpenSaveDataExporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [[#OpenSaveDataImporter]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[4.0.0]].&lt;br /&gt;
&lt;br /&gt;
== GetChallenge ==&lt;br /&gt;
No input/output, takes a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
== SetToken ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataExporter ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and u64, returns an [[#ISaveDataExporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporter ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and a 0x10-byte userID, and a type-0x5 input buffer. Returns an output u64 and an [[#ISaveDataImporter]].&lt;br /&gt;
&lt;br /&gt;
= ISaveDataExporter =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataExporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetSaveDataInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetRestSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#Pull]]&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [[#PullInitialData]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[4.0.0]].&lt;br /&gt;
&lt;br /&gt;
== GetSaveDataInfo ==&lt;br /&gt;
No input/output, takes a type-0x1A [[#SaveDataInfo]] output buffer.&lt;br /&gt;
&lt;br /&gt;
The actual name for this is the SaveDataExporter constructor. This is used automatically after [[#OpenSaveDataExporter]] by official sw.&lt;br /&gt;
&lt;br /&gt;
== GetRestSize ==&lt;br /&gt;
No input, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== Pull ==&lt;br /&gt;
Takes a type-0x6 output buffer, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== PullInitialData ==&lt;br /&gt;
No input/output, takes a type-0x6 output buffer.&lt;br /&gt;
&lt;br /&gt;
= ISaveDataImporter =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataImporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetSaveDataInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetRestSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#Push]]&lt;br /&gt;
|-&lt;br /&gt;
| 17 || [[#Finalize]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[4.0.0]].&lt;br /&gt;
&lt;br /&gt;
== GetSaveDataInfo ==&lt;br /&gt;
No input/output, takes a type-0x1A [[#GetSaveDataInfo]] output buffer.&lt;br /&gt;
&lt;br /&gt;
The actual name for this is the SaveDataImporter constructor. This is used automatically after [[#OpenSaveDataImporter]] by official sw.&lt;br /&gt;
&lt;br /&gt;
== GetRestSize ==&lt;br /&gt;
No input, returns an output u64.&lt;br /&gt;
&lt;br /&gt;
== Push ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer.&lt;br /&gt;
&lt;br /&gt;
== Finalize ==&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
= ISaveDataTransferManagerWithDivision =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataTransferManagerWithDivision&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#GetChallenge]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [[#SetKeySeedPackage]]&lt;br /&gt;
|-&lt;br /&gt;
| 32 || [[#OpenSaveDataExporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 33 || [[#OpenSaveDataExporterForDiffExport]]&lt;br /&gt;
|-&lt;br /&gt;
| 34 || [6.0.0+] [[#OpenSaveDataExporterByContext]]&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;| 64 || [5.0.0-5.1.0] OpenSaveDataImporter&lt;br /&gt;
|-&lt;br /&gt;
| [6.0.0+] [[#OpenSaveDataImporterDeprecated]]&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [[#OpenSaveDataImporterForDiffImport]]&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [6.0.0+] [[#OpenSaveDataImporterForDuplicateDiffImport]]&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [6.0.0+] [[#OpenSaveDataImporter]]&lt;br /&gt;
|-&lt;br /&gt;
| 68 || [6.0.0+] [[#OpenSaveDataImporterByContext]]&lt;br /&gt;
|-&lt;br /&gt;
| 69 || [6.0.0+] [[#CancelSuspendingImport]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
== GetChallenge ==&lt;br /&gt;
No input/output, takes a type-0x6 output buffer containing the &#039;&#039;&#039;Challenge&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== SetKeySeedPackage ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer containing the &#039;&#039;&#039;KeySeedPackage&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataExporter ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]] and u64. Returns an [[#ISaveDataDivisionExporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataExporterForDiffExport ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], an u64, and a type-0x5 input buffer [[#InitialDataVersion2]]. Returns an [[#ISaveDataDivisionExporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataExporterByContext ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer, returns an [[#ISaveDataDivisionExporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporterDeprecated ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], a 0x10-byte userID, and a type-0x5 input buffer [[#InitialDataVersion2]]. Returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporterForDiffImport ==&lt;br /&gt;
Takes an input u8 [[#SaveDataSpaceId]], an u64, and a type-0x5 input buffer [[#InitialDataVersion2]], returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporterForDuplicateDiffImport ==&lt;br /&gt;
Takes an input u8 and an u64, and a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporter ==&lt;br /&gt;
Takes an input u8, an u8(bool), a 0x10-byte struct, and a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== OpenSaveDataImporterByContext ==&lt;br /&gt;
No input/output, takes a type-0x5 input buffer, returns an [[#ISaveDataDivisionImporter]].&lt;br /&gt;
&lt;br /&gt;
== CancelSuspendingImport ==&lt;br /&gt;
Takes an input u64 and a 0x10-byte struct, no output.&lt;br /&gt;
&lt;br /&gt;
= ISaveDataDivisionExporter =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataDivisionExporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SetDivisionCount (Takes an input u32, no output)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [6.0.0+] GetSaveDataInfo (No input/output, takes a type-0x6 output buffer)&lt;br /&gt;
|-&lt;br /&gt;
| 16 || OpenSaveDataDiffChunkIterator (No input, returns an [[#ISaveDataChunkIterator]])&lt;br /&gt;
|-&lt;br /&gt;
| 48 || OpenSaveDataChunkExporter (Takes an input u32, returns an [[#ISaveDataChunkExporter]])&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [6.0.0+] FinalizeFullExport (No input, returns two 0x10-byte output structs)&lt;br /&gt;
|-&lt;br /&gt;
| 65 || [6.0.0+] FinalizeDiffExport (No input, returns an output 0x10-byte struct)&lt;br /&gt;
|-&lt;br /&gt;
| 66 || [6.0.0+] CancelExport (No input/output)&lt;br /&gt;
|-&lt;br /&gt;
| 67 || [6.0.0+] SuspendExport (No input/output, takes a type-0x6 output buffer)&lt;br /&gt;
|-&lt;br /&gt;
| 70 || [6.0.0+] GetKeySeed (No input, returns an output 0x10-byte struct)&lt;br /&gt;
|-&lt;br /&gt;
| 71 || [6.0.0+] GetInitialDataMac (No input, returns an output 0x10-byte struct)&lt;br /&gt;
|-&lt;br /&gt;
| 72 || [6.0.0+] FinalizeExport (No input/output)&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [6.0.0+] GetImportInitialDataAad (No input, returns an output 0x20-byte struct)&lt;br /&gt;
|-&lt;br /&gt;
| 81 || [6.0.0+] SetExportInitialDataAad (Takes an input 0x20-byte struct, no output)&lt;br /&gt;
|-&lt;br /&gt;
| 96 || [6.0.0+] GetReportInfo (No input, returns an output 0x20-byte struct)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
= ISaveDataDivisionImporter =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataDivisionImporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [6.0.0+] GetSaveDataInfo (No input/output, takes a type-0x6 output buffer)&lt;br /&gt;
|-&lt;br /&gt;
| 16 || OpenSaveDataDiffChunkIterator (No input, returns an [[#ISaveDataChunkIterator]])&lt;br /&gt;
|-&lt;br /&gt;
| 32 || InitializeImport (No input, returns an output u64)&lt;br /&gt;
|-&lt;br /&gt;
| 33 || FinalizeImport (No input/output)&lt;br /&gt;
|-&lt;br /&gt;
| 34 || [6.0.0+] CancelImport (No input/output)&lt;br /&gt;
|-&lt;br /&gt;
| 35 || [6.0.0+] GetImportContext (No input/output, takes a type-0x6 output buffer)&lt;br /&gt;
|-&lt;br /&gt;
| 36 || [6.0.0+] SuspendImport (No input/output)&lt;br /&gt;
|-&lt;br /&gt;
| 48 || OpenSaveDataChunkImporter (Takes an input u32, returns an [[#ISaveDataChunkImporter]])&lt;br /&gt;
|-&lt;br /&gt;
| 64 || [6.0.0+] GetImportInitialDataAad (No input, returns an output 0x20-byte struct)&lt;br /&gt;
|-&lt;br /&gt;
| 80 || [6.0.0+] GetReportInfo (No input, returns an output 0x20-byte struct)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
= ISaveDataChunkIterator =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataChunkIterator&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Next (No input/output)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || IsEnd (No input, returns an output u8)&lt;br /&gt;
|-&lt;br /&gt;
| 16 || GetId (No input, returns an output u32)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
= ISaveDataChunkExporter =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataChunkExporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Pull (Takes an input u64 and a type-0x6 output buffer, returns an output u64)&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [6.0.0+] GetRestRawDataSize (No input, returns an output u64)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
= ISaveDataChunkImporter =&lt;br /&gt;
This is &amp;quot;nn::fssrv::sf::ISaveDataChunkImporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Push (Takes an input u64 and a type-0x5 input buffer, no output)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[5.0.0]].&lt;br /&gt;
&lt;br /&gt;
= ISaveDataTransferProhibiter =&lt;br /&gt;
This was added with [[6.0.0]].&lt;br /&gt;
&lt;br /&gt;
This doesn&#039;t seem to handle any commands (?).&lt;br /&gt;
&lt;br /&gt;
= IMultiCommitManager =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Add (Takes an input [[#IFilesystem]], no output)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Commit (No input/output)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This was added with [[6.0.0]].&lt;br /&gt;
&lt;br /&gt;
= FileSystemType =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Code&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Data&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Logo&lt;br /&gt;
|-&lt;br /&gt;
| 3 || ContentControl&lt;br /&gt;
|-&lt;br /&gt;
| 4 || ContentManual&lt;br /&gt;
|-&lt;br /&gt;
| 5 || ContentMeta&lt;br /&gt;
|-&lt;br /&gt;
| 6 || ContentData&lt;br /&gt;
|-&lt;br /&gt;
| 7 || ApplicationPackage&lt;br /&gt;
|-&lt;br /&gt;
| 8 || RegisteredUpdate&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= StorageId =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || None&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Host&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GameCard&lt;br /&gt;
|-&lt;br /&gt;
| 3 || NandSystem&lt;br /&gt;
|-&lt;br /&gt;
| 4 || NandUser&lt;br /&gt;
|-&lt;br /&gt;
| 5 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentStorageId =&lt;br /&gt;
This is &amp;quot;nn::fs::ContentStorageId&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || System&lt;br /&gt;
|-&lt;br /&gt;
| 1 || User&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= SaveDataSpaceId =&lt;br /&gt;
This is &amp;quot;nn::fs::SaveDataSpaceId&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || System&lt;br /&gt;
|-&lt;br /&gt;
| 1 || User&lt;br /&gt;
|-&lt;br /&gt;
| 2 || SdSystem&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [3.0.0+] ProperSystem&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Determines the storage where the savedata is stored.&lt;br /&gt;
&lt;br /&gt;
= SaveDataType =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || SystemSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SaveData&lt;br /&gt;
|-&lt;br /&gt;
| 2 || BcatDeliveryCacheStorage&lt;br /&gt;
|-&lt;br /&gt;
| 3 || DeviceSaveData&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [3.0.0+] TemporaryStorage&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [3.0.0+] CacheStorage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ImageDirectoryId =&lt;br /&gt;
This is &amp;quot;nn::fs::ImageDirectoryId&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Nand&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CloudBackupWorkStorageId =&lt;br /&gt;
This is &amp;quot;nn::fs::CloudBackupWorkStorageId&amp;quot;.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Nand&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= CustomStorageId =&lt;br /&gt;
This is &amp;quot;nn::fs::CustomStorageId&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Nand&lt;br /&gt;
|-&lt;br /&gt;
| 1 || SdCard&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ContentPath =&lt;br /&gt;
These are the 0x300 paths to NCA files for the various filesystems FS can access, beginning with @. They&#039;re passed via X descriptors, and returned via various [[Location Resolver services|ncm/lr]] commands.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Path || Notes&lt;br /&gt;
|-&lt;br /&gt;
| @SystemContent ||&lt;br /&gt;
|- &lt;br /&gt;
| @UserContent ||&lt;br /&gt;
|-&lt;br /&gt;
| @SdCardContent ||&lt;br /&gt;
|-&lt;br /&gt;
| @CalibFile ||&lt;br /&gt;
|-&lt;br /&gt;
| @Safe ||&lt;br /&gt;
|-&lt;br /&gt;
| @User ||&lt;br /&gt;
|-&lt;br /&gt;
| @System ||&lt;br /&gt;
|-&lt;br /&gt;
| @Sdcard ||&lt;br /&gt;
|-&lt;br /&gt;
| @Host ||&lt;br /&gt;
|-&lt;br /&gt;
| @GcApp || Gamecard App partition (Partition 2)&lt;br /&gt;
|-&lt;br /&gt;
| @GcXYYYYYYYY || Gamecard Contents. X is the partition type (U - Update, N - Normal, S - Secure). Y is the gamecard handle as a 32-bit hex value &lt;br /&gt;
|-&lt;br /&gt;
| @upp || Gamecard update partition (Partition 0)&lt;br /&gt;
|-&lt;br /&gt;
| [4.0.0+] @RegUpdate || Registered update partition&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Save Struct =&lt;br /&gt;
This is &amp;quot;nn::fs::SaveDataAttribute&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData. SaveData: 0 can be used for accessing the savedata associated with the current FS session titleID, otherwise when set this is the titleID associated with the savedata to access.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x10&lt;br /&gt;
| userID for user-specific savedata(saveuser) when set, otherwise when zero this indicates the common savedata(savecommon). This is loaded from [[Account_services]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| u64 [[Flash_Filesystem|saveID]]. 0 for SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[#SaveDataType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x21&lt;br /&gt;
| 0x1&lt;br /&gt;
| Save data &#039;rank&#039; or &#039;precedence&#039;. 0 if this save data is considered the primary save data. 1 if it&#039;s considered the secondary save data.&lt;br /&gt;
|-&lt;br /&gt;
| 0x22&lt;br /&gt;
| 0x2&lt;br /&gt;
| Save data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x4&lt;br /&gt;
| Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0 for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
For DeviceSaveData, this struct is all-zero except for the [[#SaveDataType]] field.&lt;br /&gt;
&lt;br /&gt;
= SaveCreate Struct =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| Save data size.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x8&lt;br /&gt;
| Save data journal size.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x8&lt;br /&gt;
| Save data block size. 0x4000 for SystemSaveData/SaveData/DeviceSaveData/BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x8&lt;br /&gt;
| Save data owner id. Official user-processes only uses 0 here for SystemSaveData/SaveData. For the dedicated save-creation code with SaveData/DeviceSaveData, this value comes from an input param with official user-processes. For BcatSaveData, this is the hard-coded [[Title_list|titleID]] of the bcat-sysmodule.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x4&lt;br /&gt;
| Save data flags. Written using an input param for official user-processes. Hard-coded 0 for BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[#SaveDataSpaceId]]. Official user-processes only uses 0 here for SystemSaveData, 1 for SaveData/DeviceSaveData/BcatSaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x25&lt;br /&gt;
| 0x1&lt;br /&gt;
| Unknown. 0 for SystemSaveData/SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x26&lt;br /&gt;
| 0x1A&lt;br /&gt;
| Not initialized for SystemSaveData/SaveData.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Total size is 0x40-bytes.&lt;br /&gt;
&lt;br /&gt;
= DeviceSaveData =&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8, the only difference compared to SaveData is the Save-struct.&lt;br /&gt;
&lt;br /&gt;
= BcatSaveData =&lt;br /&gt;
This is accessed using the same commands for SaveData with the same input u8. The Save-struct is the same as DeviceSaveData, except that the titleID field is set to &amp;lt;input titleID&amp;gt;. See above regarding SaveCreate-struct.&lt;br /&gt;
&lt;br /&gt;
The 0x10-byte struct passed to [[#CreateSaveDataFileSystem]] has the first 0x5-bytes set to all-zero.&lt;br /&gt;
&lt;br /&gt;
= SaveDataInfo =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| Unknown saveID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[#SaveDataSpaceId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[#SaveDataType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| 0x6&lt;br /&gt;
| Padding?&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x10&lt;br /&gt;
| userID&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x8&lt;br /&gt;
| saveID, 0 for regular SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x8&lt;br /&gt;
| Application titleID, for regular SaveData.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x8&lt;br /&gt;
| Raw saveimage size&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x2&lt;br /&gt;
| Save data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x3A&lt;br /&gt;
| 0x1&lt;br /&gt;
| Save data &#039;rank&#039; or &#039;precedence&#039;. 0 if this save data is considered the primary save data. 1 if it&#039;s considered the secondary save data.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B&lt;br /&gt;
| 0x25&lt;br /&gt;
| Unknown. Usually zeros?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x60-byte struct.&lt;br /&gt;
&lt;br /&gt;
= SaveDataFileSystemExtraData =&lt;br /&gt;
This is a 0x200-byte struct. Appears to match [[Savegames#Extra_data]].&lt;br /&gt;
&lt;br /&gt;
= InitialDataVersion2 =&lt;br /&gt;
This is a 0x8210-byte struct used by [[#ISaveDataTransferManagerWithDivision]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Paeton</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Shared_Database_services&amp;diff=7618</id>
		<title>Shared Database services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Shared_Database_services&amp;diff=7618"/>
		<updated>2019-09-02T16:25:10Z</updated>

		<summary type="html">&lt;p&gt;Paeton: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= pl:u =&lt;br /&gt;
This is &amp;quot;nn::pl::detail::IPlatformServiceManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#RequestSharedFontLoad]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetSharedFontLoadState]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#GetSharedFontSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#GetSharedFontAddress]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#GetSharedFontSharedMemoryHandle]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#GetSharedFontInOrderOfPriority]]&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [4.0.0+] GetSharedFontInOrderOfPriorityForSystem&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [8.0.0+] RequestApplicationFunctionAuthorization&lt;br /&gt;
|-&lt;br /&gt;
| 101 || [8.0.0+] RequestApplicationFunctionAuthorizationForSystem&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RequestSharedFontLoad ==&lt;br /&gt;
Takes a [[#SharedFontType]] (uint32), no output.&lt;br /&gt;
&lt;br /&gt;
== GetSharedFontLoadState ==&lt;br /&gt;
Takes a [[#SharedFontType]] (uint32), returns the [[#LoadState]] (uint32).&lt;br /&gt;
&lt;br /&gt;
=== LoadState ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Loading&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Loaded&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetSharedFontSize ==&lt;br /&gt;
Takes a [[#SharedFontType]] (uint32), returns the Font Size (uint32).&lt;br /&gt;
&lt;br /&gt;
== GetSharedFontAddress ==&lt;br /&gt;
Takes a [[#SharedFontType]] (uint32), returns the offset (uint32) to the Font Address.&lt;br /&gt;
&lt;br /&gt;
== GetSharedFontSharedMemoryHandle ==&lt;br /&gt;
No input, returns an output SharedMemory handle.&lt;br /&gt;
&lt;br /&gt;
User-processes map this SharedMemory with size=0x1100000 and permissions=R--.&lt;br /&gt;
&lt;br /&gt;
Font data is TTF, located at the offset returned by [[#GetSharedFontAddress]].&lt;br /&gt;
&lt;br /&gt;
== GetSharedFontInOrderOfPriority ==&lt;br /&gt;
Takes an input u64 [[Settings_services#LanguageCode|LanguageCode]] and 3 type-0x6 output buffers, returns an output u8 and u32. The u8 is a bool to specify if the fonts are loaded or not and the u32 is the font count.&lt;br /&gt;
The first buffer contains a list of [[#SharedFontType|Shared font types]], the second buffer contains the font offsets and the final buffer contains the font sizes.&lt;br /&gt;
The buffers are an array of u32s which specify information about a specific font. Buffer1[n] is related to Buffer2[n] and Buffer3[n].&lt;br /&gt;
Example: Font index 0s offset is at Buffer2[0], size is at Buffer3[0].&lt;br /&gt;
The fonts are relative to the shared memory created by [[#GetSharedFontSharedMemoryHandle]]&lt;br /&gt;
&lt;br /&gt;
== SharedFontType ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Japan, US and Europe (Standard)&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Chinese Simplified&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Extended Chinese Simplified&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Chinese Traditional&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Korean (Hangul)&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Nintendo Extended&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Nintendo Extended: Contains Nintendo-specific characters, including HID buttons, HID controller styles, applet icons, Wii(U) icons,  etc.&lt;br /&gt;
&lt;br /&gt;
= mii:u, mii:e =&lt;br /&gt;
This is &amp;quot;nn::mii::detail::IStaticService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetDatabaseService&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IDatabaseService ==&lt;br /&gt;
This is &amp;quot;nn::mii::detail::IDatabaseService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || IsUpdated&lt;br /&gt;
|-&lt;br /&gt;
| 1 || IsFullDatabase&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetCount&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Get&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Get1&lt;br /&gt;
|-&lt;br /&gt;
| 5 || UpdateLatest&lt;br /&gt;
|-&lt;br /&gt;
| 6 || BuildRandom&lt;br /&gt;
|-&lt;br /&gt;
| 7 || BuildDefault&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Get2&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Get3&lt;br /&gt;
|-&lt;br /&gt;
| 10 || UpdateLatest1&lt;br /&gt;
|-&lt;br /&gt;
| 11 || FindIndex&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Move&lt;br /&gt;
|-&lt;br /&gt;
| 13 || AddOrReplace&lt;br /&gt;
|-&lt;br /&gt;
| 14 || Delete&lt;br /&gt;
|-&lt;br /&gt;
| 15 || DestroyFile&lt;br /&gt;
|-&lt;br /&gt;
| 16 || DeleteFile&lt;br /&gt;
|-&lt;br /&gt;
| 17 || Format&lt;br /&gt;
|-&lt;br /&gt;
| 18 || Import&lt;br /&gt;
|-&lt;br /&gt;
| 19 || Export&lt;br /&gt;
|-&lt;br /&gt;
| 20 || IsBrokenDatabaseWithClearFlag&lt;br /&gt;
|-&lt;br /&gt;
| 21 || GetIndex&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [5.0.0+] SetInterfaceVersion&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [5.0.0+] Convert&lt;br /&gt;
|-&lt;br /&gt;
| 24 || [7.0.0+] ConvertCoreDataToCharInfo&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [7.0.0+] ConvertCharInfoToCoreData&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= miiimg =&lt;br /&gt;
This is &amp;quot;nn::mii::detail::IImageDatabaseService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [5.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Initialize&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Reload&lt;br /&gt;
|-&lt;br /&gt;
| 11 || GetCount&lt;br /&gt;
|-&lt;br /&gt;
| 12 || IsEmpty&lt;br /&gt;
|-&lt;br /&gt;
| 13 || IsFull&lt;br /&gt;
|-&lt;br /&gt;
| 14 || GetAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 15 || LoadImage&lt;br /&gt;
|-&lt;br /&gt;
| 16 || AddOrUpdateImage&lt;br /&gt;
|-&lt;br /&gt;
| 17 || DeleteImages&lt;br /&gt;
|-&lt;br /&gt;
| 100 || DeleteFile&lt;br /&gt;
|-&lt;br /&gt;
| 101 || DestroyFile&lt;br /&gt;
|-&lt;br /&gt;
| 102 || ImportFile&lt;br /&gt;
|-&lt;br /&gt;
| 103 || ExportFile&lt;br /&gt;
|-&lt;br /&gt;
| 104 || ForceInitialize&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= pdm:ntfy =&lt;br /&gt;
This is &amp;quot;nn::pdm::detail::INotifyService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#NotifyAppletEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#NotifyOperationModeChangeEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#NotifyPowerStateChangeEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#NotifyClearAllEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#NotifyEventForDebug]]&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [4.0.0+] SuspendUserAccountEventService&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [4.0.0+] ResumeUserAccountEventService&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [8.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== NotifyAppletEvent ==&lt;br /&gt;
Takes an input u8 [[#AppletEventType]], an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an u8 [[#PlayLogPolicy]], an u32 &#039;&#039;&#039;event_x8&#039;&#039;&#039;, and an u64 &#039;&#039;&#039;titleID&#039;&#039;&#039;. Returns no output.&lt;br /&gt;
&lt;br /&gt;
When [[#PlayLogPolicy]] is 2 (&amp;quot;None&amp;quot;) this will immediately return 0.&lt;br /&gt;
&lt;br /&gt;
Logs a new [[#PlayEvent]] with the following data:&lt;br /&gt;
* Clears the 0x10-bytes at +0x10.&lt;br /&gt;
* u8 +0xF = [[#AppletEventType]].&lt;br /&gt;
* Sets the 3 timestamps.&lt;br /&gt;
* Converts &#039;&#039;&#039;titleID&#039;&#039;&#039; and writes it to +0x0.&lt;br /&gt;
* u32 +0x8 = &#039;&#039;&#039;event_x8&#039;&#039;&#039;.&lt;br /&gt;
* u8 +0xC = [[Applet_Manager_services#AppletId|AppletId]], u8 +0xD = [[Filesystem_services#StorageId|StorageId]], and u8 +0xE = [[#PlayLogPolicy]].&lt;br /&gt;
&lt;br /&gt;
After the initial logging, additional code runs with some of the above input params.&lt;br /&gt;
&lt;br /&gt;
== NotifyOperationModeChangeEvent ==&lt;br /&gt;
Takes an input u8 &#039;&#039;&#039;inval&#039;&#039;&#039;, no output.&lt;br /&gt;
&lt;br /&gt;
Logs a new [[#PlayEvent]] with the following data: clears the 0x20-bytes at +0x0, u8 +0x1C = 0x3, u8 +0x0 = &#039;&#039;&#039;inval&#039;&#039;&#039;, and sets the 3 timestamps.&lt;br /&gt;
&lt;br /&gt;
== NotifyPowerStateChangeEvent ==&lt;br /&gt;
Takes an input u8 &#039;&#039;&#039;inval&#039;&#039;&#039;, no output.&lt;br /&gt;
&lt;br /&gt;
Logs a new [[#PlayEvent]] with the following data: clears the 0x20-bytes at +0x0, u8 +0x1C = 0x2, u8 +0x0 = &#039;&#039;&#039;inval&#039;&#039;&#039;, and sets the 3 timestamps.&lt;br /&gt;
&lt;br /&gt;
After the initial logging, additional code runs which uses &#039;&#039;&#039;inval&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== NotifyClearAllEvent ==&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
== NotifyEventForDebug ==&lt;br /&gt;
Takes an input type-0x5 buffer containing an array of [[#PlayEvent]], no output.&lt;br /&gt;
&lt;br /&gt;
Gets the [[System_Settings|system-setting]] &amp;lt;code&amp;gt;pdm!is_production&amp;lt;/code&amp;gt;, the size must be 1 and the value must be 0, otherwise an error is returned.&lt;br /&gt;
&lt;br /&gt;
Each [[#PlayEvent]] entry is validated, throwing an error on failure. After an entry is successfully validated, it is written to the log.&lt;br /&gt;
&lt;br /&gt;
== Cmd8 ==&lt;br /&gt;
Takes an input u8 [[#AppletEventType]], an u8 [[Applet_Manager_services#LibraryAppletMode|LibraryAppletMode]], an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an u8 [[#PlayLogPolicy]], and an u64 &#039;&#039;&#039;titleID&#039;&#039;&#039;. Returns no output.&lt;br /&gt;
&lt;br /&gt;
This is similar to [[#NotifyAppletEvent]].&lt;br /&gt;
&lt;br /&gt;
When [[#PlayLogPolicy]] is 2 (&amp;quot;None&amp;quot;) this will immediately return 0.&lt;br /&gt;
&lt;br /&gt;
Logs a new [[#PlayEvent]] with the following data:&lt;br /&gt;
* Clears the 0x20-bytes at +0x0.&lt;br /&gt;
* u8 +0xF = [[#AppletEventType]].&lt;br /&gt;
* Sets the 3 timestamps.&lt;br /&gt;
* Converts &#039;&#039;&#039;titleID&#039;&#039;&#039; and writes it to +0x0.&lt;br /&gt;
* u8 +0x9 = [[Applet_Manager_services#LibraryAppletMode|LibraryAppletMode]].&lt;br /&gt;
* u8 +0x8 = 1.&lt;br /&gt;
* u8 +0xC = [[Applet_Manager_services#AppletId|AppletId]], u8 +0xD = [[Filesystem_services#StorageId|StorageId]], and u8 +0xE = [[#PlayLogPolicy]].&lt;br /&gt;
&lt;br /&gt;
After the initial logging, additional code runs with some of the above input params. This is handled the same as [[#NotifyAppletEvent]], except that the value passed for &#039;&#039;&#039;event_x8&#039;&#039;&#039; is value 0 here.&lt;br /&gt;
&lt;br /&gt;
== Cmd9 ==&lt;br /&gt;
Takes an input u8 [[#AppletEventType]], an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an 0x20-byte struct, an u8 bool flag, an u8 [[#PlayLogPolicy]], an u32 &#039;&#039;&#039;event_x8&#039;&#039;&#039;, and an u64 &#039;&#039;&#039;titleID&#039;&#039;&#039;. Returns no output.&lt;br /&gt;
&lt;br /&gt;
This is identical to [[#NotifyAppletEvent]] except for the additional struct/flag params.&lt;br /&gt;
&lt;br /&gt;
After the initial logging, additional code runs with some of the above input params. This is handled the same as [[#NotifyAppletEvent]], except that when the u8 bool flag is set the input struct is used with this.&lt;br /&gt;
&lt;br /&gt;
= pdm:qry =&lt;br /&gt;
This is &amp;quot;nn::pdm::detail::IQueryService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#QueryApplicationEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 1 || QueryPlayStatistics&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 2 || QueryPlayStatisticsByUserAccountId&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 3 || QueryPlayStatisticsByNetworkServiceAccountId&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#QueryPlayStatisticsByApplicationId]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#QueryPlayStatisticsByApplicationIdAndUserAccountId]]&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 6 || QueryPlayStatisticsByApplicationIdAndNetworkServiceAccountId&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#QueryLastPlayTime]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [[#QueryPlayEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#GetAvailablePlayEventRange]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#QueryAccountEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [4.0.0+] [[#QueryAccountPlayEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [4.0.0+] [[#GetAvailableAccountPlayEventRange]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [5.0.0+] [[#QueryApplicationPlayStatisticsForSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [6.0.0+] [[#QueryRecentlyPlayedApplication]]&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [6.0.0+] [[#GetRecentlyPlayedApplicationUpdateEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [6.0.0+] [[#QueryApplicationPlayStatisticsByUserAccountIdForSystem]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== QueryApplicationEvent ==&lt;br /&gt;
Takes an input u32 entryindex, a type-0x6 output buffer containing an array of [[#ApplicationEvent]], and returns an output s32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
== QueryPlayStatisticsByApplicationId ==&lt;br /&gt;
Takes an input u64 titleID and returns an output [[#PlayStatistics]].&lt;br /&gt;
&lt;br /&gt;
== QueryPlayStatisticsByApplicationIdAndUserAccountId ==&lt;br /&gt;
Takes an input u64 titleID, an input u128 userID, and returns an output [[#PlayStatistics]].&lt;br /&gt;
&lt;br /&gt;
== QueryLastPlayTime ==&lt;br /&gt;
Takes a type-0x6 output buffer containing an array of [[#LastPlayTime]], and a type-0x5 input buffer containing an array of u64 titleIDs. Returns an output s32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
== QueryPlayEvent ==&lt;br /&gt;
Takes an input u32 entryindex, a type-0x6 output buffer containing an array of [[#PlayEvent]], and returns an output u32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
== GetAvailablePlayEventRange ==&lt;br /&gt;
No input, returns 3 output u32s: total_entries, start_entryindex, and end_entryindex.&lt;br /&gt;
&lt;br /&gt;
== QueryAccountEvent ==&lt;br /&gt;
Takes an input u32 entryindex, a type-0x6 output buffer containing an array of [[#AccountEvent]], and returns an output s32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
== QueryAccountPlayEvent ==&lt;br /&gt;
Takes an input u32 entryoffset, an input u128 userID, a type-0x6 output buffer containing an array of [[#AccountPlayEvent]], and returns an output u32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
== GetAvailableAccountPlayEventRange ==&lt;br /&gt;
Takes an input u128 userID and returns 3 output u32s: total_entries, start_entryindex, and end_entryindex.&lt;br /&gt;
&lt;br /&gt;
== QueryApplicationPlayStatisticsForSystem ==&lt;br /&gt;
Takes a type-0x6 output buffer containing an array of [[#ApplicationPlayStatistics]] and a type-0x5 input buffer containing an array of u64 titleIDs. Returns an output s32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
The number of entries in each array is the same.&lt;br /&gt;
&lt;br /&gt;
== QueryRecentlyPlayedApplication ==&lt;br /&gt;
Takes an input u128 userID, a type-0x6 output buffer containing an array of u64 titleIDs, and returns an output u32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
Returns a list of titles played by the specified user.&lt;br /&gt;
&lt;br /&gt;
== GetRecentlyPlayedApplicationUpdateEvent ==&lt;br /&gt;
No input, returns an output Event handle with autoclear=false.&lt;br /&gt;
&lt;br /&gt;
This is signaled when logging a new [[#PlayEvent]] which would be available via [[#QueryAccountEvent]], where [[#PlayEvent]] +0x18 is 0.&lt;br /&gt;
&lt;br /&gt;
== QueryApplicationPlayStatisticsByUserAccountIdForSystem ==&lt;br /&gt;
Takes a u128 userID, a type-0x6 output buffer containing an array of [[#ApplicationPlayStatistics]] and a type-0x5 input buffer containing an array of u64 titleIDs. Returns an output s32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
Same as [[#QueryApplicationPlayStatisticsForSystem]] except this gets playstats specific to userIDs.&lt;br /&gt;
&lt;br /&gt;
= avm =&lt;br /&gt;
This is &amp;quot;nn::avm::srv::IAvmService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [6.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 100 || &lt;br /&gt;
|-&lt;br /&gt;
| 101 || &lt;br /&gt;
|-&lt;br /&gt;
| 102 || &lt;br /&gt;
|-&lt;br /&gt;
| 103 || No input, returns an [[#IVersionListImporter]].&lt;br /&gt;
|-&lt;br /&gt;
| 200 || &lt;br /&gt;
|-&lt;br /&gt;
| 202 || &lt;br /&gt;
|-&lt;br /&gt;
| 1000 || &lt;br /&gt;
|-&lt;br /&gt;
| 1001 || &lt;br /&gt;
|-&lt;br /&gt;
| 1002 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IVersionListImporter ==&lt;br /&gt;
This is &amp;quot;nn::avm::srv::IVersionListImporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [6.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ApplicationEvent =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8 || titleID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x4 || entryindex&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x4 || timestamp0&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x4 || timestamp1&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x1 || [[#PlayEvent]] +0xF&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0x3 || Padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x18-byte struct.&lt;br /&gt;
&lt;br /&gt;
Timestamp format, converted from PosixTime: total minutes since epoch UTC 1999/12/31 00:00.&lt;br /&gt;
&lt;br /&gt;
= PlayStatistics =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8 || titleID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x4 || First entryindex&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x4 || First timestamp0. Same as the first [[#ApplicationEvent]] timestamp.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x4 || First timestamp1. Same as the second [[#ApplicationEvent]] timestamp.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x4 || Last entryindex&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x4 || Last timestamp0. Same as the first [[#ApplicationEvent]] timestamp.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || 0x4 || Last timestamp1. Same as the second [[#ApplicationEvent]] timestamp.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x4 || Total play-time in minutes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || 0x4 || Total times the application title was launched.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x28-byte struct.&lt;br /&gt;
&lt;br /&gt;
= LastPlayTime =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8 || titleID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x4 || Same as the first [[#ApplicationEvent]] timestamp.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x4 || Same as the second [[#ApplicationEvent]] timestamp.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x4 || Total minutes since the title was last played.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x1 || Flag indicating whether the above field is set.&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0x3 || Padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x18-byte struct. This contains data from the last time the title was played.&lt;br /&gt;
&lt;br /&gt;
= PlayEventType =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Applet&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Account&lt;br /&gt;
|-&lt;br /&gt;
| 2 || PowerStateChange&lt;br /&gt;
|-&lt;br /&gt;
| 3 || OperationModeChange&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Initialize. Used for the very first [[#PlayEvent]] entry in the log.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is an enum for [[#PlayEvent]] +0x1C, which indicates the type of [[#PlayEvent]].&lt;br /&gt;
&lt;br /&gt;
= AppletEventType =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &amp;quot;launch&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || &amp;quot;exit&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2 || &amp;quot;in_focus&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || &amp;quot;out_of_focus&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 4 || &amp;quot;out_of_focus&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 5 || &amp;quot;exit&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 6 || &amp;quot;exit&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is an enum for [[#PlayEvent]] +0xF with [[#PlayEventType]] = Applet, this indicates the type of the Applet event.&lt;br /&gt;
&lt;br /&gt;
= PlayLogPolicy =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Meaning&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || All || All pdm:qry cmds which require [[#PlayEventType]] = Applet and AppletId = Application will only return the entry when PlayLogPolicy matches this value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || LogOnly || The above commands will filter out the entry with this.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || None || pdm:ntfy [[#NotifyAppletEvent]], [[#Cmd8]], and [[#Cmd9]] will immediately return 0 when the input param matches this value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is an enum for [[#PlayEvent]] +0xE with [[#PlayEventType]] = Applet. This is set via the above commands, which uses this as an input param.&lt;br /&gt;
&lt;br /&gt;
= PlayEvent =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || 0x1 || [[#PlayEventType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || 0x3 || Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x8 || PosixTime timestamp from [[PCV_services|StandardUserSystemClock]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || 0x8 || PosixTime timestamp from [[PCV_services|StandardNetworkSystemClock]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || 0x8 || Timestamp in seconds derived from [[PCV_services|StandardSteadyClock]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x38-byte struct.&lt;br /&gt;
&lt;br /&gt;
This is the raw entry struct directly read from FS, without any entry filtering. The other structs are extracted+converted from this one, with filtering.&lt;br /&gt;
&lt;br /&gt;
Filtering:&lt;br /&gt;
* [[#QueryApplicationEvent]], [[#QueryLastPlayTime]], and [[#QueryApplicationPlayStatisticsForSystem]]: PlayEvent +0x1C must be 0, +0xC must be 1, and +0xE must be 0.&lt;br /&gt;
* [[#QueryPlayStatisticsByApplicationId]]: PlayEvent +0x1C must be 0, +0xC must be 1, and the titleID must match.&lt;br /&gt;
* [[#QueryAccountEvent]]: PlayEvent +0x1C must be 1 and PlayEvent +0x18 must be &amp;lt;=1.&lt;br /&gt;
* [[#QueryApplicationPlayStatisticsForSystem]]: In addition to the above, this also handles [[#PlayEventType]] PowerStateChange, where PlayEvent +0x0 is value 0 or 1.&lt;br /&gt;
&lt;br /&gt;
The structure of the first 0x1C-bytes are determined by [[#PlayEventType]]. For titleIDs/userIDs, the low/high u32 in each u64 is swapped.&lt;br /&gt;
&lt;br /&gt;
Applet:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8 || titleID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x4 || Title version, set by pdm:ntfy [[#NotifyAppletEvent]] and [[#Cmd9]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x1 || When set to u8 0x1 by pdm:ntfy [[#Cmd8]], this indicates that +0x9 is set. Only used for non-applications.&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x1 || See above. [[Applet_Manager_services#LibraryAppletMode|LibraryAppletMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x1 || [[Applet_Manager_services#AppletId|AppletId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x1 || [[Filesystem_services#StorageId|StorageId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0x1 || [[#PlayLogPolicy]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x1 || [[#AppletEventType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0xC || Unused&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Account:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x10 || userID&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8 || titleID, when u8 +0x18 = 2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x1 || Type. 0-1 to be listed by [[#QueryAccountEvent]], or 2 to include the above titleID.&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || 0x3 || Padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
PlayEventType PowerStateChange/OperationModeChange: u8 +0x0 is the input value from [[#NotifyOperationModeChangeEvent]]/[[#NotifyPowerStateChangeEvent]], the rest is unused.&lt;br /&gt;
&lt;br /&gt;
= AccountEvent =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x10 || userID&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x4 || entryindex&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x4 || Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x8 || [[#PlayEvent]] +0x20&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x8 || [[#PlayEvent]] +0x28&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || 0x8 || [[#PlayEvent]] +0x30&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || 0x1 || [[#PlayEvent]] +0x18&lt;br /&gt;
|-&lt;br /&gt;
| 0x31 || 0x7 || Padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x38-byte struct.&lt;br /&gt;
&lt;br /&gt;
= AccountPlayEvent =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x4 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x8 || titleID, with the u32 low/high words swapped.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0xC || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x8 || POSIX timestamp&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x8 || POSIX timestamp&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x28-byte struct.&lt;br /&gt;
&lt;br /&gt;
This is the raw entry struct directly read from FS, without any entry filtering. This is separate from [[#PlayEvent]].&lt;br /&gt;
&lt;br /&gt;
= ApplicationPlayStatistics =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8 || titleID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8 || Total play-time in nanoseconds.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8 || Total times the application title was launched.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is &amp;quot;nn::pdm::ApplicationPlayStatistics&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This is a 0x18-byte struct.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Paeton</name></author>
	</entry>
	<entry>
		<id>https://switchbrew.org/w/index.php?title=Shared_Database_services&amp;diff=7617</id>
		<title>Shared Database services</title>
		<link rel="alternate" type="text/html" href="https://switchbrew.org/w/index.php?title=Shared_Database_services&amp;diff=7617"/>
		<updated>2019-09-02T16:15:45Z</updated>

		<summary type="html">&lt;p&gt;Paeton: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= pl:u =&lt;br /&gt;
This is &amp;quot;nn::pl::detail::IPlatformServiceManager&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#RequestSharedFontLoad]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || [[#GetSharedFontLoadState]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#GetSharedFontSize]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#GetSharedFontAddress]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#GetSharedFontSharedMemoryHandle]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#GetSharedFontInOrderOfPriority]]&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [4.0.0+] GetSharedFontInOrderOfPriorityForSystem&lt;br /&gt;
|-&lt;br /&gt;
| 100 || [8.0.0+] RequestApplicationFunctionAuthorization&lt;br /&gt;
|-&lt;br /&gt;
| 101 || [8.0.0+] RequestApplicationFunctionAuthorizationForSystem&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RequestSharedFontLoad ==&lt;br /&gt;
Takes a [[#SharedFontType]] (uint32), no output.&lt;br /&gt;
&lt;br /&gt;
== GetSharedFontLoadState ==&lt;br /&gt;
Takes a [[#SharedFontType]] (uint32), returns the [[#LoadState]] (uint32).&lt;br /&gt;
&lt;br /&gt;
=== LoadState ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Loading&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Loaded&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GetSharedFontSize ==&lt;br /&gt;
Takes a [[#SharedFontType]] (uint32), returns the Font Size (uint32).&lt;br /&gt;
&lt;br /&gt;
== GetSharedFontAddress ==&lt;br /&gt;
Takes a [[#SharedFontType]] (uint32), returns the offset (uint32) to the Font Address.&lt;br /&gt;
&lt;br /&gt;
== GetSharedFontSharedMemoryHandle ==&lt;br /&gt;
No input, returns an output SharedMemory handle.&lt;br /&gt;
&lt;br /&gt;
User-processes map this SharedMemory with size=0x1100000 and permissions=R--.&lt;br /&gt;
&lt;br /&gt;
Font data is TTF, located at the offset returned by [[#GetSharedFontAddress]].&lt;br /&gt;
&lt;br /&gt;
== GetSharedFontInOrderOfPriority ==&lt;br /&gt;
Takes an input u64 [[Settings_services#LanguageCode|LanguageCode]] and 3 type-0x6 output buffers, returns an output u8 and u32. The u8 is a bool to specify if the fonts are loaded or not and the u32 is the font count.&lt;br /&gt;
The first buffer contains a list of [[#SharedFontType|Shared font types]], the second buffer contains the font offsets and the final buffer contains the font sizes.&lt;br /&gt;
The buffers are an array of u32s which specify information about a specific font. Buffer1[n] is related to Buffer2[n] and Buffer3[n].&lt;br /&gt;
Example: Font index 0s offset is at Buffer2[0], size is at Buffer3[0].&lt;br /&gt;
The fonts are relative to the shared memory created by [[#GetSharedFontSharedMemoryHandle]]&lt;br /&gt;
&lt;br /&gt;
== SharedFontType ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value || Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Japan, US and Europe (Standard)&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Chinese Simplified&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Extended Chinese Simplified&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Chinese Traditional&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Korean (Hangul)&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Nintendo Extended&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Nintendo Extended: Contains Nintendo-specific characters, including HID buttons, HID controller styles, applet icons, Wii(U) icons,  etc.&lt;br /&gt;
&lt;br /&gt;
= mii:u, mii:e =&lt;br /&gt;
This is &amp;quot;nn::mii::detail::IStaticService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || GetDatabaseService&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IDatabaseService ==&lt;br /&gt;
This is &amp;quot;nn::mii::detail::IDatabaseService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || IsUpdated&lt;br /&gt;
|-&lt;br /&gt;
| 1 || IsFullDatabase&lt;br /&gt;
|-&lt;br /&gt;
| 2 || GetCount&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Get&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Get1&lt;br /&gt;
|-&lt;br /&gt;
| 5 || UpdateLatest&lt;br /&gt;
|-&lt;br /&gt;
| 6 || BuildRandom&lt;br /&gt;
|-&lt;br /&gt;
| 7 || BuildDefault&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Get2&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Get3&lt;br /&gt;
|-&lt;br /&gt;
| 10 || UpdateLatest1&lt;br /&gt;
|-&lt;br /&gt;
| 11 || FindIndex&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Move&lt;br /&gt;
|-&lt;br /&gt;
| 13 || AddOrReplace&lt;br /&gt;
|-&lt;br /&gt;
| 14 || Delete&lt;br /&gt;
|-&lt;br /&gt;
| 15 || DestroyFile&lt;br /&gt;
|-&lt;br /&gt;
| 16 || DeleteFile&lt;br /&gt;
|-&lt;br /&gt;
| 17 || Format&lt;br /&gt;
|-&lt;br /&gt;
| 18 || Import&lt;br /&gt;
|-&lt;br /&gt;
| 19 || Export&lt;br /&gt;
|-&lt;br /&gt;
| 20 || IsBrokenDatabaseWithClearFlag&lt;br /&gt;
|-&lt;br /&gt;
| 21 || GetIndex&lt;br /&gt;
|-&lt;br /&gt;
| 22 || [5.0.0+] SetInterfaceVersion&lt;br /&gt;
|-&lt;br /&gt;
| 23 || [5.0.0+] Convert&lt;br /&gt;
|-&lt;br /&gt;
| 24 || [7.0.0+] ConvertCoreDataToCharInfo&lt;br /&gt;
|-&lt;br /&gt;
| 25 || [7.0.0+] ConvertCharInfoToCoreData&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= miiimg =&lt;br /&gt;
This is &amp;quot;nn::mii::detail::IImageDatabaseService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [5.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Initialize&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Reload&lt;br /&gt;
|-&lt;br /&gt;
| 11 || GetCount&lt;br /&gt;
|-&lt;br /&gt;
| 12 || IsEmpty&lt;br /&gt;
|-&lt;br /&gt;
| 13 || IsFull&lt;br /&gt;
|-&lt;br /&gt;
| 14 || GetAttribute&lt;br /&gt;
|-&lt;br /&gt;
| 15 || LoadImage&lt;br /&gt;
|-&lt;br /&gt;
| 16 || AddOrUpdateImage&lt;br /&gt;
|-&lt;br /&gt;
| 17 || DeleteImages&lt;br /&gt;
|-&lt;br /&gt;
| 100 || DeleteFile&lt;br /&gt;
|-&lt;br /&gt;
| 101 || DestroyFile&lt;br /&gt;
|-&lt;br /&gt;
| 102 || ImportFile&lt;br /&gt;
|-&lt;br /&gt;
| 103 || ExportFile&lt;br /&gt;
|-&lt;br /&gt;
| 104 || ForceInitialize&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= pdm:ntfy =&lt;br /&gt;
This is &amp;quot;nn::pdm::detail::INotifyService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#NotifyAppletEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || [[#NotifyOperationModeChangeEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || [[#NotifyPowerStateChangeEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#NotifyClearAllEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#NotifyEventForDebug]]&lt;br /&gt;
|-&lt;br /&gt;
| 6 || [4.0.0+] SuspendUserAccountEventService&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [4.0.0+] ResumeUserAccountEventService&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [6.0.0+]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [8.0.0+]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== NotifyAppletEvent ==&lt;br /&gt;
Takes an input u8 [[#AppletEventType]], an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an u8 [[#PlayLogPolicy]], an u32 &#039;&#039;&#039;event_x8&#039;&#039;&#039;, and an u64 &#039;&#039;&#039;titleID&#039;&#039;&#039;. Returns no output.&lt;br /&gt;
&lt;br /&gt;
When [[#PlayLogPolicy]] is 2 (&amp;quot;None&amp;quot;) this will immediately return 0.&lt;br /&gt;
&lt;br /&gt;
Logs a new [[#PlayEvent]] with the following data:&lt;br /&gt;
* Clears the 0x10-bytes at +0x10.&lt;br /&gt;
* u8 +0xF = [[#AppletEventType]].&lt;br /&gt;
* Sets the 3 timestamps.&lt;br /&gt;
* Converts &#039;&#039;&#039;titleID&#039;&#039;&#039; and writes it to +0x0.&lt;br /&gt;
* u32 +0x8 = &#039;&#039;&#039;event_x8&#039;&#039;&#039;.&lt;br /&gt;
* u8 +0xC = [[Applet_Manager_services#AppletId|AppletId]], u8 +0xD = [[Filesystem_services#StorageId|StorageId]], and u8 +0xE = [[#PlayLogPolicy]].&lt;br /&gt;
&lt;br /&gt;
After the initial logging, additional code runs with some of the above input params.&lt;br /&gt;
&lt;br /&gt;
== NotifyOperationModeChangeEvent ==&lt;br /&gt;
Takes an input u8 &#039;&#039;&#039;inval&#039;&#039;&#039;, no output.&lt;br /&gt;
&lt;br /&gt;
Logs a new [[#PlayEvent]] with the following data: clears the 0x20-bytes at +0x0, u8 +0x1C = 0x3, u8 +0x0 = &#039;&#039;&#039;inval&#039;&#039;&#039;, and sets the 3 timestamps.&lt;br /&gt;
&lt;br /&gt;
== NotifyPowerStateChangeEvent ==&lt;br /&gt;
Takes an input u8 &#039;&#039;&#039;inval&#039;&#039;&#039;, no output.&lt;br /&gt;
&lt;br /&gt;
Logs a new [[#PlayEvent]] with the following data: clears the 0x20-bytes at +0x0, u8 +0x1C = 0x2, u8 +0x0 = &#039;&#039;&#039;inval&#039;&#039;&#039;, and sets the 3 timestamps.&lt;br /&gt;
&lt;br /&gt;
After the initial logging, additional code runs which uses &#039;&#039;&#039;inval&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== NotifyClearAllEvent ==&lt;br /&gt;
No input/output.&lt;br /&gt;
&lt;br /&gt;
== NotifyEventForDebug ==&lt;br /&gt;
Takes an input type-0x5 buffer containing an array of [[#PlayEvent]], no output.&lt;br /&gt;
&lt;br /&gt;
Gets the [[System_Settings|system-setting]] &amp;lt;code&amp;gt;pdm!is_production&amp;lt;/code&amp;gt;, the size must be 1 and the value must be 0, otherwise an error is returned.&lt;br /&gt;
&lt;br /&gt;
Each [[#PlayEvent]] entry is validated, throwing an error on failure. After an entry is successfully validated, it is written to the log.&lt;br /&gt;
&lt;br /&gt;
== Cmd8 ==&lt;br /&gt;
Takes an input u8 [[#AppletEventType]], an u8 [[Applet_Manager_services#LibraryAppletMode|LibraryAppletMode]], an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an u8 [[#PlayLogPolicy]], and an u64 &#039;&#039;&#039;titleID&#039;&#039;&#039;. Returns no output.&lt;br /&gt;
&lt;br /&gt;
This is similar to [[#NotifyAppletEvent]].&lt;br /&gt;
&lt;br /&gt;
When [[#PlayLogPolicy]] is 2 (&amp;quot;None&amp;quot;) this will immediately return 0.&lt;br /&gt;
&lt;br /&gt;
Logs a new [[#PlayEvent]] with the following data:&lt;br /&gt;
* Clears the 0x20-bytes at +0x0.&lt;br /&gt;
* u8 +0xF = [[#AppletEventType]].&lt;br /&gt;
* Sets the 3 timestamps.&lt;br /&gt;
* Converts &#039;&#039;&#039;titleID&#039;&#039;&#039; and writes it to +0x0.&lt;br /&gt;
* u8 +0x9 = [[Applet_Manager_services#LibraryAppletMode|LibraryAppletMode]].&lt;br /&gt;
* u8 +0x8 = 1.&lt;br /&gt;
* u8 +0xC = [[Applet_Manager_services#AppletId|AppletId]], u8 +0xD = [[Filesystem_services#StorageId|StorageId]], and u8 +0xE = [[#PlayLogPolicy]].&lt;br /&gt;
&lt;br /&gt;
After the initial logging, additional code runs with some of the above input params. This is handled the same as [[#NotifyAppletEvent]], except that the value passed for &#039;&#039;&#039;event_x8&#039;&#039;&#039; is value 0 here.&lt;br /&gt;
&lt;br /&gt;
== Cmd9 ==&lt;br /&gt;
Takes an input u8 [[#AppletEventType]], an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an 0x20-byte struct, an u8 bool flag, an u8 [[#PlayLogPolicy]], an u32 &#039;&#039;&#039;event_x8&#039;&#039;&#039;, and an u64 &#039;&#039;&#039;titleID&#039;&#039;&#039;. Returns no output.&lt;br /&gt;
&lt;br /&gt;
This is identical to [[#NotifyAppletEvent]] except for the additional struct/flag params.&lt;br /&gt;
&lt;br /&gt;
After the initial logging, additional code runs with some of the above input params. This is handled the same as [[#NotifyAppletEvent]], except that when the u8 bool flag is set the input struct is used with this.&lt;br /&gt;
&lt;br /&gt;
= pdm:qry =&lt;br /&gt;
This is &amp;quot;nn::pdm::detail::IQueryService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || [[#QueryApplicationEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 1 || QueryPlayStatistics&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 2 || QueryPlayStatisticsByUserAccountId&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 3 || QueryPlayStatisticsByNetworkServiceAccountId&lt;br /&gt;
|-&lt;br /&gt;
| 4 || [[#QueryPlayStatisticsByApplicationId]]&lt;br /&gt;
|-&lt;br /&gt;
| 5 || [[#QueryPlayStatisticsByApplicationIdAndUserAccountId]]&lt;br /&gt;
|-&lt;br /&gt;
| [1.0.0-6.2.0] 6 || QueryPlayStatisticsByApplicationIdAndNetworkServiceAccountId&lt;br /&gt;
|-&lt;br /&gt;
| 7 || [[#QueryLastPlayTime]]&lt;br /&gt;
|-&lt;br /&gt;
| 8 || [[#QueryPlayEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 9 || [[#GetAvailablePlayEventRange]]&lt;br /&gt;
|-&lt;br /&gt;
| 10 || [[#QueryAccountEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 11 || [4.0.0+] [[#QueryAccountPlayEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 12 || [4.0.0+] [[#GetAvailableAccountPlayEventRange]]&lt;br /&gt;
|-&lt;br /&gt;
| 13 || [5.0.0+] [[#QueryApplicationPlayStatisticsForSystem]]&lt;br /&gt;
|-&lt;br /&gt;
| 14 || [6.0.0+] QueryRecentlyPlayedApplication&lt;br /&gt;
|-&lt;br /&gt;
| 15 || [6.0.0+] GetRecentlyPlayedApplicationUpdateEvent&lt;br /&gt;
|-&lt;br /&gt;
| 16 || [6.0.0+] QueryApplicationPlayStatisticsByUserAccountIdForSystem&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== QueryApplicationEvent ==&lt;br /&gt;
Takes an input u32 entryindex, a type-0x6 output buffer containing an array of [[#ApplicationEvent]], and returns an output s32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
== QueryPlayStatisticsByApplicationId ==&lt;br /&gt;
Takes an input u64 titleID and returns an output [[#PlayStatistics]].&lt;br /&gt;
&lt;br /&gt;
== QueryPlayStatisticsByApplicationIdAndUserAccountId ==&lt;br /&gt;
Takes an input u64 titleID, an input u128 userID, and returns an output [[#PlayStatistics]].&lt;br /&gt;
&lt;br /&gt;
== QueryLastPlayTime ==&lt;br /&gt;
Takes a type-0x6 output buffer containing an array of [[#LastPlayTime]], and a type-0x5 input buffer containing an array of u64 titleIDs. Returns an output s32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
== QueryPlayEvent ==&lt;br /&gt;
Takes an input u32 entryindex, a type-0x6 output buffer containing an array of [[#PlayEvent]], and returns an output u32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
== GetAvailablePlayEventRange ==&lt;br /&gt;
No input, returns 3 output u32s: total_entries, start_entryindex, and end_entryindex.&lt;br /&gt;
&lt;br /&gt;
== QueryAccountEvent ==&lt;br /&gt;
Takes an input u32 entryindex, a type-0x6 output buffer containing an array of [[#AccountEvent]], and returns an output s32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
== QueryAccountPlayEvent ==&lt;br /&gt;
Takes an input u32 entryoffset, an input u128 userID, a type-0x6 output buffer containing an array of [[#AccountPlayEvent]], and returns an output u32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
== GetAvailableAccountPlayEventRange ==&lt;br /&gt;
Takes an input u128 userID and returns 3 output u32s: total_entries, start_entryindex, and end_entryindex.&lt;br /&gt;
&lt;br /&gt;
== QueryApplicationPlayStatisticsForSystem ==&lt;br /&gt;
Takes a type-0x6 output buffer containing an array of [[#ApplicationPlayStatistics]] and a type-0x5 input buffer containing an array of u64 titleIDs. Returns an output s32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
The number of entries in each array is the same.&lt;br /&gt;
&lt;br /&gt;
== Cmd14 ==&lt;br /&gt;
Takes an input u128 userID, a type-0x6 output buffer containing an array of u64 titleIDs, and returns an output u32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
Returns a list of titles played by the specified user.&lt;br /&gt;
&lt;br /&gt;
== Cmd15 ==&lt;br /&gt;
No input, returns an output Event handle with autoclear=false.&lt;br /&gt;
&lt;br /&gt;
This is signaled when logging a new [[#PlayEvent]] which would be available via [[#QueryAccountEvent]], where [[#PlayEvent]] +0x18 is 0.&lt;br /&gt;
&lt;br /&gt;
== Cmd16 ==&lt;br /&gt;
Takes a u128 userID, a type-0x6 output buffer containing an array of [[#ApplicationPlayStatistics]] and a type-0x5 input buffer containing an array of u64 titleIDs. Returns an output s32 for actual total output entries.&lt;br /&gt;
&lt;br /&gt;
Same as [[#QueryApplicationPlayStatisticsForSystem]] except this gets playstats specific to userIDs.&lt;br /&gt;
&lt;br /&gt;
= avm =&lt;br /&gt;
This is &amp;quot;nn::avm::srv::IAvmService&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [6.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 100 || &lt;br /&gt;
|-&lt;br /&gt;
| 101 || &lt;br /&gt;
|-&lt;br /&gt;
| 102 || &lt;br /&gt;
|-&lt;br /&gt;
| 103 || No input, returns an [[#IVersionListImporter]].&lt;br /&gt;
|-&lt;br /&gt;
| 200 || &lt;br /&gt;
|-&lt;br /&gt;
| 202 || &lt;br /&gt;
|-&lt;br /&gt;
| 1000 || &lt;br /&gt;
|-&lt;br /&gt;
| 1001 || &lt;br /&gt;
|-&lt;br /&gt;
| 1002 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== IVersionListImporter ==&lt;br /&gt;
This is &amp;quot;nn::avm::srv::IVersionListImporter&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This was added with [6.0.0+].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Cmd || Name&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &lt;br /&gt;
|-&lt;br /&gt;
| 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= ApplicationEvent =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8 || titleID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x4 || entryindex&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x4 || timestamp0&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x4 || timestamp1&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x1 || [[#PlayEvent]] +0xF&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0x3 || Padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x18-byte struct.&lt;br /&gt;
&lt;br /&gt;
Timestamp format, converted from PosixTime: total minutes since epoch UTC 1999/12/31 00:00.&lt;br /&gt;
&lt;br /&gt;
= PlayStatistics =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8 || titleID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x4 || First entryindex&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x4 || First timestamp0. Same as the first [[#ApplicationEvent]] timestamp.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x4 || First timestamp1. Same as the second [[#ApplicationEvent]] timestamp.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x4 || Last entryindex&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x4 || Last timestamp0. Same as the first [[#ApplicationEvent]] timestamp.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || 0x4 || Last timestamp1. Same as the second [[#ApplicationEvent]] timestamp.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x4 || Total play-time in minutes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || 0x4 || Total times the application title was launched.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x28-byte struct.&lt;br /&gt;
&lt;br /&gt;
= LastPlayTime =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8 || titleID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x4 || Same as the first [[#ApplicationEvent]] timestamp.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x4 || Same as the second [[#ApplicationEvent]] timestamp.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x4 || Total minutes since the title was last played.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x1 || Flag indicating whether the above field is set.&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || 0x3 || Padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x18-byte struct. This contains data from the last time the title was played.&lt;br /&gt;
&lt;br /&gt;
= PlayEventType =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Applet&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Account&lt;br /&gt;
|-&lt;br /&gt;
| 2 || PowerStateChange&lt;br /&gt;
|-&lt;br /&gt;
| 3 || OperationModeChange&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Initialize. Used for the very first [[#PlayEvent]] entry in the log.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is an enum for [[#PlayEvent]] +0x1C, which indicates the type of [[#PlayEvent]].&lt;br /&gt;
&lt;br /&gt;
= AppletEventType =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || &amp;quot;launch&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || &amp;quot;exit&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2 || &amp;quot;in_focus&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 3 || &amp;quot;out_of_focus&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 4 || &amp;quot;out_of_focus&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 5 || &amp;quot;exit&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 6 || &amp;quot;exit&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is an enum for [[#PlayEvent]] +0xF with [[#PlayEventType]] = Applet, this indicates the type of the Applet event.&lt;br /&gt;
&lt;br /&gt;
= PlayLogPolicy =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Meaning&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || All || All pdm:qry cmds which require [[#PlayEventType]] = Applet and AppletId = Application will only return the entry when PlayLogPolicy matches this value.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || LogOnly || The above commands will filter out the entry with this.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || None || pdm:ntfy [[#NotifyAppletEvent]], [[#Cmd8]], and [[#Cmd9]] will immediately return 0 when the input param matches this value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is an enum for [[#PlayEvent]] +0xE with [[#PlayEventType]] = Applet. This is set via the above commands, which uses this as an input param.&lt;br /&gt;
&lt;br /&gt;
= PlayEvent =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || 0x1 || [[#PlayEventType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D || 0x3 || Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x8 || PosixTime timestamp from [[PCV_services|StandardUserSystemClock]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || 0x8 || PosixTime timestamp from [[PCV_services|StandardNetworkSystemClock]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || 0x8 || Timestamp in seconds derived from [[PCV_services|StandardSteadyClock]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x38-byte struct.&lt;br /&gt;
&lt;br /&gt;
This is the raw entry struct directly read from FS, without any entry filtering. The other structs are extracted+converted from this one, with filtering.&lt;br /&gt;
&lt;br /&gt;
Filtering:&lt;br /&gt;
* [[#QueryApplicationEvent]], [[#QueryLastPlayTime]], and [[#QueryApplicationPlayStatisticsForSystem]]: PlayEvent +0x1C must be 0, +0xC must be 1, and +0xE must be 0.&lt;br /&gt;
* [[#QueryPlayStatisticsByApplicationId]]: PlayEvent +0x1C must be 0, +0xC must be 1, and the titleID must match.&lt;br /&gt;
* [[#QueryAccountEvent]]: PlayEvent +0x1C must be 1 and PlayEvent +0x18 must be &amp;lt;=1.&lt;br /&gt;
* [[#QueryApplicationPlayStatisticsForSystem]]: In addition to the above, this also handles [[#PlayEventType]] PowerStateChange, where PlayEvent +0x0 is value 0 or 1.&lt;br /&gt;
&lt;br /&gt;
The structure of the first 0x1C-bytes are determined by [[#PlayEventType]]. For titleIDs/userIDs, the low/high u32 in each u64 is swapped.&lt;br /&gt;
&lt;br /&gt;
Applet:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8 || titleID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x4 || Title version, set by pdm:ntfy [[#NotifyAppletEvent]] and [[#Cmd9]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x1 || When set to u8 0x1 by pdm:ntfy [[#Cmd8]], this indicates that +0x9 is set. Only used for non-applications.&lt;br /&gt;
|-&lt;br /&gt;
| 0x9 || 0x1 || See above. [[Applet_Manager_services#LibraryAppletMode|LibraryAppletMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0x1 || [[Applet_Manager_services#AppletId|AppletId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xD || 0x1 || [[Filesystem_services#StorageId|StorageId]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xE || 0x1 || [[#PlayLogPolicy]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF || 0x1 || [[#AppletEventType]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0xC || Unused&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Account:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x10 || userID&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8 || titleID, when u8 +0x18 = 2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x1 || Type. 0-1 to be listed by [[#QueryAccountEvent]], or 2 to include the above titleID.&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || 0x3 || Padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
PlayEventType PowerStateChange/OperationModeChange: u8 +0x0 is the input value from [[#NotifyOperationModeChangeEvent]]/[[#NotifyPowerStateChangeEvent]], the rest is unused.&lt;br /&gt;
&lt;br /&gt;
= AccountEvent =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x10 || userID&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x4 || entryindex&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || 0x4 || Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x8 || [[#PlayEvent]] +0x20&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x8 || [[#PlayEvent]] +0x28&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || 0x8 || [[#PlayEvent]] +0x30&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || 0x1 || [[#PlayEvent]] +0x18&lt;br /&gt;
|-&lt;br /&gt;
| 0x31 || 0x7 || Padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x38-byte struct.&lt;br /&gt;
&lt;br /&gt;
= AccountPlayEvent =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x4 || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x4 || 0x8 || titleID, with the u32 low/high words swapped.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC || 0xC || ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || 0x8 || POSIX timestamp&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || 0x8 || POSIX timestamp&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a 0x28-byte struct.&lt;br /&gt;
&lt;br /&gt;
This is the raw entry struct directly read from FS, without any entry filtering. This is separate from [[#PlayEvent]].&lt;br /&gt;
&lt;br /&gt;
= ApplicationPlayStatistics =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0 || 0x8 || titleID&lt;br /&gt;
|-&lt;br /&gt;
| 0x8 || 0x8 || Total play-time in nanoseconds.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || 0x8 || Total times the application title was launched.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is &amp;quot;nn::pdm::ApplicationPlayStatistics&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This is a 0x18-byte struct.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>Paeton</name></author>
	</entry>
</feed>