Changes

491 bytes added ,  18:06, 16 November 2019
no edit summary
| 0x0
| 0x8
| Title ID[[NCM_services#ApplicationId|ApplicationId]]
|-
| 0x8
== LaunchApplication ==
Takes an input u64 titleID[[NCM_services#ApplicationId|ApplicationId]], returns an output u64 PID.
Launches an application title which is registered with NS.
== GetApplicationContentPath ==
Takes a 0x16-type output buffer, an u8 [[NCM_services#Title_TypesContentMetaType|title typeContentMetaType]], and an u64 titleID[[NCM_services#ApplicationId|ApplicationId]].
The input titleID [[NCM_services#ApplicationId|ApplicationId]] is used with the application-title table like various other cmds, anything not in that table can't be used with this.
Returns a string path for the specified type of patch content with this titleID[[NCM_services#ApplicationId|ApplicationId]], otherwise returns regular-application paths when update-title not installed. Returns an error when the specified type of content doesn't exist for this title. Starts with "@{SdCardContent,UserContent}://" and ends in ".nca".
For gamecard content, the output path is: "@GcSXXXXXXXX:/<NcaId>.nca". NCA-type0 with gamecard returns 0 with an empty output string.
== GetApplicationControlData ==
Takes an input u8 [[#ApplicationControlSource]], an u64 titleID[[NCM_services#ApplicationId|ApplicationId]], 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 (Storage if not in cache).
Loads cached [[control.nacp]] to buf+0 and the cached icon to buf+0x4000. Returns an error if the buffer is too small.
| 0x2
| StorageOnly (Returns data from storage without using cache)
|-
|}
== ListApplicationContentMetaStatus ==
Takes a type-0x6 output buffer containing an array of the below entries, an input s32 index and u64 titleID[[NCM_services#ApplicationId|ApplicationId]], returns an output s32 out_entrycount.
Returns 0x10-byte entries using the specified titleID [[NCM_services#ApplicationId|ApplicationId]] starting at the specified index. Can only return game titles. The second entry if any is the update-title usually. When the input entryindex is >= totalentries, this will return 0 with out_entrycount=0.
Entry structure:
| 0x0
| 0x1
| u8 "type". [[Content_Manager_servicesNCM_services#ContentMetaType|Title typeContentMetaType]] (String is from web-applet"type")
|-
| 0x1
| 0x1
| u8 "installedStorage" / [[NCM_services#StorageId|StorageId]] (String is from web-applet"installedStorage")
|-
| 0x2
| 0x4
| 0x4
| u32 Title-versionVersion
|-
| 0x8
| 0x8
| u64 titleID[[NCM_services#ApplicationId|ApplicationId]]
|}
==== RequestApplicationUpdateInfo ====
Takes an input u64 titleID (<code>nn::ncm::[[NCM_services#ApplicationId</code>)|ApplicationId]], returns an output Event handle and an [[#IAsyncValue]].
The data that can be read from the [[#IAsyncValue]] is [[#ApplicationUpdateInfo]].
This is used by AM cmd [[Applet_Manager_services#LaunchDevMenu|LaunchDevMenu]].
This loads titleIDs ProgramIds 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|NCMOpenContentMetaDatabase]] OpenContentMetaDatabase is used with StorageId = NandSystem, then IContentMetaDatabase GetLatestContentMetaKey is used with both of the above titleIDs 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.
==== RequestNoDownloadRightsErrorResolution ====
Takes an input u64 titleID (<code>nn::ncm::[[NCM_services#ApplicationId</code>)|ApplicationId]], returns an output Event handle and an [[#IAsyncValue]].
The data that can be read from the [[#IAsyncValue]] is [[#NoDownloadRightsErrorResolution]].
==== RequestResolveNoDownloadRightsError ====
Takes an input u64 titleID (<code>nn::ncm::[[NCM_services#ApplicationId</code>)|ApplicationId]], returns an output Event handle and an [[#IAsyncValue]].
The data that can be read from the [[#IAsyncValue]] is [[#NoDownloadRightsErrorResolution]].
==== GetApplicationDeliveryInfo ====
Takes a type-0x6 output buffer containing an array of [[#ApplicationDeliveryInfo]], an input u32 bitmask <code>nn::ns::ApplicationDeliveryAttributeTag</code>, an u64 <code>nn::ncm::[[NCM_services#ApplicationId</code>|ApplicationId]], and returns an output s32 total_out.
An error is thrown if any bit is set in ApplicationDeliveryAttributeTag besides bit1. The output array-count must be at least 1: only 1 entry will be written to this array (hence on success total_out will also only be 1 on success).
==== RequestReceiveApplication ====
Takes a type-0x5 input buffer containing an array of [[NCM_services#ContentMetaKey|ContentMetaKey]], a [[NCM_services#StorageId|StorageId]], an u16 port, an u32 Ipv4Address, an u64 <code>nn::ncm::[[NCM_services#ApplicationId</code>|ApplicationId]], returns an output Event handle and an [[#IAsyncResult]].
[[qlaunch]] uses value Any for the StorageId, and value 55556 for the port.
==== CommitReceiveApplication ====
Takes an input u64 <code>nn::ncm::[[NCM_services#ApplicationId</code>|ApplicationId]], no output.
==== GetReceiveApplicationProgress ====
Takes an input u64 <code>nn::ncm::[[NCM_services#ApplicationId</code>|ApplicationId]], returns an output [[#ReceiveApplicationProgress]].
An error is thrown if a state ref-count is zero. An error is thrown if [[NIM_services|nim]] ListApplicationApplyDeltaTask returns a task.
==== RequestSendApplication ====
Takes a type-0x5 input buffer containing an array of [[NCM_services#ContentMetaKey|ContentMetaKey]], an u16 port, an u32 Ipv4Address, an u64 <code>nn::ncm::[[NCM_services#ApplicationId</code>|ApplicationId]], returns an output Event handle and an [[#IAsyncResult]].
[[qlaunch]] uses value 55556 for the port.
==== GetSendApplicationProgress ====
Takes an input u64 <code>nn::ncm::[[NCM_services#ApplicationId</code>|ApplicationId]], returns an output [[#SendApplicationProgress]].
Same as [[#GetReceiveApplicationProgress]] except this is the Send version, and uses [[NIM_services|nim]] cmd68/cmd63 instead.
==== ListNotCommittedContentMeta ====
Takes a type-0x6 output buffer containing an array of [[NCM_services#ContentMetaKey|ContentMetaKey]], a s32, an u64 <code>nn::ncm::[[NCM_services#ApplicationId</code>|ApplicationId]], returns an output s32 total_out.
==== RecoverDownloadTask ====
== UpdateSafeSystemVersionForDebug ==
Takes an input u64 '''titleID''' [[NCM_services#ApplicationId|ApplicationId]] 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''' [[NCM_services#ApplicationId|ApplicationId]] and '''version''' in it.
Finally, it calls [[NCM_services#ncm|OpenContentMetaDatabase]] with [[NCM_services#StorageId|StorageId]] 3, then calls [[NCM_services#IContentMetaDatabase|GetLatestContentMetaKey]] with the supplied '''titleID''' [[NCM_services#ApplicationId|ApplicationId]] 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 an output [[NCM_services#ContentMetaKey|ContentMetaKey]] with the cached contents of "ns_ssversion:/entry" (u64 '''titleID'''[[NCM_services#ApplicationId|ApplicationId]], u32 '''version''' and u32 '''policy''' from <code>vulnerability!needs_update_vulnerability_policy</code>).
= ns:su =
== LaunchApplicationForDevelop ==
Takes an input u32 [[Process_Manager_services#LaunchFlags|LaunchFlags]] and u64 titleID[[NCM_services#ApplicationId|ApplicationId]], returns an output u64 PID.
Same as LaunchApplicationWithStorageId except the last two params passed to the internal vtable funcptr call are value 0x6, instead of from the command input.
== LaunchApplicationWithStorageIdForDevelop ==
Takes 2 input u8s, an u32 [[Process_Manager_services#LaunchFlags|LaunchFlags]], and an u64 titleID[[NCM_services#ApplicationId|ApplicationId]]. Returns an output u64 PID.
Launches an application title which is registered with NS.
== IsPreomiaForDevelop ==
Takes an u64 titleID[[NCM_services#ProgramId|ProgramId]]. Returns a bool.
= VersionListData =