Changes

Jump to navigation Jump to search
11,705 bytes added ,  19:50, 21 September 2019
no edit summary
Line 25: Line 25:  
|-
 
|-
 
| 100 || [7.0.0+] [[#IPurchaseEventManager|CreateEcPurchasedEventManager]]
 
| 100 || [7.0.0+] [[#IPurchaseEventManager|CreateEcPurchasedEventManager]]
 +
|-
 +
| 101 || [9.0.0+] [[#IPurchaseEventManager|CreatePermanentEcPurchasedEventManager]]
 
|}
 
|}
   Line 41: Line 43:  
|-
 
|-
 
| 3 || PopPurchasedProductInfo
 
| 3 || PopPurchasedProductInfo
 +
|-
 +
| 4 || [9.0.0+] PopPurchasedProductInfoWithUid
 
|}
 
|}
   Line 258: Line 262:  
| 1001 || [2.0.0+] CorruptApplicationForDebug
 
| 1001 || [2.0.0+] CorruptApplicationForDebug
 
|-
 
|-
| 1200 || [2.0.0+] NeedsUpdateVulnerability
+
| 1200 || [2.0.0+] [[#NeedsUpdateVulnerability]]
 
|-
 
|-
 
| 1300 || [2.0.0+] IsAnyApplicationEntityInstalled
 
| 1300 || [2.0.0+] IsAnyApplicationEntityInstalled
Line 293: Line 297:     
=== Application Record Format ===
 
=== Application Record Format ===
   
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 408: Line 411:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 7988 || [6.0.0+] Returns an output [[#IDynamicRightsInterface]].
+
| 7988 || [6.0.0+] [[#IDynamicRightsInterface|GetDynamicRightsInterface]].
 
|-
 
|-
| 7989 || [5.1.0+] Returns an output [[#IReadOnlyApplicationControlDataInterface]].
+
| 7989 || [5.1.0+] [[#IReadOnlyApplicationControlDataInterface|GetReadOnlyApplicationControlDataInterface]].
 
|-
 
|-
| 7991 || [5.0.0+] Returns an output [[#IReadOnlyApplicationRecordInterface]].
+
| 7991 || [5.0.0+] [[#IReadOnlyApplicationRecordInterface|GetReadOnlyApplicationRecordInterface]].
 
|-
 
|-
 
| 7992 || [4.0.0+] [[#IECommerceInterface|GetECommerceInterface]]
 
| 7992 || [4.0.0+] [[#IECommerceInterface|GetECommerceInterface]]
Line 429: Line 432:  
|-
 
|-
 
| 7999 || [[#IDocumentInterface|GetDocumentInterface]]
 
| 7999 || [[#IDocumentInterface|GetDocumentInterface]]
|-
   
|}
 
|}
   Line 440: Line 442:  
|-
 
|-
 
| 0 || CreateUserAccount
 
| 0 || CreateUserAccount
|-
   
|}
 
|}
   Line 490: Line 491:  
| 30 || RequestApplicationUpdateInfo
 
| 30 || RequestApplicationUpdateInfo
 
|-
 
|-
| [1.0.0-3.0.2] 31 ||
+
| 31 || [1.0.0-3.0.2]  
 
|-
 
|-
 
| 32 || CancelApplicationDownload
 
| 32 || CancelApplicationDownload
Line 504: Line 505:  
| 38 || CheckApplicationLaunchVersion
 
| 38 || CheckApplicationLaunchVersion
 
|-
 
|-
| [1.0.0-6.2.0] 39 || CheckApplicationLaunchRights
+
| 39 || [1.0.0-6.2.0] CheckApplicationLaunchRights
 
|-
 
|-
 
| 40 || GetApplicationLogoData
 
| 40 || GetApplicationLogoData
Line 572: Line 573:  
| 82 || [3.0.0+] DownloadApplication
 
| 82 || [3.0.0+] DownloadApplication
 
|-
 
|-
| [4.0.0-6.2.0] 83 || CheckApplicationResumeRights
+
| 83 || [4.0.0-6.2.0] CheckApplicationResumeRights
 
|-
 
|-
 
| 84 || [4.0.0+] GetDynamicCommitEvent
 
| 84 || [4.0.0+] GetDynamicCommitEvent
Line 582: Line 583:  
| 87 || [4.0.0+] IsApplicationCrashReportEnabled
 
| 87 || [4.0.0+] IsApplicationCrashReportEnabled
 
|-
 
|-
| 90 || [4.0.0+] BoostSystemMemoryResourceLimit
+
| 90 || [4.0.0-8.1.0] BoostSystemMemoryResourceLimit
 
|-
 
|-
 
| 91 || [5.0.0+] DeprecatedLaunchApplication
 
| 91 || [5.0.0+] DeprecatedLaunchApplication
Line 600: Line 601:  
| 98 || [6.0.0+] EnableApplicationAllThreadDumpOnCrash
 
| 98 || [6.0.0+] EnableApplicationAllThreadDumpOnCrash
 
|-
 
|-
| 99 || [8.0.0+]
+
| 99 || [8.0.0+] [[#LaunchDevMenu]]
 
|-
 
|-
 
| 100 || ResetToFactorySettings
 
| 100 || ResetToFactorySettings
Line 650: Line 651:  
| 406 || [6.0.0+] GetApplicationControlProperty
 
| 406 || [6.0.0+] GetApplicationControlProperty
 
|-
 
|-
| 407 || [8.0.0+]
+
| 407 || [8.0.0+] ListApplicationTitle
 
|-
 
|-
| 408 || [8.0.0+]
+
| 408 || [8.0.0+] ListApplicationIcon
 
|-
 
|-
 
| 502 || RequestCheckGameCardRegistration
 
| 502 || RequestCheckGameCardRegistration
Line 669: Line 670:  
|-
 
|-
 
| 509 || [5.0.0+] ListApplicationIdOnGameCard
 
| 509 || [5.0.0+] ListApplicationIdOnGameCard
 +
|-
 +
| 510 || [9.0.0+] [[#GetGameCardPlatformRegion]]
 
|-
 
|-
 
| 600 || CountApplicationContentMeta
 
| 600 || CountApplicationContentMeta
Line 729: Line 732:  
|-
 
|-
 
| 912 || [5.1.0+] ClearPreInstalledApplicationFlag
 
| 912 || [5.1.0+] ClearPreInstalledApplicationFlag
 +
|-
 +
| 913 || [9.0.0+] ListAllApplicationRecord
 +
|-
 +
| 914 || [9.0.0+] HideApplicationRecord
 +
|-
 +
| 915 || [9.0.0+] ShowApplicationRecord
 
|-
 
|-
 
| 1000 || RequestVerifyApplicationDeprecated
 
| 1000 || RequestVerifyApplicationDeprecated
Line 740: Line 749:  
| 1004 || [5.0.0+] CorruptContentForDebug
 
| 1004 || [5.0.0+] CorruptContentForDebug
 
|-
 
|-
| 1200 || NeedsUpdateVulnerability
+
| 1200 || [[#NeedsUpdateVulnerability]]
 
|-
 
|-
 
| 1300 || IsAnyApplicationEntityInstalled
 
| 1300 || IsAnyApplicationEntityInstalled
Line 767: Line 776:  
|-
 
|-
 
| 1505 || [3.0.0+] RemoveSdCard
 
| 1505 || [3.0.0+] RemoveSdCard
 +
|-
 +
| 1506 || [9.0.0+] GetSdCardStartupStatus
 
|-
 
|-
 
| 1600 || GetSystemSeedForPseudoDeviceId
 
| 1600 || GetSystemSeedForPseudoDeviceId
Line 780: Line 791:  
| 1703 || [4.0.0+] GetApplicationViewDownloadErrorContext
 
| 1703 || [4.0.0+] GetApplicationViewDownloadErrorContext
 
|-
 
|-
| 1704 || [8.0.0+]
+
| 1704 || [8.0.0+] GetApplicationViewWithPromotionInfo
 
|-
 
|-
 
| 1800 || IsNotificationSetupCompleted
 
| 1800 || IsNotificationSetupCompleted
Line 835: Line 846:  
|-
 
|-
 
| 2050 || [6.0.0+] GetApplicationRightsOnClient
 
| 2050 || [6.0.0+] GetApplicationRightsOnClient
 +
|-
 +
| 2051 || [9.0.0+] InvalidateRightsIdCache
 
|-
 
|-
 
| 2100 || [6.0.0+] GetApplicationTerminateResult
 
| 2100 || [6.0.0+] GetApplicationTerminateResult
Line 851: Line 864:  
|-
 
|-
 
| 2155 || [7.0.0+] UpdateRightsEnvironmentStatus
 
| 2155 || [7.0.0+] UpdateRightsEnvironmentStatus
 +
|-
 +
| 2156 || [9.0.0+] CreateRightsEnvironmentForPreomia
 
|-
 
|-
 
| 2160 || [6.0.0+] AddTargetApplicationToRightsEnvironment
 
| 2160 || [6.0.0+] AddTargetApplicationToRightsEnvironment
Line 866: Line 881:  
| 2182 || [6.0.0+] SetActiveRightsContextUsingStateToRightsEnvironment
 
| 2182 || [6.0.0+] SetActiveRightsContextUsingStateToRightsEnvironment
 
|-
 
|-
| 2190 || [6.0.0+] GetRightsEnvironmentHandleForApplication
+
| 2190 || [6.0.0+] [[#GetRightsEnvironmentHandleForApplication]]
 
|-
 
|-
 
| 2199 || [6.0.0+] GetRightsEnvironmentCountForDebug
 
| 2199 || [6.0.0+] GetRightsEnvironmentCountForDebug
Line 874: Line 889:  
| 2201 || [6.0.0+] GetInstalledApplicationCopyIdentifier
 
| 2201 || [6.0.0+] GetInstalledApplicationCopyIdentifier
 
|-
 
|-
| [6.0.0-6.2.0] 2250 || RequestReportActiveELicence
+
| 2250 || [6.0.0-6.2.0] RequestReportActiveELicence
 
|-
 
|-
| 2300 || [6.0.0+] ListEventLog
+
| 2300 || [6.0.0-8.1.0] ListEventLog
 
|-
 
|-
| 2350 || [7.0.0+]  
+
| 2350 || [7.0.0+] PerformAutoUpdateByApplicationId
 
|-
 
|-
| 2400 || [8.0.0+]
+
| 2351 || [9.0.0+] RequestNoDownloadRightsErrorResolution
 
|-
 
|-
| 2401 || [8.0.0+]
+
| 2352 || [9.0.0+] RequestResolveNoDownloadRightsError
 
|-
 
|-
| 2402 || [8.0.0+]
+
| 2400 || [8.0.0+] GetPromotionInfo
 
|-
 
|-
| 2403 || [8.0.0+]
+
| 2401 || [8.0.0+] CountPromotionInfo
 
|-
 
|-
| 2404 || [8.0.0+]
+
| 2402 || [8.0.0+] ListPromotionInfo
 
|-
 
|-
| 2500 || [8.0.0+]
+
| 2403 || [8.0.0+] ImportPromotionJsonForDebug
 
|-
 
|-
 +
| 2404 || [8.0.0+] ClearPromotionInfoForDebug
 +
|-
 +
| 2500 || [8.0.0+] ConfirmAvailableTime
 +
|-
 +
| 2510 || [9.0.0+] [[#CreateApplicationResource]]
 +
|-
 +
| 2511 || [9.0.0+] [[#GetApplicationResource]]
 +
|-
 +
| 2513 || [9.0.0+] LaunchPreomia
 +
|-
 +
| 2514 || [9.0.0+] ClearTaskOfAsyncTaskManager
 +
|-
 +
| 2800 || [9.0.0+] GetApplicationIdOfPreomia
 
|}
 
|}
    
[4.0.0+] RequestDownloadAddOnContent now takes an additional 8-bytes of input.
 
[4.0.0+] RequestDownloadAddOnContent now takes an additional 8-bytes of input.
 +
 +
==== LaunchDevMenu ====
 +
No input/output.
 +
 +
This is used by AM cmd [[Applet_Manager_services#LaunchDevMenu|LaunchDevMenu]].
 +
 +
This loads titleIDs from [[System_Settings|system-settings]] <code>ns.applet!devmenu_id</code> and <code>ns.applet!devoverlaydisp_id</code>, which only exists on devunits. An error is thrown if loading these fail.
 +
 +
[[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.
 +
 +
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.
 +
 +
==== GetGameCardPlatformRegion ====
 +
No input, returns an u8 '''PlatformRegion''' (0x00 = Default, 0x01 = China).
 +
 +
This calls [[Filesystem_services#IDeviceOperator|fsp-srv IDeviceOperator]] GetGameCardCompatibilityType and returns the result.
 +
 +
==== GetRightsEnvironmentHandleForApplication ====
 +
No input, returns a total of 8-bytes of output.
 +
 +
[9.0.0+] Now takes a total of 8-bytes of input, returns a total of 8-bytes of output.
 +
 +
==== CreateApplicationResource ====
 +
Returns an [[#IApplicationResource]].
 +
 +
==== GetApplicationResource ====
 +
Returns an [[#IApplicationResource]].
    
=== IApplicationVersionInterface ===
 
=== IApplicationVersionInterface ===
Line 922: Line 977:  
|-
 
|-
 
| 1000 || PerformAutoUpdate
 
| 1000 || PerformAutoUpdate
|-
   
|}
 
|}
   Line 947: Line 1,001:  
|-
 
|-
 
| 607 || IsAnyApplicationRunning
 
| 607 || IsAnyApplicationRunning
|-
   
|}
 
|}
   Line 962: Line 1,015:  
|-
 
|-
 
| 92 || [5.0.0+] GetRunningApplicationProgramId
 
| 92 || [5.0.0+] GetRunningApplicationProgramId
|-
   
|}
 
|}
   Line 989: Line 1,041:  
|-
 
|-
 
| 709 || [4.0.0+] TriggerDynamicCommitEvent
 
| 709 || [4.0.0+] TriggerDynamicCommitEvent
|-
   
|}
 
|}
   Line 1,020: Line 1,071:  
|-
 
|-
 
| 3 || [[#ConvertLanguageCodeToApplicationLanguage]] || Same as [[#IApplicationManagerInterface]] cmd 60
 
| 3 || [[#ConvertLanguageCodeToApplicationLanguage]] || Same as [[#IApplicationManagerInterface]] cmd 60
 +
|-
 +
| 4 || [9.0.0+] SelectApplicationDesiredLanguage ||
 
|}
 
|}
   Line 1,031: Line 1,084:  
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 0 || ||  
+
| 0 || RequestApplicationRightsOnServer ||  
 
|-
 
|-
| 1 || ||  
+
| 1 || RequestAssignRights ||  
 
|-
 
|-
| 4 || ||  
+
| 4 || DeprecatedRequestAssignRightsToResume ||  
 
|-
 
|-
| 5 || ||  
+
| 5 || VerifyActivatedRightsOwners ||  
 
|-
 
|-
| 6 || ||  
+
| 6 || DeprecatedGetApplicationRightsStatus ||  
 
|-
 
|-
| 7 || ||  
+
| 7 || RequestPrefetchForDynamicRights ||  
 
|-
 
|-
| 8 || ||  
+
| 8 || GetDynamicRightsState ||  
 
|-
 
|-
| 9 || [7.0.0+] ||  
+
| 9 || [7.0.0+] RequestApplicationRightsOnServerToResume ||  
 
|-
 
|-
| 10 || [7.0.0+] ||  
+
| 10 || [7.0.0+] RequestAssignRightsToResume ||  
 
|-
 
|-
| 11 || [7.0.0+] ||  
+
| 11 || [7.0.0+] GetActivatedRightsUsers ||  
 
|-
 
|-
| 12 || [8.0.0+]
+
| 12 || [8.0.0+] GetApplicationRightsStatus ||
|-
  −
| 13 || [8.0.0+]
   
|-
 
|-
 +
| 13 || [8.0.0+] GetRunningApplicationStatus ||
 
|}
 
|}
   Line 1,077: Line 1,129:  
|-
 
|-
 
| 5 || [6.1.0+] RequestRevokeAllELicense || Takes a total of 0x10-bytes of input, returns an [[#IAsyncResult]].
 
| 5 || [6.1.0+] RequestRevokeAllELicense || Takes a total of 0x10-bytes of input, returns an [[#IAsyncResult]].
 +
|-
 +
| 6 || [9.0.0+] RequestSyncRightsBasedOnAssignedELicenses ||
 
|}
 
|}
   Line 1,091: Line 1,145:  
|-
 
|-
 
| 102 || ResetToFactorySettingsForRefurbishment
 
| 102 || ResetToFactorySettingsForRefurbishment
 +
|}
 +
 +
=== IApplicationResource ===
 +
This is "nn::ns::detail::IApplicationResource".
 +
 +
This was added with [9.0.0+].
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 
|-
 
|-
 +
| 0 || Attach
 +
|-
 +
| 1 || BoostSystemMemoryResourceLimit
 
|}
 
|}
   Line 1,101: Line 1,168:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 1200 || [3.0.0+] NeedsUpdateVulnerability
+
| 1200 || [3.0.0+] [[#NeedsUpdateVulnerability]]
|-
  −
| 1201 || [4.0.0+] UpdateSafeSystemVersionForDebug
   
|-
 
|-
| 1202 || [4.0.0+] GetSafeSystemVersion
+
| 1201 || [4.0.0+] [[#UpdateSafeSystemVersionForDebug]]
 
|-
 
|-
 +
| 1202 || [4.0.0+] [[#GetSafeSystemVersion]]
 
|}
 
|}
 +
 +
== NeedsUpdateVulnerability ==
 +
No input, returns an output u8 bool flag.
 +
 +
Web-applets use this command to check if the system needs an update.
 +
 +
== UpdateSafeSystemVersionForDebug ==
 +
Takes an input u64 '''titleID''' and an u32 '''version'''.
 +
 +
This command is not available for retail units. On a debug unit, if the [[System_Settings|system setting]] <code>vulnerability!enable_debug</code> is set, this mounts the system savegame [[Flash_Filesystem#System_Savegames|0x8000000000000049]] as "ns_ssversion:/", opens the file "ns_ssversion:/entry" and writes the supplied '''titleID''' and '''version''' in it.
 +
 +
Finally, it calls [[NCM_services#ncm|OpenContentMetaDatabase]] with [[Filesystem_services#StorageId|StorageID]] 3, then calls [[NCM_services#IContentMetaDatabase|GetLatestContentMetaKey]] with the supplied '''titleID''' and compares the version field from the returned [[CNMT#Content_Meta_Records|Content Meta Record]] with the supplied '''version'''.
 +
 +
If the supplied '''version''' is higher than the one in NCM's database, the value returned by [[NS_Services#NeedsUpdateVulnerability|NeedsUpdateVulnerability]] is set to "true".
 +
 +
== GetSafeSystemVersion ==
 +
No input, returns a 0x10 byte array with the cached contents of "ns_ssversion:/entry" (u64 '''titleID''', u32 '''version''' and u32 '''policy''' from <code>vulnerability!needs_update_vulnerability_policy</code>).
    
= ns:su =
 
= ns:su =
Line 1,116: Line 1,199:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 || GetBackgroundNetworkUpdateState
+
| 0 || [[#GetBackgroundNetworkUpdateState]]
 
|-
 
|-
| 1 || [[#ISystemUpdateControl|OpenSystemUpdateControl]]
+
| 1 || [[#OpenSystemUpdateControl]]
 
|-
 
|-
| 2 || NotifyExFatDriverRequired
+
| 2 || [[#NotifyExFatDriverRequired]]
 
|-
 
|-
| 3 || ClearExFatDriverStatusForDebug
+
| 3 || [[#ClearExFatDriverStatusForDebug]]
 
|-
 
|-
| 4 || RequestBackgroundNetworkUpdate
+
| 4 || [[#RequestBackgroundNetworkUpdate]]
 
|-
 
|-
| 5 || NotifyBackgroundNetworkUpdate
+
| 5 || [[#NotifyBackgroundNetworkUpdate]]
 
|-
 
|-
| 6 || NotifyExFatDriverDownloadedForDebug
+
| 6 || [[#NotifyExFatDriverDownloadedForDebug]]
 
|-
 
|-
| 9 || GetSystemUpdateNotificationEventForContentDelivery
+
| 9 || [[#GetSystemUpdateNotificationEventForContentDelivery]]
 
|-
 
|-
| 10 || NotifySystemUpdateForContentDelivery
+
| 10 || [[#NotifySystemUpdateForContentDelivery]]
 
|-
 
|-
| 11 || [3.0.0+] PrepareShutdown
+
| 11 || [3.0.0+] [[#PrepareShutdown]]
 
|-
 
|-
| [3.0.0-3.0.2] 12 ||
+
| 12 || [3.0.0-3.0.2]
 
|-
 
|-
| [3.0.0-3.0.2] 13 ||
+
| 13 || [3.0.0-3.0.2]
 
|-
 
|-
| [3.0.0-3.0.2] 14 ||
+
| 14 || [3.0.0-3.0.2]
 
|-
 
|-
| [3.0.0-3.0.2] 15 ||
+
| 15 || [3.0.0-3.0.2]
 
|-
 
|-
| 16 || [4.0.0+] DestroySystemUpdateTask
+
| 16 || [4.0.0+] [[#DestroySystemUpdateTask]]
 
|-
 
|-
| 17 || [4.0.0+] RequestSendSystemUpdate
+
| 17 || [4.0.0+] [[#RequestSendSystemUpdate]]
|-
  −
| 18 || [4.0.0+] GetSendSystemUpdateProgress
   
|-
 
|-
 +
| 18 || [4.0.0+] [[#GetSendSystemUpdateProgress]]
 
|}
 
|}
 +
 +
== GetBackgroundNetworkUpdateState ==
 +
No input, returns an output [[#BackgroundNetworkUpdateState]].
 +
 +
== OpenSystemUpdateControl ==
 +
No input, returns an [[#ISystemUpdateControl]].
 +
 +
== NotifyExFatDriverRequired ==
 +
No input/output.
 +
 +
== ClearExFatDriverStatusForDebug ==
 +
No input/output.
 +
 +
== RequestBackgroundNetworkUpdate ==
 +
No input/output.
 +
 +
== NotifyBackgroundNetworkUpdate ==
 +
Takes an input [[NCM_services#ContentMetaKey|ContentMetaKey]], no output.
 +
 +
== NotifyExFatDriverDownloadedForDebug ==
 +
No input/output.
 +
 +
== GetSystemUpdateNotificationEventForContentDelivery ==
 +
No input, returns an output Event handle with EventClearMode=0.
 +
 +
== NotifySystemUpdateForContentDelivery ==
 +
No input/output.
 +
 +
== PrepareShutdown ==
 +
No input/output.
 +
 +
== DestroySystemUpdateTask ==
 +
No input/output.
 +
 +
== RequestSendSystemUpdate ==
 +
Takes a type-0x15 input buffer containing a [[#SystemDeliveryInfo]], an u16, an u32, returns an output Event handle and an [[#IAsyncResult]].
 +
 +
== GetSendSystemUpdateProgress ==
 +
No input, returns an output [[#SystemUpdateProgress]].
    
== ISystemUpdateControl ==
 
== ISystemUpdateControl ==
Line 1,159: Line 1,280:  
| 0 || [[#HasDownloaded]]
 
| 0 || [[#HasDownloaded]]
 
|-
 
|-
| 1 || RequestCheckLatestUpdate
+
| 1 || [[#RequestCheckLatestUpdate]]
 
|-
 
|-
| 2 || RequestDownloadLatestUpdate
+
| 2 || [[#RequestDownloadLatestUpdate]]
 
|-
 
|-
 
| 3 || [[#GetDownloadProgress]]
 
| 3 || [[#GetDownloadProgress]]
Line 1,167: Line 1,288:  
| 4 || [[#ApplyDownloadedUpdate]]
 
| 4 || [[#ApplyDownloadedUpdate]]
 
|-
 
|-
| 5 || RequestPrepareCardUpdate
+
| 5 || [[#RequestPrepareCardUpdate]]
 
|-
 
|-
| 6 || GetPrepareCardUpdateProgress
+
| 6 || [[#GetPrepareCardUpdateProgress]]
 
|-
 
|-
| 7 || HasPreparedCardUpdate
+
| 7 || [[#HasPreparedCardUpdate]]
 
|-
 
|-
| 8 || ApplyCardUpdate
+
| 8 || [[#ApplyCardUpdate]]
 
|-
 
|-
| 9 || GetDownloadedEulaDataSize
+
| 9 || [[#GetDownloadedEulaDataSize]]
 
|-
 
|-
| 10 || GetDownloadedEulaData
+
| 10 || [[#GetDownloadedEulaData]]
 
|-
 
|-
| 11 || SetupCardUpdate
+
| 11 || [[#SetupCardUpdate]]
 
|-
 
|-
| 12 || GetPreparedCardUpdateEulaDataSize
+
| 12 || [[#GetPreparedCardUpdateEulaDataSize]]
 
|-
 
|-
| 13 || GetPreparedCardUpdateEulaData
+
| 13 || [[#GetPreparedCardUpdateEulaData]]
 
|-
 
|-
| 14 || [4.0.0+] SetupCardUpdateViaSystemUpdater
+
| 14 || [4.0.0+] [[#SetupCardUpdateViaSystemUpdater]]
 
|-
 
|-
| 15 || [4.0.0+] HasReceived
+
| 15 || [4.0.0+] [[#HasReceived]]
 
|-
 
|-
| 16 || [4.0.0+] RequestReceiveSystemUpdate
+
| 16 || [4.0.0+] [[#RequestReceiveSystemUpdate]]
 
|-
 
|-
| 17 || [4.0.0+] GetReceiveProgress
+
| 17 || [4.0.0+] [[#GetReceiveProgress]]
 
|-
 
|-
| 18 || [4.0.0+] ApplyReceivedUpdate
+
| 18 || [4.0.0+] [[#ApplyReceivedUpdate]]
 
|-
 
|-
| 19 || [4.0.0+] GetReceivedEulaDataSize
+
| 19 || [4.0.0+] [[#GetReceivedEulaDataSize]]
 
|-
 
|-
| 20 || [4.0.0+] GetReceivedEulaData
+
| 20 || [4.0.0+] [[#GetReceivedEulaData]]
 
|-
 
|-
| 21 || [4.0.0+] SetupToReceiveSystemUpdate
+
| 21 || [4.0.0+] [[#SetupToReceiveSystemUpdate]]
 
|-
 
|-
| 22 || [6.0.0+] RequestCheckLatestUpdateIncludesRebootlessUpdate
+
| 22 || [6.0.0+] [[#RequestCheckLatestUpdateIncludesRebootlessUpdate]]
 
|}
 
|}
 +
 +
Only 1 ISystemUpdateControl can be open at a time.
 +
 +
On newer sysvers, all pre-4.0.0 Card cmds require [[#SetupCardUpdateViaSystemUpdater]] to be used previously, except for RequestPrepareCardUpdate.
    
=== HasDownloaded ===
 
=== HasDownloaded ===
Line 1,212: Line 1,337:     
This always returns 0, however this will assert if GetSystemUpdateTaskInfo fails with ret!=0x3C89.
 
This always returns 0, however this will assert if GetSystemUpdateTaskInfo fails with ret!=0x3C89.
 +
 +
=== RequestCheckLatestUpdate ===
 +
No input, returns an output Event handle and an [[#IAsyncValue]].
 +
 +
The data that can be read from the [[#IAsyncValue]] is [[#LatestSystemUpdate]].
 +
 +
=== RequestDownloadLatestUpdate ===
 +
No input, returns an output Event handle and an [[#IAsyncResult]].
    
=== GetDownloadProgress ===
 
=== GetDownloadProgress ===
No input, returns a 0x10-byte output struct.
+
No input, returns an output [[#SystemUpdateProgress]].
    
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't available.
 
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't available.
Line 1,224: Line 1,357:     
* Uses ListSystemUpdateTask again, then [[NIM_services|nim]] IsExFatDriverIncluded. Runs ExFat handling when the output flag is set.
 
* Uses ListSystemUpdateTask again, then [[NIM_services|nim]] IsExFatDriverIncluded. Runs ExFat handling when the output flag is set.
* The two flags in [[Flash_Filesystem#System_Update_Control]] are set to 1.
+
* On newer system-versions, this uses [[NIM_services|nim]] GetSystemUpdateTaskInfo then on success uses data from there to save a SystemPlayReport when a state flag is set (by default it's not set).
 +
** The EventId is "systemupdate_dl_throughput" with ApplicationId 0100000000001018.
 +
** The following fields are added to the report, see [[NIM_services#SystemUpdateTaskInfo|nim SystemUpdateTaskInfo]]: "ContentMetaId", "Version", "DownloadSize", and "ThroughputKBps",
 +
* On newer system-versions, this saves another SystemPlayReport when a state flag is set (same flag mentioned above).
 +
** The EventId is "systemupdate_pass" with ApplicationId 0100000000001021.
 +
** This report has the following fields:
 +
*** "Type"
 +
*** "SourceSystemUpdateMetaId"
 +
*** "SourceSystemUpdateMetaVersion"
 +
*** "SourceExFatStatus"
 +
*** "DestinationSystemUpdateMetaId"
 +
*** "DestinationSystemUpdateMetaVersion"
 +
*** "DestinationExFatStatus"
 +
*** "Rebootless"
 +
* Since FIRM will be installed later, the two flags in [[Flash_Filesystem#System_Update_Control]] are set to 1.
 
* Uses [[NIM_services|nim]] CommitSystemUpdateTask and [[NIM_services|nim]] DestroySystemUpdateTask.
 
* Uses [[NIM_services|nim]] CommitSystemUpdateTask and [[NIM_services|nim]] DestroySystemUpdateTask.
* Installs FIRM.
+
* Installs FIRM. After installing each FIRM, the associated flag in [[Flash_Filesystem#System_Update_Control]] is set to 0.
 +
* On newer system versions when an input flag is set, this uses [[Filesystem_services|NotifySystemDataUpdateEvent]], however this doesn't happen with ApplyDownloadedUpdate since that input flag is 0.
 +
 
 +
=== RequestPrepareCardUpdate ===
 +
No input, returns an output Event handle and an [[#IAsyncResult]].
 +
 
 +
=== GetPrepareCardUpdateProgress ===
 +
No input, returns an output [[#SystemUpdateProgress]].
 +
 
 +
=== HasPreparedCardUpdate ===
 +
No input, returns an output u8 bool flag.
 +
 
 +
=== ApplyCardUpdate ===
 +
No input/output.
 +
 
 +
=== GetDownloadedEulaDataSize ===
 +
Takes a type-0x15 input buffer [[#EulaDataPath]], returns an output u64 '''filesize'''.
 +
 
 +
Runs code similar to [[#HasDownloaded]], throwing an error if a network sysupdate isn't ready for install.
 +
 
 +
Uses ListSystemUpdateTask again. Then [[NIM_services|nim]] GetDownloadedSystemDataPath, with the output ContentPath being used to mount the EULA title with FS.
 +
 
 +
Then "<mountname>:/<[[#EulaDataPath]]>" is opened, gets the '''filesize''', then runs cleanup.
 +
 
 +
=== GetDownloadedEulaData ===
 +
Takes a type-0x15 input buffer [[#EulaDataPath]] and a type-0x6 output buffer, returns an output u64 '''filesize'''.
 +
 
 +
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.
 +
 
 +
=== SetupCardUpdate ===
 +
Takes an input u64 size and a TransferMemory handle, no output.
 +
 
 +
The permissions for the TransferMemory is None.
 +
 
 +
=== GetPreparedCardUpdateEulaDataSize ===
 +
Takes a type-0x15 input buffer [[#EulaDataPath]], returns an output u64 '''filesize'''.
 +
 
 +
=== GetPreparedCardUpdateEulaData ===
 +
Takes a type-0x15 input buffer [[#EulaDataPath]] and a type-0x6 output buffer, returns an output u64 '''filesize'''.
 +
 
 +
=== SetupCardUpdateViaSystemUpdater ===
 +
Takes an input u64 size and a TransferMemory handle, no output.
 +
 
 +
The permissions for the TransferMemory is None.
 +
 
 +
Same as SetupCardUpdate, except this doesn't have the code for [[Filesystem_services|GetGameCardHandle/GetGameCardUpdatePartitionInfo]], and uses [[Filesystem_services|OpenRegisteredUpdatePartition]] instead of [[Filesystem_services|OpenGameCardFileSystem]]. This also uses a different is_initialized bool state flag.
 +
 
 +
=== HasReceived ===
 +
No input, returns an output u8 bool.
 +
 
 +
Same as [[#HasDownloaded]] except this uses [[NIM_services|nim]] cmd71 and cmd73.
 +
 
 +
=== RequestReceiveSystemUpdate ===
 +
Takes a type-0x15 input buffer containing a [[#SystemDeliveryInfo]], an u16, an u32, returns an output Event handle and an [[#IAsyncResult]].
 +
 
 +
=== GetReceiveProgress ===
 +
No input, returns an output [[#SystemUpdateProgress]].
 +
 
 +
Same as [[#GetDownloadProgress]] except this uses [[NIM_services|nim]] cmd71 and cmd73.
 +
 
 +
=== ApplyReceivedUpdate ===
 +
No input/output.
 +
 
 +
=== GetReceivedEulaDataSize ===
 +
Takes a type-0x15 input buffer [[#EulaDataPath]], returns an output u64 '''filesize'''.
 +
 
 +
=== GetReceivedEulaData ===
 +
Takes a type-0x15 input buffer [[#EulaDataPath]] and a type-0x6 output buffer, returns an output u64 '''filesize'''.
 +
 
 +
=== SetupToReceiveSystemUpdate ===
 +
No input/output.
 +
 
 +
This just uses [[NIM_services|nim]] ListSystemUpdateTask, then when a task is returned uses it with DestroySystemUpdateTask.
 +
 
 +
=== RequestCheckLatestUpdateIncludesRebootlessUpdate ===
 +
No input, returns an output Event handle and an [[#IAsyncValue]].
 +
 
 +
== BackgroundNetworkUpdateState ==
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Value
 +
!  Description
 +
|-
 +
| 0 || Unknown. Values >2 are handled the same as this by [[qlaunch]].
 +
|-
 +
| 1 || Unknown.
 +
|-
 +
| 2 || Unknown.
 +
|}
 +
 
 +
This is "nn::ns::BackgroundNetworkUpdateState". This is an u8.
 +
 
 +
== SystemUpdateProgress ==
 +
This is "nn::ns::SystemUpdateProgress". This is a 0x10-byte struct.
 +
 
 +
== EulaDataPath ==
 +
This is "nn::ns::detail::EulaDataPath". This is a 0x100-byte struct.
 +
 
 +
This contains a file path.
 +
 
 +
== SystemDeliveryInfo ==
 +
This is "nn::ns::SystemDeliveryInfo". This is a 0x100-byte struct.
 +
 
 +
== LatestSystemUpdate ==
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Value
 +
!  Description
 +
|-
 +
| 1 || Unknown.
 +
|-
 +
| 2 || Unknown.
 +
|-
 +
| Other values || Unknown.
 +
|}
 +
 
 +
This is "nn::ns::LatestSystemUpdate". This is an u8.
    
= IAsyncValue =
 
= IAsyncValue =
Line 1,235: Line 1,498:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 ||  
+
| 0 || GetSize
 
|-
 
|-
| 1 ||  
+
| 1 || Get
 
|-
 
|-
| 2 ||  
+
| 2 || Cancel
 
|-
 
|-
| 3 || [4.0.0+]  
+
| 3 || [4.0.0+] GetErrorContext
 
|}
 
|}
   Line 1,253: Line 1,516:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 0 ||  
+
| 0 || Get
 
|-
 
|-
| 1 ||  
+
| 1 || Cancel
 
|-
 
|-
| 2 || [4.0.0+]  
+
| 2 || [4.0.0+] GetErrorContext
 
|}
 
|}
   Line 1,287: Line 1,550:  
| 9 || [[#LaunchApplicationWithStorageIdForDevelop]]
 
| 9 || [[#LaunchApplicationWithStorageIdForDevelop]]
 
|-
 
|-
| 10 || [6.0.0+] TerminateApplication2
+
| 10 || [6.0.0-8.1.0] IsSystemMemoryResourceLimitBoosted
 
|-
 
|-
 
| 11 || [6.0.0+] GetRunningApplicationProcessIdForDevelop
 
| 11 || [6.0.0+] GetRunningApplicationProcessIdForDevelop
 
|-
 
|-
 
| 12 || [6.0.0+] SetCurrentApplicationRightsEnvironmentCanBeActiveForDevelop
 
| 12 || [6.0.0+] SetCurrentApplicationRightsEnvironmentCanBeActiveForDevelop
 +
|-
 +
| 13 || [9.0.0+] [[#CreateApplicationResourceForDevelop]]
 +
|-
 +
| 14 || [9.0.0+] [[#IsPreomiaForDevelop]]
 
|}
 
|}
    
== LaunchProgram ==
 
== LaunchProgram ==
Wrapper for "pm:shell" [[Process_Manager_services#LaunchProcess|LaunchProcess]].
+
Wrapper for "pm:shell" [[Process_Manager_services#pm:shell|LaunchProcess]].
    
== TerminateProcess ==
 
== TerminateProcess ==
Wrapper for "pm:shell" [[Process_Manager_services#TerminateTitleByPid|TerminateTitleByPid]].
+
Wrapper for "pm:shell" [[Process_Manager_services#pm:shell|TerminateProcess]].
    
== TerminateProgram ==
 
== TerminateProgram ==
Wrapper for "pm:shell" [[Process_Manager_services#TerminateTitleByTitleId|TerminateTitleByTitleId]].
+
Wrapper for "pm:shell" [[Process_Manager_services#pm:shell|TerminateProgram]].
    
== GetShellEvent ==
 
== GetShellEvent ==
Wrapper for "pm:shell" [[Process_Manager_services#GetProcessEventWaiter|GetProcessEventWaiter]].
+
Wrapper for "pm:shell" [[Process_Manager_services#pm:shell|GetProcessEventHandle]].
    
== GetShellEventInfo ==
 
== GetShellEventInfo ==
Wrapper for "pm:shell" [[Process_Manager_services#GetProcessEventType|GetProcessEventType]].
+
Wrapper for "pm:shell" [[Process_Manager_services#pm:shell|GetProcessEventInfo]].
    
== TerminateApplication ==
 
== TerminateApplication ==
Calls "pm:shell" [[Process_Manager_services#GetCrashingProcessPid|GetCrashingProcessPid]] and sends PID to [[Process_Manager_services#TerminateTitleByPid|TerminateTitleByPid]].
+
Calls "pm:shell" [[Process_Manager_services#pm:shell|GetApplicationProcessIdForShell]] and sends PID to [[Process_Manager_services#pm:shell|TerminateProcess]].
    
== PrepareLaunchProgramFromHost ==
 
== PrepareLaunchProgramFromHost ==
Line 1,325: Line 1,592:  
Takes 2 input u8s, an u32 [[Process_Manager_services#LaunchFlags|LaunchFlags]], and an u64 titleID. Returns an output u64 PID.
 
Takes 2 input u8s, an u32 [[Process_Manager_services#LaunchFlags|LaunchFlags]], and an u64 titleID. Returns an output u64 PID.
   −
Launches an application title which is registered with NS.  
+
Launches an application title which is registered with NS.
 +
 
 +
== CreateApplicationResourceForDevelop ==
 +
Takes an input u32 (1 = Preomia). Returns an [[#IApplicationResource]].
 +
 
 +
== IsPreomiaForDevelop ==
 +
Takes an u64 titleID. Returns a bool.
    
[[Category:Services]]
 
[[Category:Services]]

Navigation menu