ps5: handle PS4 saves natively (single PS5 takes both queues) #1
Loading…
Reference in a new issue
No description provided.
Delete branch "ps5-handle-ps4-saves"
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?
Summary
Makes the PS5 worker process both PS5 and PS4 jobs natively. A single jailbroken PS5 can now drain both garlicsaves.com queues at once.
Why this works
garlic-savemgralready proves the PS5 can decrypt PS4 sealed keys via the same/dev/pfsmgrioctl0xc0845302the PS5 worker uses. The only difference is where the sealed key lives:pfsSKKeymagic embedded at offset0x800of the imagesdimg_<save>.binfileAfter decryption,
sceFsMountSaveData()mounts both formats identically.Changes
src/ps5/savedata.c(+163 / -50)detect_is_ps4()reads byte 0 of the save image (0x01=PS4,0x02=PS5)save_mount()branches: PS5 path is unchanged; PS4 path copies the companion.binand loads the 0x60 sealed-key bytesioctl 0xc0845302+sceFsMountSaveData()flow afterwardsrc/ps5/worker.c(+46 / -7)?platform=ps5and?platform=ps4each tick; sleeps only after both return emptyencrypt/createsave(PS5 worker only produces PS5-format PFS images viasceFsCreatePprPfsSaveDataImage) — HTOS keeps those queued for a real PS4 workerdecrypt/resign/reregion/keysetall work via the new mount pathNo server-side changes
HTOS-web
/api/worker/nextalready accepts?platform=ps4and filters byparams.platform(seeroutes/api.py:190). No server patch required.Test plan
make ps5→garlic-worker-ps5.elf(verified locally, 172KB, no warnings)sdimg_*+.binmount succeedslast_platforminworker_keys— should flip betweenps4/ps5based on whichever queue had the jobFollowups (not in this PR)
encrypt/createsavesupport on PS5 (would need PS4 PFS creation, whichgarlic-savemgrdoes not do either)authadvertises only ps5)