Commit Graph
63 Commits
Author SHA1 Message Date
Hexwell e0fe255e23 feat(shellui): support 8.x HomeUI and DebugSettings 2026-08-07 12:23:56 +08:00
Hexwell 655133f551 fix(shellui): tighten per-core overlay spacing 2026-07-30 23:32:20 +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 2df9e0b2fb fix: share console IP lookup across modules
get_ip_address had three independent implementations (shellui, util, daemon)
because each module also carried its own copy of SceNetCtlInfo and its own
prototype for sceNetCtlGetInfo, with the pointer typed as SceNetCtlInfo* in
two of them and void* in the third.

The shellui and util copies stored the result in an unsigned int and tested
`ret < 0`, which is never true for an unsigned value. Their error branch was
unreachable, so a failed lookup returned success, left not_connected clear,
and copied an uninitialised SceNetCtlInfo to the caller instead of the
IP NOT FOUND placeholder. util's rest-mode network-recovery retry keys off
that return value and therefore never ran.

Declare the netctl ABI once in source/include/ps5/net_ctl.h, add
onion_net_get_ip_address to libonion_platform with an explicit buffer-size
contract, and keep util's not_connected latch in util where it belongs.
Cover the status mapping, the placeholder length and buffer validation with
host tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 19:49:50 +08:00
HexwellandClaude Fable 5 f1219fc317 refactor(shellui): consolidate hook declarations into header
Hook trampoline pointers such as boot_orig, oOnPress and CaptureScreen_orig
were declared in hooked_funcs.hpp and then re-declared verbatim in the
translation units that use them, so a signature change would not fail the
build at the duplicate site.

Remove the redundant local externs, include hooked_funcs.hpp from
hook_onpress.cpp instead of hand-declaring oOnPress, and move OnRender_orig,
Orig_ReloadApp and set_value_method into the header alongside the pointers
they sit next to.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-26 19:49:23 +08:00
Hexwell 258eed695e fix: HomeUI top-nav crash on game close and blank focus icon
Host OnionHEN on ApplicationErrorEventTrigger instead of rewriting Fps,
restore stock Fps body on all profiles, and mirror onionhen.png into
invertedIcon for focused state. Add dump verifier and build toggle.
2026-07-21 22:12:54 +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 7db83f3baf update: show build metadata in welcome toast
Generate shared version metadata from an exact Git tag, falling back to dirty-YYMMDD-SHA for untagged or modified trees. Show the version and author in the startup toast and reuse the generated version across ShellUI.
2026-07-20 16:48:47 +08:00
Hexwell 9fb270c06e fix: scope settings hooks to toolbox pages
SettingPage hooks are process-wide, so stock pages such as PkgInstaller were being consumed by toolbox handlers. Track the active XML page, dispatch handlers by toolbox domain, pass stock pages through unchanged, and add host regression coverage.
2026-07-20 16:17:47 +08:00
Hexwell 7a4fbcb23c update: settings UI icons and credits 2026-07-20 15:29:57 +08:00
Hexwell 520edd2609 feat: add Ko-fi donation QR code 2026-07-20 14:50:43 +08:00
Hexwell 098dcbd737 fix: correct Remote Play PIN and account lookup 2026-07-20 13:16:51 +08:00
Hexwell 64488ce462 feat: add DebugSettings compatibility profiles 2026-07-20 12:27:23 +08:00
Hexwell 22021cbb28 fix: restore payload state from pid file 2026-07-19 01:37:45 +08:00
Hexwell 2582795f2a feat: add semantic config schema 2026-07-19 01:25:03 +08:00
Hexwell 14d9dc9f07 Use system language for toolbox XML 2026-07-19 00:54:04 +08:00
Hexwell e2e1435027 feat: top bar entry for toolbox 2026-07-18 22:47:37 +08:00
Hexwell 13c4ef92e3 style: drop PHU flex banner wording from overlay UI and comments
Remove user-facing and in-code PHU branding; keep neutral descriptions
for the edge-strip overlay layout.
2026-07-16 23:58:21 +08:00
Hexwell 2f1bdcf5af fix: apply Display_tids home reload on UI thread after inject
Queue a one-shot NPXS40002 ReloadApp after hooks are ready and drain it
from OnRender so title IDs show without a manual toggle. Gate on hooks
ready plus UI thread, not wall-clock delay or onion_ready markers.
2026-07-16 23:41:13 +08:00
Hexwell e8103a9731 fix: persist all_cpu_usage overlay toggle in config.ini
Move the per-core CPU overlay option from session-only g_ui into the
shared Settings schema so toolbox toggles survive reinject and reboot.
2026-07-16 23:32:05 +08:00
Hexwell b2640863a1 fix: harden shellui inject trampolines and ptrace stager
Allocate unique near trampolines without MAP_FIXED, gate hooks until
install completes, and make pt_attach/pt_call wait and stack alignment
fail-closed so controller use during inject cannot corrupt ShellUI.
2026-07-16 23:09:11 +08:00
Hexwell 4412785bf7 remove: drop FPS overlay inject and fps_elf embed
Remove FPS calculation from the shellui monitor bar while keeping CPU,
GPU, RAM, and IP metrics, and delete the full game-process inject path
(fps_elf, fps.prx, SHM) so titles are no longer soft-injected.

