90 Commits
Author SHA1 Message Date
Knutwurst b8899c6b02 Revert "README: static license badge (shields.io's GitHub license badge shows invalid)"
This reverts commit 4816a0fbd7.
2026-10-17 11:52:00 +02:00
Knutwurst 4816a0fbd7 README: static license badge (shields.io's GitHub license badge shows invalid) 2026-10-17 11:51:02 +02:00
Knutwurst 1cc12e2640 Search the whole patch history for an older-firmware patch
The lookup took only the 64 newest versions, so a game whose 64 newest
patches all need newer firmware lost its compatible older patch.
2026-10-17 11:44:40 +02:00
Knutwurst 4dd254c20d Accept single-piece PS4 links, Orbis error text, natural UI terminology
A PS4 patch that fits in one piece is listed by Orbis as "<name>.pkg"
without a number; its manifest is "<name>.json" in the same gs2 folder,
like split packages. A wrong link on a PS4 game now explains Orbis' "Copy
all links!" instead of asking for Prospero's SC link.

All translations were reviewed against per-language glossaries (PS5 and
common app wording): e.g. German "Herunterladen" instead of "Holen",
status texts as "Wird ... ", requirements as "erfordert FW".
2026-10-17 11:43:05 +02:00
Knutwurst 76d40a5327 Translate the UI into ten languages
The UI follows the browser language, which on the PS5 is the system
language, and Settings has a selector to override it per device (kept in
localStorage). All UI text moved into web/i18n.js (306 keys) with English,
German, French, Spanish, Italian, Portuguese (Brazil), Japanese, Simplified
Chinese, Korean and Russian; missing keys fall back to English.

Log entries keep their key and values, so the Logs view shows them in the
chosen language while the diagnostic report stays English for issues.
2026-10-17 11:33:21 +02:00
Knutwurst a8aace1e55 Pick another patch version from Prospero (PS5) or Orbis (PS4)
An optional "Other versions" link on a game card lists every version the
patch site knows: Prospero Patches for PS5, its sister site Orbis Patches
for PS4 (same API). Versions newer than the installed one that run on this
firmware can be picked; older ones are shown but not offered, since
installing an older patch over a newer one is untested.

Picking a version opens the existing guide for exactly that version: QR
code to the phone, copy the link on the site, paste it. Orbis offers the
piece links of a PS4 patch ("Copy all links!"); they sit in the same gs2
folder as the manifest, so PatchDL derives "<name>.json" from any
"<name>_<n>.pkg" and fetches it over http like other PS4 manifests. The
size check uses the size the list showed for the version picked.

The Prospero lookup behind "Old FW patch" now uses the same list.
2026-10-17 11:18:38 +02:00
Knutwurst b4fbdd4681 Bump version to 0.2.1 v0.2.1 2026-10-17 10:45:52 +02:00
Knutwurst 8053f5395b Mark sideloaded apps, explain failed downloads, diagnose from the UI
Sideloaded apps
- A Sony-signed package installed with another tool ("fake": true in
  app.json, but no PatchDL loopback URL) stays Official but is marked
  Sideloaded, and its Updates switch starts off, so Update all skips it.
  Switching it on is saved separately, so a switch saved earlier can't
  turn it on. The card says an update replaces this exact version.

Failed downloads
- When the package list can't be fetched, the download job records why
  (DNS, connection, timeout, TLS, redirect, HTTP status, not a manifest)
  with the curl and HTTP codes; the card says so with a Details link.
- Details runs /api/netcheck?title=<id>, which walks the game's update
  list and manifest the way a download does and reports PatchDL's own
  DNS answer for each host. The dialog shows a checklist and a report to
  copy into an issue; on the PS5 a QR code opens it on a phone.
2026-10-17 10:39:49 +02:00
Knutwurst bde585eab7 Add a Buy me a coffee link with a QR code to the UI
The sidebar footer and the end of Settings open a dialog with a QR code
for PayPal, so it works from the TV, plus a direct link for phones.
v0.2.0
2026-10-16 19:04:03 +02:00
Knutwurst eaab113d8a Add a PayPal donation link to the README and the repo's Sponsor button 2026-10-16 17:42:48 +02:00
Knutwurst c3630000b6 Bump version to 0.2.0 2026-10-16 14:25:40 +02:00
Knutwurst 72b9136ff5 Say PS5 and PS4 games in the README and the UI header 2026-10-16 14:25:39 +02:00
Knutwurst c6f001f857 README: PS4 games are supported 2026-10-16 13:56:41 +02:00
Knutwurst e72c25a56e Update PS4 games too
PS4 patches install on the PS5 through the same loopback route as PS5
updates; the console puts them in /user/patch/<id>/ next to the game.
Tested with Bloodborne (CUSA00207, 01.00 to 01.09) on FW 11.60.

- Installed version: PS4 titles have no CONTENT_VERSION in app.db; use
  APP_VER, which includes an installed patch.
- Update check: Sony lists PS4 patches at a gs-sec URL derived from the
  title id with HMAC-SHA256 (the well-known PS4 update key). A PS4
  package's system_ver is a PS4 firmware in decimal and never blocks it.
- Download: PS4 manifests are served over plain http on gs2 only (its
  https edge has no Sony certificate); allow http for that host's
  manifests, keep everything else https. Piece hashes are SHA-1 there, so
  verification picks SHA-1 or SHA-256 by length.
- After an install, check /user/patch/<id>/patch.json instead of app.json.
  PS4 installs fetch no .crc, so a minute of quiet after reading ends one.
- The UI shows a PS4 badge instead of "not supported".

Also: a list reload no longer ends an install on the card early. The
console writes the new version during the install, and the card briefly
showed Delete before the install poll put it back.
2026-10-16 13:56:41 +02:00
Knutwurst bd08ad70c4 Keep the indeterminate install bar moving across card redraws
Cards are rebuilt on list updates, and each rebuild restarted the bar's
animation. A negative animation-delay taken from the clock lets a new bar
continue where the old one was. The sweep is linear now instead of easing
in from a standstill, and it stops for prefers-reduced-motion.
v0.1.0
2026-10-16 12:08:41 +02:00
Knutwurst f0091943f2 Bump version to 0.1.0 2026-10-16 12:04:56 +02:00
Knutwurst c09f0481ab README: automatic rescan, package reuse and cleanup, PS4 not supported 2026-10-16 12:04:56 +02:00
Knutwurst 289688f727 Rescan on its own, track installs, verify and clean up packages
Library
- Rescan when /user/app or Sony's app.db changes, after an install, and on
  the Refresh button (which also asks Sony for updates again). Later scans
  keep a handle to the system root and use relative paths instead of
  swapping the process root while other threads run; app.db is copied out
  first because SQLite resolves relative paths with getcwd(). The scan
  thread gets a 1 MB stack (the default made reads fail with EFAULT).
- Take the newer of app.db and appmeta param.json as installed version:
  app.db lags behind until the game is started.
- A package header decides "fake"; the installer's "fake": true marker
  only says the package didn't come from Sony's CDN, and PatchDL's own
  installs set it too.
- PS4 titles are listed as not supported.

Downloads
- Fetch the manifest's .crc next to the package; the console asks for it.
- Keep the sidecar (with the version) after a download completes, so a
  restart still knows the package is whole.
- A package already on disk without a matching sidecar is hashed against
  the manifest piece by piece; only pieces that don't match are fetched.
  Install refuses an unverified package.

Installs
- One install per title: a second request (another tab, a double click)
  gets install_running; an installed version gets already_installed.
  Download, Cancel and Delete wait until the console is done reading.
- Progress comes from the bytes PatchDL serves to the console (distinct
  ranges), since Sony's status query fails for these installs. Phases:
  waiting, reading with percent, finishing, done or stalled. Each title
  is tracked on its own.
- After an install: check that the installed version matches and the new
  app.json names this package and its size. With "Delete PKG after
  install" on, delete the package only then. The setting existed but was
  never read; the old cleanup trusted app.db alone and deleted packages
  that were never applied.

UI
- Settings list every package on the console with size, version and
  whether it is installed, newer or for a game that's gone, with Delete.
  The storage tile links there.
- The list reloads quietly when the server reports a change.
- Bigger covers on wide screens, "Updates on/off" on the switch, no
  "Shared master" badge, no endless auto-install retries.
2026-10-16 12:04:49 +02:00
Knutwurst 533c25a2ac Install updates with InstallByPackage instead of AppInstallPkg
sceAppInstUtilAppInstallPkg returns 0 but installs no content: it writes
the new version to app.db, the tile and appmeta, while the game keeps
running the old one. That is what #9 and #11 report (version shows new,
game unchanged, install stuck at 0%).

