Skip to content

Commit 5eb4162

Browse files
phantomptrclaude
andcommitted
release: 2.2.44 — .pkg install: switch primary backend from BGFT to AppInstUtil (etaHEN-style)
User report: BGFT install fails with "BGFT symbol missing: sceBgftInitialize" / 0xe0000001. The 2.2.43 BGFT-side fix added multiple library paths and symbol-name variants to harden the dlopen+dlsym dance, but BGFT's symbol decoration drifts across firmwares enough that some path/name combination is bound to fail. Studied etaHEN's pkg-install implementation (util/source/DirectPKGInstaller.cpp) — they don't use BGFT at all. They use Sony's higher-level sceAppInstUtilInstallByPackage, which: - Lives in libSceAppInstUtil, *already compile-time linked* in our payload via -lSceAppInstUtil (no dlopen/dlsym needed). - Takes a URL + meta info and handles the full download + decrypt + install chain end-to-end. - Returns the content_id we use for status polling via sceAppInstUtilGetInstallStatus. bgft.c now dispatches: - AppInstUtil path (primary): no firmware-symbol-drift fragility, same call etaHEN / DirectPKGInstaller use, years of field testing on 9.6x firmwares. - BGFT path (fallback): unchanged from 2.2.43, kept so obscure firmwares where AppInstUtil refuses still have a chance. Synthetic 32-bit task IDs route status polls back to the right backend (task_id & 0x40000000 → AppInstUtil, otherwise BGFT). Sony's status string ("downloading"/"installing"/"playable") maps to our phase enum so the UI doesn't change. Verification: tsc clean, vitest 226/226, eslint clean, clippy -D warnings clean (tauri), payload -Werror clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 32d8c71 commit 5eb4162

12 files changed

Lines changed: 306 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,58 @@ What's new in ps5upload, written for humans.
44

55
---
66

7+
## 2.2.44
8+
9+
**`.pkg` install: switch primary backend from BGFT to AppInstUtil
10+
(etaHEN-style)**
11+
12+
User report: BGFT install fails with `BGFT symbol missing:
13+
sceBgftInitialize` / `0xe0000001`. The 2.2.43 BGFT-side fix added
14+
multiple library paths and symbol-name variants to harden the
15+
dlopen+dlsym dance, but BGFT's symbol decoration drifts across
16+
firmwares enough that *some* path/name combination is bound to
17+
fail eventually.
18+
19+
Studied [etaHEN](https://github.com/etaHEN/etaHEN)'s pkg-install
20+
implementation (`util/source/DirectPKGInstaller.cpp`) — they don't
21+
use BGFT at all. They use Sony's higher-level
22+
`sceAppInstUtilInstallByPackage`, which:
23+
24+
- Lives in `libSceAppInstUtil`, **already compile-time linked** in
25+
our payload via `-lSceAppInstUtil` (no dlopen/dlsym needed).
26+
- Takes a URL + meta info and handles the full download +
27+
decrypt + install chain end-to-end.
28+
- Returns the content_id we use for status polling via
29+
`sceAppInstUtilGetInstallStatus`.
30+
31+
Reorganised `payload/src/bgft.c` so the public install API
32+
(`bgft_install_start` / `bgft_install_status`) tries this path
33+
first and only falls back to the legacy BGFT machinery if the
34+
AppInstUtil call itself returns a Sony-side error:
35+
36+
- **AppInstUtil path** (primary, now the path 99% of users hit):
37+
no firmware-symbol-drift fragility; same call etaHEN /
38+
DirectPKGInstaller use, with years of field testing across
39+
9.6x firmwares.
40+
- **BGFT path** (fallback): unchanged from 2.2.43, kept so
41+
obscure firmwares where AppInstUtil refuses still have a
42+
chance to install.
43+
44+
Synthetic 32-bit task IDs route status polls back to the right
45+
backend: `task_id & 0x40000000` → AppInstUtil, otherwise BGFT.
46+
Sony's status string ("downloading"/"installing"/"playable") maps
47+
to our existing phase enum so the UI doesn't change.
48+
49+
Files touched:
50+
- `payload/include/bgft.h` — added `BGFT_ERR_TASK_TABLE_FULL`
51+
sentinel for the new task-table backpressure case.
52+
- `payload/src/bgft.c` — added AppInstUtil structs (verbatim
53+
from etaHEN's `common_utils.h`), task-tracking ring,
54+
`appinst_install_start` / `appinst_install_status` helpers,
55+
and the dispatch in the public entry points.
56+
57+
---
58+
759
## 2.2.43
860

961
**BGFT install: try multiple library paths + symbol-name variants

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.43
1+
2.2.44

client/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ps5upload-client",
33
"private": true,
4-
"version": "2.2.43",
4+
"version": "2.2.44",
55
"description": "The all-in-one PS5 companion app.",
66
"homepage": "https://github.com/phantomptr/ps5upload",
77
"author": "PhantomPtr <phantomptr@gmail.com>",

client/src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ps5upload-desktop"
3-
version = "2.2.43"
3+
version = "2.2.44"
44
description = "The all-in-one PS5 companion app."
55
edition = "2021"
66
rust-version = "1.77"

client/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "PS5Upload",
4-
"version": "2.2.43",
4+
"version": "2.2.44",
55
"identifier": "com.phantomptr.ps5upload",
66
"build": {
77
"beforeDevCommand": "npm run dev:vite",

payload/include/bgft.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ typedef enum {
6060
#define BGFT_ERR_REGISTER_FAILED 0xE0000004u
6161
#define BGFT_ERR_START_FAILED 0xE0000005u
6262
#define BGFT_ERR_UCRED_ELEVATE 0xE0000006u
63+
/* Synthetic task table is full — too many in-flight installs. Reset
64+
* the tx table or wait for current installs to drain. */
65+
#define BGFT_ERR_TASK_TABLE_FULL 0xE0000007u
6366

6467
/* Register + start a BGFT install task.
6568
*

payload/include/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* UI tell apart an old payload still running from a build that includes
66
* a particular fix, without having to boot the console. Keep in sync
77
* with the desktop app's package.json during releases. */
8-
#define PS5UPLOAD2_VERSION "2.2.43"
8+
#define PS5UPLOAD2_VERSION "2.2.44"
99
/* Author credit — embedded in the startup toast so anyone looking at
1010
* the console screen knows who wrote the software that just loaded.
1111
* Kept separate from VERSION so release scripts can bump the version

payload/ps5upload.elf

2.68 KB
Binary file not shown.

0 commit comments

Comments
 (0)