Clear any legacy fps_overlay ready marker on daemon/shellui start, and
bound CPU sampling retries so a stuck probe cannot block other metrics.
2026-07-16 22:22:29 +08:00
Hexwell 72f607f5e6 refactor: reorganize project directories 2026-07-16 18:09:55 +08:00
Hexwell 31ad34afb7 chore: remove orphaned headers 2026-07-16 17:48:16 +08:00
Hexwell b2eef5a116 style: normalize source filenames to snake case 2026-07-16 17:34:31 +08:00
Hexwell 643708f490 fix(shellui): install stock PkgInstaller path-id rows via AppInstUtil
List items use the .pkg absolute path as Id with an empty Value, so the
empty-Value early-out never started install. Detect those rows and call
sceAppInstUtilInstallByPackage directly.
2026-07-15 19:05:53 +08:00
Hexwell c32701b070 fix(shellui): keep single slashes in display text, double only for icons
ShellUI shows // literally in title/second_title path strings, but still
requires / → // on icon filesystem paths to load toolbox group icons.
2026-07-15 19:05:53 +08:00
Hexwell 072361c53f refactor: remove online kstuff and cheats downloads
Drop GitHub-based download UI, IPC, and the util HTTP/curl stack. Keep
local cheats under /data/OnionHEN/cheats and optional external kstuff.elf.
2026-07-15 18:42:54 +08:00
Hexwell b99e084a25 feat(shellui): add zh-Hans/en i18n for dynamic toolbox XML
Introduce toolbox_i18n string tables and Settings.ui_lang (0=zh, 1=en).
Build all dynamic toolbox pages through tr(), add a language list under
shortcuts, and notify the user to re-open the toolbox after switching.
2026-07-15 18:31:29 +08:00
Hexwell aad2cdaabc refactor: rebrand OrionHEN to OnionHEN
Rename product, namespaces, libraries, paths, and assets from Orion/orion
to Onion/onion across the tree. TCP stack-shutdown magic is now ONIO
(0x4F4E494F) to match the corrected branding.
2026-07-15 18:23:16 +08:00
Hexwell b8fb7d4136 fix(shellui): use PHU-style overlay bar cell layout
Lay out metric cells with PositionType/margins and group separators so the
HUD bar matches the flex-banner style instead of absolute X/Y labels.
2026-07-15 17:53:28 +08:00
Hexwell c821c252f0 refactor(shellui): build toolbox menu via ps5ui::Page
Generate the main toolbox XML at runtime with the fluent builder and drop
the encrypted static embed, encryptxml pre-build step, and decrypt path.
2026-07-15 17:53:18 +08:00
Hexwell 42b7523ff4 fix(fps): SHM overlay path; disable freezing GNM detour
Ship the PHU-style ShellUI top bar and file SHM channel for FPS samples.
Soft-inject fps_elf without process suspend (suspend+ptrace hung titles).

Document and gate the confirmed freeze: DetourFunction on the linked
sceGnmSubmitAndFlipCommandBuffersForWorkload entry (prologue size 17)
freezes games even after a 20s defer. Keep ORION_FPS_ARM_GNM_HOOK=0 so
inject only opens SHM until a safe flip probe is verified.

