Difference between revisions of "Migration services"
(Created page with "Migration is a sysmodule designed for handling the new Switch to Switch transfer system. = mig:usr =") |
|||
(18 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | Migration is a sysmodule designed for handling the | + | Migration is a sysmodule designed for handling the Switch-to-Switch transfer system introduced in firmware [[4.0.0]]. |
+ | |||
+ | With newer system-versions this sysmodule is only running when [[qlaunch]] is using migration from the relevant transfer menus (see [[Applet_Manager_services#ActivateMigrationService|ActivateMigrationService]]/[[Applet_Manager_services#DeactivateMigrationService|DeactivateMigrationService]]). | ||
= mig:usr = | = mig:usr = | ||
+ | This is "nn::migration::user::IService" | ||
+ | |||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Cmd || Name | ||
+ | |- | ||
+ | | 0 || [19.0.0+] | ||
+ | |- | ||
+ | | 10 || [7.0.0+] TryGetLastUserMigrationInfo ([4.0.0-6.2.0] TryGetLastMigrationInfo) | ||
+ | |- | ||
+ | | 100 || [7.0.0+] [[#CreateUserMigrationServer|CreateUserMigrationServer]] ([4.0.0-6.2.0] CreateServer) | ||
+ | |- | ||
+ | | 101 || [7.0.0+] [[#ResumeUserMigrationServer|ResumeUserMigrationServer]] ([4.0.0-6.2.0] ResumeServer) | ||
+ | |- | ||
+ | | 200 || [7.0.0+] [[#CreateUserMigrationClient|CreateUserMigrationClient]] ([4.0.0-6.2.0] CreateClient) | ||
+ | |- | ||
+ | | 201 || [7.0.0+] [[#ResumeUserMigrationClient|ResumeUserMigrationClient]] ([4.0.0-6.2.0] ResumeClient) | ||
+ | |- | ||
+ | | 1001 || [8.0.0+] [[#GetSaveDataMigrationPolicyInfoAsync|GetSaveDataMigrationPolicyInfoAsync]] | ||
+ | |- | ||
+ | | 1010 || [7.0.0+] TryGetLastSaveDataMigrationInfo | ||
+ | |- | ||
+ | | 1100 || [7.0.0+] [[#CreateSaveDataMigrationServer|CreateSaveDataMigrationServer]] | ||
+ | |- | ||
+ | | 1101 || [7.0.0+] [[#ResumeSaveDataMigrationServer|ResumeSaveDataMigrationServer]] | ||
+ | |- | ||
+ | | 1110 || [17.0.0+] | ||
+ | |- | ||
+ | | 1200 || [7.0.0+] [[#CreateSaveDataMigrationClient|CreateSaveDataMigrationClient]] | ||
+ | |- | ||
+ | | 1201 || [7.0.0+] [[#ResumeSaveDataMigrationClient|ResumeSaveDataMigrationClient]] | ||
+ | |} | ||
+ | |||
+ | == CreateUserMigrationServer == | ||
+ | Takes a total of 0x18-bytes of input, a type-0x19 input buffer, a TransferMemory handle, returns an [[#IServer]]. | ||
+ | |||
+ | == ResumeUserMigrationServer == | ||
+ | Takes an input u32, a TransferMemory handle, returns an [[#IServer]]. | ||
+ | |||
+ | == CreateUserMigrationClient == | ||
+ | Takes an input u32, a type-0x19 input buffer, a TransferMemory handle, returns an [[#IClient]]. | ||
+ | |||
+ | == ResumeUserMigrationClient == | ||
+ | Takes an input u32, a TransferMemory handle, returns an [[#IClient]]. | ||
+ | |||
+ | == GetSaveDataMigrationPolicyInfoAsync == | ||
+ | Takes an [[NCM_services#ApplicationId|ApplicationId]], returns an [[#IAsyncSaveDataMigrationPolicyInfoContext]]. | ||
+ | |||
+ | This is used by [[qlaunch]] before the actual savedata transfer is started. | ||
+ | |||
+ | This starts a network request for [[Network|save_data_migration_policy]]. | ||
+ | |||
+ | == CreateSaveDataMigrationServer == | ||
+ | Takes a total of 0x20-bytes of input, a type-0x19 input buffer, a TransferMemory handle, returns an [[#IServer_2|IServer]]. | ||
+ | |||
+ | == ResumeSaveDataMigrationServer == | ||
+ | Takes an input u32, a TransferMemory handle, returns an [[#IServer_2|IServer]]. | ||
+ | |||
+ | == Cmd1110 == | ||
+ | Takes a total of 0x18-bytes of input, a type-0x19 input buffer, a type-0x5 input buffer containing an array of u64s, and a TransferMemory handle. Returns an [[#IServer_2|IServer]]. | ||
+ | |||
+ | This is identical to [[#CreateSaveDataMigrationServer|CreateSaveDataMigrationServer]] except the u64-array is passed directly instead of from a single input u64. | ||
+ | |||
+ | == CreateSaveDataMigrationClient == | ||
+ | Takes an input u32, a type-0x19 input buffer, a TransferMemory handle, returns an [[#IClient_2|IClient]]. | ||
+ | |||
+ | == ResumeSaveDataMigrationClient == | ||
+ | Takes an input u32, a TransferMemory handle, returns an [[#IClient_2|IClient]]. | ||
+ | |||
+ | == IServer == | ||
+ | This is "nn::migration::user::IServer" | ||
+ | |||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Cmd || Name | ||
+ | |- | ||
+ | | 0 || GetUid | ||
+ | |- | ||
+ | | 1 || GetServerProfile | ||
+ | |- | ||
+ | | 100 || PrepareAsync | ||
+ | |- | ||
+ | | 101 || GetConnectionRequirement | ||
+ | |- | ||
+ | | 200 || WaitConnectionAsync | ||
+ | |- | ||
+ | | 201 || GetClientProfile | ||
+ | |- | ||
+ | | 202 || AcceptConnectionAsync | ||
+ | |- | ||
+ | | 203 || DeclineConnectionAsync | ||
+ | |- | ||
+ | | 300 || ProcessTransferAsync | ||
+ | |- | ||
+ | | 400 || CompleteAsync | ||
+ | |- | ||
+ | | 500 || Abort | ||
+ | |} | ||
+ | |||
+ | == IClient == | ||
+ | This is "nn::migration::user::IClient" | ||
+ | |||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Cmd || Name | ||
+ | |- | ||
+ | | 0 || GetClientProfile | ||
+ | |- | ||
+ | | 10 || CreateLoginSession | ||
+ | |- | ||
+ | | 11 || GetNetworkServiceAccountId | ||
+ | |- | ||
+ | | 12 || GetUserNickname | ||
+ | |- | ||
+ | | 13 || GetUserProfileImage | ||
+ | |- | ||
+ | | 100 || PrepareAsync | ||
+ | |- | ||
+ | | 101 || GetConnectionRequirement | ||
+ | |- | ||
+ | | 200 || ScanServersAsync | ||
+ | |- | ||
+ | | 201 || ListServers | ||
+ | |- | ||
+ | | 210 || ConnectByServerIdAsync | ||
+ | |- | ||
+ | | 300 || GetStorageShortfall | ||
+ | |- | ||
+ | | 301 || GetTotalTransferInfo | ||
+ | |- | ||
+ | | 302 || GetImmigrantUid | ||
+ | |- | ||
+ | | 310 || GetCurrentTransferInfo | ||
+ | |- | ||
+ | | 311 || GetCurrentRelatedApplications | ||
+ | |- | ||
+ | | 320 || TransferNextAsync | ||
+ | |- | ||
+ | | 350 || SuspendAsync | ||
+ | |- | ||
+ | | 400 || CompleteAsync | ||
+ | |- | ||
+ | | 500 || Abort | ||
+ | |- | ||
+ | | 999 || DebugSynchronizeStateInFinalizationAsync | ||
+ | |} | ||
+ | |||
+ | == IAsyncContext == | ||
+ | This is "nn::migration::detail::IAsyncContext". | ||
+ | |||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Cmd || Name | ||
+ | |- | ||
+ | | 0 || GetSystemEvent | ||
+ | |- | ||
+ | | 1 || Cancel | ||
+ | |- | ||
+ | | 2 || HasDone | ||
+ | |- | ||
+ | | 3 || GetResult | ||
+ | |} | ||
+ | |||
+ | == IAsyncSaveDataMigrationPolicyInfoContext == | ||
+ | This is "nn::migration::detail::IAsyncSaveDataMigrationPolicyInfoContext". | ||
+ | |||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Cmd || Name | ||
+ | |- | ||
+ | | 0 || GetSystemEvent | ||
+ | |- | ||
+ | | 1 || Cancel | ||
+ | |- | ||
+ | | 2 || HasDone | ||
+ | |- | ||
+ | | 3 || GetResult | ||
+ | |- | ||
+ | | 100 || GetSaveDataMigrationPolicyInfo | ||
+ | |} | ||
+ | |||
+ | == IServer == | ||
+ | This is "nn::migration::savedata::IServer". | ||
+ | |||
+ | This was added with [7.0.0+]. | ||
+ | |||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Cmd || Name | ||
+ | |- | ||
+ | | 0 || GetUid | ||
+ | |- | ||
+ | | 1 || GetApplicationId | ||
+ | |- | ||
+ | | 2 || GetServerProfile | ||
+ | |- | ||
+ | | 3 || [17.0.0+] ListApplicationIds | ||
+ | |- | ||
+ | | 100 || [[#PrepareAsync|PrepareAsync]] | ||
+ | |- | ||
+ | | 101 || GetConnectionRequirement | ||
+ | |- | ||
+ | | 200 || WaitConnectionAsync | ||
+ | |- | ||
+ | | 201 || GetClientProfile | ||
+ | |- | ||
+ | | 210 || [8.0.0+] WaitAcceptanceAsync | ||
+ | |- | ||
+ | | 300 || ProcessTransferAsync | ||
+ | |- | ||
+ | | 400 || CompleteAsync | ||
+ | |- | ||
+ | | 500 || Abort | ||
+ | |- | ||
+ | | 510 || [19.0.0+] | ||
+ | |- | ||
+ | | 998 || [8.0.0+] DebugTryGetState | ||
+ | |- | ||
+ | | 999 || [8.0.0+] DebugWaitStateSynchronizationFinalizedAsync | ||
+ | |} | ||
+ | |||
+ | === PrepareAsync === | ||
+ | No input, returns an [[#IAsyncContext|IAsyncContext]]. | ||
+ | |||
+ | Besides various other functionality, the async task also uses functionality similar to [[#GetSaveDataMigrationPolicyInfoAsync|GetSaveDataMigrationPolicyInfoAsync]], throwing an error if needed. | ||
+ | |||
+ | == IClient == | ||
+ | This is "nn::migration::savedata::IClient". | ||
+ | |||
+ | This was added with [7.0.0+]. | ||
+ | |||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Cmd || Name | ||
+ | |- | ||
+ | | 0 || GetClientProfile | ||
+ | |- | ||
+ | | 100 || GetConnectionRequirement | ||
+ | |- | ||
+ | | 200 || ScanServersAsync | ||
+ | |- | ||
+ | | 201 || ListServers | ||
+ | |- | ||
+ | | 210 || ConnectByServerIdAsync | ||
+ | |- | ||
+ | | 220 || [8.0.0+] AcceptAsync | ||
+ | |- | ||
+ | | 221 || [8.0.0+] DeclineAsync | ||
+ | |- | ||
+ | | 300 || GetStorageShortfall | ||
+ | |- | ||
+ | | 301 || GetTotalTransferInfo | ||
+ | |- | ||
+ | | 302 || GetImmigrantUid | ||
+ | |- | ||
+ | | 303 || GetApplicationId | ||
+ | |- | ||
+ | | 304 || [17.0.0+] ListApplicationIds | ||
+ | |- | ||
+ | | 310 || GetCurrentTransferInfo | ||
+ | |- | ||
+ | | 320 || TransferNextAsync | ||
+ | |- | ||
+ | | 350 || SuspendAsync | ||
+ | |- | ||
+ | | 400 || CompleteAsync | ||
+ | |- | ||
+ | | 500 || Abort | ||
+ | |- | ||
+ | | 510 || [19.0.0+] | ||
+ | |- | ||
+ | | 996 || [8.0.0+] DebugTryGetState | ||
+ | |- | ||
+ | | 997 || [8.0.0+] DebugSynchronizeStateInFinalization0Async | ||
+ | |- | ||
+ | | 998 || [8.0.0+] DebugSynchronizeStateInFinalization1Async | ||
+ | |- | ||
+ | | 999 || DebugSynchronizeStateFinalizedAsync | ||
+ | |} | ||
+ | |||
+ | [[Category:Services]] |
Latest revision as of 21:18, 22 March 2025
Migration is a sysmodule designed for handling the Switch-to-Switch transfer system introduced in firmware 4.0.0.
With newer system-versions this sysmodule is only running when qlaunch is using migration from the relevant transfer menus (see ActivateMigrationService/DeactivateMigrationService).
mig:usr
This is "nn::migration::user::IService"
Cmd | Name |
---|---|
0 | [19.0.0+] |
10 | [7.0.0+] TryGetLastUserMigrationInfo ([4.0.0-6.2.0] TryGetLastMigrationInfo) |
100 | [7.0.0+] CreateUserMigrationServer ([4.0.0-6.2.0] CreateServer) |
101 | [7.0.0+] ResumeUserMigrationServer ([4.0.0-6.2.0] ResumeServer) |
200 | [7.0.0+] CreateUserMigrationClient ([4.0.0-6.2.0] CreateClient) |
201 | [7.0.0+] ResumeUserMigrationClient ([4.0.0-6.2.0] ResumeClient) |
1001 | [8.0.0+] GetSaveDataMigrationPolicyInfoAsync |
1010 | [7.0.0+] TryGetLastSaveDataMigrationInfo |
1100 | [7.0.0+] CreateSaveDataMigrationServer |
1101 | [7.0.0+] ResumeSaveDataMigrationServer |
1110 | [17.0.0+] |
1200 | [7.0.0+] CreateSaveDataMigrationClient |
1201 | [7.0.0+] ResumeSaveDataMigrationClient |
CreateUserMigrationServer
Takes a total of 0x18-bytes of input, a type-0x19 input buffer, a TransferMemory handle, returns an #IServer.
ResumeUserMigrationServer
Takes an input u32, a TransferMemory handle, returns an #IServer.
CreateUserMigrationClient
Takes an input u32, a type-0x19 input buffer, a TransferMemory handle, returns an #IClient.
ResumeUserMigrationClient
Takes an input u32, a TransferMemory handle, returns an #IClient.
GetSaveDataMigrationPolicyInfoAsync
Takes an ApplicationId, returns an #IAsyncSaveDataMigrationPolicyInfoContext.
This is used by qlaunch before the actual savedata transfer is started.
This starts a network request for save_data_migration_policy.
CreateSaveDataMigrationServer
Takes a total of 0x20-bytes of input, a type-0x19 input buffer, a TransferMemory handle, returns an IServer.
ResumeSaveDataMigrationServer
Takes an input u32, a TransferMemory handle, returns an IServer.
Cmd1110
Takes a total of 0x18-bytes of input, a type-0x19 input buffer, a type-0x5 input buffer containing an array of u64s, and a TransferMemory handle. Returns an IServer.
This is identical to CreateSaveDataMigrationServer except the u64-array is passed directly instead of from a single input u64.
CreateSaveDataMigrationClient
Takes an input u32, a type-0x19 input buffer, a TransferMemory handle, returns an IClient.
ResumeSaveDataMigrationClient
Takes an input u32, a TransferMemory handle, returns an IClient.
IServer
This is "nn::migration::user::IServer"
Cmd | Name |
---|---|
0 | GetUid |
1 | GetServerProfile |
100 | PrepareAsync |
101 | GetConnectionRequirement |
200 | WaitConnectionAsync |
201 | GetClientProfile |
202 | AcceptConnectionAsync |
203 | DeclineConnectionAsync |
300 | ProcessTransferAsync |
400 | CompleteAsync |
500 | Abort |
IClient
This is "nn::migration::user::IClient"
Cmd | Name |
---|---|
0 | GetClientProfile |
10 | CreateLoginSession |
11 | GetNetworkServiceAccountId |
12 | GetUserNickname |
13 | GetUserProfileImage |
100 | PrepareAsync |
101 | GetConnectionRequirement |
200 | ScanServersAsync |
201 | ListServers |
210 | ConnectByServerIdAsync |
300 | GetStorageShortfall |
301 | GetTotalTransferInfo |
302 | GetImmigrantUid |
310 | GetCurrentTransferInfo |
311 | GetCurrentRelatedApplications |
320 | TransferNextAsync |
350 | SuspendAsync |
400 | CompleteAsync |
500 | Abort |
999 | DebugSynchronizeStateInFinalizationAsync |
IAsyncContext
This is "nn::migration::detail::IAsyncContext".
Cmd | Name |
---|---|
0 | GetSystemEvent |
1 | Cancel |
2 | HasDone |
3 | GetResult |
IAsyncSaveDataMigrationPolicyInfoContext
This is "nn::migration::detail::IAsyncSaveDataMigrationPolicyInfoContext".
Cmd | Name |
---|---|
0 | GetSystemEvent |
1 | Cancel |
2 | HasDone |
3 | GetResult |
100 | GetSaveDataMigrationPolicyInfo |
IServer
This is "nn::migration::savedata::IServer".
This was added with [7.0.0+].
Cmd | Name |
---|---|
0 | GetUid |
1 | GetApplicationId |
2 | GetServerProfile |
3 | [17.0.0+] ListApplicationIds |
100 | PrepareAsync |
101 | GetConnectionRequirement |
200 | WaitConnectionAsync |
201 | GetClientProfile |
210 | [8.0.0+] WaitAcceptanceAsync |
300 | ProcessTransferAsync |
400 | CompleteAsync |
500 | Abort |
510 | [19.0.0+] |
998 | [8.0.0+] DebugTryGetState |
999 | [8.0.0+] DebugWaitStateSynchronizationFinalizedAsync |
PrepareAsync
No input, returns an IAsyncContext.
Besides various other functionality, the async task also uses functionality similar to GetSaveDataMigrationPolicyInfoAsync, throwing an error if needed.
IClient
This is "nn::migration::savedata::IClient".
This was added with [7.0.0+].
Cmd | Name |
---|---|
0 | GetClientProfile |
100 | GetConnectionRequirement |
200 | ScanServersAsync |
201 | ListServers |
210 | ConnectByServerIdAsync |
220 | [8.0.0+] AcceptAsync |
221 | [8.0.0+] DeclineAsync |
300 | GetStorageShortfall |
301 | GetTotalTransferInfo |
302 | GetImmigrantUid |
303 | GetApplicationId |
304 | [17.0.0+] ListApplicationIds |
310 | GetCurrentTransferInfo |
320 | TransferNextAsync |
350 | SuspendAsync |
400 | CompleteAsync |
500 | Abort |
510 | [19.0.0+] |
996 | [8.0.0+] DebugTryGetState |
997 | [8.0.0+] DebugSynchronizeStateInFinalization0Async |
998 | [8.0.0+] DebugSynchronizeStateInFinalization1Async |
999 | DebugSynchronizeStateFinalizedAsync |