feat(libSceSystemService): answer the rest of the running title's identity #10801
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10801"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-25T01:44:42Z.
What
Answers the rest of the running title's identity in libSceSystemService, after #8354:
sceLncUtilGetAppIdandsceLncUtilIsAppLaunchedtake the running title's ID assceSystemServiceGetAppIddoes.sceLncUtilGetAppIdOfRunningBigAppreturns whatsceSystemServiceGetAppIdOfRunningBigAppreturns.sceLncUtilGetAppIdListOfBigAppandsceSystemServiceGetAppIdListOfBigApplist the running title alone.sceLncUtilGetAppLaunchedUser,sceSystemServiceGetAppLaunchedUserandsceShellCoreUtilGetUserFocuswrite the initial user, 0x10000000, whichsceUserServiceGetInitialUserandsceUserServiceGetForegroundUserreport. That is the emulator's own user, not a console measurement.sceLncUtilIsAppSuspended,sceSystemServiceIsAppSuspendedandsceLncUtilIsSpeculativeLaunchwrite false, from the emulator's own state, not a console measurement: it never suspends the running title, and it starts the title from the host, with noLncLaunchParamasking for a speculative launch.sceLncUtilLoadExecforwards tosceSystemServiceLoadExec.The arguments firmware 13.42's
libSceSystemService.sprxchecks before it makes a request give its results, as @BunnyFl measured (comment): a null or non-9-character title ID makessceSystemServiceGetAppIdandsceLncUtilGetAppIdreturn -1 andsceLncUtilIsAppLaunched0x80940005, a null output, list, count or user returns 0x80940005 (0x80e30003 fromsceShellCoreUtilGetUserFocus) before the app ID is looked at, and a nullsceLncUtilLoadExecpath returns 0x80940005. What the module passes on as a request still throws, because the console's answers are unknown: another app ID or 9-character title ID, a list capacity of 0 and an emptysceLncUtilLoadExecpath.sceShellCoreUtilGetAppEnterButtonAssignstays unimplemented:sceSystemServiceParamGetInt(1000)returns 0x80A10003, as measured on a PS5, so the tree has no enter-button assignment to report. The debt file has an entry for each group.Related: #8354 (running title's app ID and title ID), #9586 (libSceSystemService suspend notifications and absent features; no shared lines, both merge cleanly).
Tested
guest_system_service,guest_system_service_app_title_id_{known,long,missing}, the newguest_lnc_util_load_exec_exit, and the other 10guest_system_exittests (guest_system_exit,guest_system_exit_parameters,guest_requested_exit,guest_quick_exit,guest_immediate_exit,guest_immediate_exit_drain,guest_return_from_main,guest_system_relaunch,guest_nested_exit,guest_exit_finalizers_before_shutdown). With main's implementation the set fails. The libc and libkernel suites pass: Linux 143 and 206 tests run, Windows 170 and 222, 0 failed.No title tested.
1928c54b4f, firmware 13.42's argument checks (run), after MarcZX10's review and @BunnyFl's emulator run of the 13.42 module. The tests now expect those results: the malformed title IDsPPSA0000,PPSA000000,PPSA00000,PPSA00000and the empty string, null pointers and null outputs, also for app IDs other than the running one, and null lists and counts, while a capacity of 0, another app ID and an emptysceLncUtilLoadExecpath still throw. Theguest_system_serviceandguest_system_exittests,guest_system_service_app_title_id_{known,long,missing},guest_lnc_util_load_exec_exitandpublic_headerspass 10 runs in a row. Linux: 18 run, 18 pass, 0 skip, 0 fail. Windows: 19 run, 19 pass, 0 skip, 0 fail. The before arm, the previous head7a4b965d6fwith these tests, doesn't build, since the tests use the new error constants. Suites: libc and libkernel pass on Linux (143 and 206) and on Windows (170 and 222). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.2c9d0ec646, following the rule that tests don't require a placeholder to throw (run). The tests no longer require the app list with no room, the running-app queries for another app ID,sceLncUtilIsAppLaunchedfor another title (three checks) orsceLncUtilGetAppIdfor another title to throw, since those answers aren't measured and such a check fails once the call is implemented;GetAppIdThrowsis back tomain's form. The calls still refuse those cases, as the debt entries say, and the running title's answers and firmware 13.42's argument checks stay. Theguest_system_servicetests pass 10 runs in a row. Linux: 6 run, 6 pass, 0 skip, 0 fail. Windows: 7 run, 7 pass, 0 skip, 0 fail. Suites: libc and libkernel pass on Linux (143 and 206) and on Windows (170 and 222). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T01:54:11Z.
Review: DISMISSED
I reviewed the current head
7a4b965d6fcf73ea1d45e46d78f00ff4c511daaaand found behavior that needs clarification or correction before these exports can be treated as implemented.\n\n1.sceLncUtilIsAppLaunchedcurrently callsRunningAppId, which throws for every title ID other than the current one. The API is specifically a launched-state query, so a valid, non-running title should ordinarily be reportable asfalse; that case is distinct from malformed/null input. The new testIsAppLaunchedThrowsasserts the opposite for every other title and does not validate an ordinary negative result. Please confirm the console contract from evidence or implement the supported false result and add a test.\n\n2. The three launched/focus user functions always returnUSER_SERVICE_INITIAL_USER_ID. The cited local evidence only establishes the initial user and foreground user in the simplest state.libSceUserServicesupports additional connected users, so this does not establish that the initial user launched every title or that it remains the focused user. Please add evidence/modeling for the relevant launch/focus state, or keep unsupported cases throwing rather than claim a general answer.\n\n3. The new running-app list writes one ID whenever capacity is nonzero, but has no evidence for the API’s capacity/count contract (including whether a zero-capacity query should return a required count). Likewise, list nulls/zero capacity currently throw viaNotImplemented_nid_no_patch; please document a source or probe for these return semantics, or leave the export unsupported until known.\n\n4. The PR body’s detailed test run is from an older branch SHA, while the current head addssceLncUtilLoadExec. The current-head hosted Build run passed its policy/eligibility steps but skipped the Linux and Windows product jobs due to path filters. Please run/report the focused guest exit test for the alias on this head (or update the test evidence); no current-head product test result is visible in CI.\n\nI did run the repository convention checker andgit diff --checkagainst currentmain; both pass. I also confirmed the local user service can represent secondary connected users, which is why the hardcoded launched/focus user needs a more precise basis.