Skip to content

feat(prx): declare the missing libSceAppInstUtil and libSceAudioIn exports - #12539

Merged
adriadam10 merged 3 commits into
boykopovar:mainfrom
juanpimg:feat/prx-declare-appinstutil-audioin
Oct 30, 2026
Merged

adriadam10 merged 3 commits into
boykopovar:mainfrom
juanpimg:feat/prx-declare-appinstutil-audioin

Conversation

@juanpimg

Copy link
Copy Markdown
Contributor

What

Declares 13 PS5 3.20 system exports that AnyPS5 does not provide, across 2 libraries: libSceAppInstUtil (7) and libSceAudioIn (6).

AnyPS5 resolves a title's imports by NID, so a title that imports a system function that no AnyPS5 library provides fails to load with an unresolved import. Declaring them as throwing stubs lets those titles load and reach their next blocker.

Every declaration calls NotImplemented_nid_no_patch and returns 0; none of them implements the function. All 13 are declared without parameters, which resolves the import without making an ABI claim. The technical-debt files record the limitation per library.

The list is the intersection of the export table of the console's library (function symbols only), the pinned aerolib names and the functions not yet defined anywhere in the repo (verified per symbol with tools/nid_names.py). It was computed with tools/export_gap.py (#8588), which recognises what a module already provides through an APS5_VABI declaration, a _nid_postfix name, an APS5_EXPORT binding or a macro, and which reports the missing exports whose name the module calls itself.

tools/pr_overlap.py reports no shared export with any open pull request.

tools/progress.py reports system libraries changing from 6653/14205 (46.84%) to 6653/14218 (46.79%). These are pending declarations, so the implemented count is unchanged.

Tested

CachyOS Linux, kernel 7.2.9-2-cachyos, GCC 16.2.1, CMake 3.31.6, Ninja 1.12.1, Release build.

  • cmake --build build --target libSceAppInstUtil libSceAudioIn: builds and links cleanly.
  • No dedicated tests exist for these declarations (the project does not add tests that only check that a symbol is exported; missing exports already fail at startup).
  • python3 tools/check_conventions.py --base origin/main: all conventions checks passed.
  • git diff --check: clean.
  • No title was run: the contributor has no PS5 and no game dumps.

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: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Progress report (90c9759 → a249841)

📉 System libraries: 43.19% (-0.02%, +7 declared functions)

🆕 7 declared as stubs
Library Name
libSceAppInstUtil sceAppInstUtilAppConvertAppDiscToDownload
libSceAppInstUtil sceAppInstUtilAppGetCustomThemeInfo
libSceAppInstUtil sceAppInstUtilAppGetInstallAddcontFromDiscStatus
libSceAppInstUtil sceAppInstUtilAppInstallCloudGame
libSceAppInstUtil sceAppInstUtilAppInstallMediaPlayer
libSceAppInstUtil sceAppInstUtilAppInstallRequestAddcontFromDisc
libSceAppInstUtil sceAppInstUtilAppSetSavedataUploadStatus

Changed libraries (implemented exports)

Library Before After Change
libSceAppInstUtil 0/117 (0.00%) 0/124 (0.00%) +0.00%

@adriadam10 adriadam10 self-assigned this Oct 28, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — changes requested

The 13 new exported functions have definitions but no declarations in either library's public headers, so the required public_headers audit fails on this head.

What I ran

Reviewed head 4792cc3607c3dbc19383c853bd2111844d66c55e against current main 319621ba2e578bd053b0baba2877fe70520e0737; the merge tree is clean. Environment: Debian 12 x86_64, Python 3.11. I ran the repository's public_headers audit on both the PR head and its base as a negative control, and inspected the two public headers and the relevant contribution rule.

git diff --check refs/review/current-main...refs/review/12539
git merge-tree --write-tree refs/review/current-main refs/review/12539
python3 core/libs/tests/test_public_headers.py --audit-only

The audit command was run from /dev/shm/AnyPS5-review-12539 at the PR head and /dev/shm/AnyPS5-base-12539 at the base.

Results

