93 Commits
Author SHA1 Message Date
aydencharles 8917b42918 feat(about): add donors and credit Kylin/0xp0co on startup 2026-10-02 17:02:39 +08:00
aydencharles dee1c1d523 feat(log): share the file sink and cap rotation from config 2026-10-02 16:40:23 +08:00
aydencharles 9255a52b44 style(icons): fit toolbox glyphs to circular padding
Scale and recenter icon_xml SVGs so each glyph sits in the same
~22px radius safe zone as native PS5 circular list icons.
2026-09-09 12:07:00 +08:00
aydencharles fc9ec112f3 feat(payload): add load priority and autostart delay 2026-09-07 20:25:46 +08:00
aydencharles f9cc115931 feat(payload): add payload detail controls 2026-09-07 20:00:26 +08:00
aydencharles 1cdbfc5752 perf(unpacker): cache bootstrapper ELF to skip LZMA on reboot 2026-09-04 17:26:28 +08:00
aydencharles 7c33667749 feat(boot): refuse start when a conflicting payload is running 2026-09-04 16:52:38 +08:00
aydencharles db59d1d45d fix(notify): fall back to plain toast on rich failure 2026-09-04 15:52:20 +08:00
aydencharles b84bac3027 fix(notify): write toast icon to /user/data 2026-09-04 15:37:48 +08:00
Hexwell e415d0b75e feat(plugin): add ELF discovery and lifecycle management 2026-09-01 18:15:35 +08:00
Hexwell d67f6c7f8b perf(build): optimize release binaries 2026-09-01 16:27:42 +08:00
Hexwell 52e4746bb2 refactor(bootstrapper): split startup responsibilities 2026-08-22 22:08:04 +08:00
Hexwell b8c15cff0b fix(payload): preserve user-owned processes 2026-08-22 21:49:06 +08:00
Hexwell e049af1ce4 refactor(services): remove ShadowMountPlus and integrate ftpsrv source 2026-08-22 21:13:16 +08:00
Hexwell da2073578b feat: add control facade for ftpsrv and ShadowMountPlus 2026-08-21 15:57:07 +08:00
Hexwell 1dc7451f65 feat(shellui): regroup ShadowMountPlus/FTP and add cheats icons 2026-08-21 10:42:54 +08:00
Hexwell 3bce004d4d fix(shellui): add Drakmor icon for ShadowMountPlus 2026-08-20 10:31:54 +08:00
Kevin Huerta b7fa1bd238 feat: add FTP, Docker, Remote Play, and ShadowMountPlus support (#23)
* feat: move FTP server to third_party and keep Docker

* docs: add ftpsrv to project credits

* feat: add FTP, Docker, and Remote Play support

* docs: document FTP and Remote Play

* feat: improve dependency scripts and add ShadowMountPlus

* docs: update ShadowMountPlus credits

* docs: add ShadowMountPlus config example

* i18n: normalize locale terminology and validation

* fix: launch ShadowMountPlus from memory
2026-08-20 10:10:32 +08:00
Hexwell 7ea2ba30c5 feat(cheats): sync cheat catalogs over HTTPS zip download
Replace the git clone/fetch pipeline with a curl + miniz HTTPS
ZIP download. The engine streams one archive, extracts only the
catalog roots, and reuses flatten to install flat files, so the
libgit2 submodule and its build integration are gone.

Drop the pre-download reachability probe and the commit-SHA
parser; reachability is implied by the download itself and the
SHA only fed the old git flow. Mirror selection stays in
CheatMirrorFactory (auto: cnb.cool for zh-Hans, GitHub otherwise;
explicit github/cnb skips fallback).

curl verifies peer+host against the embedded CA bundle and now
distinguishes certificate time-skew from other verification
failures, surfacing a dedicated clock notification. Revert the
util CMake target back to "util" now that libgit2 no longer
claims that name.
2026-08-18 15:41:08 +08:00
Hexwell c5e30c4fd0 feat(cheats): add toolbox download UI and HTTP probe
Expose catalog download on the Game Tools page and put the
mirror picker in Preferences. Probe gstatic/miui generate_204
before clone so auto can pick GitHub or cnb.cool by reachability.

Also fix the CNB slug, rename the util CMake target so it no
longer clashes with libgit2, and keep last-error text off the
download button.
2026-08-18 12:38:27 +08:00
Hexwell 295590203c chore(shellui): replace Remote Play with account activation
Drop the pairing page and the OnActivated / OnDeactivating
lifecycle hooks. Keep the Toolbox entry for offline account
activation, with a localized save-loss warning before writing
an account ID.
2026-08-17 19:18:02 +08:00
Hexwell fbf4c3c64b chore: remove unused ELF self-integrity
Ed25519 signing no longer adds useful friction. Drop
libonion_integrity, tools/elf_sign, and the XOR integrity toasts
so builds no longer sign daemon.elf.
2026-08-17 10:45:02 +08:00
Hexwell 4c4043581d chore: remove unused beta trial gate
The 14-day seal is no longer used. Drop libonion_trial, the Toolbox
banner, and notify.trial catalog entries so Debug no longer expires.
2026-08-17 10:44:16 +08:00
Hexwell 57826d5424 refactor(i18n): use stable keys and whole-sentence formats
Notifications look up notify.* keys instead of English source
strings. Toolbox interpolations go through toolbox_i18n::format so
zh/en word order lives in the JSON catalogs.
2026-08-17 09:50:33 +08:00
Hexwell a604646495 fix(kstuff): default autoload on in config
Read the Toolbox toggle from config.ini (default true) instead of the
no_kstuff sentinel so a fresh install loads kstuff. USB no_kstuff still
skips launch.
2026-08-16 20:59:55 +08:00
Hexwell b51b59bca0 fix(shellui): preserve stock Settings icon
Leave NPXS40008's icon_setting.png and bundle icon id untouched.
Redirect the URI at CxmlUri so Debug Settings reverts to the Sony
icon when OnionHEN is not loaded.
2026-08-15 12:57:13 +08:00
Hexwell 7e54890306 fix(shellui): stabilize 9.00 HomeUI and Settings patches 2026-08-07 11:32:16 +08:00
Hexwell 9a9c37e318 feat(logging): add runtime levels and log rotation 2026-08-06 18:12:52 +08:00
Hexwell 9736b1f99a feat: obfuscate beta banner and boot notify strings
Keep redistribution and integrity notices out of ELF .rodata by storing
XOR+position-math blobs and decoding at runtime, so casual string search
cannot locate and patch them. Covers toolbox XML banner, bootstrapper
debug toasts, and the shared integrity failure path in daemon.
2026-08-03 20:05:29 +08:00
Hexwell 0aef6b7717 feat(integrity): gate boot on ELF signature and trial before payloads
Add libonion_integrity (Ed25519 self-check + signed-image verify) and
host sign/verify tools. Bootstrapper now verifies the embedded daemon
and runs the beta trial gate before launching private elfldr, util, or
daemon. Stop writing OnionHEN.bin under /data/OnionHEN; link kernel_sys
from bootstrapper for device serial used by trial.
2026-08-03 19:36:20 +08:00
HexwellandClaude Fable 5 7e64b92d98 refactor(log): route every call site through the shared logger
There were seven ways to log, each invented where the previous one was not
reachable:

  OnionHEN_log   libonion_platform, the only one with a file sink
  shellui_log    libonion_ipc, klog only — because it did not depend on
                 libonion_platform
  game_log       same body as shellui_log
  onion_ipc_log  same body again
  logf           libonion_ipc's IPC server, with a sink the host had to
                 register
  log_msg        onion_elfldr_server
  crash_log      util's fault handler, plus a second copy in common/
  boot_log       bootstrapper's fault handler
  klog_printf / klog_puts / printf / puts, called directly

A message's destination therefore depended on which module happened to emit
it: ShellUI's ~300 records went to volatile klog and never reached a log file,
while the daemon's went to klog, stdout and disk.

Everything now goes through the LOG_* macros. All seven legacy entry points
are gone, and klog_printf survives only as a sink inside log.c.

The bare -nostdlib libraries deliberately did not get their own backend. Those
flags only affect the static library's own link step; each is linked into a
host with full libc and pthread, which is why they already called vsnprintf.
A second backend would have recreated the split this removes.

Levels were inferred from message text rather than applied uniformly — the old
entry points carried no severity, so a blanket mapping would either bury real
failures at debug or promote routine chatter to error. Result: 291 error, 63
warn, 140 info, 309 debug.

Consequences worth noting:

  * ShellUI records now reach the log file, so a user report finally contains
    what the injected process did. In release builds most of them are debug
    and compile out, so this costs nothing on a retail unit.
  * The IPC server's log-sink injection is gone; both servers registered the
    same forwarder.
  * common/backtrace.cpp and backtrace.hpp are deleted. That was a third copy
    of the frame walking plus its own crash_log, and every caller of
    printBacktrace/printBacktraceForCrash had already been commented out.
  * Fault handlers use onion_log_emergency, so crash records go to the same
    file as everything else instead of a separate crash log.

The shared entry point carries a printf format attribute, which the old
shellui_log explicitly avoided. That attribute found seven real format
defects: %p given typed pointers, %lx given a MonoObject*, %p given a
uint64_t, and %u given an unsigned long. Four of them only compile in debug
builds, so they had gone unnoticed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 21:10:08 +08:00
HexwellandClaude Fable 5 0d9fe9302a fix(build): make DEBUG and SHELL_DEBUG follow the build type
A --release build defined both DEBUG and NDEBUG, and SHELL_DEBUG was
hardcoded to 1 in defs.h. Every debug branch therefore shipped: the extra
checks in libhijacker's containers, and ~50 verbose diagnostic blocks in the
ShellUI hooks — the chattiest logging in the project, running inside an
injected system process on every boot.

DEBUG is now defined only for non-Release configurations, and SHELL_DEBUG
follows NDEBUG (override with -DSHELL_DEBUG=1 to keep the verbose blocks in a
release build while chasing a report). The symbols that exist only to serve
those blocks are guarded alongside them.

Also drop the hardcoded -O0. Release only got -O3 because it was appended
after it; reordering the flag strings would have silently produced an
unoptimised release build. Optimisation now comes from the build type alone.

Release shellui.elf is 24% smaller than the Debug one, and smaller than
before this change despite the added logging code.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 20:44:26 +08:00
HexwellandClaude Fable 5 204685fd47 refactor(bootstrapper): drop unused toolbox icons
icon_xml_credits and icon_xml_language were added when SVG rasterization was
automated but never referenced by the toolbox, and were never listed in
daemon.c or main.cpp either, so they had never been embedded or deployed.
Generating the icon table from the asset directory would have started
shipping them; remove the sources instead.

The generated manifest again matches the 26 icons the hand-written table
carried.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 20:19:53 +08:00
HexwellandClaude Fable 5 971296f174 refactor: separate libhijacker headers from shared contracts
source/include mixed libhijacker's private implementation headers (util.hpp
with its hand-rolled UniquePtr/String/Vector, plus kernel/, elf/, dbg/,
hijacker/) with genuinely cross-module contracts, and the whole directory was
pulled in as -isystem, so any module could reach libhijacker internals and
every warning in those headers was suppressed.

Move the libhijacker-private headers to source/libhijacker/include and expose
it as a PUBLIC include directory, so the two modules that actually use it —
util for hijacker.hpp, shellui for SHA-1 — now declare that dependency.

Split sha1.hpp: the public-domain SHA-1 goes to third_party/sha1, while
NID_KEY, Sha1 and genSha1 (which needed libhijacker's StringView) move into
the nid.hpp that uses them. shellui only ever wanted the plain digest.

Drop source/include's SYSTEM marker now that it holds only first-party
contracts. That surfaced problems -isystem had been hiding:

  * 68 format-string mismatches in dbg.hpp, printing uintptr_t with %llx
  * freebsd-helper.h redefining PROT_* and TRACEBUF over the SDK's
  * ini.h's header-only helpers declared static rather than static inline

The GNU extensions that TYPE_BEGIN/TYPE_FIELD rely on are now silenced per
header instead of by the blanket -isystem.

Also drop three redundant util.hpp includes (bootstrapper, shellui) that
referenced none of its symbols, and fix backtrace.hpp being included through
relative ../include paths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 20:13:50 +08:00
HexwellandClaude Fable 5 2ab1fa9b13 refactor: share fault-handler frame walking
util and bootstrapper each carried their own copy of the frame-pointer
walking primitives and backtrace printer, so a fix to either had to be made
twice.

Move them to onion/fault_frame.h. They stay header-inline rather than
becoming library functions because onion_current_frame() returns the frame of
its caller and a fault handler uses that to overwrite its own return address:
putting it behind a call would insert a frame and shift which one gets
rewritten. Signal registration, cleanup policy and the setjmp site differ
between the two handlers and stay where they are.

The backtrace addresses are now assembled into one line and sent through the
sink. util previously printed the frames with raw printf() while the markers
around them went through crash_log(), so the crash log recorded
"backtrace start/end" with no addresses between them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 20:04:28 +08:00
HexwellandClaude Fable 5 d322a734b0 refactor(bootstrapper): generate embedded icon table
Adding a toolbox icon meant editing three hand-maintained places: a 12-line
.incbin block in daemon.c, an extern pair in main.cpp and a write_blob_file()
call. None of them fail the build when missed, while the CMake side was
already driven by a glob over assets/icons.

Generate the .incbin blocks and an X-macro manifest from that same glob, and
walk the manifest at runtime instead of listing every icon by hand.

This surfaced two icons, icon_xml_credits and icon_xml_language, that have
been in assets/icons since SVG rasterization was automated but were never
added to daemon.c or main.cpp, so they were neither embedded nor written to
disk. They are now deployed like the rest. Nothing references them yet, so
they should either be wired into the toolbox or removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 20:04:13 +08:00
HexwellandClaude Fable 5 8db337607a refactor(build): extract shared CMake target helpers
All 17 module CMakeLists repeated the same prologue: language standards, the
PS5 SDK header paths, a clang check, the cross-compile triple, the output
directory layout and an objcopy strip step. The triple appeared 17 times and
the strip block 6 times, each needing manual sync.

Add source/cmake/OnionTarget.cmake with onion_module_prologue,
onion_output_dirs and onion_strip_debug. Language standards stay opt-in
arguments because the loader-side C modules are C17 while the rest are C11,
and a shared default would silently downgrade them. Per-module compiler flags
are left alone since the modules genuinely differ.

Drop IS_SUBPROJECT and IS_CLANG, which were assigned in 11 and 6 modules
respectively and never read anywhere.

Add CONFIGURE_DEPENDS to the seven source-listing globs that lacked it, so a
newly added source file triggers a re-configure instead of being silently
omitted from the build.

Hoist -DDEBUG onto the shared C flags in the five modules that only passed it
to C++, so both languages in a target see the same macros. No .c file keys
off DEBUG today, so this changes no behaviour.

Compile and link flags were captured from build.ninja before and after: all
132 compile edges and 17 link edges are unchanged except for the intended
-DDEBUG addition.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 19:50:30 +08:00
Hexwell 027814f5b0 fix: prefix OnionHEN runtime process names 2026-07-22 22:10:16 +08:00
Hexwell ab7712b35f fix(ui): update title ID icon 2026-07-22 21:16:33 +08:00
Hexwell 6314dd7e26 feat(ui): add toolbox item icons 2026-07-22 21:10:52 +08:00
Hexwell 237553b7d7 feat: enforce private elfldr payload loading
Require user payloads to launch through :9020 with an exact PID response, removing the :9021 fallback and process-snapshot PID inference.

Supervise the private loader from daemon, recover it through :9021 before restarting util through :9020, and protect synchronous launches with a bounded busy marker.

Add strict loader tests, update runtime documentation, and remove obsolete elfldr and process-snapshot compatibility APIs.
2026-07-22 15:02:23 +08:00
Hexwell ce5e410fce feat(ui): add donor cards and refresh tester credits 2026-07-20 19:16:18 +08:00
Hexwell be0c6544d9 feat(ui): replace credits icon with thanks icon 2026-07-20 19:15:57 +08:00
Hexwell ee60a74ed7 update: icon 2026-07-20 18:44:11 +08:00
Hexwell fad3a1fab6 feat(ui): add legacy toolbox item icons 2026-07-20 18:06:00 +08:00
Hexwell 5654190b7a fix: simplify language caching 2026-07-20 17:59:45 +08:00
Hexwell a4cc7c835e fix: localize welcome toast and cache language
Cache the PS5 system language once per process and share the resolved locale across Toolbox, plain notifications, and rich notifications. Keep ShellUI queries behind the registered trampoline, localize the daemon welcome toast, and cover cache refresh and localized payload generation in host tests.
2026-07-20 17:36:30 +08:00
Hexwell 734e86ed29 feat: localize notification messages
Share the Toolbox language setting across bootstrapper, daemon, util, and ShellUI notifications. Localize both plain and icon-rich toast text with system-language fallback, and add host coverage for language resolution and rich payload formatting.
2026-07-20 17:25:29 +08:00
Hexwell 4820cb0b48 update: add author card to support page
Embed the 0xP0CO avatar in bootstrapper assets, show it as a presentation-only button above the existing donation text, and safely consume button presses.
2026-07-20 16:55:01 +08:00
Hexwell 6d3a3504d1 update: automate SVG icon rasterization
Move bootstrapper SVG sources into a dedicated icons directory, rasterize them into the build tree, and embed the generated PNGs with proper incremental dependencies.
2026-07-20 16:31:15 +08:00