How ytps5 works
ytps5 is a runtime patch for the official PS5 video app. It does not modify the installed app package, does not use console keys, and does not distribute any app files.
Components
ytps5.elf— the single-file installer. It embeds the proxy and injector and hands both to the console's ownelfldron127.0.0.1:9021.- Proxy (
injector/dump_server.c) — a small local HTTP service on port4040. It fetches SponsorBlock data andversion.jsonover HTTPS. - Injector (
injector/main.cpp) — readsconfig.txt, attaches to the selected app process, findsHTMLScriptExecute, installs a trampoline and hook, and stays resident. - Hook (
injector/direct_hook.c) — a tiny position-independent blob that prepends the JavaScript payload to each script. - Payload (
payload/inject.src.js, minified topayload/inject.js) — ad filtering, SponsorBlock skipping, the settings panel, and update checks.
Flow
- The installer sends the proxy and injector to
elfldr. - The injector reads
/data/ytps5-sponsorblock/config.txtand waits for the title named inpatch_title(defaultPPSA01652; anyPPSA0165xbuild works).PPSA01650/PPSA01651are refused unlessallow_y2jb=1. - It attaches with libhijacker, finds
HTMLScriptExecute, and makes the target page writable from the kernel side. - It installs a
scePadReadGOT trigger. On the next controller poll, the trigger applies theHTMLScriptExecuteprologue patch from inside the app's own input loop, avoiding a race with a live script call. - The
HTMLScriptExecutehook calls a trampoline containing the original prologue, then calls the original function with a combined string:
<our JavaScript payload>
<the original script>
- The JavaScript runs in the page context and is idempotent. It filters ad objects from API responses, watches the video element, fetches SponsorBlock segments through the local proxy, and skips matching segments.
- The injector stays resident. When the app closes, it waits for the next launch and patches the new process.
App selection
On first run the injector writes /data/ytps5-sponsorblock/config.txt:
patch_title=PPSA01652 # PPSA01650 | PPSA01651 | PPSA01652 | AUTO
allow_y2jb=0 # 1 = allow patching PPSA01650/PPSA01651
The file is read once at startup. Restart ytps5.elf after
editing it. The Y2JB daily drivers are refused unless
allow_y2jb=1.
Settings
The app's settings response is patched lazily, only when the settings screen is opened. The “Premium” row becomes “ytps5 Settings”; the purchases/memberships row is removed. The native modal exposes Ad Block, SponsorBlock, category toggles, and the support QR.
Settings are currently per-session. A native persisted config is planned.
Update check
The proxy serves /update by fetching version.json
from the repository. The payload compares it with
CURRENT_VERSION and shows a toast when a newer version exists.
Limits
- Tested on firmware 8.20 with YouTube
01.000.003(PPSA01652). AnyPPSA0165xbuild of that version can be patched; patching a Y2JB title still needsallow_y2jb=1. - The
HTMLScriptExecutesignature is matched against the tested app build. A store update can change it. - The patch is memory-only and is cleared by a console reboot or app exit. The resident injector re-patches app launches; after a reboot, run the installer again or use autoload.
- No app packages, console keys, DRM tools, or copyrighted files are distributed.