Skip to content
Proyectos

Acerca de

Otro habilitador de HEN para PS5 con jailbreak

Otros proyectos

Cómo se miden estas cifras

What you can do

  • ShellUI Toolbox — a settings page injected into the PS5 ShellUI
  • System preparation — raise privileges, remount filesystems, and block the update partition
  • fSELF / fPKG — uses the kstuff you load yourself; OnionHEN does not bundle or start it
  • Plugin runtime — discovers, validates, starts, stops, and removes descriptor-bearing plugin ELFs

Crecimiento de estrellas medido

in 24h
+19
in 7 days
+91
in 15 days
+131
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

OnionHEN

OnionHEN
An all-in-one HEN and Toolbox for PlayStation 5

简体中文 · English

Features · Run · Build · Configuration · Support · Credits


license PlayStation 5 C C++ CMake

OnionHEN is a modular payload stack for the PS5. One entry ELF prepares the system, injects a ShellUI Toolbox,
and then runs overlays, cheats, payloads, and background services.

OnionHEN home-screen entry

OnionHEN in-game monitor bar

OnionHEN Toolbox


Features

OnionHEN is a practical homebrew stack for jailbroken PS5 consoles.

  • ShellUI Toolbox — a settings page injected into the PS5 ShellUI
  • System preparation — raise privileges, remount filesystems, and block the update partition
  • fSELF / fPKG — uses the kstuff you load yourself; OnionHEN does not bundle or start it
  • Plugin runtime — discovers, validates, starts, stops, and removes descriptor-bearing plugin ELFs
  • PS5 FTP server — available as the optional external onionHEN-ftpsrv-plugin
  • ShadowMount+ — available as the optional external onionHEN-shadowmountplus-plugin
  • Remote Play pairing — enable the native PS5 Remote Play service, generate a pairing PIN, and register a client from the Network section
  • User payload manager — start and stop user-provided .elf payloads, with optional auto-start
  • Custom PKG Installer — scan up to eight configured /data or /mnt folders for PS4 PKG files and submit them to the system installer
  • Game overlay — an in-game bar for FPS, CPU, GPU, RAM, temperatures, and network info
  • Cheat engine — local JSON, SHN, MC4, and ShnExt files in /data/OnionHEN/cheats/ that can be toggled while a game is running
  • Game Patches (XML) — standalone menu and lifecycle for PS-Game-Patch XML files in /data/OnionHEN/patches/xml/, with persistent per-game toggle state and automatic application on game launch
  • Forced 120Hz output — optional global switch (off by default) that unlocks kHFR/kVRR app attributes in SceShellCore and forces 120Hz VideoOut on game launch (credit: illusionyy / ps-patch-system)
  • DPI v2 — available as the optional external onionHEN-dpiv2-plugin
  • Console tools — account activation, external HDD, Title IDs, fan control, shortcuts, and game options
  • App jailbreak — allowlisted homebrew can ask the daemon for extra privileges through a sandbox FIFO
  • Resilient runtime — the critical daemon and utility daemon run apart; the main daemon can restart the utility
  • Shared configuration — the Toolbox and daemons use one versioned config.ini

OnionHEN does not include a kernel exploit. The first hop still needs an external elfldr on 9021. After that, OnionHEN starts its own private loader on 9020 for later ELF and user-payload launches.


Run

Requirements

  1. A jailbroken PS5
  2. An external PS5 elfldr listening on port 9021 for the first hop

Load OnionHEN

  1. Run the kernel exploit and start the external elfldr service.
  2. Send OnionHEN.elf through the loader your exploit host provides.
  3. Load your own kstuff, then send OnionHEN. If kstuff is not already loaded, OnionHEN stops and shows a notice.
  4. Open PS5 Settings and enter the OnionHEN Toolbox.

Startup is sequential. After the first hop, OnionHEN uses its own onion_elfldr.elf on port 9020 and keeps 9021 only as a fallback.

OnionHEN.elf → bootstrapper → onion_elfldr.elf (:9020) → util.elf → daemon.elf → Toolbox

External plugins are discovered and started by the daemon. The user loads kstuff before OnionHEN. Startup checks with mprotect and does not continue when that check fails.

FTP server

FTP is provided by the separate onionHEN-ftpsrv-plugin. Install it as /data/OnionHEN/plugins/FTPS00001.elf; OnionHEN discovers and starts the plugin, and its dynamic settings page provides enable, port, and restart controls. The plugin retains upstream ftpsrv commands such as KILL, SELF, SCHK, MTRW, and AUTHID where supported.

ShadowMount+

