Changes

Jump to navigation Jump to search
7,091 bytes added ,  20:37, 14 July 2021
no edit summary
Line 25: Line 25:  
|-
 
|-
 
| 9 || [10.0.0+] GetAddOnContentLostErrorCode
 
| 9 || [10.0.0+] GetAddOnContentLostErrorCode
 +
|-
 +
| 10 || [11.0.0+] GetAddOnContentListChangedEventWithProcessId
 
|-
 
|-
 
| 100 || [7.0.0+] [[#IPurchaseEventManager|CreateEcPurchasedEventManager]]
 
| 100 || [7.0.0+] [[#IPurchaseEventManager|CreateEcPurchasedEventManager]]
 
|-
 
|-
 
| 101 || [9.0.0+] [[#IPurchaseEventManager|CreatePermanentEcPurchasedEventManager]]
 
| 101 || [9.0.0+] [[#IPurchaseEventManager|CreatePermanentEcPurchasedEventManager]]
 +
|-
 +
| 110 || [12.0.0+] [[#IContentsServiceManager|CreateContentsServiceManager]]
 
|}
 
|}
   Line 47: Line 51:  
|-
 
|-
 
| 4 || [9.0.0+] PopPurchasedProductInfoWithUid
 
| 4 || [9.0.0+] PopPurchasedProductInfoWithUid
 +
|}
 +
 +
== IContentsServiceManager ==
 +
This is "nn::ec::IContentsServiceManager".
 +
 +
This was added with [12.0.0+].
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || [[#RequestContentsAuthorizationToken]]
 +
|}
 +
 +
=== RequestContentsAuthorizationToken ===
 +
Takes a total of 0x50-bytes of input, a PID, a type-0x5 input buffer. Returns an [[#IAsyncData|IAsyncData]] and an output handle.
 +
 +
== IAsyncData ==
 +
This is "nn::ec::detail::IAsyncData".
 +
 +
This was added with [12.0.0+].
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || GetSize
 +
|-
 +
| 1 || Get
 +
|-
 +
| 2 || Cancel
 
|}
 
|}
   Line 84: Line 119:  
| 17 || ListApplicationRecordContentMeta
 
| 17 || ListApplicationRecordContentMeta
 
|-
 
|-
| 18 ||  
+
| 18 || CheckLaunchRights
 
|-
 
|-
 
| 19 || [[#LaunchApplication]]
 
| 19 || [[#LaunchApplication]]
Line 106: Line 141:  
| 33 || ResumeApplicationDownload
 
| 33 || ResumeApplicationDownload
 
|-
 
|-
| 34 ||  
+
| 34 || ClearTaskStatusList
 
|-
 
|-
 
| 35 || UpdateVersionList
 
| 35 || UpdateVersionList
Line 428: Line 463:  
|}
 
|}
   −
= ns:am2, ns:ec, ns:rid, ns:rt, ns:web =
+
= ns:am2, ns:ec, ns:rid, ns:rt, ns:web, ns:ro =
 
These services are all, at the top level, "nn::ns::detail::IServiceGetterInterface". 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.
 
These services are all, at the top level, "nn::ns::detail::IServiceGetterInterface". 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.
 +
 +
[11.0.0+] ns:ro was added.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 435: Line 472:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 7988 || [6.0.0+] [[#IDynamicRightsInterface|GetDynamicRightsInterface]].
+
| 7988 || [6.0.0+] [[#IDynamicRightsInterface|GetDynamicRightsInterface]]
 
|-
 
|-
| 7989 || [5.1.0+] [[#IReadOnlyApplicationControlDataInterface|GetReadOnlyApplicationControlDataInterface]].
+
| 7989 || [5.1.0+] [[#IReadOnlyApplicationControlDataInterface|GetReadOnlyApplicationControlDataInterface]]
 
|-
 
|-
| 7991 || [5.0.0+] [[#IReadOnlyApplicationRecordInterface|GetReadOnlyApplicationRecordInterface]].
+
| 7991 || [5.0.0+] [[#IReadOnlyApplicationRecordInterface|GetReadOnlyApplicationRecordInterface]]
 
|-
 
|-
 
| 7992 || [4.0.0+] [[#IECommerceInterface|GetECommerceInterface]]
 
| 7992 || [4.0.0+] [[#IECommerceInterface|GetECommerceInterface]]
Line 515: Line 552:  
| 30 || [[#RequestApplicationUpdateInfo]]
 
| 30 || [[#RequestApplicationUpdateInfo]]
 
|-
 
|-
| 31 || [1.0.0-3.0.2]  
+
| 31 || [1.0.0-3.0.2] RequestUpdateApplication
 
|-
 
|-
 
| 32 || [[#CancelApplicationDownload]]
 
| 32 || [[#CancelApplicationDownload]]
Line 615: Line 652:  
| 93 || [5.0.0+] GetMainApplicationProgramIndex
 
| 93 || [5.0.0+] GetMainApplicationProgramIndex
 
|-
 
|-
| 94 || [6.0.0+] LaunchApplication
+
| 94 || [6.0.0+] [[#LaunchApplication_2|LaunchApplication]]
 
|-
 
|-
 
| 95 || [6.0.0+] [[#GetApplicationLaunchInfo]]
 
| 95 || [6.0.0+] [[#GetApplicationLaunchInfo]]
Line 657: Line 694:  
| 301 || PopApplicationShellEventInfo
 
| 301 || PopApplicationShellEventInfo
 
|-
 
|-
| 302 || LaunchLibraryApplet
+
| 302 || [[#LaunchLibraryApplet]]
 
|-
 
|-
 
| 303 || TerminateLibraryApplet
 
| 303 || TerminateLibraryApplet
 
|-
 
|-
| 304 || LaunchSystemApplet
+
| 304 || [[#LaunchSystemApplet]]
 
|-
 
|-
 
| 305 || TerminateSystemApplet
 
| 305 || TerminateSystemApplet
 
|-
 
|-
| 306 || LaunchOverlayApplet
+
| 306 || [[#LaunchOverlayApplet]]
 
|-
 
|-
 
| 307 || TerminateOverlayApplet
 
| 307 || TerminateOverlayApplet
Line 770: Line 807:  
|-
 
|-
 
| 915 || [9.0.0+] ShowApplicationRecord
 
| 915 || [9.0.0+] ShowApplicationRecord
 +
|-
 +
| 916 || [11.0.0+] IsApplicationAutoDeleteDisabled
 
|-
 
|-
 
| 1000 || [[#RequestVerifyApplicationDeprecated]]
 
| 1000 || [[#RequestVerifyApplicationDeprecated]]
Line 802: Line 841:  
|-
 
|-
 
| 1312 || [10.0.0+] HasMovableEntity
 
| 1312 || [10.0.0+] HasMovableEntity
 +
|-
 +
| 1313 || [11.0.0+] CleanupOrphanContents
 +
|-
 +
| 1314 || [11.0.0+] CheckPreconditionSatisfiedToMove
 
|-
 
|-
 
| 1400 || PrepareShutdown
 
| 1400 || PrepareShutdown
Line 830: Line 873:  
|-
 
|-
 
| 1704 || [8.0.0+] [[#GetApplicationViewWithPromotionInfo]]
 
| 1704 || [8.0.0+] [[#GetApplicationViewWithPromotionInfo]]
 +
|-
 +
| 1705 || [11.0.0+] [[#IsPatchAutoDeletableApplication]]
 
|-
 
|-
 
| 1800 || IsNotificationSetupCompleted
 
| 1800 || IsNotificationSetupCompleted
Line 938: Line 983:  
|-
 
|-
 
| 2353 || [10.0.0+] GetApplicationDownloadTaskInfo
 
| 2353 || [10.0.0+] GetApplicationDownloadTaskInfo
 +
|-
 +
| 2354 || [11.0.0+] PrioritizeApplicationBackgroundTask
 +
|-
 +
| 2355 || [12.0.0+] PreferStorageEfficientUpdate
 +
|-
 +
| 2356 || [12.0.0+] RequestStorageEfficientUpdatePreferable
 
|-
 
|-
 
| 2400 || [8.0.0+] [[#GetPromotionInfo]]
 
| 2400 || [8.0.0+] [[#GetPromotionInfo]]
Line 965: Line 1,016:  
| 2800 || [9.0.0+] GetApplicationIdOfPreomia
 
| 2800 || [9.0.0+] GetApplicationIdOfPreomia
 
|-
 
|-
| 9999 || [10.0.0+] GetApplicationCertificate
+
| 3000 || [11.0.0+] [[#RegisterDeviceLockKey]]
 +
|-
 +
| 3001 || [11.0.0+] [[#UnregisterDeviceLockKey]]
 +
|-
 +
| 3002 || [11.0.0+] [[#VerifyDeviceLockKey]]
 +
|-
 +
| 3003 || [11.0.0+] [[#HideApplicationIcon]]
 +
|-
 +
| 3004 || [11.0.0+] [[#ShowApplicationIcon]]
 +
|-
 +
| 3005 || [11.0.0+] [[#HideApplicationTitle]]
 +
|-
 +
| 3006 || [11.0.0+] [[#ShowApplicationTitle]]
 +
|-
 +
| 3007 || [11.0.0+] [[#EnableGameCard]]
 +
|-
 +
| 3008 || [11.0.0+] [[#DisableGameCard]]
 +
|-
 +
| 3009 || [11.0.0+] [[#EnableLocalContentShare]]
 +
|-
 +
| 3010 || [11.0.0+] [[#DisableLocalContentShare]]
 +
|-
 +
| 3011 || [11.0.0+] [[#IsApplicationIconHidden]]
 +
|-
 +
| 3012 || [11.0.0+] [[#IsApplicationTitleHidden]]
 +
|-
 +
| 3013 || [11.0.0+] [[#IsGameCardEnabled]]
 +
|-
 +
| 3014 || [11.0.0+] [[#IsLocalContentShareEnabled]]
 +
|-
 +
| 9999 || [10.0.0-10.2.0] GetApplicationCertificate
 
|}
 
|}
   Line 1,060: Line 1,141:     
See [[#RequestApplicationUpdateInfo]] regarding nifm.
 
See [[#RequestApplicationUpdateInfo]] regarding nifm.
 +
 +
==== LaunchApplication ====
 +
Takes an input u8 ProgramIndex, an input [[#ApplicationLaunchInfo]], returns an output u64.
    
==== GetApplicationLaunchInfo ====
 
==== GetApplicationLaunchInfo ====
Line 1,078: Line 1,162:  
[[NCM_services#ncm|OpenContentMetaDatabase]] is used with StorageId = NandSystem, then IContentMetaDatabase GetLatestContentMetaKey is used with both of the above ProgramIds to verify that the cmd is successful.
 
[[NCM_services#ncm|OpenContentMetaDatabase]] is used with StorageId = NandSystem, then IContentMetaDatabase GetLatestContentMetaKey is used with both of the above ProgramIds 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.
+
Then if the above succeeds, the above titles are launched with the above StorageId via [[Process_Manager_services|pmshell]] LaunchProgram ([10.0.0+] [[PGL_services#LaunchProgram|pgl]] with pgl_launch_flags=0), with a 0.5s sleep-thread afterwards on success. [[Process_Manager_services#LaunchFlags|LaunchFlags]] value 0xB is used here.
    
==== DeleteUserSaveDataAll ====
 
==== DeleteUserSaveDataAll ====
Line 1,096: Line 1,180:  
==== UnregisterNetworkServiceAccountWithUserSaveDataDeletion ====
 
==== UnregisterNetworkServiceAccountWithUserSaveDataDeletion ====
 
Takes an input [[Account_services#Uid|Uid]], no output.
 
Takes an input [[Account_services#Uid|Uid]], no output.
 +
 +
==== LaunchLibraryApplet ====
 +
Takes an input u64 [[NCM_services#ProgramId|ProgramId]], returns an output u64.
 +
 +
The specified program is launched with StorageId=BuiltInSystem via [[Process_Manager_services|pmshell]] LaunchProgram ([10.0.0+] [[PGL_services#LaunchProgram|pgl]] with pgl_launch_flags=0). [[Process_Manager_services#LaunchFlags|LaunchFlags]] value 0x9 is used here. The output u64 from here is written to the output for this cmd, on success.
 +
 +
This is used by [[Applet_Manager_services|AM]].
 +
 +
==== LaunchSystemApplet ====
 +
No input, returns an output u64.
 +
 +
A state flag must be zero, otherwise an error is thrown. When a state field is value 1, a hard-coded ProgramId for MaintenanceMenu is used. Otherwise, the ProgramId is loaded from [[System_Settings|system-setting]] <code>ns.applet!system_applet_id</code>.
 +
 +
The SystemApplet is launched with StorageId=BuiltInSystem via [[Process_Manager_services|pmshell]] LaunchProgram ([10.0.0+] [[PGL_services#LaunchProgram|pgl]] with pgl_launch_flags=0). [[Process_Manager_services#LaunchFlags|LaunchFlags]] value 0x9 is used here. The output u64 from here is written to the output for this cmd, on success.
 +
 +
This is used by [[Applet_Manager_services|AM]].
 +
 +
==== LaunchOverlayApplet ====
 +
No input, returns an output u64.
 +
 +
A state flag must be zero, otherwise an error is thrown. The ProgramId is loaded from [[System_Settings|system-setting]] <code>ns.applet!overlay_applet_id</code>.
 +
 +
The OverlayApplet is launched with StorageId=BuiltInSystem via [[Process_Manager_services|pmshell]] LaunchProgram ([10.0.0+] [[PGL_services#LaunchProgram|pgl]] with pgl_launch_flags=0). [[Process_Manager_services#LaunchFlags|LaunchFlags]] value 0x9 is used here. The output u64 from here is written to the output for this cmd, on success.
 +
 +
This is used by [[Applet_Manager_services|AM]].
    
==== RequestDownloadApplicationControlData ====
 
==== RequestDownloadApplicationControlData ====
Line 1,218: Line 1,327:  
==== GetApplicationViewWithPromotionInfo ====
 
==== GetApplicationViewWithPromotionInfo ====
 
Takes a type-0x6 output buffer containing an array of [[#ApplicationViewWithPromotionInfo]], a type-0x5 input buffer containing an array of u64 [[NCM_services#ApplicationId|ApplicationIds]], no output.
 
Takes a type-0x6 output buffer containing an array of [[#ApplicationViewWithPromotionInfo]], a type-0x5 input buffer containing an array of u64 [[NCM_services#ApplicationId|ApplicationIds]], no output.
 +
 +
==== IsPatchAutoDeletableApplication ====
 +
Takes an input [[NCM_services#ApplicationId|ApplicationId]], returns an output bool.
 +
 +
Compares the input ApplicationId with the value of [[System_Settings|system-setting]] <code>ns.application!auto_deletable_application_id_on_not_enough_space</code>, with the bool being set to the comparsion result.
    
==== RequestDownloadApplicationPrepurchasedRights ====
 
==== RequestDownloadApplicationPrepurchasedRights ====
Line 1,296: Line 1,410:  
** Uses [[NIM_services|nim]] cmd56, returning the Result on failure. Waits for the IAsyncResult operation from this to finish, then uses the Get cmd to get the output Result.
 
** Uses [[NIM_services|nim]] cmd56, returning the Result on failure. Waits for the IAsyncResult operation from this to finish, then uses the Get cmd to get the output Result.
 
** Handles cleanup and returns.
 
** Handles cleanup and returns.
* On success, this loads various data which is then used for saving a SystemPlayReport when a state flag is set.
+
* On success, this loads various data which is then used for saving a SystemPlayReport when the cached [[System_Settings|system-setting]] "systemreport!enabled" is set.
 
** The EventId is "receive_app_contents" with ApplicationId <NS ProgramId>.
 
** The EventId is "receive_app_contents" with ApplicationId <NS ProgramId>.
   Line 1,325: Line 1,439:  
** Uses [[NIM_services|nim]] cmd61, returning the Result on failure. Waits for the IAsyncResult operation from this to finish, then uses the Get cmd to get the output Result.
 
** Uses [[NIM_services|nim]] cmd61, returning the Result on failure. Waits for the IAsyncResult operation from this to finish, then uses the Get cmd to get the output Result.
 
** Handles cleanup and returns.
 
** Handles cleanup and returns.
* On success, this loads various data which is then used for saving a SystemPlayReport when a state flag is set.
+
* On success, this loads various data which is then used for saving a SystemPlayReport when the cached [[System_Settings|system-setting]] "systemreport!enabled" is set.
 
** The EventId is "send_app_contents" with ApplicationId <NS ProgramId>.
 
** The EventId is "send_app_contents" with ApplicationId <NS ProgramId>.
   Line 1,400: Line 1,514:  
==== GetApplicationResource ====
 
==== GetApplicationResource ====
 
Returns an [[#IApplicationResource]].
 
Returns an [[#IApplicationResource]].
 +
 +
==== RegisterDeviceLockKey ====
 +
Takes a type-0x5 input buffer containing an InArray of u8, no output.
 +
 +
User-processes expose this with two funcs: one which uses an user-specified u8 array directly, while the other uses [[HID_services#NpadButtonSet|NpadButton]].
 +
 +
This does SHA256 hashing, etc.
 +
 +
==== UnregisterDeviceLockKey ====
 +
No input/output.
 +
 +
Runs code identical to [[#RegisterDeviceLockKey]], except the passed buffer/size are 0.
 +
 +
==== VerifyDeviceLockKey ====
 +
Takes a type-0x5 input buffer containing an InArray of u8, no output.
 +
 +
User-processes expose this with two funcs: one which uses an user-specified u8 array directly, while the other uses [[HID_services#NpadButtonSet|NpadButton]].
 +
 +
This runs hashing similar to [[#RegisterDeviceLockKey]], with the calculated hash being verified with the one from state.
 +
 +
==== HideApplicationIcon ====
 +
No input/output.
 +
 +
==== ShowApplicationIcon ====
 +
No input/output.
 +
 +
==== HideApplicationTitle ====
 +
No input/output.
 +
 +
==== ShowApplicationTitle ====
 +
No input/output.
 +
 +
==== EnableGameCard ====
 +
No input/output.
 +
 +
==== DisableGameCard ====
 +
No input/output.
 +
 +
==== EnableLocalContentShare ====
 +
No input/output.
 +
 +
==== DisableLocalContentShare ====
 +
No input/output.
 +
 +
==== IsApplicationIconHidden ====
 +
No input, returns an output bool.
 +
 +
==== IsApplicationTitleHidden ====
 +
No input, returns an output bool.
 +
 +
==== IsGameCardEnabled ====
 +
No input, returns an output bool.
 +
 +
==== IsLocalContentShareEnabled ====
 +
No input, returns an output bool.
 +
 +
Various Deliver cmds now load the same flag used by this cmd (IsLocalContentShareEnabled), with an error being returned when it's not enabled.
    
=== IGameCardStopper ===
 
=== IGameCardStopper ===
Line 1,479: Line 1,650:  
|-
 
|-
 
| 802 || [[#RequestVersionListData]]
 
| 802 || [[#RequestVersionListData]]
 +
|-
 +
| 900 || [12.0.0+] ImportAutoUpdatePolicyJsonForDebug
 +
|-
 +
| 901 || [12.0.0+] ListDefaultAutoUpdatePolicy
 +
|-
 +
| 902 || [12.0.0+] ListAutoUpdatePolicyForSpecificApplication
 
|-
 
|-
 
| 1000 || PerformAutoUpdate
 
| 1000 || PerformAutoUpdate
 +
|-
 +
| 1001 || [11.0.0+] ListAutoUpdateSchedule
 
|}
 
|}
   Line 1,663: Line 1,842:  
|-
 
|-
 
| 14 || [10.0.0+] SelectApplicationLicense
 
| 14 || [10.0.0+] SelectApplicationLicense
 +
|-
 +
| 15 || [12.0.0+] [[#RequestContentsAuthorizationToken]]
 
|}
 
|}
   Line 1,700: Line 1,881:  
==== GetRunningApplicationStatus ====
 
==== GetRunningApplicationStatus ====
 
Takes an input u64 "nn::ns::RightsEnvironmentHandle". Returns an u32 "nn::ns::RunningApplicationStatus".
 
Takes an input u64 "nn::ns::RightsEnvironmentHandle". Returns an u32 "nn::ns::RunningApplicationStatus".
 +
 +
==== RequestContentsAuthorizationToken ====
 +
Takes a total of 0x50-bytes of input, a type-0x5 input buffer. Returns an [[#IAsyncData_2|IAsyncData]] and an output handle.
 +
 +
==== IAsyncData ====
 +
This is "nn::ns::detail::IAsyncData".
 +
 +
This was added with [12.0.0+].
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 || GetSize
 +
|-
 +
| 1 || Get
 +
|-
 +
| 2 || Cancel
 +
|-
 +
| 3 || GetErrorContext
 +
|}
    
=== IECommerceInterface===
 
=== IECommerceInterface===
Line 2,064: Line 2,266:     
* 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.
* 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).
+
* On newer system-versions, this uses [[NIM_services|nim]] GetSystemUpdateTaskInfo then on success uses data from there to save a SystemPlayReport when the cached [[System_Settings|system-setting]] "systemreport!enabled" is set.
 
** The EventId is "systemupdate_dl_throughput" with ApplicationId 0100000000001018.
 
** 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",
+
** 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).
 
* 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.
 
** The EventId is "systemupdate_pass" with ApplicationId 0100000000001021.
Line 2,153: Line 2,355:  
** Uses [[NIM_services|nim]] cmd72, returning the Result on failure. Waits for the IAsyncResult operation from this to finish, then uses the Get cmd to get the output Result.
 
** Uses [[NIM_services|nim]] cmd72, returning the Result on failure. Waits for the IAsyncResult operation from this to finish, then uses the Get cmd to get the output Result.
 
** Handles cleanup and returns.
 
** Handles cleanup and returns.
* On success, this loads various data which is then used for saving a SystemPlayReport when a state flag is set.
+
* On success, this loads various data which is then used for saving a SystemPlayReport when the cached [[System_Settings|system-setting]] "systemreport!enabled" is set.
 
** The EventId is "receive_system_update" with ApplicationId <NS ProgramId>.
 
** The EventId is "receive_system_update" with ApplicationId <NS ProgramId>.
 
** This report has the following fields:  
 
** This report has the following fields:  
Line 2,278: Line 2,480:  
|-
 
|-
 
| 15 || [10.0.0+] [[#GetApplicationProgramIdFromHost]]
 
| 15 || [10.0.0+] [[#GetApplicationProgramIdFromHost]]
 +
|-
 +
| 16 || [12.0.0+] RefreshCachedDebugValues
 +
|-
 +
| 17 || [12.0.0+] PrepareLaunchApplicationFromHost
 +
|-
 +
| 18 || [12.0.0+] GetLaunchEvent
 +
|-
 +
| 19 || [12.0.0+] GetLaunchResult
 
|}
 
|}
  

Navigation menu