feat(libSceAppInstUtil): answer for an installer service that never installs #8346

Merged
MarrasFederico merged 11 commits from upstream-pr/8346 into main 2026-11-03 16:43:02 +00:00
MarrasFederico commented 2026-10-20 10:48:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarrasFederico on 2026-10-20T10:48:25Z.


What

sceAppInstUtilInitialize, sceAppInstUtilTerminate and sceAppInstUtilAppExists threw not implemented. SharpProspero AppInstUtil.cs documents the installer service: initialization opens it once per process, termination closes it, and AppExists writes 0 or non-zero for a title id.

AnyPS5 runs one title and cannot install or launch another (sceSystemServiceLaunchApp throws), so the service now answers as one that never installs anything:

  • sceAppInstUtilInitialize / sceAppInstUtilTerminate open and close the service; it can be opened again after termination.
  • sceAppInstUtilAppExists writes 1 for the running title's id, read from its param.json or param.sfo, and 0 for any other id, including a prefix of it.
  • Throws: a call before initialization or after termination, a second initialization, a termination without one, and null pointers, as SharpProspero names no error code for them.
  • sceAppInstUtilAppIsInInstalling keeps throwing: its prototype is disputed between SharpProspero's int* form and the string form of its PackageInstaller.cs and the PS4 headers. It now has its own Unknown function info entry citing all three.

The library gets a CMakeLists.txt to register its test; the library target is built as before. sceAppInstUtilAppInstallAll, sceAppInstUtilAppInstallTitleDir and sceAppInstUtilAppUnInstall still throw.

Tested