ShadowMount+ is provided by the optional external onionHEN-shadowmountplus-plugin. Install its descriptor-bearing ELF under /data/OnionHEN/plugins/; the daemon then owns discovery, start, stop, replacement, and removal. Its dynamic page provides an immediate scan action. The plugin requires your own kstuff and keeps its own options under /data/shadowmount/config.ini.

DPI (network package installer)

DPI v2 is provided by the optional external onionHEN-dpiv2-plugin. Install it as /data/OnionHEN/plugins/DPIV00001.elf; OnionHEN discovers and starts it, and its dynamic settings page provides enable, API port, WebUI port, and restart controls. The browser remains the installer interface, including chunked uploads, queue management, staged-file reuse, and SSE progress. The default WebUI URL is http://<console>:12800.

Remote Play

Remote Play pairing is available from Toolbox → Network → Remote Play. The current account must already be activated. If it is not, OnionHEN blocks the Remote Play page and directs you to Toolbox → Account → Account activation. Once the account is activated, OnionHEN enables the Remote Play registry setting and displays the pairing PIN. Enter that PIN in the official Remote Play client while the page is open; OnionHEN uses the native PS5 Remote Play service to confirm the registered device.

The feature provides pairing and registration only. Video streaming and client transport remain handled by Sony's native Remote Play service.

Payloads

Place standalone payloads in:

/data/OnionHEN/payloads/

Only plain .elf files are supported. Auto-start can be turned on in the Toolbox; OnionHEN remembers that choice with a matching .auto_start file next to the ELF.

All .elf filenames use the same Payload page, loader, and auto-start flow. A recorded running instance is left running by later launch and auto-start requests. OnionHEN plugins are a separate category and belong in /data/OnionHEN/plugins/.

Cheats

Put cheat files in one directory. Names are TITLEID_VERSION, with an optional process and 8-hex source ID:

/data/OnionHEN/cheats/<TITLE_ID>_<VERSION>[_<PROCESS>][_<SOURCE_ID>].json
/data/OnionHEN/cheats/<TITLE_ID>_<VERSION>[_<PROCESS>][_<SOURCE_ID>].shn
/data/OnionHEN/cheats/<TITLE_ID>_<VERSION>[_<PROCESS>][_<SOURCE_ID>].mc4
/data/OnionHEN/cheats/<TITLE_ID>_<VERSION>[_<PROCESS>][_<SOURCE_ID>].ShnExt

PROCESS is optional. SOURCE_ID is a stable physical-source discriminator. OnionHEN loads every compatible source for the title/version/process, so independent JSON, SHN, MC4, and ShnExt files can coexist. A source with an explicit process is only used for that process; a source without one is generic.

Cheats load from disk. If a file changes, OnionHEN reloads it without restarting the whole stack.

DOWNLOAD_CHEATS downloads a cheat catalog ZIP over HTTPS (GitHub or cnb.cool), extracts the cheats/ tree, and copies json/, shn/, and mc4/ files into this directory with their original names. [cheats] mirror=auto uses cnb.cool when the UI/system language is Simplified Chinese, otherwise GitHub.

Game Patches (XML)

Game patches are intentionally separated from Cheats because their lifecycles differ: cheats only live while a game is running, whereas XML patches are pre-configured per title and applied automatically as soon as the game starts.

Place Illusion PS-Game-Patch XML files in:

/data/OnionHEN/patches/xml/<TITLE_ID>.xml
/data/OnionHEN/patches/xml/<TITLE_ID>_<VERSION>.xml

You can also import .xml files into /user/data/OnionHEN/patches/xml/ through the built-in File Browser. Persistent per-game toggle state is stored in /data/OnionHEN/patches/state/<TITLE_ID>.json. Online XML catalog sync is not included.

Open Toolbox → Game → Game Patches (XML) or press Options on a game tile on the PS5 home screen (★ OnionHEN Game Patches) to browse installed XML patches, pre-toggle patches before launching a title, or toggle patches live while a game is running.

XML patches match active TitleID and AppVer metadata (comma-separated versions and AppVer="mask" are supported). Direct addresses are resolved relative to ImageBase (default 0x00400000) and AppElf. Supported types are byte, bytes16, bytes32, bytes64, bytes (up to 1024 bytes), float32, float64, utf8, and utf16, plus pattern types mask and mask_jump32 (two-digit hex pairs with ?/?? wildcards, signed Offset, and Size >= 5 for mask_jump32). Both the source pattern and exact Target code-cave signature in mask_jump32 must resolve uniquely in executable ranges. Integer literals accept decimal, 0x/#/$-prefixed hex, and unprefixed hex literals used in PS-Game-Patch XMLs; strings support \n, \t, \r, \0, \\, and \xHH escapes. Disabling a patch restores the original bytes captured before enabling (refusing to overwrite if live memory was modified elsewhere).

