feat: read plaintext PS5 packages directly (relinker input and runtime /app0 mount) #1056
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1056"
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 snowzhangy on 2026-10-07T06:02:43Z.
What
Read plaintext PS5 packages directly, without extracting them.
core/pkg: reader for plaintext debug packages: FIH finalized image, outer PFS (signed 32-bit inodes,PPRPLAIN-NOAUTH!seed), NAPS native-span inner image with indexed sparse pages, inner PFSv2 tree, CNT named entries, and fake-signed SELF to ELF unwrapping. Kraken blocks are rebuilt into Oodle streams (block, quantum and chunk headers from the CblockInfo selectors) and decoded by a user-suppliedoo2corelibrary loaded on first use. Reads are positional and thread-safe, with an LRU of decoded 256 KiB blocks..pkginput and a new--oodle <library>option.eboot.binand the modules insce_module/,sce_modules/andprx/are read in memory and unwrapped; the Windows icon comes from the CNT. Only the executable, the*.guest.prxmodules andanyps5-package.ini(package path, size, content ID, Oodle path) are written.GuestModuleBuilderis split into disk collection and building from in-memory sources;WindowsPePatcheraccepts icon bytes./app0from the sidecar, or fromANYPS5_PACKAGE/ANYPS5_OODLE; files missing from the package fall back to the hostapp0/(converted modules). Package files get read-only descriptors in0x08000000-0x0fffffff, dispatched in kernel open, close, read, pread, readv, preadv, lseek, stat, fstat, getdents, getdirentries and reachability, AIO reads, AMPR resolve/read/stat, libcopendir/readdir/access/rename/remove, AvPlayer sources (custom AVIO),sceFontOpenFontFile,param.json/icon0.pngmetadata and PlayGo chunk definitions. Writes and namespace changes inside the mount reportEROFS. Lookups are exact, then case-insensitive.fopen,freopen,fdopen), encrypted packages and other NAPS layouts. Recorded in TechnicalDebt.Provenance: the format facts (offsets, bit layouts, flag meanings) come from the GPL-3.0 projects LibProsperoPKG and PS5PCEM, and from a decompiled copy of the ProsperoPkgTool engine vendored by PS5PkgTool. That engine is labelled MIT, but its Kraken decoder mirrors ooz, so I treat the label as unverified. No code was copied. The NAPS walk and the Oodle stream rebuild follow that engine's behaviour and were checked against a real package. The project does not ship or download Oodle: packages with Kraken blocks need a user-supplied
oo2corelibrary. Maintainers may want to weigh that against the README's "does not require proprietary libraries".Tested
Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs UCRT r7), AMD Radeon 8060S.
ctestwith-DBUILD_TESTING=ON: 380/382 pass. Failing:agc_driver_lds_atomics64andagc_driver_vopc_compare_table(shader math, not touched here; not checked againstmainon this GPU).package_format: Kraken stream headers, SELF unwrap (version trailer, encrypted and compressed segments), entry name validation.package_input: synthetic packages relinked for Linux and Windows; sidecar contents; Kraken without--oodle, unloadable Oodle, missing plaintext marker, unsafe entry names.guest_package_mount: synthetic package mounted through the env override, a sidecar, a stale sidecar and a non-ASCII path. Covers stat, open, read, pread, lseek, getdents, case-insensitive lookup,EROFS, host fallback, and libcopendir/access/rename/remove.eboot.binplus 2 guest modules.AGC graphics: unsupported descriptor role Gds, which is unrelated to package reading.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Pull request closed