Applet Manager services: Difference between revisions
(41 intermediate revisions by the same user not shown) | |||
Line 113: | Line 113: | ||
| 31 || [2.0.0+] [[#GetWriterLockAccessorEx]] || | | 31 || [2.0.0+] [[#GetWriterLockAccessorEx]] || | ||
|- | |- | ||
| 100 || [6.0.0+] PopRequestLaunchApplicationForDebug || | | 100 || [6.0.0+] [[#PopRequestLaunchApplicationForDebug]] || | ||
|- | |- | ||
| 200 || [8.0.0+] [[#LaunchDevMenu]] || | | 200 || [8.0.0+] [[#LaunchDevMenu]] || | ||
Line 142: | Line 142: | ||
The input value must be 0-3. 0 = HomeButton. | The input value must be 0-3. 0 = HomeButton. | ||
==== PopRequestLaunchApplicationForDebug ==== | |||
Takes a type-0x6 output buffer containing an array of u128 userIDs, returns an output u64 titleID (<code>nn::ncm::ApplicationId</code>) and an output s32 '''total_userIDs'''. | |||
The total entries in the userID buffer must be >= {total userIDs in state}. | |||
==== LaunchDevMenu ==== | ==== LaunchDevMenu ==== | ||
Line 149: | Line 154: | ||
Uses [[NS_Services#IApplicationManagerInterface]] cmd99. | Uses [[NS_Services#IApplicationManagerInterface]] cmd99. | ||
This is used by [[qlaunch]]. On success, official sw will enter an infinite loop with sleep-thread value 86400000000000. | |||
==== ILockAccessor ==== | ==== ILockAccessor ==== | ||
Line 272: | Line 279: | ||
| 100 || [[#PopFloatingApplicationForDevelopment]] || | | 100 || [[#PopFloatingApplicationForDevelopment]] || | ||
|} | |} | ||
[[#CreateApplication]]/[[#CreateSystemApplication]] eventually call the same internal func. With [[#CreateApplication]], two ptrs passed to the internal func are NULL, while with [[#CreateSystemApplication]] these are loaded from state. The initial content of [[#ApplicationLaunchRequestInfo]] is all-zero with [[#CreateSystemApplication]], while with [[#CreateApplication]] the first two u32s are value 0x3 with the rest all-zero. The [[#AppletId]] is set to 0x01 with [[#CreateApplication]], while with [[#CreateSystemApplication]] it's 0x04. | |||
==== CreateApplication ==== | ==== CreateApplication ==== | ||
Takes an input u64 <code>nn::ncm::ApplicationId</code> | Takes an input u64 titleID (<code>nn::ncm::ApplicationId</code>), returns an [[#IApplicationAccessor]]. | ||
==== PopLaunchRequestedApplication ==== | ==== PopLaunchRequestedApplication ==== | ||
Line 280: | Line 289: | ||
==== CreateSystemApplication ==== | ==== CreateSystemApplication ==== | ||
Takes an input u64 <code>nn::ncm::SystemApplicationId</code>, returns an [[#IApplicationAccessor]]. | Takes an input u64 titleID (<code>nn::ncm::SystemApplicationId</code>), returns an [[#IApplicationAccessor]]. | ||
[[qlaunch]] only uses this with a hard-coded titleID for the "starter" title. | |||
==== PopFloatingApplicationForDevelopment ==== | ==== PopFloatingApplicationForDevelopment ==== | ||
No input, returns an [[#IApplicationAccessor]]. | No input, returns an [[#IApplicationAccessor]]. | ||
Should not be used if no FloatingApplication is available (svcBreak). | |||
==== IApplicationAccessor ==== | ==== IApplicationAccessor ==== | ||
Line 353: | Line 366: | ||
===== GetApplicationControlProperty ===== | ===== GetApplicationControlProperty ===== | ||
No input, takes a type-0x6 output buffer. | No input, takes a type-0x6 output buffer. | ||
The output buffer must be at least 0x4000-bytes. Returns an error when the [[#AppletId]] is 0x04, aka when the IApplicationAccessor is for a SystemApplication. | |||
This gets the application [[NACP_Format|control.nacp]]. | This gets the application [[NACP_Format|control.nacp]]. | ||
Line 359: | Line 374: | ||
Takes a type-0x6 output buffer. | Takes a type-0x6 output buffer. | ||
The output buffer size must be at least 0x10-bytes. | The output buffer size must be at least 0x10-bytes. Returns an error when the [[#AppletId]] is 0x04, aka when the IApplicationAccessor is for a SystemApplication. | ||
This gets the | This gets the [[#ApplicationLaunchProperty]]. | ||
===== GetApplicationLaunchRequestInfo ===== | ===== GetApplicationLaunchRequestInfo ===== | ||
No input, returns an output 0x10-byte struct. | No input, returns an output 0x10-byte struct. | ||
This gets the ApplicationLaunchRequestInfo from state. The output struct is "nn::applet::ApplicationLaunchRequestInfo". | This gets the [[#ApplicationLaunchRequestInfo]] from state. The output struct is "nn::applet::ApplicationLaunchRequestInfo". | ||
===== SetUsers ===== | ===== SetUsers ===== | ||
Line 373: | Line 388: | ||
The total entries for the userIDs must be <=8. | The total entries for the userIDs must be <=8. | ||
When the input flag is true, the '''users_available''' state flag | When the input flag is true, this just clears the '''users_available''' state flag to 0 and returns. | ||
===== CheckRightsEnvironmentAvailable ===== | ===== CheckRightsEnvironmentAvailable ===== | ||
Line 384: | Line 399: | ||
Takes a type-0x6 output buffer containing an array of u128 userIDs, returns an output s32 '''total_entries'''. | Takes a type-0x6 output buffer containing an array of u128 userIDs, returns an output s32 '''total_entries'''. | ||
Gets a userID listing, this is unrelated to [[#SetUsers]]. | Gets a userID listing, this is unrelated to [[#SetUsers]]. [[qlaunch]] only uses 1 userID with this. | ||
The stored entry-count in state must be <= <size of output buffer in entries>. | The stored entry-count in state must be <= <size of output buffer in entries>. | ||
Line 598: | Line 613: | ||
Exits the LibraryApplet and returns to running the title which launched this LibraryApplet ([[qlaunch]] for example). | Exits the LibraryApplet and returns to running the title which launched this LibraryApplet ([[qlaunch]] for example). | ||
On success, official sw will enter an infinite loop with sleep-thread value 86400000000000. | |||
==== GetLibraryAppletInfo ==== | ==== GetLibraryAppletInfo ==== | ||
Line 673: | Line 688: | ||
==== CreateGameMovieTrimmer ==== | ==== CreateGameMovieTrimmer ==== | ||
Takes an input u64 and handle, returns a GRC [[GRC_services#IGameMovieTrimmer|IGameMovieTrimmer]]. | Takes an input u64 size and a TransferMemory handle, returns a GRC [[GRC_services#IGameMovieTrimmer|IGameMovieTrimmer]]. | ||
This is a wrapper for GRC [[GRC_services#OpenGameMovieTrimmer|OpenGameMovieTrimmer]]. | |||
Official sw uses an user-buffer for the tmem, with permissions=0. | |||
==== ReserveResourceForMovieOperation ==== | ==== ReserveResourceForMovieOperation ==== | ||
No input/output. | No input/output. | ||
Updates | Updates state fields. This must be used before [[#CreateGameMovieTrimmer]]. | ||
==== UnreserveResourceForMovieOperation ==== | ==== UnreserveResourceForMovieOperation ==== | ||
No input/output. | No input/output. | ||
Updates | Updates state fields. This must be used once finished with [[GRC_services#IGameMovieTrimmer|IGameMovieTrimmer]]. | ||
==== GetMainAppletAvailableUsers ==== | ==== GetMainAppletAvailableUsers ==== | ||
Line 777: | Line 796: | ||
==== StartShutdownSequenceForOverlay ==== | ==== StartShutdownSequenceForOverlay ==== | ||
No input/output. | No input/output. | ||
On success, official sw will enter an infinite loop with sleep-thread value 86400000000000. | |||
==== StartRebootSequenceForOverlay ==== | ==== StartRebootSequenceForOverlay ==== | ||
No input/output. | No input/output. | ||
On success, official sw will enter an infinite loop with sleep-thread value 86400000000000. | |||
==== SetHandlingHomeButtonShortPressedEnabled ==== | ==== SetHandlingHomeButtonShortPressedEnabled ==== | ||
Line 791: | Line 814: | ||
==== BeginToObserveHidInputForDevelop ==== | ==== BeginToObserveHidInputForDevelop ==== | ||
No input/output. | No input/output. | ||
Sets various state fields and signals an userspace-event. | |||
Enables HID input for the OverlayApplet, without disabling input for the foreground applet. | |||
== IApplicationProxy == | == IApplicationProxy == | ||
Line 835: | Line 862: | ||
| 15 || [7.0.0+] [[#CreateApplicationWithAttributeAndRequestToStartForQuest]] || | | 15 || [7.0.0+] [[#CreateApplicationWithAttributeAndRequestToStartForQuest]] || | ||
|- | |- | ||
| 20 || EnsureSaveData || | | 20 || [[#EnsureSaveData]] || | ||
|- | |- | ||
| 21 || [[#GetDesiredLanguage]] || | | 21 || [[#GetDesiredLanguage]] || | ||
Line 903: | Line 930: | ||
| 130 || [8.0.0+] [[#GetGpuErrorDetectedSystemEvent]] || | | 130 || [8.0.0+] [[#GetGpuErrorDetectedSystemEvent]] || | ||
|- | |- | ||
| 500 || [5.0.0+] StartContinuousRecordingFlushForDebug || | | 500 || [5.0.0+] [[#StartContinuousRecordingFlushForDebug]] || | ||
|- | |- | ||
| 1000 || [5.0.0+] [[#CreateMovieMaker]] || | | 1000 || [5.0.0+] [[#CreateMovieMaker]] || | ||
Line 947: | Line 974: | ||
Same as [[#CreateApplicationAndRequestToStartForQuest]] except the entire attributes structure is directly specified via the input buffer. This command replaces [[#CreateApplicationAndRequestToStartForQuest]], official user-processes no longer use [[#CreateApplicationAndPushAndRequestToStartForQuest]]. | Same as [[#CreateApplicationAndRequestToStartForQuest]] except the entire attributes structure is directly specified via the input buffer. This command replaces [[#CreateApplicationAndRequestToStartForQuest]], official user-processes no longer use [[#CreateApplicationAndPushAndRequestToStartForQuest]]. | ||
==== EnsureSaveData ==== | |||
Takes an input u128 userID, returns an output u64 size. | |||
Calls sdk func <code>nn::fs::EnsureApplicationSaveData</code>. [[qlaunch]] also calls this same sdk func directly. | |||
Creates the various savedata as specified by the application [[NACP_Format|control.nacp]] when the savedata doesn't exist. | |||
Official user-processes launch the dataErase LibraryApplet depending on the Result, the above output size is used with this. | |||
==== GetDesiredLanguage ==== | ==== GetDesiredLanguage ==== | ||
Line 964: | Line 1,000: | ||
No input, returns an output u8 [[Filesystem_services#StorageId|StorageId]] and u8 [[Filesystem_services#StorageId|StorageId]]. | No input, returns an output u8 [[Filesystem_services#StorageId|StorageId]] and u8 [[Filesystem_services#StorageId|StorageId]]. | ||
This returns two u8s loaded from state, these are the same StorageIds from [[#ApplicationLaunchProperty]]. | |||
==== BeginBlockingHomeButtonShortAndLongPressed ==== | ==== BeginBlockingHomeButtonShortAndLongPressed ==== | ||
Line 1,006: | Line 1,042: | ||
==== RequestFlushGamePlayingMovieForDebug ==== | ==== RequestFlushGamePlayingMovieForDebug ==== | ||
No input/output. | No input/output. | ||
Requests to save the video recording, as if the Capture-button was held. | |||
==== RequestToShutdown ==== | ==== RequestToShutdown ==== | ||
No input/output. | No input/output. | ||
On success, official sw will enter an infinite loop with sleep-thread value 86400000000000. | |||
==== RequestToReboot ==== | ==== RequestToReboot ==== | ||
No input/output. | No input/output. | ||
On success, official sw will enter an infinite loop with sleep-thread value 86400000000000. | |||
==== ExitAndRequestToShowThanksMessage ==== | ==== ExitAndRequestToShowThanksMessage ==== | ||
No input/output. | No input/output. | ||
Used to exit the application and return to the kiosk menu. Official sw uses [[#UnlockExit]] immediately before this. | Used to exit the application and return to the kiosk menu. Official sw uses [[#UnlockExit]] immediately before this if needed. | ||
On success, official sw will enter an infinite loop with sleep-thread value 86400000000000. | |||
This throws an error when the cached [[Settings_services#GetQuestFlag]] value is 0. | This throws an error when the cached [[Settings_services#GetQuestFlag]] value is 0. | ||
Line 1,077: | Line 1,121: | ||
==== GetPreviousProgramIndex ==== | ==== GetPreviousProgramIndex ==== | ||
No input, returns an output s32. | No input, returns an output s32. | ||
Gets the ProgramIndex of the Application which launched this title. The output ProgramIndex is -1 when there was no previous title. | |||
==== EnableApplicationAllThreadDumpOnCrash ==== | ==== EnableApplicationAllThreadDumpOnCrash ==== | ||
Line 1,085: | Line 1,131: | ||
This is used by sdknso during applet-application initialization. A seperate thread is setup where event-waiting is handled. When the Event is signaled, official sw will assert. | This is used by sdknso during applet-application initialization. A seperate thread is setup where event-waiting is handled. When the Event is signaled, official sw will assert. | ||
==== StartContinuousRecordingFlushForDebug ==== | |||
Takes an input s64 nanoseconds-value, returns an output Event handle with autoclear=false. | |||
The cached value loaded from [[System_Settings|system-setting]] <code>am.debug!dev_function</code> must be set to 0x1 with size 0x1, otherwise an error is returned. | |||
==== CreateMovieMaker ==== | ==== CreateMovieMaker ==== | ||
Takes an input u64 and handle, returns an [[#IMovieMaker]]. | Takes an input u64 size and a TransferMemory handle, returns an [[#IMovieMaker]]. | ||
Official sw retries using the cmd in a loop on error 0x8D4 with svcSleepThread(100000000) being used first. | |||
Official sw uses permissions=None for the TransferMemory, with an user-specified buffer. | |||
==== PrepareForJit ==== | ==== PrepareForJit ==== | ||
Line 1,133: | Line 1,188: | ||
Stubbed with an ILibraryAppletCreator from [[#CreateSelfLibraryAppletCreatorForDevelop]], just returns an error. | Stubbed with an ILibraryAppletCreator from [[#CreateSelfLibraryAppletCreatorForDevelop]], just returns an error. | ||
Terminates all LibraryApplets which were created by the current applet (or by the Application when used from the [[#IApplicationAccessor]] cmd). | |||
=== AreAnyLibraryAppletsLeft === | === AreAnyLibraryAppletsLeft === | ||
Line 1,138: | Line 1,195: | ||
Stubbed with an ILibraryAppletCreator from [[#CreateSelfLibraryAppletCreatorForDevelop]], just returns an error. | Stubbed with an ILibraryAppletCreator from [[#CreateSelfLibraryAppletCreatorForDevelop]], just returns an error. | ||
Gets whether any LibraryApplets ([[#ILibraryAppletAccessor]]) which were created by the current applet are still open (or by the Application when used from the [[#IApplicationAccessor]] cmd). | |||
=== CreateStorage === | === CreateStorage === | ||
Line 1,319: | Line 1,378: | ||
|} | |} | ||
Officially notification messages are handled by the application itself, not sdk-nso in ExeFS. Official apps call code in sdk-nso which basically uses svcWaitSynchronization with the event from [[#GetEventHandle]] to check whether a message is available, then if so it uses [[#ReceiveMessage]]. The actual handling for message IDs is done in the app itself(see [[# | Officially notification messages are handled by the application itself, not sdk-nso in ExeFS. Official apps call code in sdk-nso which basically uses svcWaitSynchronization with the event from [[#GetEventHandle]] to check whether a message is available, then if so it uses [[#ReceiveMessage]]. The actual handling for message IDs is done in the app itself(see [[#AppletMessage]]). | ||
[7.0.0+] User-processes now use BeginVrModeEx/EndVrModeEx instead of [[#SetVrModeEnabled]]. Prior to using using BeginVrModeEx, [[Parental_Control_services|pctl]] IsStereoVisionPermitted is used and error 0xD08E is thrown if not allowed by pctl. | [7.0.0+] User-processes now use BeginVrModeEx/EndVrModeEx instead of [[#SetVrModeEnabled]]. Prior to using using BeginVrModeEx, [[Parental_Control_services|pctl]] IsStereoVisionPermitted is used and error 0xD08E is thrown if not allowed by pctl. | ||
Line 1,327: | Line 1,386: | ||
=== ReceiveMessage === | === ReceiveMessage === | ||
No input. Returns an output | No input. Returns an output [[#AppletMessage]]. Error 0x680 indicates no message is available. | ||
=== GetThisAppletKind === | === GetThisAppletKind === | ||
Line 1,453: | Line 1,512: | ||
Takes a type-0x5 input buffer containing a string, returns an output u64 titleID. | Takes a type-0x5 input buffer containing a string, returns an output u64 titleID. | ||
Gets the application titleID for the specified ContentActionName string. Returns an error when the current [[#AppletId]] isn't 0x04 ( | Gets the application titleID for the specified ContentActionName string. Returns an error when the current [[#AppletId]] isn't 0x04 (when the current applet isn't a SystemApplication). | ||
=== SetCpuBoostMode === | === SetCpuBoostMode === | ||
Line 1,460: | Line 1,519: | ||
=== PerformSystemButtonPressingIfInFocus === | === PerformSystemButtonPressingIfInFocus === | ||
Takes an input [[#SystemButtonType]], no output. | Takes an input [[#SystemButtonType]], no output. | ||
Just returns 0 when a state field is not value 1. Verifies that the input button is allowed, then calls the same func as [[#PerformSystemButtonPressing]] internally. | |||
=== SetPerformanceConfigurationChangedNotification === | === SetPerformanceConfigurationChangedNotification === | ||
Line 1,562: | Line 1,623: | ||
=== Exit === | === Exit === | ||
No input/output. | No input/output. | ||
Exits the current applet. On success, official sw will enter an infinite loop with sleep-thread value 86400000000000. | |||
=== LockExit === | === LockExit === | ||
Line 1,613: | Line 1,676: | ||
Takes an input u8 bool flag, no output. | Takes an input u8 bool flag, no output. | ||
See [[# | See [[#AppletMessage]]. | ||
=== SetScreenShotAppletIdentityInfo === | === SetScreenShotAppletIdentityInfo === | ||
Line 1,629: | Line 1,692: | ||
Takes an input u8 bool flag, no output. | Takes an input u8 bool flag, no output. | ||
See [[# | See [[#AppletMessage]]. | ||
When enabled with a non-Overlay applet, Overlay applet will not be notified of capture button short-presses for screenshots. | When enabled with a non-Overlay applet, Overlay applet will not be notified of capture button short-presses for screenshots. | ||
Line 1,670: | Line 1,733: | ||
Sets an internal state flag. When the input flag is 0, this will in additional run the same code as [[#ApproveToDisplay]]. | Sets an internal state flag. When the input flag is 0, this will in additional run the same code as [[#ApproveToDisplay]]. | ||
See [[# | See [[#AppletMessage]]. | ||
=== ApproveToDisplay === | === ApproveToDisplay === | ||
Line 1,749: | Line 1,812: | ||
Takes an input u8 bool, no output. | Takes an input u8 bool, no output. | ||
See [[# | See [[#AppletMessage]]. | ||
=== SetApplicationAlbumUserData === | === SetApplicationAlbumUserData === | ||
Line 2,137: | Line 2,200: | ||
! Cmd || Name || Notes | ! Cmd || Name || Notes | ||
|- | |- | ||
| 0 || NotifyMessageToHomeMenuForDebug || | | 0 || [[#NotifyMessageToHomeMenuForDebug]] || | ||
|- | |- | ||
| 1 || [[#OpenMainApplication]] || | | 1 || [[#OpenMainApplication]] || | ||
|- | |- | ||
| 10 || | | 10 || [[#PerformSystemButtonPressing]] || | ||
|- | |- | ||
| 20 || InvalidateTransitionLayer || | | 20 || [[#InvalidateTransitionLayer]] || | ||
|- | |- | ||
| 30 || [6.0.0+] RequestLaunchApplicationWithUserAndArgumentForDebug || | | 30 || [6.0.0+] [[#RequestLaunchApplicationWithUserAndArgumentForDebug]] || | ||
|- | |- | ||
| 40 || [6.0.0+] GetAppletResourceUsageInfo || | | 40 || [6.0.0+] [[#GetAppletResourceUsageInfo]] || | ||
|- | |- | ||
| 100 || [7.0.0+] [[#SetCpuBoostModeForApplet]] || | | 100 || [7.0.0+] [[#SetCpuBoostModeForApplet]] || | ||
|} | |} | ||
=== NotifyMessageToHomeMenuForDebug === | |||
Takes an input [[#AppletMessage]], no output. | |||
Stubbed, just returns an error. | |||
=== OpenMainApplication === | === OpenMainApplication === | ||
No input, returns an output [[#IApplicationAccessor]]. | No input, returns an output [[#IApplicationAccessor]]. | ||
Should not be used when no Application is running (svcBreak). | |||
=== PerformSystemButtonPressing === | |||
Takes an input [[#SystemButtonType]], no output. | |||
=== InvalidateTransitionLayer === | |||
No input/output. | |||
=== RequestLaunchApplicationWithUserAndArgumentForDebug === | |||
Takes an input u8 bool flag, an u64 Application titleID, a type-0x5 input buffer containing an array of u128 userIDs, and a type-0x5 input buffer, no output. | |||
Requests to launch the specified Application, with the specified users. When the bool flag is true, the content of the second input buffer is used to create a storage which is pushed to the UserChannel for this Application (see [[#LaunchParameterKind]]). | |||
=== GetAppletResourceUsageInfo === | |||
No input, returns an output [[#AppletResourceUsageInfo]]. | |||
=== SetCpuBoostModeForApplet === | === SetCpuBoostModeForApplet === | ||
Takes an input u32 '''CpuBoostMode''' (only modes 0 and 1 are valid) and passes it to [[PPC_services#apm:sys|SetCpuBoostMode]]. | Takes an input u32 '''CpuBoostMode''' (only modes 0 and 1 are valid) and passes it to [[PPC_services#apm:sys|SetCpuBoostMode]]. | ||
The cached value loaded from [[Settings_services#GetDebugModeFlag]] must be 1, otherwise an error is returned. | |||
== IStorage == | == IStorage == | ||
Line 2,445: | Line 2,531: | ||
| 0x04 | | 0x04 | ||
| 0100000000001012 | | 0100000000001012 | ||
| "starter" | | "starter" SystemApplication. | ||
|- | |- | ||
| 0x0A | | 0x0A | ||
Line 2,539: | Line 2,625: | ||
|} | |} | ||
=== | === AppletMessage === | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 2,561: | Line 2,647: | ||
| 0x5C || Screenshot was [[#SetAlbumImageTakenNotificationEnabled|taken]]. | | 0x5C || Screenshot was [[#SetAlbumImageTakenNotificationEnabled|taken]]. | ||
|} | |} | ||
This is "nn::am::AppletMessage". | |||
=== OperationMode === | === OperationMode === | ||
Line 2,595: | Line 2,683: | ||
|- | |- | ||
| 2 || PerformHomeButtonLongPressing | | 2 || PerformHomeButtonLongPressing | ||
|- | |||
| 3 || Short-pressing with the Power-button. Only available with [[#PerformSystemButtonPressing]]. | |||
|- | |||
| 4 || Long-pressing with the Power-button. Only available with [[#PerformSystemButtonPressing]]. | |||
|- | |||
| 5 || Shutdown the system. Only available with [[#PerformSystemButtonPressing]]. | |||
|- | |- | ||
| 6 || PerformCaptureButtonShortPressing | | 6 || PerformCaptureButtonShortPressing | ||
Line 2,601: | Line 2,695: | ||
|} | |} | ||
This is "nn::am::service::SystemButtonType". This is used with [[#PerformSystemButtonPressingIfInFocus]]. | This is "nn::am::service::SystemButtonType". This is used with [[#PerformSystemButtonPressingIfInFocus]]/[[#PerformSystemButtonPressing]]. | ||
=== LaunchParameterKind === | === LaunchParameterKind === | ||
Line 2,609: | Line 2,703: | ||
! Description | ! Description | ||
|- | |- | ||
| 1 || Application-specific LaunchParameter | | 1 || UserChannel. Application-specific LaunchParameter. | ||
|- | |- | ||
| 2 || account PreselectedUser | | 2 || account PreselectedUser | ||
Line 2,637: | Line 2,731: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 || u8 ProgramIndex. "ExecuteProgram". | | 0 || u8 ProgramIndex. "ExecuteProgram". [[NS_Services|NS]] handles ProgramIndex by launching titleID {application_titleID}+ProgramIndex. After using [[#ExecuteProgram]] with this successfully, official user-processes will enter an infinite loop with sleep-thread value 86400000000000. | ||
|- | |- | ||
| 1 || u64 titleID. "JumpToSubApplicationProgramForDevelopment". Only available when [[Settings_services#GetDebugModeFlag|DebugMode]] is 1. | | 1 || u64 titleID. "JumpToSubApplicationProgramForDevelopment". Only available when [[Settings_services#GetDebugModeFlag|DebugMode]] is 1. | ||
Line 2,646: | Line 2,740: | ||
This is "nn::am::service::ProgramSpecifyKind". This controls the type of the u64 passed to [[#ExecuteProgram]]. | This is "nn::am::service::ProgramSpecifyKind". This controls the type of the u64 passed to [[#ExecuteProgram]]. | ||
ProgramIndex values where the title is not installed should not be used: [[qlaunch]] will display an error message and the current title will become "corrupted", however Home Menu will have an option to repair it. | |||
= AppletResourceUserId = | = AppletResourceUserId = | ||
Line 2,740: | Line 2,836: | ||
Internally AM only uses the first 0xC-bytes from ApplicationAttribute, regardless of the cmd. | Internally AM only uses the first 0xC-bytes from ApplicationAttribute, regardless of the cmd. | ||
= ApplicationLaunchProperty = | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x8 || Application titleID. | |||
|- | |||
| 0x8 || 0x4 || Application title-version. | |||
|- | |||
| 0xC || 0x1 || [[Filesystem_services#StorageId|StorageId]] for the Application base title. | |||
|- | |||
| 0xD || 0x1 || [[Filesystem_services#StorageId|StorageId]] for the Application update title. | |||
|- | |||
| 0xE || 0x1 || Unknown. | |||
|- | |||
| 0xF || 0x1 || Padding. | |||
|} | |||
This struct is 0x10-bytes. | |||
= ApplicationLaunchRequestInfo = | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x4 || Unknown. The default is 0x0 with [[#CreateSystemApplication]], 0x3 with [[#CreateApplication]]. | |||
|- | |||
| 0x4 || 0x4 || Unknown. The default is 0x0 with [[#CreateSystemApplication]], 0x3 with [[#CreateApplication]]. | |||
|- | |||
| 0x8 || 0x8 || Unknown. The default is 0x0. | |||
|} | |||
This struct is "nn::applet::ApplicationLaunchRequestInfo". This struct is 0x10-bytes. | |||
= AppletResourceUsageInfo = | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x4 || Unknown counter. | |||
|- | |||
| 0x4 || 0x4 || Unknown counter. | |||
|- | |||
| 0x8 || 0x4 || Output from [[NS_Services|NS GetRightsEnvironmentCountForDebug]]. | |||
|- | |||
| 0xC || 0x14 || Always zero. | |||
|} | |||
This struct is "nn::am::service::AppletResourceUsageInfo". This struct is 0x20-bytes. | |||
= Notes = | = Notes = |