For example, a CUSA00001_01.00.xml file can contain:

<Patch>
  <TitleID><ID>CUSA00001</ID></TitleID>
  <Metadata Name="Example 60 FPS" AppVer="01.00" AppElf="eboot.bin">
    <PatchList>
      <Line Type="bytes32" Address="0x00412345" Value="0x00000001"/>
    </PatchList>
  </Metadata>
</Patch>

Build

Dependencies

Dependency Purpose
PS5 Payload SDK Prospero compiler, target headers, runtime, and CMake wrapper
CMake 3.20+ and Ninja Configure and build the payload graph
Clang / LLVM Compile the x86_64-sie-ps5 targets
Python 3 Generate i18n catalogs and LZMA-pack the bootstrapper
rsvg-convert or ImageMagick Rasterize SVG menu icons
Git Check out the source tree

Full build

export PS5_PAYLOAD_SDK=/path/to/ps5-payload-sdk
./scripts/build.sh --jobs 8

The script configures the project and builds the embed chain in the required order. kstuff is not downloaded or embedded.

For the reproducible Docker build:

docker compose build onionhen-build
docker compose run --rm onionhen-build

Common options

Option Description
--build-type Debug|Release Select the CMake build type
--build-dir <path> Override the default build/ directory
--cache-dir <path> Override .cache/dependencies/
--stub-missing Accepted for compatibility; no external ELF is staged
--skip-unpacker Stop after building the bootstrapper

Run ./scripts/build.sh --help for the complete option list.

Outputs

Path Description
build/bin/OnionHEN.elf Final payload sent to the console
build/bin/bootstrapper.elf Uncompressed bootstrapper
build/bin/bootstrapper.elf.lzma Bootstrapper embedded by the final payload
build/bin/daemon.elf Critical daemon
build/bin/util.elf Utility daemon
build/bin/shellui.elf Toolbox injection payload
build/lib/*.a In-tree static libraries

Build outputs stay in build/. Downloads are cached in .cache/dependencies/. Nothing is written back into source/.

Tests

Host tests cover settings, IPC, payload helpers, cheat parsers, relocation, Toolbox routing, and shared platform code:

make -C source/util/tests clean
make -C source/util/tests test -j8

Linking the host tests needs Keystone (auto-detected via pkg-config or /opt/homebrew, /usr/local, /usr; override with KEYSTONE_PREFIX=...). On Linux, run scripts/install-libkqueue.sh first. The distro libkqueue package does not report a new file in a watched directory, so the directory-watch tests fail.


Configuration

OnionHEN reads and writes the same config in two places:

/data/OnionHEN/config.ini
/user/data/OnionHEN/config.ini

Most options can be changed in the Toolbox. The format is schema_version=1. If no file exists, OnionHEN writes a commented default from config.ini.example.

The Custom PKG Installer stores comma-separated folders under [pkg] as pkg.search_paths (scanned folders) and pkg.quick_paths (one-click preset folders). Installation progress is shown by the PS5 system installer. Firmware-specific package support still needs console validation.

Key Default Values
meta.schema_version 1 1
toolbox.language system system, zh-Hans, zh-Hant, en, ja, ko, fr, de, it, es, pt-BR, pt-PT, pl, ru, ar, th, nl, fi, sv, da, no, tr, cs, hu, el, ro, vi, id, uk
pkg.search_paths /data/OnionHEN/pkgs Comma-separated absolute /data or /mnt paths (up to 8)
pkg.quick_paths /data/OnionHEN/pkgs,/data/pkg,/data,/data/downloads Comma-separated preset shortcut paths (up to 8; empty disables shortcuts)
startup.open_after_load none none, home_menu
home_screen.show_title_ids false true, false
game_menu.show_onionhen_options true true, false
display.force_120hz false true, false
rest_mode.resume_reinject_delay_seconds 10 0 through 255 seconds
cheats.mirror auto auto, github, cnb
app_jailbreak.debug_notifications false true, false
cooling.fan_control automatic automatic, temperature_threshold
cooling.temperature_threshold_celsius 77 0 through 100
overlay.enabled true true, false
overlay.background true true, false
overlay.edge top top, bottom
overlay.align center left, center, right
overlay.font_size medium small, medium, large
overlay.order fps,cpu,gpu,memory,ip,fan comma-separated fps, cpu, gpu, memory, ip, fan
overlay.show_cpu / overlay.show_gpu / overlay.show_memory / overlay.show_fps true true, false
overlay.cpu_usage_mode average average, per_core
overlay.show_ip_address false true, false
shortcuts.cheats_menu off off, r3_l3, l2_triangle, long_options, long_share, share
shortcuts.toolbox off off, l2_r3, long_share, share

Runtime data

Path Purpose
/data/OnionHEN/payloads/ User payload ELFs
/data/OnionHEN/plugins/ Descriptor-bearing OnionHEN plugin ELFs
/data/OnionHEN/cheats/ Cheat files
/data/OnionHEN/cheats_tmp/ Temporary HTTPS ZIP and extraction files, cleaned after sync
/data/OnionHEN/OnionHEN.log Main runtime log
/data/OnionHEN/OnionHEN_crash.log Preserved daemon signal and backtrace log
/data/OnionHEN/OnionHEN_util_daemon.log Utility daemon log

Host tools

Tool Purpose
scripts/daemon_log.py Stream daemon logs; use scripts/capture_klog.py to capture kernel logs
scripts/shutdown_onion.py Shut down the OnionHEN userland stack without killing kstuff
scripts/sync_dependencies.sh Fetch or build external payload inputs

Repository layout

.
├── assets/                    Project artwork
├── docs/                      Architecture and technical notes
├── scripts/                   Build, dependency, and host-side helpers
├── source/                    In-tree PS5 sources
│   ├── bootstrapper/          Startup and embedded payload chain
│   ├── daemon/                Critical daemon and Toolbox injection
│   ├── util/                  Utility daemon, IPC, and cheats
│   ├── shellui/               Toolbox and ShellUI hooks
│   ├── i18n/                  Shared Toolbox / notification locale catalogs
│   ├── unpacker/              Final OnionHEN payload wrapper
│   ├── libonion_*/            Shared in-tree libraries
│   ├── common/                Shared low-level implementations
│   └── platform/ps5/stubs/    PS5 system-library link stubs
├── third_party/               External source and prebuilt archives
├── tools/                     Repository-side generators
├── build/                     Generated build outputs (ignored)
└── .cache/dependencies/       Downloaded external inputs (ignored)