InstallByPackage had been refused with 0x80B2116F because MetaInfo was the
published 48-byte struct. Sony reads past it; the stack bytes there sent
the install down another path. MetaInfo is now 0x70 bytes and fully zeroed.

- Try the package over http://127.0.0.1:12880/api/pkg first, so the console
  streams it from PatchDL, then the LAN address, the /user/data path and
  file://. content_id stays empty.
- Drop the AppInstallPkg fallback: a refusal beats a fake success.
- Wait up to 15 s for the install backend instead of failing the first
  click with "install backend not ready".

Verified on a PS5 (FW 11.60) with Dead Island 2, Ghostwire: Tokyo and
Atlas Fallen: app.pkg replaced, packageDigest equal to Sony's manifest,
games start on the new version.
2026-10-16 12:04:37 +02:00
Knutwurst 70863fb54e Show the newest version and its firmware on every card again
Since the version line rework, "Newest … · needs FW …" only appeared when
the newest patch was newer than the installed one, so up-to-date games,
fake packages and Shadowmount titles lost the firmware information that
0.0.8 showed. It is back whenever Sony reports a newest version, unless
the Update entry already names the same version.
v0.0.9
2026-10-15 22:16:20 +02:00
Knutwurst b115c0fd4b Drop leftovers of the "shared master can't install" assumption
/api/pkgmeta now calls a package installable when its embedded title id
matches the installed game, which is what AppInstallPkg goes by, instead
of flagging every shared-master package. The unused UI message for the
old refusal is gone, and web/README.md describes the current policy:
Shadowmount, unknown and fake titles get neither download nor install,
and shared-master packages install like any other.
2026-10-15 22:05:44 +02:00
Knutwurst 7ae09ce571 Allow installing shared-master patches again
The UI hid Install for games whose patch pieces live under another
region's title id. That block predates the switch to AppInstallPkg on the
manifest-assembled package, which carries the installed game's own
content id; Dead Island 2 (EU disc, US master pieces) updated fine that
way. The server has a branch for exactly this case, so the UI now offers
Install again and only keeps the "Shared master" label.
2026-10-15 21:58:06 +02:00
Knutwurst 1739096aa1 Treat Shadowmount titles like fake packages: no download
A mounted image can't take a patch, so a download leads nowhere. The
server now refuses downloads and Prospero links for Shadowmount titles
and skips the Prospero lookup for them; the UI lists them under Not
supported without a button, the same as fake packages.
2026-10-15 21:53:46 +02:00
Knutwurst 25c2adc4bf Bump version to 0.0.9 2026-10-15 21:48:47 +02:00
Knutwurst 36c7c02ebb README: new screenshots with the old-firmware flow on TV and phone 2026-10-15 21:48:47 +02:00
Knutwurst 4379ac3f59 List download-only titles under Not supported, soften the human-check hint
Shadowmount titles can't take a patch, so they no longer sit under Updates.
They move to Not supported and keep their download: Download for Sony
updates, Old FW download for patches from Prospero. Fake packages stay
without any download.

Prospero's human check usually passes without the user noticing, so the
guide now only asks to confirm it if one shows up.
2026-10-15 21:48:47 +02:00
Knutwurst 91cfb2cd02 Flag region patches, check free space, slim the console guide
Disc and store installs whose update Sony serves from another region's
master package can't be installed from homebrew; Sony's installer refused
them in testing. They now sit under Not supported with a short reason
instead of offering a download that leads nowhere.

Before preallocating a package, PatchDL now checks that it fits on /data
with 2 GB to spare and reports how much it needs. The Prospero link check
runs the same test, so the phone gets the answer right away.

The PS5 browser can't copy links, so on the console the old-FW guide only
shows a large QR code and the link for the phone.
2026-10-15 21:31:00 +02:00
Knutwurst bc716339ba README: mention patches for older firmware and the Prospero lookup 2026-10-15 21:21:51 +02:00
Knutwurst fbe984da87 Offer the newest patch that fits the firmware via Prospero Patches
Sony's version.xml only lists the newest patch. When that one needs a
newer firmware, PatchDL now asks Prospero Patches for the version history
and offers the newest patch that still runs on the console. Prospero only
hands out download links after a human check, so a guide with a QR code
moves the user to a phone, where they copy the SC link. PatchDL derives
Sony's manifest from that link and downloads like an official update.