Check Result
Merge with current main Clean
Diff check Passed; no output
Base public_headers audit Passed: 369 libraries, 13,071 exports
PR-head public_headers audit Failed: all 13 newly defined exports have zero header declarations
Hosted conventions, eligibility, intake, labels, report Passed
Hosted Windows Job passed, but test selection and CTest were skipped; host-only test executables linked
Hosted Linux, register-context, relinker, ASan, write-watch Skipped by workflow
Raw output
8421c132edbe9d521e10fbef6856547a8f7233e0
369 libraries, 13071 exports: unique declarations and umbrella coverage verified
RuntimeError: sceAppInstUtilAppInstallCloudGame: expected exactly one header declaration; found 0:
sceAppInstUtilAppInstallRequestAddcontFromDisc: expected exactly one header declaration; found 0:
sceAppInstUtilAppInstallMediaPlayer: expected exactly one header declaration; found 0:
sceAppInstUtilAppSetSavedataUploadStatus: expected exactly one header declaration; found 0:
sceAppInstUtilAppGetCustomThemeInfo: expected exactly one header declaration; found 0:
sceAppInstUtilAppConvertAppDiscToDownload: expected exactly one header declaration; found 0:
sceAppInstUtilAppGetInstallAddcontFromDiscStatus: expected exactly one header declaration; found 0:
sceAudioInExtOpen: expected exactly one header declaration; found 0:
sceAudioInExtSetAecMode: expected exactly one header declaration; found 0:
sceAudioInSetFocusForUser: expected exactly one header declaration; found 0:
sceAudioInExtClose: expected exactly one header declaration; found 0:
sceAudioInSetConnectionsForUser: expected exactly one header declaration; found 0:
sceAudioInExtInput: expected exactly one header declaration; found 0:

Hosted Windows job output:

Link changed host-only core/libs test executables	success
Run cmake --build build --target libs	skipped
Run python tools/select_tests.py ctest build --output-on-failure --timeout 120 --parallel 4 --output-log ctest.log --output-junit ctest.xml	skipped

Negative control

Assertion Change made to code under test Did the new test fail?
Each exported APS5_VABI function has exactly one declaration in a public header reachable through its library umbrella. Ran the same audit on base 319621ba2e578bd053b0baba2877fe70520e0737, then on PR head 4792cc3607c3dbc19383c853bd2111844d66c55e. Base passed; PR head failed for all 13 new functions.

Findings

Blocking: CONTRIBUTING.md requires every exported APS5_VABI function to have exactly one declaration in a header reachable through its library umbrella. libSceAppInstUtil/include/Api.hpp and libSceAudioIn/include/AudioIn.hpp contain none of these new declarations. Add one declaration for each export in its library's public header, following the repository-approved convention for signatures whose prototypes remain unknown, and keep the technical-debt entries explicit that callers must not rely on an unverified ABI. Then rerun public_headers and header compilation.

Non-blocking: The hosted Windows job linked changed host-only targets but skipped CTest, which is why its green result does not cover this public-header audit failure.

Sources

Not verified

I did not independently validate all 13 NIDs against console exports or the pinned aerolib database, and I did not build either full library locally. Their hosted Windows build steps linked the changed host-only test targets but skipped the full library build and CTest.

To get this to a good state

Add the required public declarations in the two headers and rerun python3 core/libs/tests/test_public_headers.py --audit-only plus the public-header compile test. I will rerun those checks on the updated head.

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 8346 docs/dev/debt/libSceAppInstUtil.md L105

@adriadam10
adriadam10 force-pushed the feat/prx-declare-appinstutil-audioin branch from 4792cc3 to 50513e0 Compare October 29, 2026 15:09
juanpimg and others added 3 commits October 30, 2026 02:34
… in their public headers

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s pending NIDs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@adriadam10
adriadam10 force-pushed the feat/prx-declare-appinstutil-audioin branch from 50513e0 to a249841 Compare October 30, 2026 01:45
@adriadam10
adriadam10 merged commit 8df3278 into boykopovar:main Oct 30, 2026
10 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Thanks. The full Linux build failed on this head: libSceAudioIn.prx: duplicate patched export name: KpBKoHKVKEc. main now has libSceAudioIn/InventoryExports.cpp, which already exports all six NIDs you declare there (sceAudioInExtClose, sceAudioInExtInput, sceAudioInExtOpen, sceAudioInExtSetAecMode, sceAudioInSetConnectionsForUser, sceAudioInSetFocusForUser) as pending stubs.

Added on your branch: dropped the libSceAudioIn part (Export.cpp, header declarations, debt line). The 7 libSceAppInstUtil declarations stay; none of their NIDs is exported elsewhere, and the public-headers audit passes (373 libraries, 14246 exports); merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants