Parental Control services: Difference between revisions
Parental controls documentation |
No edit summary |
||
| (21 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
PCTL handles all parental controls management. | |||
= pctl:s, pctl:r, pctl:a, pctl = | |||
These are "nn::pctl::detail::ipc::IParentalControlServiceFactory". | |||
The max_sessions are these are: pctl has 6, pctl:s has 8, pctl:a has 1, and pctl:r has 1. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || | | 0 || CreateService | ||
|- | |- | ||
| 1 || [4.0.0+] CreateServiceWithoutInitialize | |||
|} | |} | ||
== IParentalControlService == | == IParentalControlService == | ||
This is "nn::pctl::detail::ipc::IParentalControlService". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |||
| 1 || [4.0.0+] Initialize | |||
|- | |- | ||
| 1001 || CheckFreeCommunicationPermission | | 1001 || CheckFreeCommunicationPermission | ||
| Line 41: | Line 47: | ||
|- | |- | ||
| 1012 || GetRestrictedFeatures | | 1012 || GetRestrictedFeatures | ||
|- | |||
| 1013 || [4.0.0+] ConfirmStereoVisionPermission | |||
|- | |||
| 1014 || [5.0.0+] ConfirmPlayableApplicationVideoOld | |||
|- | |||
| 1015 || [5.0.0+] ConfirmPlayableApplicationVideo | |||
|- | |||
| 1016 || [6.0.0+] ConfirmShowNewsPermission | |||
|- | |||
| 1017 || [10.0.0+] EndFreeCommunication | |||
|- | |||
| 1018 || [10.0.0+] IsFreeCommunicationAvailable | |||
|- | |||
| 1019 || [20.0.0+] ConfirmLaunchApplicationPermission | |||
|- | |||
| 1020 || [20.0.0+] ConfirmLaunchSharedApplicationPermission | |||
|- | |||
| 1021 || [21.0.0+] TryBeginFreeCommunicationForStreamPlay | |||
|- | |||
| 1022 || [21.0.0+] EndFreeCommunicationForStreamPlay | |||
|- | |- | ||
| 1031 || IsRestrictionEnabled | | 1031 || IsRestrictionEnabled | ||
| Line 70: | Line 96: | ||
| 1046 || DisableFeaturesForReset | | 1046 || DisableFeaturesForReset | ||
|- | |- | ||
| 1047 || NotifyApplicationDownloadStarted | | 1047 || [20.0.0+] NotifyApplicationDownloadStartedOld ([3.0.0-19.0.1] NotifyApplicationDownloadStarted) | ||
|- | |||
| 1048 || [6.0.0+] NotifyNetworkProfileCreated | |||
|- | |||
| 1049 || [11.0.0+] ResetFreeCommunicationApplicationList | |||
|- | |||
| 1050 || [20.0.0+] AddToFreeCommunicationApplicationList | |||
|- | |||
| 1051 || [20.0.0+] NotifyApplicationDownloadStarted | |||
|- | |||
| 1061 || [4.0.0+] ConfirmStereoVisionRestrictionConfigurable | |||
|- | |||
| 1062 || [4.0.0+] GetStereoVisionRestriction | |||
|- | |||
| 1063 || [4.0.0+] SetStereoVisionRestriction | |||
|- | |||
| 1064 || [5.0.0+] ResetConfirmedStereoVisionPermission | |||
|- | |||
| 1065 || [5.0.0+] [[#IsStereoVisionPermitted]] | |||
|- | |- | ||
| 1201 || UnlockRestrictionTemporarily | | 1201 || UnlockRestrictionTemporarily | ||
| Line 85: | Line 129: | ||
|- | |- | ||
| 1207 || GetPinCodeChangedEvent | | 1207 || GetPinCodeChangedEvent | ||
|- | |||
| 1208 || [4.0.0+] GetPinCode | |||
|- | |- | ||
| 1403 || IsPairingActive | | 1403 || IsPairingActive | ||
| Line 95: | Line 141: | ||
|- | |- | ||
| 1424 || GetAccountState | | 1424 || GetAccountState | ||
|- | |||
| 1425 || [6.0.0-19.0.1] RequestPostEvents | |||
|- | |||
| 1426 || [11.0.0-19.0.1] GetPostEventInterval | |||
|- | |||
| 1427 || [11.0.0-19.0.1] SetPostEventInterval | |||
|- | |- | ||
| 1432 || GetSynchronizationEvent | | 1432 || GetSynchronizationEvent | ||
| Line 108: | Line 160: | ||
| 1455 || IsRestrictedByPlayTimer | | 1455 || IsRestrictedByPlayTimer | ||
|- | |- | ||
| 1456 || GetPlayTimerSettings | | 1456 || [18.0.0-20.5.0] GetPlayTimerSettingsOld ([1.0.0-17.0.1] GetPlayTimerSettings) | ||
|- | |- | ||
| 1457 || GetPlayTimerEventToRequestSuspension | | 1457 || GetPlayTimerEventToRequestSuspension | ||
|- | |||
| 1458 || [4.0.0+] IsPlayTimerAlarmDisabled | |||
|- | |||
| 1459 || [20.0.0+] GetPlayTimerRemainingTimeDisplayInfo | |||
|- | |- | ||
| 1471 || NotifyWrongPinCodeInputManyTimes | | 1471 || NotifyWrongPinCodeInputManyTimes | ||
| Line 119: | Line 175: | ||
|- | |- | ||
| 1474 || ClearUnlinkedEvent | | 1474 || ClearUnlinkedEvent | ||
|- | |||
| 1475 || [18.0.0+] GetExtendedPlayTimerEvent | |||
|- | |||
| 1501 || [20.0.0+] SetTimerEventEnabled | |||
|- | |- | ||
| 1601 || DisableAllFeatures | | 1601 || DisableAllFeatures | ||
| Line 129: | Line 189: | ||
|- | |- | ||
| 1902 || ClearFreeCommunicationApplicationListForDebug | | 1902 || ClearFreeCommunicationApplicationListForDebug | ||
|- | |||
| 1903 || [5.0.0+] GetExemptApplicationListCountForDebug | |||
|- | |||
| 1904 || [5.0.0+] GetExemptApplicationListForDebug | |||
|- | |||
| 1905 || [5.0.0+] UpdateExemptApplicationListForDebug | |||
|- | |||
| 1906 || [5.0.0+] AddToExemptApplicationListForDebug | |||
|- | |||
| 1907 || [5.0.0+] DeleteFromExemptApplicationListForDebug | |||
|- | |||
| 1908 || [5.0.0+] ClearExemptApplicationListForDebug | |||
|- | |- | ||
| 1941 || DeletePairing | | 1941 || DeletePairing | ||
|- | |- | ||
| 1951 || SetPlayTimerSettingsForDebug | | 1951 || [18.0.0-20.5.0] SetPlayTimerSettingsForDebugOld ([1.0.0-17.0.1] SetPlayTimerSettingsForDebug) | ||
|- | |- | ||
| 1952 || GetPlayTimerSpentTimeForTest | | 1952 || GetPlayTimerSpentTimeForTest | ||
|- | |||
| 1953 || [4.0.0+] SetPlayTimerAlarmDisabledForDebug | |||
|- | |||
| 1954 || [18.0.0+] IsBedtimeAlarmEnabled | |||
|- | |||
| 1955 || [18.0.0+] GetBedtimeAlarmTime | |||
|- | |||
| 1956 || [18.0.0+] GetBedtimeAlarmTimeHour | |||
|- | |||
| 1957 || [18.0.0+] GetBedtimeAlarmTimeMinute | |||
|- | |||
| 1958 || [20.0.0+] GetBedtimeAlarmResetTimeHour | |||
|- | |||
| 1959 || [20.0.0+] GetBedtimeAlarmResetTimeMinute | |||
|- | |||
| 1960 || [20.0.0+] GetExtraPlayingTimeForDebug | |||
|- | |- | ||
| 2001 || RequestPairingAsync | | 2001 || RequestPairingAsync | ||
| Line 140: | Line 228: | ||
| 2002 || FinishRequestPairing | | 2002 || FinishRequestPairing | ||
|- | |- | ||
| 2003 || AuthorizePairingAsync | | 2003 || [19.0.0+] AuthorizePairingAsyncOld ([1.0.0-18.1.0] AuthorizePairingAsync) | ||
|- | |- | ||
| 2004 || FinishAuthorizePairing | | 2004 || FinishAuthorizePairing | ||
| Line 166: | Line 254: | ||
| 2015 || FinishSynchronizeParentalControlSettingsWithLastUpdated | | 2015 || FinishSynchronizeParentalControlSettingsWithLastUpdated | ||
|- | |- | ||
| 2016 || [5.0.0+] RequestUpdateExemptionListAsync | |||
|- | |||
| 2017 || [19.0.0+] AuthorizePairingAsync | |||
|- | |||
| 2019 || [19.0.0+] RequestUpdateDeviceUsersBackground | |||
|- | |||
| 2021 || [20.0.0+] RequestCopyPairingAsync | |||
|- | |||
| 2022 || [20.0.0+] FinishRequestCopyPairing | |||
|- | |||
| 2023 || [20.0.0+] IsFromPairingActiveDevice | |||
|- | |||
| 2024 || [21.0.0+] RollbackCopyPairing | |||
|- | |||
| 3001 || [20.0.0+] GetErrorContextChangedEvent | |||
|- | |||
| 9401 || [20.0.0+] GetEvents | |||
|- | |||
| 9402 || [20.0.0+] GetEventsWithJson | |||
|- | |||
| 9403 || [20.0.0+] RequestPostEvents | |||
|- | |||
| 9404 || [20.0.0+] GetPostEventInterval | |||
|- | |||
| 9405 || [20.0.0+] SetPostEventInterval | |||
|- | |||
| 145601 || [18.0.0+] [[#GetPlayTimerSettings]] | |||
|- | |||
| 195101 || [18.0.0+] [[#SetPlayTimerSettingsForDebug]] | |||
|} | |} | ||
=== IsStereoVisionPermitted === | |||
No input, returns an output u8 bool. True indicates that VrMode is allowed, false otherwise. | |||
== GenerateInquiryCode == | == GenerateInquiryCode == | ||
| Line 179: | Line 298: | ||
Master Keys are validated as follows on <= [[3.0.0]]: first, svcSleepThread(1000000000LL) is called to introduce a delay to prevent brute force attacks. Then, strlen(master_key) is called -- if this is not 8, 0 is returned. Next, the inquiry code is regenerated and snprintf("%02d%08llu", 10, generated_inquiry_rnd) is compared to the inquiry data passed in as an argument. If this doesn't match, 0 is returned. Then, hmac-sha256(snprintf("%02d%08llu", 10, generated_inquiry_rnd)) is called using hardcoded keydata, and the master key argument is compared to snprintf("%08llu", (hmac_result & 0xFFFFFFFFFFFF) % 100000000). If this matches, 1 is returned, otherwise 0 is returned. | Master Keys are validated as follows on <= [[3.0.0]]: first, svcSleepThread(1000000000LL) is called to introduce a delay to prevent brute force attacks. Then, strlen(master_key) is called -- if this is not 8, 0 is returned. Next, the inquiry code is regenerated and snprintf("%02d%08llu", 10, generated_inquiry_rnd) is compared to the inquiry data passed in as an argument. If this doesn't match, 0 is returned. Then, hmac-sha256(snprintf("%02d%08llu", 10, generated_inquiry_rnd)) is called using hardcoded keydata, and the master key argument is compared to snprintf("%08llu", (hmac_result & 0xFFFFFFFFFFFF) % 100000000). If this matches, 1 is returned, otherwise 0 is returned. | ||
On [[3.0.1]] this was | On [[3.0.1]] this was changed to use different hardcoded keydata, and to pass 11 as the snprintf argument instead of 10. | ||
== GetPlayTimerSettings == | |||
[21.0.0+] Now returns a total of 0x44-bytes of output. | |||
== SetPlayTimerSettingsForDebug == | |||
[21.0.0+] Now takes a total of 0x44-bytes of input. | |||
= Notes = | |||
nnMain will skip various functionality when the output from [[Process_Manager_services|pm:bm]] GetBootMode is Maintenance. This includes psc:m init/deinit, bgtc:t functionality (including init/deinit), {various init/deinit}. | |||
[[Category:Services]] | |||
Latest revision as of 23:24, 11 November 2025
PCTL handles all parental controls management.
pctl:s, pctl:r, pctl:a, pctl
These are "nn::pctl::detail::ipc::IParentalControlServiceFactory".
The max_sessions are these are: pctl has 6, pctl:s has 8, pctl:a has 1, and pctl:r has 1.
| Cmd | Name |
|---|---|
| 0 | CreateService |
| 1 | [4.0.0+] CreateServiceWithoutInitialize |
IParentalControlService
This is "nn::pctl::detail::ipc::IParentalControlService".
| Cmd | Name |
|---|---|
| 1 | [4.0.0+] Initialize |
| 1001 | CheckFreeCommunicationPermission |
| 1002 | ConfirmLaunchApplicationPermission |
| 1003 | ConfirmResumeApplicationPermission |
| 1004 | ConfirmSnsPostPermission |
| 1005 | ConfirmSystemSettingsPermission |
| 1006 | IsRestrictionTemporaryUnlocked |
| 1007 | RevertRestrictionTemporaryUnlocked |
| 1008 | EnterRestrictedSystemSettings |
| 1009 | LeaveRestrictedSystemSettings |
| 1010 | IsRestrictedSystemSettingsEntered |
| 1011 | RevertRestrictedSystemSettingsEntered |
| 1012 | GetRestrictedFeatures |
| 1013 | [4.0.0+] ConfirmStereoVisionPermission |
| 1014 | [5.0.0+] ConfirmPlayableApplicationVideoOld |
| 1015 | [5.0.0+] ConfirmPlayableApplicationVideo |
| 1016 | [6.0.0+] ConfirmShowNewsPermission |
| 1017 | [10.0.0+] EndFreeCommunication |
| 1018 | [10.0.0+] IsFreeCommunicationAvailable |
| 1019 | [20.0.0+] ConfirmLaunchApplicationPermission |
| 1020 | [20.0.0+] ConfirmLaunchSharedApplicationPermission |
| 1021 | [21.0.0+] TryBeginFreeCommunicationForStreamPlay |
| 1022 | [21.0.0+] EndFreeCommunicationForStreamPlay |
| 1031 | IsRestrictionEnabled |
| 1032 | GetSafetyLevel |
| 1033 | SetSafetyLevel |
| 1034 | GetSafetyLevelSettings |
| 1035 | GetCurrentSettings |
| 1036 | SetCustomSafetyLevelSettings |
| 1037 | GetDefaultRatingOrganization |
| 1038 | SetDefaultRatingOrganization |
| 1039 | GetFreeCommunicationApplicationListCount |
| 1042 | AddToFreeCommunicationApplicationList |
| 1043 | DeleteSettings |
| 1044 | GetFreeCommunicationApplicationList |
| 1045 | UpdateFreeCommunicationApplicationList |
| 1046 | DisableFeaturesForReset |
| 1047 | [20.0.0+] NotifyApplicationDownloadStartedOld ([3.0.0-19.0.1] NotifyApplicationDownloadStarted) |
| 1048 | [6.0.0+] NotifyNetworkProfileCreated |
| 1049 | [11.0.0+] ResetFreeCommunicationApplicationList |
| 1050 | [20.0.0+] AddToFreeCommunicationApplicationList |
| 1051 | [20.0.0+] NotifyApplicationDownloadStarted |
| 1061 | [4.0.0+] ConfirmStereoVisionRestrictionConfigurable |
| 1062 | [4.0.0+] GetStereoVisionRestriction |
| 1063 | [4.0.0+] SetStereoVisionRestriction |
| 1064 | [5.0.0+] ResetConfirmedStereoVisionPermission |
| 1065 | [5.0.0+] #IsStereoVisionPermitted |
| 1201 | UnlockRestrictionTemporarily |
| 1202 | UnlockSystemSettingsRestriction |
| 1203 | SetPinCode |
| 1204 | #GenerateInquiryCode |
| 1205 | #CheckMasterKey |
| 1206 | GetPinCodeLength |
| 1207 | GetPinCodeChangedEvent |
| 1208 | [4.0.0+] GetPinCode |
| 1403 | IsPairingActive |
| 1406 | GetSettingsLastUpdated |
| 1411 | GetPairingAccountInfo |
| 1421 | GetAccountNickname |
| 1424 | GetAccountState |
| 1425 | [6.0.0-19.0.1] RequestPostEvents |
| 1426 | [11.0.0-19.0.1] GetPostEventInterval |
| 1427 | [11.0.0-19.0.1] SetPostEventInterval |
| 1432 | GetSynchronizationEvent |
| 1451 | StartPlayTimer |
| 1452 | StopPlayTimer |
| 1453 | IsPlayTimerEnabled |
| 1454 | GetPlayTimerRemainingTime |
| 1455 | IsRestrictedByPlayTimer |
| 1456 | [18.0.0-20.5.0] GetPlayTimerSettingsOld ([1.0.0-17.0.1] GetPlayTimerSettings) |
| 1457 | GetPlayTimerEventToRequestSuspension |
| 1458 | [4.0.0+] IsPlayTimerAlarmDisabled |
| 1459 | [20.0.0+] GetPlayTimerRemainingTimeDisplayInfo |
| 1471 | NotifyWrongPinCodeInputManyTimes |
| 1472 | CancelNetworkRequest |
| 1473 | GetUnlinkedEvent |
| 1474 | ClearUnlinkedEvent |
| 1475 | [18.0.0+] GetExtendedPlayTimerEvent |
| 1501 | [20.0.0+] SetTimerEventEnabled |
| 1601 | DisableAllFeatures |
| 1602 | PostEnableAllFeatures |
| 1603 | IsAllFeaturesDisabled |
| 1901 | DeleteFromFreeCommunicationApplicationListForDebug |
| 1902 | ClearFreeCommunicationApplicationListForDebug |
| 1903 | [5.0.0+] GetExemptApplicationListCountForDebug |
| 1904 | [5.0.0+] GetExemptApplicationListForDebug |
| 1905 | [5.0.0+] UpdateExemptApplicationListForDebug |
| 1906 | [5.0.0+] AddToExemptApplicationListForDebug |
| 1907 | [5.0.0+] DeleteFromExemptApplicationListForDebug |
| 1908 | [5.0.0+] ClearExemptApplicationListForDebug |
| 1941 | DeletePairing |
| 1951 | [18.0.0-20.5.0] SetPlayTimerSettingsForDebugOld ([1.0.0-17.0.1] SetPlayTimerSettingsForDebug) |
| 1952 | GetPlayTimerSpentTimeForTest |
| 1953 | [4.0.0+] SetPlayTimerAlarmDisabledForDebug |
| 1954 | [18.0.0+] IsBedtimeAlarmEnabled |
| 1955 | [18.0.0+] GetBedtimeAlarmTime |
| 1956 | [18.0.0+] GetBedtimeAlarmTimeHour |
| 1957 | [18.0.0+] GetBedtimeAlarmTimeMinute |
| 1958 | [20.0.0+] GetBedtimeAlarmResetTimeHour |
| 1959 | [20.0.0+] GetBedtimeAlarmResetTimeMinute |
| 1960 | [20.0.0+] GetExtraPlayingTimeForDebug |
| 2001 | RequestPairingAsync |
| 2002 | FinishRequestPairing |
| 2003 | [19.0.0+] AuthorizePairingAsyncOld ([1.0.0-18.1.0] AuthorizePairingAsync) |
| 2004 | FinishAuthorizePairing |
| 2005 | RetrievePairingInfoAsync |
| 2006 | FinishRetrievePairingInfo |
| 2007 | UnlinkPairingAsync |
| 2008 | FinishUnlinkPairing |
| 2009 | GetAccountMiiImageAsync |
| 2010 | FinishGetAccountMiiImage |
| 2011 | GetAccountMiiImageContentTypeAsync |
| 2012 | FinishGetAccountMiiImageContentType |
| 2013 | SynchronizeParentalControlSettingsAsync |
| 2014 | FinishSynchronizeParentalControlSettings |
| 2015 | FinishSynchronizeParentalControlSettingsWithLastUpdated |
| 2016 | [5.0.0+] RequestUpdateExemptionListAsync |
| 2017 | [19.0.0+] AuthorizePairingAsync |
| 2019 | [19.0.0+] RequestUpdateDeviceUsersBackground |
| 2021 | [20.0.0+] RequestCopyPairingAsync |
| 2022 | [20.0.0+] FinishRequestCopyPairing |
| 2023 | [20.0.0+] IsFromPairingActiveDevice |
| 2024 | [21.0.0+] RollbackCopyPairing |
| 3001 | [20.0.0+] GetErrorContextChangedEvent |
| 9401 | [20.0.0+] GetEvents |
| 9402 | [20.0.0+] GetEventsWithJson |
| 9403 | [20.0.0+] RequestPostEvents |
| 9404 | [20.0.0+] GetPostEventInterval |
| 9405 | [20.0.0+] SetPostEventInterval |
| 145601 | [18.0.0+] #GetPlayTimerSettings |
| 195101 | [18.0.0+] #SetPlayTimerSettingsForDebug |
IsStereoVisionPermitted
No input, returns an output u8 bool. True indicates that VrMode is allowed, false otherwise.
GenerateInquiryCode
This cmd takes no input, and produces 0x20 bytes of raw output containing snprintf("%02d%08llu", 10, [inquiry_rnd]) on <= 3.0.0. This changed on 3.0.1 to produce "11(...)" instead of "10(...)".
The random number generation relies on TinyMT.
CheckMasterKey
This cmd takes the 0x20 bytes produced by GenerateInquiryCode, and an 0x20 byte X descriptor containing snprintf("%08llu", master_key), and returns a bool 00 if the master key is not valid, and 01 if it is.
Master Keys are validated as follows on <= 3.0.0: first, svcSleepThread(1000000000LL) is called to introduce a delay to prevent brute force attacks. Then, strlen(master_key) is called -- if this is not 8, 0 is returned. Next, the inquiry code is regenerated and snprintf("%02d%08llu", 10, generated_inquiry_rnd) is compared to the inquiry data passed in as an argument. If this doesn't match, 0 is returned. Then, hmac-sha256(snprintf("%02d%08llu", 10, generated_inquiry_rnd)) is called using hardcoded keydata, and the master key argument is compared to snprintf("%08llu", (hmac_result & 0xFFFFFFFFFFFF) % 100000000). If this matches, 1 is returned, otherwise 0 is returned.
On 3.0.1 this was changed to use different hardcoded keydata, and to pass 11 as the snprintf argument instead of 10.
GetPlayTimerSettings
[21.0.0+] Now returns a total of 0x44-bytes of output.
SetPlayTimerSettingsForDebug
[21.0.0+] Now takes a total of 0x44-bytes of input.
Notes
nnMain will skip various functionality when the output from pm:bm GetBootMode is Maintenance. This includes psc:m init/deinit, bgtc:t functionality (including init/deinit), {various init/deinit}.