The game list now groups by what the user can do: Updates, Up to date,
Not supported. Update all read a nonexistent state.games and did nothing;
it now uses state.titles.
2026-10-15 21:21:51 +02:00
Knutwurst f251e2aa98 README: show 0.0.8 with game icons and a library screenshot
New screenshots for the hero, games, queue, settings and phone views,
all with game icons. Add a library shot sorted A to Z, mention the
Needs FW label and the package check in the highlights, and answer
which games PatchDL updates in the FAQ.
2026-10-15 11:17:01 +02:00
Knutwurst f6b0bba49a Show game icons and label the firmware a patch needs
- The scan opens each game's icon0.png (app.db icon0Info first, then
  /user/appmeta and the title's sce_sys) while it can still see the
  whole filesystem, and keeps the fd. GET /api/icon/<title_id> serves
  it with a one-day cache. Cards show the icon and fall back to the
  initials; loaded icons are reused across re-renders.
- "Latest x · FW y" read like the console firmware. It now says
  "needs FW y".
v0.0.8
2026-10-15 11:08:49 +02:00
Knutwurst 0efa0312d5 Bump version to 0.0.8 2026-10-15 11:00:31 +02:00
Knutwurst ca5977f872 Show the latest official version for fake packages
The update check only reads Sony's version.xml, so it is safe for fake
packages too. Their cards now show the latest version and the firmware
it needs. Download and install stay blocked.
2026-10-15 10:58:42 +02:00
Knutwurst 04d27a9fd5 List only games, keep fake packages visible, sort by name
- Scan only PPSA and CUSA title ids. Homebrew with made-up ids (the
  PatchDL tile, loaders, file managers) no longer shows up as a game.
- Installed fake packages carry "fake": true in app.json, the same
  marker homebrew uses, so they vanished from the list. Titles with an
  app.pkg now stay listed and count as fake when either the marker or
  the package header says so.
- Sort the game list by name.
- "Updatable" only holds titles PatchDL can install. Download-only
  titles (shadowmounts, shared-master patches) with an update move to
  "Can't update" and show "Update · download only".
2026-10-15 10:53:29 +02:00
Knutwurst 9253235a0d Classify installs by package signature, block fake packages
The scanner treated every title with an app.pkg as official unless its
app.json mentioned a URL. That let fake packages through as official, so
PatchDL offered and tried to install Sony patches on them, while disc and
store installs whose app.json lists CDN pieces ended up as unknown.

Read the app.pkg header instead. A PS5 finalized image (\x7FFIH) is
retail when byte 0x05 has bit 0x80 set; a PS4 container (\x7FCNT) is
retail when bit 0 of byte 4 is set. Retail installs count as official,
fake-signed ones as the new "fake" source, unreadable headers stay
unknown.

Fake packages are listed with a "Not supported" label. PatchDL skips
their update check, and the server refuses download, install and the
enable toggle for them. The titles JSON reports pkg_sign for diagnostics.
2026-10-15 10:21:36 +02:00
Knutwurst 664ad3d4fd Show "Needs FW" when a newer patch exceeds the console firmware
A title whose installed version matched the newest compatible patch was
reported as up to date even when Sony offered a newer patch that needs a
higher firmware. It now reports incompatible_fw, so the UI shows
"Needs FW x.xx". The UI drops stale job flags for that state too.