See the architecture document for the complete module and IPC map.


Troubleshooting

  1. Before loading OnionHEN, make sure the external elfldr is reachable on port 9021.
  2. Make sure the payload was built for this firmware with a complete PS5 Payload SDK.
  3. If the Toolbox does not appear, wait for util → daemon to finish and check the logs. Load your own kstuff before OnionHEN.
  4. When you report a problem, include firmware, exploit host, SDK version, build type, logs, and steps to reproduce.

Contributing

See CONTRIBUTING.md.


Support

Support OnionHEN on Ko-fi

For Chinese users, you can also scan the QR codes below to donate:

国内用户也可以扫描下方二维码进行捐赠:

Alipay (CN) WeChat (CN)
Alipay WeChat

If OnionHEN is useful to you, consider supporting further development. Thank you.


Credits

OnionHEN exists because of the PS5 homebrew and reverse-engineering community.

Contributors

Based on

  • etaHEN — LightningMods and contributors; source base of this tree
  • GoldHEN — SiSTR0 and contributors; the PS4 all-in-one HEN this project takes after

Referenced

  • kstuff-lite — EchoStretch, sleirsgoevy, and contributors; Rest Mode Toolbox recovery follows its SceSysCore NOTE_EXEC watch for NPXS40087 and wait for libSceNpTrophy.sprx / libSceNpTrophy2.sprx
  • ps5-payload-manager — itsplk; listen-socket rebind after Rest Mode (Unix IPC and TCP accept-fail self-heal) follows this project
  • HEN-Cheats-Collection — TeeKay87; the community cheat collection downloaded by the built-in cheat sync
  • PHU Games Tools — ArkSama; the in-game FPS counter follows PHU Games Tools skip-hook sampling (/dev/dce scanout and DMAP reads of libSceAgcDriver)
  • PS-Game-Patch — illusionyy and contributors; XML game patch format and community patch conventions
  • ps-patch-system — illusionyy; Forced 120Hz output (SceShellCore kHFR/kVRR attribute unlock, libSceVideoOut 120Hz configuration, and libSceVideodec2 Nathan Drake Collection cutscene flip-rate fix) is not original work by OnionHEN and is directly based on illusionyy's design and signatures

Used or embedded

Testers

即食面, 雨之声, 大饼电玩, 安定区, 随风, 麒麟, 尼克库尔曼, 云, 啊烦, 小小蔡, B站谢锡榆, 荆枫, 苏打先森, 噢, 天天向上

Thanks as well to everyone else who tested, researched, or sent usable feedback.


License

This project is licensed under the GNU General Public License v3.0. Third-party components retain their respective licenses and notices.

OnionHEN is an unofficial homebrew project and is not affiliated with Sony Interactive Entertainment. Use it only on hardware you own and at your own risk. No warranty is provided.

Explorar proyectos relacionados

Cargando…