Skip to content

12.6.38: put games back on the home screen after Rebuild Database (#961); password-protected RAR on the console (#958) - #962

Merged
phantomptr merged 11 commits into
mainfrom
release-12.6.38
Nov 27, 2026
Merged

phantomptr merged 11 commits into
mainfrom
release-12.6.38

Conversation

@phantomptr

Copy link
Copy Markdown
Owner

#961 Restore to home screen: a fake-package game still on its drive but missing from app.db is offered Restore (game page) / Restore all (Games). The helper backs up app.db/appinfo.db, moves the package aside on the same device, reinstalls it with the console's installer, and puts the files back if the console doesn't take it. Play on a title app.db doesn't list now stops with launch_not_in_database instead of falling through to the ShellUI route. Engine API + MCP tools + FAQ + i18n.

#958 The extractor decrypts RAR 4 / RAR5 (data and header encryption, multi-part, solid) itself and feeds libarchive; key derivation written from the format description on 7-Zip's AES/SHA-256. TorBox integration declined.

Hardware (Fat, FW 13.60, helper from this branch):

  • 6 encrypted RAR fixtures extracted through the engine: 30/30 files match by CRC32; no password → fs_extract_password_required, wrong → fs_extract_wrong_password, no folder left.
  • Launch of a title not in app.db: launch_not_in_database in 4 s; SceShellUI still pid 136 (not restarted).
  • Restore itself NOT run on hardware (no FPKG-capable kstuff available here).

Local gates: fmt, clippy, payload tests, extractor host tests (26), engine tests, typecheck, lint, vitest, i18n, apidoc, embedded pages all pass (one join test fixed to ignore the &ts= tailnet hint present when the test machine runs Tailscale).

🤖 Generated with Claude Code

https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT

phantomptr and others added 11 commits November 26, 2026 19:43
libarchive's RAR readers cannot decrypt, so a password-protected .rar was
refused. The extractor now reads such an archive itself and hands libarchive
the same archive decrypted, as a stream: RAR 3/4 (AES-128) and RAR5
(AES-256), data or headers encrypted, single or split over volumes. The key
derivations are written from the format on 7-Zip's AES and SHA-256 (no UnRAR
code). A missing or wrong password is found before anything is made, except
for RAR 3/4 with only the data encrypted, whose first file then fails its
CRC and is dropped. RAR5's keyed checksums and encrypted RAR 3/4 files are
checked as they are written.

libarchive's RAR5 reader now ends a file at its last block when only the
encryption padding is left (marked PS5Upload).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
RAR5 and RAR 4 archives made with RAR 7.23 and 6.24 from files the generator
script makes: data and header encryption, stored, BLAKE2, multi-part, solid
multi-part. Checked: right, wrong and missing passwords, listing, a missing
volume, the space check and damage. libarchive's mixed-password fixtures now
extract the files the password opens and stop at the one it does not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
After Rebuild Database the PS5 forgets games installed from fake packages,
but their app.pkg stays on the drive. The new app.restore method lets the
app hand that package to the console's own installer again instead of a
download:

- check (read-only): is the title restorable, and why not
- prepare: copy app.db and appinfo.db aside (SQLite backup), then move
  app.pkg and the update's patch.pkg into <drive>/ps5upload/restore/<id>
  on the same drive (a proven same-device rename only), with a record
  written first so an interrupted restore is found again
- finish: after the install, delete the moved copy once app.db lists the
  game and a package is in place; on a failed install, put the files back
  only into a free place and only while app.db does not list the title

Never writes either database and makes no Sony call. Refuses a title
either database knows, a folder registration, a retail-signed PS5
package, a package on two drives, no room for the new copy, or an
unreadable database. Host self-test covers every state on a scratch
console layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
…onsole (#961)

Pressing Play on a game whose record Rebuild Database dropped sent the
launch through every fallback: the in-process launcher refused, then the
ShellUI route ran (twice) and three more launcher calls. The console's
system UI restarted back to the home screen and homebrew running inside
it stopped, as reported in #961.

When app.db, read successfully, has no row for the title and still has
none after a short wait (a register that just ran may not be written
yet), the launch now ends after the one in-process attempt with
launch_not_in_database. An unreadable app.db keeps the old behaviour.
The host self-test checks the order in launch_title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
New routes, all calling the helper's app.restore:
- GET /api/ps5/app/restore/check: one title, read-only
- GET /api/ps5/app/restore/candidates: every game with an app folder on a
  drive that app.db does not list, with its check
- POST /api/ps5/app/restore {title_id | title_ids}: check, take the
  console's install slot, prepare, then install the moved package like
  any package on the console; titles go one after the other
- GET /api/ps5/app/restore/status and POST /api/ps5/app/restore/finish
  for a restore left pending

After the install: a verdict of installed asks the helper to delete the
moved copy (waiting a few minutes for app.db); a failure the console
never took puts the package back; anything the console may still be
working on (stalled, cancelled, reply lost, unverified) touches nothing
and stays pending. MCP: games_restore_list, games_restore_check,
games_restore, games_restore_status, games_restore_finish. OpenAPI
regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
What Restore to home screen does, in order, what it never touches, and
Finish / Put back for an interrupted restore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
)

A game installed on a drive but missing from the PS5's home screen now
says so on its page instead of offering Play, with Restore to home
screen (a confirmation says what happens, in order), its progress, and
Finish / Put back for a restore that did not finish. Games shows
Restore all above the grid when the connected PS5 has such games.
A launch the helper refuses for this reason says how to get the game
back and links the FAQ entry.

New strings are in en.ts and allowlisted for the other languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
…is on Tailscale

titleRestore.ts used Error's cause option, which the app's TypeScript target
doesn't have. The internet-join test compared the whole home-network part of the
invite link, which gains a tailnet page (&ts=) on a computer running Tailscale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
…e app does

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GtiJiJdHq1hekoZ6vizvVT
@phantomptr
phantomptr merged commit 38937eb into main Nov 27, 2026
49 checks passed
@phantomptr
phantomptr deleted the release-12.6.38 branch November 27, 2026 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant