Changes

Jump to navigation Jump to search
371 bytes added ,  17:10, 16 November 2019
no edit summary
| 0x0
| 0x8
| Title ID[[NCM_services#ProgramId|ProgramId]]
|-
| 0x8
== LaunchApplication ==
Takes an input u64 titleID[[NCM_services#ProgramId|ProgramId]], 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#ProgramId|ProgramId]].
The input titleID [[NCM_services#ProgramId|ProgramId]] 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#ProgramId|ProgramId]], 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#ProgramId|ProgramId]], 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.
== ListApplicationContentMetaStatus ==
Takes a type-0x6 output buffer containing an array of the below entries, an input s32 index and u64 titleID[[NCM_services#ProgramId|ProgramId]], returns an output s32 out_entrycount.
Returns 0x10-byte entries using the specified titleID [[NCM_services#ProgramId|ProgramId]] 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#ProgramId|ProgramId]]
|}
==== RequestApplicationUpdateInfo ====
Takes an input u64 titleID (<code>nn::ncm::[[NCM_services#ProgramId|ApplicationId</code>)]], 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]] 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#ProgramId|ApplicationId</code>)]], 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#ProgramId|ApplicationId</code>)]], returns an output Event handle and an [[#IAsyncValue]].
The data that can be read from the [[#IAsyncValue]] is [[#NoDownloadRightsErrorResolution]].
== UpdateSafeSystemVersionForDebug ==
Takes an input u64 '''titleID''' [[NCM_services#ProgramId|ProgramId]] 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#ProgramId|ProgramId]] 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#ProgramId|ProgramId]] 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#ProgramId|ProgramId]], 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#ProgramId|ProgramId]], 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#ProgramId|ProgramId]]. 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 =

Navigation menu