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>
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>
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>
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
- 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.