See docs/fps-overlay-known-issues.md.
2026-07-11 00:40:28 +08:00
Hexwell 6cd5977110 refactor(shellui): share toolbox value resolvers; bind cheats repo list
Move OnPreCreate value tables into toolbox_values, support list value=
in ps5ui, and set the selected cheats repo from settings so the control
shows the real choice.
2026-07-10 23:43:05 +08:00
Hexwell 1625b4524c fix(shellui): build toolbox MemoryStreams on the active Mono domain
Pass mono_domain_get() into New_Mono_XML_From_String and keep a small
ring of pinned GC handles so rapid Settings re-entry does not free the
stream still being consumed.
2026-07-10 23:43:05 +08:00
Hexwell 352d682cd2 refactor: drop plugins; OrionHEN only supports payload .elf
Remove the .plugin package format and rename the stack to payload-only:
liborion_plugin → liborion_payload, IPC LAUNCH_PAYLOAD, UI payloads.xml,
and bootstrapper/util/shellui load paths under .../payloads/*.elf.

Delete dead package header validation, make_plugin_app staging, and
plugin-named lists/handlers; keep Sony Settings.Plugins resource namespace
and system_settings plugin= attributes (platform, not our format).
2026-07-10 22:28:19 +08:00
Hexwell 0a62ab1c55 fix(shellui): stop ShellUI crashes on cheats, notify, ELF load, and toolbox open
- Route orion_notify through orion_notify_set_send so injectees never CALL a
  dlsym function-pointer as code (SIGSEGV after cheat toggle notify).
- Skip stock SettingPage.OnPressed for dynamic id_cheat_* (Consumed).
- Derive raw ELF launch/PID keys from basename stem; stop writing plugins/.elf
  when titleID was misread from ELF magic.
- Keep UpdateImposeStatusFlag detour disabled on 11.600 (bad trampoline);
  stop remote-play pairing loop when leaving the remote_play page via GMRS.
- Drop mprotect on Mono heap byte[] when building toolbox MemoryStream; free
  prior gchandle on replace (fast/notification DebugSettings opens).
- Tighten plugin/payload filename filters and align ELF tid/PID paths.
2026-07-10 22:17:50 +08:00
Hexwell f81c7a88d4 test: expand host unit coverage for pure OrionHEN modules
Extract host-testable helpers (GitHub commit SHA, account-id base64,
registry entity ids, playtime store, cheat flatten names, toolbox path
helpers, IPC reply body) and grow the util host suite to ~120 cases.
Also phase-split bootstrapper main for clearer launch diagnostics.
2026-07-10 17:09:54 +08:00
Hexwell b307266a65 refactor(shellui): drop UI state aliases; use g_ui exclusively
Finish ToolboxUiState migration by removing compatibility references and
updating all call sites to g_ui. Expand host tests for route matrix and
session flag/cheat-map helpers.
2026-07-10 16:52:01 +08:00
Hexwell 924cda712c refactor: split daemon commands and consolidate shellui UI state
Break daemon/commands.cpp into playtime, jailbreak, and utils TUs. Introduce
ToolboxUiState with compatibility aliases, extract pure toolbox resource
routing for host unit tests, and fix superuser empty-XML pass-through.
2026-07-10 16:48:59 +08:00
Hexwell 37276e1d8d feat(shellui): add fluent PS5 settings XML builder for dynamic pages
Introduce ps5ui::Page so cheats, plugins, remote play, and plapps UIs are
built via explicit widget calls instead of hand-written XML strings, and
cover the builder with host unit tests.
2026-07-10 16:26:05 +08:00
Hexwell ff40042d84 chore: keep only system PkgInstaller; remove DPI and custom PKG UI
Delete DirectPKGInstaller and the toolbox DPI toggle. Remove the custom
background package installer (custompkginstaller XML generation and
id_pkg_ handlers). Package install remains the stock PkgInstaller link
in OrionHEN_toolbox.xml. Leave BREW_UTIL_UNUSED_DPI ordinal for IPC
compatibility.
2026-07-10 16:03:27 +08:00
Hexwell eb353bb16d refactor(shellui): split prx and HookFunctions god TUs
Extract overlay widgets, navigator, manifest stream, launch/terminate,
background threads, and prx install/overlay helpers into focused files.
prx.cpp keeps inject bootstrap main; HookFunctions keeps shared hook
state and glue.
2026-07-10 15:49:47 +08:00
Hexwell c278453cb5 refactor(shellui): break ipc.hpp→HookedFuncs and extract types
ipc.hpp is now a thin orion/ipc_client seam. Domain enums/settings live in
shellui_types.hpp; HookedFuncs remains the Mono-hook umbrella.
2026-07-10 15:38:43 +08:00
Hexwell 0e24f2da17 refactor: migrate platform leaves and split ShellUI OnPress
Wire daemon/util/shellui/bootstrapper to liborion_platform and
liborion_proc (orion_notify, OrionHEN_log configure, find_pid, if_exists).
Split MonoUtils into mono_runtime/toolbox_xml/settings_ui/shellui_* and
replace the OnPress id bus with table-driven domain handlers.
2026-07-10 15:29:32 +08:00
Hexwell 4fd679b6b8 refactor(injectee): share Detour/hde64 and proc/ucred via static libs
Replace per-module Detour, hde64, proc, and ucred copies in shellui/fps_elf
with shims over liborion_detour and liborion_proc so injectee low-level fixes
land once.
2026-07-10 14:41:55 +08:00
Hexwell c06bf078a1 refactor(settings): hold orion::Settings as the single process store
Wire daemon/util/shellui Load/Save through liborion_settings. Daemon and util
use g_settings directly; util keeps atomic legacy CMD flags for the hot path.
Slim daemon globalconf.hpp to StartOpts + g_settings and move UserService ABI
locals into commands.cpp.
2026-07-10 14:41:55 +08:00
Hexwell ea9cf078d2 refactor(ipc): share client/server transport and split command dispatch
Point shellui/fps clients at liborion_ipc dual-singleton client. Move daemon
and util Unix listen/accept loops onto shared ipc_server. Extract handleIPC
into ipc_handle.cpp so transport stays in msg.cpp and command tables can
evolve independently.
2026-07-10 14:41:55 +08:00
Hexwell 793719abf4 refactor(cheats): C++ service/parsers and remove RELOAD index cache
Move util cheats orchestration to C++ (CheatService, Repository, Applier,
IMemoryBackend, ICheatParser factory for json/shn/mc4 with ShnExt C adapter).
Drop the obsolete RELOAD_CHEATS UI/IPC path; reloads use file-signature hot
reload only. Document util cheats architecture under docs/util_arch.
2026-07-10 14:06:42 +08:00