Fixes the Final Fantasy VII Rebirth case in #4.
2026-10-15 10:12:20 +02:00
Knutwurst 9209408c40 README: list firmware 1.00 to 13.60 as supported
SDK 0.44 ships kernel offsets for every firmware from 1.00 to 13.60,
and the AppInstUtil calls and app.db table PatchDL uses exist across
that range. Tested on 11.60 and 13.60.
2026-10-14 19:42:58 +02:00
Knutwurst 3803b9e6eb Release 0.0.7 v0.0.7 2026-10-14 17:30:17 +02:00
Knutwurst a15f58fbf2 Tile: fall back to AppInstallAll on firmware 13.xx
Firmware 13.xx no longer exports sceAppInstUtilAppInstallTitleDir, so
the home-screen tile never registered there. When neither the NID nor
the symbol resolves, fall back to sceAppInstUtilAppInstallAll, which
rescans /user/app and picks up the tile directory.

A receipt file is now written only after the installer accepts the
tile, and the stat-guard checks it. Files left behind by a failed
registration no longer count as installed, so the next start retries.

The API probe lists sceAppInstUtilAppInstallAll as well.
2026-10-14 17:15:25 +02:00
Knutwurst cb7a86551b README: point links and badges at the renamed ps5-patchdl repo 2026-10-06 07:45:35 +02:00
Knutwurst ded0a4ddaa README: give all four screenshots the same 16:10 frame 2026-10-05 21:17:00 +02:00
Knutwurst 5cc430ec59 README: landing page with hero, screenshots, FAQ and disclaimer
New hero composite, desktop and phone screenshots rendered from demo
data, highlights, a get-started list, a short FAQ and a clear statement
that PatchDL only fetches official, unmodified updates for games already
on the console. Old photos showing debug output are replaced; the real
home-screen tile photo stays. docs/images/social-preview.png is ready
for the repository's social preview.
2026-10-05 21:15:26 +02:00
Knutwurst b727fd430f Net: drop the unused third-party lookup host
The allowlist carried a non-Sony host for a lookup that was never built;
the function was a stub that always returned -1. Removing both leaves
behaviour unchanged and keeps every request on the PlayStation CDN.
2026-10-05 21:15:26 +02:00
Knutwurst 74ec23aa7e UI: label queued downloads as Queued, plainer header and DNS wording
Jobs waiting for a free slot showed the green Downloading pill, same as
the one that was actually transferring. They now show a neutral Queued
pill. The header eyebrow reads "PS5 update manager" and the DNS tile
says the system DNS is left untouched.
2026-10-05 21:15:26 +02:00
Knutwurst 5dc5ee57b3 Add PS5 GitHub Actions build 2026-06-27 19:19:05 +02:00
Knutwurst 44ab1dd822 README: swap hero and home-screen tile images so each fits its section 2026-06-25 22:31:39 +02:00
Knutwurst 84f5051ba3 README: tighter prose, no em-dashes, fewer adverbs 2026-06-25 22:04:58 +02:00
Knutwurst 0510e3dc34 License: GPL-3.0-or-later
Full GPL-3.0 text in LICENSE, SPDX-License-Identifier header on every
source file, README license section updated. Copyright (C) 2026 Knutwurst.

Tidied a couple of stale comments in patchdl_tile.{c,h} while at it.
2026-06-25 17:01:49 +02:00
Knutwurst edb4c90978 README: rewrite as a tool description with screenshots
Reads like a project README now: what PatchDL is, what the UI looks
like, how to use the settings, how to install. The deeper notes
(target-id matching, source classification, partition layout, console
setup chain) are out — those belong in design docs, not the front door.

Five photos under docs/images/ render inline: home-screen tile, the
desktop browser UI, the mobile settings view, the on-console browser,
and the startup notification. Originals stay in photos/ for future
crops.
2026-06-25 09:00:00 +02:00
Knutwurst ec94f0578b Release 0.0.6 v0.0.6 2026-06-25 06:35:01 +02:00