Ubuntu 26.04.1, kernel 7.0.0-38, GCC 15.2.0, Release, full build with BUILD_TESTING=ON. Windows was not compiled. No title was run.

  • New guest_app_inst_util, run with an app0/sce_sys/param.json whose title id is PPSA00000:
    • AppExists writes 1 for PPSA00000 and 0 for PPSA00001, PPSA0000 and an empty id;
    • initialization after termination works again, and AppExists answers as before.
    • The test does not exercise the paths that throw because the console's errors are unknown (calls before initialization or after termination, a second initialization, null pointers), so it does not pin them as unimplemented. They are listed in the debt entry.
  • The test fails on main, where every call throws. Matching a prefix of the title id, or not closing the service on termination, makes it fail.
  • tools/check_conventions.py --base origin/main passes. tools/pr_overlap.py reports a conflict with #8329, which declares other libSceAppInstUtil exports: its edit of the debt entry on line 5 sits next to the section this PR adds. No function is shared; whichever is merged second needs a one-line rebase, and I will rebase this one if #8329 goes first.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: PPSA99403 (NFS Black Box) and PPSA99000 (ProsperoStore), which abort at start on sceAppInstUtilInitialize not implemented on current main since #6519 and run with this PR; PPSA99404 and PPSA99405 get past that stop. Evidence on Windows from DavidSamir and on Linux from babyhuey in this PR; no Game bring-up discussion exists for these titles
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4934637861 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346). Originally posted by [MarrasFederico](https://github.com/MarrasFederico) on 2026-10-20T10:48:25Z. --- ### What `sceAppInstUtilInitialize`, `sceAppInstUtilTerminate` and `sceAppInstUtilAppExists` threw `not implemented`. [SharpProspero `AppInstUtil.cs`](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/AppInstUtil/AppInstUtil.cs#L18-L88) documents the installer service: initialization opens it once per process, termination closes it, and `AppExists` writes 0 or non-zero for a title id. AnyPS5 runs one title and cannot install or launch another (`sceSystemServiceLaunchApp` throws), so the service now answers as one that never installs anything: - **`sceAppInstUtilInitialize` / `sceAppInstUtilTerminate`** open and close the service; it can be opened again after termination. - **`sceAppInstUtilAppExists`** writes 1 for the running title's id, read from its `param.json` or `param.sfo`, and 0 for any other id, including a prefix of it. - **Throws:** a call before initialization or after termination, a second initialization, a termination without one, and null pointers, as SharpProspero names no error code for them. - **`sceAppInstUtilAppIsInInstalling`** keeps throwing: its prototype is disputed between SharpProspero's `int*` form and the string form of its `PackageInstaller.cs` and the PS4 headers. It now has its own Unknown function info entry citing all three. The library gets a `CMakeLists.txt` to register its test; the library target is built as before. `sceAppInstUtilAppInstallAll`, `sceAppInstUtilAppInstallTitleDir` and `sceAppInstUtilAppUnInstall` still throw. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Ubuntu 26.04.1, kernel 7.0.0-38, GCC 15.2.0, Release, full build with `BUILD_TESTING=ON`. Windows was not compiled. No title was run. - New `guest_app_inst_util`, run with an `app0/sce_sys/param.json` whose title id is `PPSA00000`: - `AppExists` writes 1 for `PPSA00000` and 0 for `PPSA00001`, `PPSA0000` and an empty id; - initialization after termination works again, and `AppExists` answers as before. - The test does not exercise the paths that throw because the console's errors are unknown (calls before initialization or after termination, a second initialization, null pointers), so it does not pin them as unimplemented. They are listed in the debt entry. - The test fails on `main`, where every call throws. Matching a prefix of the title id, or not closing the service on termination, makes it fail. - `tools/check_conventions.py --base origin/main` passes. `tools/pr_overlap.py` reports a conflict with #8329, which declares other `libSceAppInstUtil` exports: its edit of the debt entry on line 5 sits next to the section this PR adds. No function is shared; whichever is merged second needs a one-line rebase, and I will rebase this one if #8329 goes first. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: PPSA99403 (NFS Black Box) and PPSA99000 (ProsperoStore), which abort at start on `sceAppInstUtilInitialize not implemented` on current `main` since #6519 and run with this PR; PPSA99404 and PPSA99405 get past that stop. Evidence on Windows from [DavidSamir](https://github.com/boykopovar/AnyPS5/pull/8346#issuecomment-6342141970) and on Linux from babyhuey in this PR; no Game bring-up discussion exists for these titles <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
nikowolf123 commented 2026-10-20 22:04:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by nikowolf123 on 2026-10-20T22:04:02Z.


sceAppInstUtilAppIsInInstalling: the new store goes through an argument whose type is disputed

Export.cpp#L44 writes *installing = 0. On main this body threw before touching the argument, so the int32_t* prototype declared in #7749 was never exercised. This PR is the first to write through it. Its only source is SharpProspero's AppInstUtil.cs#L88. The same SharpProspero commit and the PS4 headers take a string instead:

SharpProspero's AppLauncher.cs#L578 does pass &inInstalling, but that does not settle it. Under the string form that argument is an empty id, and the loop gives up silently after 2 s.

For example, after sceAppInstUtilInitialize() a caller built against the string form runs:

char cid[] = "UP0000-PPSA00000_00-0000000000000000";
sceAppInstUtilAppIsInInstalling(cid);

The return value is 0 ("not installing") under both readings. But line 44 zeroes "UP00", so cid reads as "" afterwards. If the id is a string literal, the store hits a read-only segment, because the relinker keeps the original PT_LOAD flags (ProgramHeaderLayoutBuilder.cpp#L124-L127). The process then faults where main threw "not implemented". I built this PR's Export.cpp on Linux with such a caller: the buffer came back as "" and the literal call ended in SIGSEGV.

A fix: leave this one function as it is on main until a PS5 disassembly or a hardware run settles the prototype. Initialize, Terminate and AppExists don't depend on it.

int APS5_VABI sceAppInstUtilAppIsInInstalling(int32_t* installing) {
    NotImplemented_nid_no_patch(__func__);
    return 0;
}

Its cases then come out of GuestAppInstUtil.cpp (lines 11, 36, 50-51) and out of the Functional entry. The function moves to the Unknown function info entry, which should cite both SharpProspero forms and the PS4 one.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6302769851 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346#issuecomment-6302769851). Originally posted by [nikowolf123](https://github.com/nikowolf123) on 2026-10-20T22:04:02Z. --- **`sceAppInstUtilAppIsInInstalling`: the new store goes through an argument whose type is disputed** [`Export.cpp#L44`](https://github.com/boykopovar/AnyPS5/blob/92ed3d58ffe2b840a729956985eedef7517bed2c/core/libs/prx/libSceAppInstUtil/Export.cpp#L44) writes `*installing = 0`. On `main` this body threw before touching the argument, so the `int32_t*` prototype declared in #7749 was never exercised. This PR is the first to write through it. Its only source is SharpProspero's [`AppInstUtil.cs#L88`](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/AppInstUtil/AppInstUtil.cs#L79-L88). The same SharpProspero commit and the PS4 headers take a string instead: - [`PackageInstaller.cs#L121`](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Platform/PackageInstaller.cs#L121) declares it `delegate* unmanaged<byte*, int>`. [`AppIsInstalling(string titleId)`](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Platform/PackageInstaller.cs#L484-L498) passes a NUL-terminated id and reads the answer from the return value. - The PS4 headers declare `bool sceAppInstUtilAppIsInInstalling(const char* contentId);` ([flatz](https://github.com/flatz/ps4_stub_lib_maker_v2/blob/a8d044c12ea2dc3fa190ce1769eeb48b30d28ed4/include/appinst_util.h#L35), [OpenOrbis](https://github.com/OpenOrbis/OpenOrbis-PS4-Toolchain/blob/0a1aaf9dd4a92695538bdeb09fb056d06dd11725/include/orbis/AppInstUtil.h#L29)). SharpProspero's [`AppLauncher.cs#L578`](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Platform/AppLauncher.cs#L554-L590) does pass `&inInstalling`, but that does not settle it. Under the string form that argument is an empty id, and the loop gives up silently after 2 s. For example, after `sceAppInstUtilInitialize()` a caller built against the string form runs: ```c char cid[] = "UP0000-PPSA00000_00-0000000000000000"; sceAppInstUtilAppIsInInstalling(cid); ``` The return value is 0 ("not installing") under both readings. But line 44 zeroes `"UP00"`, so `cid` reads as `""` afterwards. If the id is a string literal, the store hits a read-only segment, because the relinker keeps the original `PT_LOAD` flags ([`ProgramHeaderLayoutBuilder.cpp#L124-L127`](https://github.com/boykopovar/AnyPS5/blob/92ed3d58ffe2b840a729956985eedef7517bed2c/core/relinker/elfpatcher/src/general/ProgramHeaderLayoutBuilder.cpp#L124-L127)). The process then faults where `main` threw "not implemented". I built this PR's `Export.cpp` on Linux with such a caller: the buffer came back as `""` and the literal call ended in SIGSEGV. A fix: leave this one function as it is on `main` until a PS5 disassembly or a hardware run settles the prototype. Initialize, Terminate and AppExists don't depend on it. ```cpp int APS5_VABI sceAppInstUtilAppIsInInstalling(int32_t* installing) { NotImplemented_nid_no_patch(__func__); return 0; } ``` Its cases then come out of `GuestAppInstUtil.cpp` (lines 11, 36, 50-51) and out of the Functional entry. The function moves to the Unknown function info entry, which should cite both SharpProspero forms and the PS4 one.
ycbuzi commented 2026-10-21 07:35:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ycbuzi on 2026-10-21T07:35:21Z.


Windows run of 92ed3d58ff merged onto main b77bd58806 (d720ef019a), the build the description lists as not done. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release, BUILD_TESTING=ON.

Built libSceAppInstUtil and guest_app_inst_util_tests with no errors or warnings; ctest --repeat until-fail:2 on guest_app_inst_util: passes on both repeats. Not run: the negative control against main's library, a title.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6310653947 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346#issuecomment-6310653947). Originally posted by [ycbuzi](https://github.com/ycbuzi) on 2026-10-21T07:35:21Z. --- Windows run of 92ed3d58ff merged onto `main` b77bd58806 (d720ef019a), the build the description lists as not done. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release, `BUILD_TESTING=ON`. Built `libSceAppInstUtil` and `guest_app_inst_util_tests` with no errors or warnings; `ctest --repeat until-fail:2` on `guest_app_inst_util`: passes on both repeats. Not run: the negative control against `main`'s library, a title.
babyhuey commented 2026-10-21 10:51:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-21T10:51:22Z.


Linux title runs for this head (92ed3d58f), since none were run yet. Three catalog titles started stopping on this call on main today: in my catalog sweeps they reached their usual headless stop on main 27c88a8d, and on 158d8ad34 they throw sceAppInstUtilInitialize not implemented instead (same title builds, so something merged in between gets them to this call first).

Merged onto main 158d8ad34 (clean merge). Ubuntu 24.04 container, GCC 13, Release, BUILD_TESTING=ON. No warnings in the libSceAppInstUtil files; guest_app_inst_util passes 5 of 5 (--repeat until-fail:5).

Headless with SDL's offscreen driver, 30 s:

Title main 158d8ad34 With this PR
ProsperoStore (PPSA99000, 1.000.104) sceAppInstUtilInitialize not implemented DisplayWindow Vulkan check
NFS Black Box (PPSA99403, 01.000.000) same same as above
Sahin (PPSA99404, 01.004.000) same same as above

The DisplayWindow check is where headless runs of the other UI titles stop too, so all three get past the installer service with this change.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6314153336 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346#issuecomment-6314153336). Originally posted by [babyhuey](https://github.com/babyhuey) on 2026-10-21T10:51:22Z. --- Linux title runs for this head (92ed3d58f), since none were run yet. Three catalog titles started stopping on this call on `main` today: in my catalog sweeps they reached their usual headless stop on `main` `27c88a8d`, and on `158d8ad34` they throw `sceAppInstUtilInitialize not implemented` instead (same title builds, so something merged in between gets them to this call first). Merged onto `main` `158d8ad34` (clean merge). Ubuntu 24.04 container, GCC 13, Release, `BUILD_TESTING=ON`. No warnings in the `libSceAppInstUtil` files; `guest_app_inst_util` passes 5 of 5 (`--repeat until-fail:5`). Headless with SDL's offscreen driver, 30 s: | Title | `main` `158d8ad34` | With this PR | |---|---|---| | ProsperoStore (PPSA99000, 1.000.104) | `sceAppInstUtilInitialize not implemented` | `DisplayWindow` Vulkan check | | NFS Black Box (PPSA99403, 01.000.000) | same | same as above | | Sahin (PPSA99404, 01.004.000) | same | same as above | The `DisplayWindow` check is where headless runs of the other UI titles stop too, so all three get past the installer service with this change. AI-assisted: yes
adriadam10 commented 2026-10-21 11:15:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-21T11:15:10Z.

Review: CHANGES_REQUESTED


Thanks for the PR; Initialize, Terminate and AppExists look right and the test pins the edge cases well. One blocker:

  • core/libs/prx/libSceAppInstUtil/Export.cpp:44: sceAppInstUtilAppIsInInstalling writes *installing = 0, but the prototype is disputed. SharpProspero's own PackageInstaller.cs (L121, L484-L498) declares it delegate* unmanaged<byte*, int>, passes a NUL-terminated id and reads the answer from the return value, and the PS4 headers (flatz, OpenOrbis) take const char*. Under that reading the store corrupts the caller's id, and faults on a read-only literal (reproduced in the thread by @nikowolf123). Unverified prototypes throw.
    Fix: restore the NotImplemented_nid_no_patch(__func__) body for this one function, drop its cases from GuestAppInstUtil.cpp (lines 11, 36, 50-51) and from the Functional debt entry, and list it under Unknown function info citing both SharpProspero forms and the PS4 one.

Everything else can stay as is.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5598813208 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346#pullrequestreview-5598813208). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-21T11:15:10Z. **Review:** CHANGES_REQUESTED --- Thanks for the PR; Initialize, Terminate and AppExists look right and the test pins the edge cases well. One blocker: - `core/libs/prx/libSceAppInstUtil/Export.cpp:44`: `sceAppInstUtilAppIsInInstalling` writes `*installing = 0`, but the prototype is disputed. SharpProspero's own `PackageInstaller.cs` (L121, L484-L498) declares it `delegate* unmanaged<byte*, int>`, passes a NUL-terminated id and reads the answer from the return value, and the PS4 headers (flatz, OpenOrbis) take `const char*`. Under that reading the store corrupts the caller's id, and faults on a read-only literal (reproduced in the thread by @nikowolf123). Unverified prototypes throw. Fix: restore the `NotImplemented_nid_no_patch(__func__)` body for this one function, drop its cases from `GuestAppInstUtil.cpp` (lines 11, 36, 50-51) and from the Functional debt entry, and list it under Unknown function info citing both SharpProspero forms and the PS4 one. Everything else can stay as is.
babyhuey commented 2026-10-21 11:46:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-21T11:46:26Z.


The cause of the change on main, from a bisect of 27c88a8d..158d8ad34 (first parent, ProsperoStore): the first merge that stops on this call is #6519 (ee676246c), which loads /system/common/lib/*.sprx paths as the host library.

All three titles load /system/common/lib/libSceAppInstUtil.sprx and look up sceAppInstUtilInitialize by name; the path and the name are in each eboot.bin. Before #6519 that load failed with ENOENT and the titles carried on without the installer service. Now the load succeeds, so they call sceAppInstUtilInitialize and it throws. With this PR they get past it again, as in the table above.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6315121554 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346#issuecomment-6315121554). Originally posted by [babyhuey](https://github.com/babyhuey) on 2026-10-21T11:46:26Z. --- The cause of the change on `main`, from a bisect of `27c88a8d..158d8ad34` (first parent, ProsperoStore): the first merge that stops on this call is #6519 (`ee676246c`), which loads `/system/common/lib/*.sprx` paths as the host library. All three titles load `/system/common/lib/libSceAppInstUtil.sprx` and look up `sceAppInstUtilInitialize` by name; the path and the name are in each `eboot.bin`. Before #6519 that load failed with `ENOENT` and the titles carried on without the installer service. Now the load succeeds, so they call `sceAppInstUtilInitialize` and it throws. With this PR they get past it again, as in the table above. AI-assisted: yes
MarrasFederico commented 2026-10-21 12:33:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarrasFederico on 2026-10-21T12:33:19Z.


@adriadam10 done in 230d43d14, as you described: sceAppInstUtilAppIsInInstalling is back to NotImplemented_nid_no_patch(__func__), its cases are out of GuestAppInstUtil.cpp and of the Functional entry, and it has its own Unknown function info entry citing SharpProspero's AppInstUtil.cs (int*) and PackageInstaller.cs (string) forms and the PS4 const char* headers. The branch is also merged with current main; guest_app_inst_util passes.

@nikowolf123 thanks for reproducing the overwrite, and @babyhuey for the title runs and the bisect to #6519. The three titles only need Initialize/Terminate/AppExists, which stay.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6315993288 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346#issuecomment-6315993288). Originally posted by [MarrasFederico](https://github.com/MarrasFederico) on 2026-10-21T12:33:19Z. --- @adriadam10 done in 230d43d14, as you described: `sceAppInstUtilAppIsInInstalling` is back to `NotImplemented_nid_no_patch(__func__)`, its cases are out of `GuestAppInstUtil.cpp` and of the Functional entry, and it has its own Unknown function info entry citing SharpProspero's `AppInstUtil.cs` (`int*`) and `PackageInstaller.cs` (string) forms and the PS4 `const char*` headers. The branch is also merged with current `main`; `guest_app_inst_util` passes. @nikowolf123 thanks for reproducing the overwrite, and @babyhuey for the title runs and the bisect to #6519. The three titles only need Initialize/Terminate/AppExists, which stay.
babyhuey commented 2026-10-21 12:51:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-21T12:51:42Z.


Rechecked on 230d43d14 merged onto main 7280a17ec (clean merge), same Linux setup: guest_app_inst_util passes 5 of 5, and ProsperoStore, NFS Black Box and Sahin still get past the installer service to the DisplayWindow check. So none of them calls sceAppInstUtilAppIsInInstalling before that point.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6316447963 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346#issuecomment-6316447963). Originally posted by [babyhuey](https://github.com/babyhuey) on 2026-10-21T12:51:42Z. --- Rechecked on 230d43d14 merged onto `main` `7280a17ec` (clean merge), same Linux setup: `guest_app_inst_util` passes 5 of 5, and ProsperoStore, NFS Black Box and Sahin still get past the installer service to the `DisplayWindow` check. So none of them calls `sceAppInstUtilAppIsInInstalling` before that point. AI-assisted: yes
DavidSamir commented 2026-10-22 01:37:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DavidSamir on 2026-10-22T01:37:45Z.


A title this unblocks: ProsperoStore PPSA99000 1.000.105, the current catalog build (1.000.104 didn't call into this library). Windows 11, Radeon 680M, WinLibs GCC 15.2.0 r7.

  • main 0c6a5bd59: it aborts after 1 s with what(): sceAppInstUtilInitialize not implemented (SIGABRT, 0xc0000409).
  • main a6dcea927 with this PR merged in (head 230d43d14): it runs the full 60 s and is still running when stopped. There are no key lines. The import audit shows 5 stubs and 0 absent.

When I merged it into current main, the code merged cleanly, but docs/dev/debt/libSceAppInstUtil.md conflicts, so the branch needs a merge of main.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6330576470 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346#issuecomment-6330576470). Originally posted by [DavidSamir](https://github.com/DavidSamir) on 2026-10-22T01:37:45Z. --- A title this unblocks: **ProsperoStore PPSA99000 1.000.105**, the current catalog build (1.000.104 didn't call into this library). Windows 11, Radeon 680M, WinLibs GCC 15.2.0 r7. - **`main` 0c6a5bd59:** it aborts after 1 s with `what(): sceAppInstUtilInitialize not implemented` (SIGABRT, 0xc0000409). - **`main` a6dcea927 with this PR merged in** (head 230d43d14): it runs the full 60 s and is still running when stopped. There are no key lines. The import audit shows 5 stubs and 0 absent. When I merged it into current `main`, the code merged cleanly, but `docs/dev/debt/libSceAppInstUtil.md` conflicts, so the branch needs a merge of `main`. AI-assisted: yes
babyhuey commented 2026-10-22 01:44:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-22T01:44:09Z.


Two more titles this unblocks, both new in the catalog today: FUTBOL13 (PPSA99405, 01.000.000) and Blur5 (PPSA11016, 1.0.0). On Linux main 94fbb8cea both stop on sceAppInstUtilInitialize not implemented. With 230d43d14 merged onto main 94fbb8cea (the code merges cleanly; for this local test I kept main's copy of the conflicting debt doc), both get to the DisplayWindow check like the other three.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6330659557 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346#issuecomment-6330659557). Originally posted by [babyhuey](https://github.com/babyhuey) on 2026-10-22T01:44:09Z. --- Two more titles this unblocks, both new in the catalog today: FUTBOL13 (PPSA99405, 01.000.000) and Blur5 (PPSA11016, 1.0.0). On Linux `main` `94fbb8cea` both stop on `sceAppInstUtilInitialize not implemented`. With 230d43d14 merged onto `main` `94fbb8cea` (the code merges cleanly; for this local test I kept `main`'s copy of the conflicting debt doc), both get to the `DisplayWindow` check like the other three. AI-assisted: yes
babyhuey commented 2026-10-22 07:39:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-22T07:39:50Z.


Windows run of the current head (12d605cde) merged onto main 4a17c7175 (clean merge). Windows 11, RTX 3080, WinLibs GCC 15.2, Release, 60 s each:

Title main (557682ca4 → 6ef5a1c4c) With this PR
ProsperoStore 1.000.105 (PPSA99000) was running at 53.75 FPS on 557682ca4; aborts with sceAppInstUtilInitialize not implemented on 6ef5a1c4c still running at 60 s, 59.94 FPS
NFS Black Box (PPSA99403) was running at 48.17 FPS on 557682ca4; same abort on 6ef5a1c4c still running at 60 s, 58.42 FPS
Sahin 01.004.000 (PPSA99404) same abort 0xC0000409 at 4.6 s on v_interp_mov p10 of a flat input with the first provoking vertex is not measured (#1413), its stop from before #6519
FUTBOL13 (PPSA99405) same abort the same v_interp_mov throw at 5.1 s
Blur5 (PPSA11016) same abort the same v_interp_mov throw at 4.5 s

So on Windows the two titles that ran before #6519 run again with this PR, and the other three move on to #1413.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6335450553 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346#issuecomment-6335450553). Originally posted by [babyhuey](https://github.com/babyhuey) on 2026-10-22T07:39:50Z. --- Windows run of the current head (12d605cde) merged onto `main` `4a17c7175` (clean merge). Windows 11, RTX 3080, WinLibs GCC 15.2, Release, 60 s each: | Title | `main` (557682ca4 → 6ef5a1c4c) | With this PR | |---|---|---| | ProsperoStore 1.000.105 (PPSA99000) | was running at 53.75 FPS on 557682ca4; aborts with `sceAppInstUtilInitialize not implemented` on 6ef5a1c4c | still running at 60 s, 59.94 FPS | | NFS Black Box (PPSA99403) | was running at 48.17 FPS on 557682ca4; same abort on 6ef5a1c4c | still running at 60 s, 58.42 FPS | | Sahin 01.004.000 (PPSA99404) | same abort | 0xC0000409 at 4.6 s on `v_interp_mov p10 of a flat input with the first provoking vertex is not measured` (#1413), its stop from before #6519 | | FUTBOL13 (PPSA99405) | same abort | the same `v_interp_mov` throw at 5.1 s | | Blur5 (PPSA11016) | same abort | the same `v_interp_mov` throw at 4.5 s | So on Windows the two titles that ran before #6519 run again with this PR, and the other three move on to #1413. AI-assisted: yes
DavidSamir commented 2026-10-22 13:37:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DavidSamir on 2026-10-22T13:37:27Z.


Title evidence for this PR, from a Windows regression sweep of 113 homebrew titles: Windows 11, Radeon 680M, WinLibs GCC 15.2, 60 s per title, no input.

A regression this PR fixes. PPSA99403 NFS Black Box 01.000.000 ran 60 s on main 1ff5c8ac5. On main 4777caca3, the same build of the title (same 1679 imports) aborts at start:

terminate called after throwing an instance of 'std::runtime_error'
  what():  sceAppInstUtilInitialize not implemented

A git bisect --first-parent, rebuilding the relinker and libs at each step, names #6519 (ee676246cf; last good b6fe513b9a). #6519 is correct: it makes sceKernelLoadStartModule load /system/common/lib/<name>.sprx from the host libs/<name>.prx. NFS Black Box loads libSceAppInstUtil.sprx that way. Before #6519 the load failed and the title skipped its installer path; now it succeeds and reaches sceAppInstUtilInitialize.

With this PR (head 12d605cde3 merged onto main 4777caca3):

Title main 4777caca3 with this PR
PPSA99403 NFS Black Box 01.000.000 aborts at 0 s on sceAppInstUtilInitialize runs 60 s and reaches its own store code ([STORE] store folder: nothing to reclaim)
PPSA99000 ProsperoStore 1.000.105 aborts at 0 s on sceAppInstUtilInitialize runs 60 s
PPSA99404 Sahin 01.004.000 aborts at 0 s on sceAppInstUtilInitialize gets past it, then stops at 6 s on a separate AGC gap (v_interp_mov p10 of a flat input with the first provoking vertex is not measured), where its previous build already stopped
PPSA99405 FUTBOL13 01.000.002 aborts at 0 s on sceAppInstUtilInitialize the same as Sahin: past it, then the same AGC gap at 6 s

So on current main this PR unblocks PPSA99403 and PPSA99000, and moves PPSA99404 and PPSA99405 past the sceAppInstUtilInitialize stop.

I only ran it; I didn't review the code.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6342141970 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346#issuecomment-6342141970). Originally posted by [DavidSamir](https://github.com/DavidSamir) on 2026-10-22T13:37:27Z. --- Title evidence for this PR, from a Windows regression sweep of 113 homebrew titles: Windows 11, Radeon 680M, WinLibs GCC 15.2, 60 s per title, no input. **A regression this PR fixes.** PPSA99403 NFS Black Box 01.000.000 ran 60 s on `main` `1ff5c8ac5`. On `main` `4777caca3`, the same build of the title (same 1679 imports) aborts at start: ``` terminate called after throwing an instance of 'std::runtime_error' what(): sceAppInstUtilInitialize not implemented ``` A `git bisect --first-parent`, rebuilding the relinker and libs at each step, names #6519 (`ee676246cf`; last good `b6fe513b9a`). #6519 is correct: it makes `sceKernelLoadStartModule` load `/system/common/lib/<name>.sprx` from the host `libs/<name>.prx`. NFS Black Box loads `libSceAppInstUtil.sprx` that way. Before #6519 the load failed and the title skipped its installer path; now it succeeds and reaches `sceAppInstUtilInitialize`. **With this PR** (head `12d605cde3` merged onto `main` `4777caca3`): | Title | `main` `4777caca3` | with this PR | |---|---|---| | PPSA99403 NFS Black Box 01.000.000 | aborts at 0 s on `sceAppInstUtilInitialize` | runs 60 s and reaches its own store code (`[STORE] store folder: nothing to reclaim`) | | PPSA99000 ProsperoStore 1.000.105 | aborts at 0 s on `sceAppInstUtilInitialize` | runs 60 s | | PPSA99404 Sahin 01.004.000 | aborts at 0 s on `sceAppInstUtilInitialize` | gets past it, then stops at 6 s on a separate AGC gap (`v_interp_mov p10 of a flat input with the first provoking vertex is not measured`), where its previous build already stopped | | PPSA99405 FUTBOL13 01.000.002 | aborts at 0 s on `sceAppInstUtilInitialize` | the same as Sahin: past it, then the same AGC gap at 6 s | So on current `main` this PR unblocks PPSA99403 and PPSA99000, and moves PPSA99404 and PPSA99405 past the `sceAppInstUtilInitialize` stop. I only ran it; I didn't review the code. AI-assisted: yes
MarrasFederico commented 2026-10-22 13:51:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarrasFederico on 2026-10-22T13:51:13Z.


@DavidSamir thank you, this is exactly the evidence the PR was missing. I've put PPSA99403 and PPSA99000 in the Unblocks line, with a link to your sweep, and noted that PPSA99404 and PPSA99405 get past the sceAppInstUtilInitialize stop. The branch has also just been updated to current main 3ca07d086d; guest_app_inst_util passes on the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6342434384 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346#issuecomment-6342434384). Originally posted by [MarrasFederico](https://github.com/MarrasFederico) on 2026-10-22T13:51:13Z. --- @DavidSamir thank you, this is exactly the evidence the PR was missing. I've put PPSA99403 and PPSA99000 in the `Unblocks` line, with a link to your sweep, and noted that PPSA99404 and PPSA99405 get past the `sceAppInstUtilInitialize` stop. The branch has also just been updated to current `main` `3ca07d086d`; `guest_app_inst_util` passes on the new head.
jotitadev commented 2026-10-27 06:33:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-27T06:33:59Z.

Review: COMMENTED


Merged onto current main (b7105f728), public_headers fails:

sceAppInstUtilInitialize: expected exactly one header declaration; found 2: core/libs/prx/libSceAppInstUtil/include/Api.hpp:9, core/libs/tests/GuestAppInstUtil.cpp:8
sceAppInstUtilTerminate: expected exactly one header declaration; found 2: core/libs/prx/libSceAppInstUtil/include/Api.hpp:10, core/libs/tests/GuestAppInstUtil.cpp:9
sceAppInstUtilAppExists: expected exactly one header declaration; found 2: core/libs/prx/libSceAppInstUtil/include/Api.hpp:15, core/libs/tests/GuestAppInstUtil.cpp:10

This branch's merge-base (1e740a23a) predates #10706, which added that audit on 2026-10-24: every export must be declared exactly once, in its library's public header. The new test redeclares three functions that libSceAppInstUtil/include/Api.hpp already declares. The linux/windows jobs were also skipped on this head, so CI never ran the audit.

Fix: include the public header and drop the local block:

-#include "prx/libc/include/general/VabiMacros.hpp"
+#include "prx/libSceAppInstUtil/include/Api.hpp"
 
 #include <cstdint>
 #include <cstdio>
 #include <cstdlib>
 
-extern "C" {
-int APS5_VABI sceAppInstUtilInitialize(void);
-int APS5_VABI sceAppInstUtilTerminate(void);
-int APS5_VABI sceAppInstUtilAppExists(const char* titleId, std::int32_t* exists);
-}
-

With that change the audit passes for this PR. The only remaining error is the sceKernelGetModuleInfoForUnwind one that is already on main from #9263 (#11718 fixes it). The test passes a GCC 15.2 -fsyntax-only check with the test build flags.

Checked on Linux (i7-8700, Ubuntu 26.04, GCC 15.2): core/libs/tests/test_public_headers.py --audit-only on head b1e6cc92d merged onto main b7105f728.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5663115939 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346#pullrequestreview-5663115939). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-27T06:33:59Z. **Review:** COMMENTED --- Merged onto current `main` (`b7105f728`), `public_headers` fails: ``` sceAppInstUtilInitialize: expected exactly one header declaration; found 2: core/libs/prx/libSceAppInstUtil/include/Api.hpp:9, core/libs/tests/GuestAppInstUtil.cpp:8 sceAppInstUtilTerminate: expected exactly one header declaration; found 2: core/libs/prx/libSceAppInstUtil/include/Api.hpp:10, core/libs/tests/GuestAppInstUtil.cpp:9 sceAppInstUtilAppExists: expected exactly one header declaration; found 2: core/libs/prx/libSceAppInstUtil/include/Api.hpp:15, core/libs/tests/GuestAppInstUtil.cpp:10 ``` This branch's merge-base (`1e740a23a`) predates #10706, which added that audit on 2026-10-24: every export must be declared exactly once, in its library's public header. The new test redeclares three functions that `libSceAppInstUtil/include/Api.hpp` already declares. The `linux`/`windows` jobs were also skipped on this head, so CI never ran the audit. Fix: include the public header and drop the local block: ```diff -#include "prx/libc/include/general/VabiMacros.hpp" +#include "prx/libSceAppInstUtil/include/Api.hpp" #include <cstdint> #include <cstdio> #include <cstdlib> -extern "C" { -int APS5_VABI sceAppInstUtilInitialize(void); -int APS5_VABI sceAppInstUtilTerminate(void); -int APS5_VABI sceAppInstUtilAppExists(const char* titleId, std::int32_t* exists); -} - ``` With that change the audit passes for this PR. The only remaining error is the `sceKernelGetModuleInfoForUnwind` one that is already on `main` from #9263 (#11718 fixes it). The test passes a GCC 15.2 `-fsyntax-only` check with the test build flags. Checked on Linux (i7-8700, Ubuntu 26.04, GCC 15.2): `core/libs/tests/test_public_headers.py --audit-only` on head `b1e6cc92d` merged onto `main` `b7105f728`. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
jotitadev commented 2026-10-30 14:28:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-30T14:28:41Z.

Review: COMMENTED


Follow-up on the public_headers failure from my last review: fixed on f215c37ef.

Linux, Ubuntu 26.04, i7-8700, GCC 15.2, Release, full build. Head merged --no-commit onto main f91137142e.

  • public_headers, guest_app_inst_util, patched_libraries and conventions_unknown_nids pass, 3/3 each.
  • Control: the previous head's GuestAppInstUtil.cpp (b1e6cc92d) makes the audit fail again with the three sceAppInstUtil* duplicates.

The branch conflicts with main again since #13077 (merged today), but only in docs/dev/debt/libSceAppInstUtil.md. #13077 adds more libSceAppInstUtil exports and declares them in include/Api.hpp, and the code merges cleanly. I kept main's debt file for these runs.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5713749442 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8346#pullrequestreview-5713749442). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-30T14:28:41Z. **Review:** COMMENTED --- Follow-up on the `public_headers` failure from my last review: fixed on `f215c37ef`. Linux, Ubuntu 26.04, i7-8700, GCC 15.2, Release, full build. Head merged `--no-commit` onto `main` `f91137142e`. - `public_headers`, `guest_app_inst_util`, `patched_libraries` and `conventions_unknown_nids` pass, 3/3 each. - Control: the previous head's `GuestAppInstUtil.cpp` (`b1e6cc92d`) makes the audit fail again with the three `sceAppInstUtil*` duplicates. The branch conflicts with `main` again since #13077 (merged today), but only in `docs/dev/debt/libSceAppInstUtil.md`. #13077 adds more `libSceAppInstUtil` exports and declares them in `include/Api.hpp`, and the code merges cleanly. I kept `main`'s debt file for these runs. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!8346
No description provided.