Changes

Jump to navigation Jump to search
6,524 bytes added ,  07:00, 17 December 2020
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]]
Line 84: Line 86:  
| 17 || ListApplicationRecordContentMeta
 
| 17 || ListApplicationRecordContentMeta
 
|-
 
|-
| 18 ||  
+
| 18 || CheckLaunchRights
 
|-
 
|-
 
| 19 || [[#LaunchApplication]]
 
| 19 || [[#LaunchApplication]]
Line 428: Line 430:  
|}
 
|}
   −
= 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 439:  
! 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 615: Line 619:  
| 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]]
 
|-
 
|-
| 96 || [6.0.0+] AcquireApplicationLaunchInfo
+
| 96 || [6.0.0+] [[#AcquireApplicationLaunchInfo]]
 
|-
 
|-
 
| 97 || [6.0.0+] GetMainApplicationProgramIndexByApplicationLaunchInfo
 
| 97 || [6.0.0+] GetMainApplicationProgramIndexByApplicationLaunchInfo
Line 657: Line 661:  
| 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 774:  
|-
 
|-
 
| 915 || [9.0.0+] ShowApplicationRecord
 
| 915 || [9.0.0+] ShowApplicationRecord
 +
|-
 +
| 916 || [11.0.0+] IsApplicationAutoDeleteDisabled
 
|-
 
|-
 
| 1000 || [[#RequestVerifyApplicationDeprecated]]
 
| 1000 || [[#RequestVerifyApplicationDeprecated]]
Line 802: Line 808:  
|-
 
|-
 
| 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 840:  
|-
 
|-
 
| 1704 || [8.0.0+] [[#GetApplicationViewWithPromotionInfo]]
 
| 1704 || [8.0.0+] [[#GetApplicationViewWithPromotionInfo]]
 +
|-
 +
| 1705 || [11.0.0+] [[#IsPatchAutoDeletableApplication]]
 
|-
 
|-
 
| 1800 || IsNotificationSetupCompleted
 
| 1800 || IsNotificationSetupCompleted
Line 938: Line 950:  
|-
 
|-
 
| 2353 || [10.0.0+] GetApplicationDownloadTaskInfo
 
| 2353 || [10.0.0+] GetApplicationDownloadTaskInfo
 +
|-
 +
| 2354 || [11.0.0+] PrioritizeApplicationBackgroundTask
 
|-
 
|-
 
| 2400 || [8.0.0+] [[#GetPromotionInfo]]
 
| 2400 || [8.0.0+] [[#GetPromotionInfo]]
Line 965: Line 979:  
| 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,104:     
See [[#RequestApplicationUpdateInfo]] regarding nifm.
 
See [[#RequestApplicationUpdateInfo]] regarding nifm.
 +
 +
==== LaunchApplication ====
 +
Takes an input u8 ProgramIndex, an input [[#ApplicationLaunchInfo]], returns an output u64.
 +
 +
==== GetApplicationLaunchInfo ====
 +
Takes an input [[NCM_services#ApplicationId|ApplicationId]], returns an output [[#ApplicationLaunchInfo]].
 +
 +
==== AcquireApplicationLaunchInfo ====
 +
Takes an input [[NCM_services#ApplicationId|ApplicationId]], returns an output [[#ApplicationLaunchInfo]].
 +
 +
This verifies that a state flag is set and that a state field matches the input ApplicationId, throwing an error otherwise. The [[#ApplicationLaunchInfo]] from state is copied to output, then the state flag is cleared.
    
==== LaunchDevMenu ====
 
==== LaunchDevMenu ====
Line 1,070: Line 1,125:  
[[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,089: Line 1,144:  
Takes an input [[Account_services#Uid|Uid]], no output.
 
Takes an input [[Account_services#Uid|Uid]], no output.
   −
==== RequestDownloadApplicationControlData ====
+
==== LaunchLibraryApplet ====
Takes an input [[NCM_services#ApplicationId|ApplicationId]], returns an output Event handle and an [[#IAsyncResult]].
+
Takes an input u64 [[NCM_services#ProgramId|ProgramId]], returns an output u64.
   −
See [[#RequestApplicationUpdateInfo]] regarding nifm.
+
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.
   −
==== ListApplicationTitle ====
+
This is used by [[Applet_Manager_services|AM]].
Takes an input TransferMemory handle, a type-0x5 input buffer containing an array of u64 [[NCM_services#ApplicationId|ApplicationIds]], an u8 [[#ApplicationControlSource]], an u64 size, returns an output Event handle and an [[#IAsyncValue]].
+
 
 +
==== 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 ====
 +
Takes an input [[NCM_services#ApplicationId|ApplicationId]], returns an output Event handle and an [[#IAsyncResult]].
 +
 
 +
See [[#RequestApplicationUpdateInfo]] regarding nifm.
 +
 
 +
==== ListApplicationTitle ====
 +
Takes an input TransferMemory handle, a type-0x5 input buffer containing an array of u64 [[NCM_services#ApplicationId|ApplicationIds]], an u8 [[#ApplicationControlSource]], an u64 size, returns an output Event handle and an [[#IAsyncValue]].
    
[[qlaunch]] uses value 0x1 for the u8.
 
[[qlaunch]] uses value 0x1 for the u8.
Line 1,210: Line 1,290:  
==== 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,288: Line 1,373:  
** 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,317: Line 1,402:  
** 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,392: Line 1,477:  
==== 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,473: Line 1,615:  
|-
 
|-
 
| 1000 || PerformAutoUpdate
 
| 1000 || PerformAutoUpdate
 +
|-
 +
| 1001 || [11.0.0+] ListAutoUpdateSchedule
 
|}
 
|}
   Line 2,056: Line 2,200:     
* 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,145: Line 2,289:  
** 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,570: Line 2,714:  
= DownloadTaskStatus =
 
= DownloadTaskStatus =
 
This is "nn::ns::DownloadTaskStatus". This is a 0x20-byte struct.
 
This is "nn::ns::DownloadTaskStatus". This is a 0x20-byte struct.
 +
 +
= ApplicationLaunchInfo =
 +
This is a 0x40-byte struct.
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x0 || 0x8 || [[NCM_services#ApplicationId|ApplicationId]]
 +
|-
 +
| 0x8 || 0x4 || Application version
 +
|-
 +
| 0xC || 0x4 || [[Process_Manager_services#LaunchFlags|LaunchFlags]], set to hard-coded value 0xB by [[#GetApplicationLaunchInfo]].
 +
|-
 +
| 0x10 || 0x1 || Application [[NCM_services#StorageId|StorageId]]
 +
|-
 +
| 0x11 || 0x1 || Update [[NCM_services#StorageId|StorageId]]
 +
|-
 +
| 0x12 || 0x2E ||
 +
|}
    
[[Category:Services]]
 
[[Category:Services]]

Navigation menu