Skip to content

kaiHEN 20261202.1

Latest

Choose a tag to compare

@SeanHeuc SeanHeuc released this 02 Dec 15:11

kaiHEN 20261202.1 — upstream 20261201 + PR ouncebrew#49 + Switch 1 policy capture

This is the SeanHeuc/kaihen fork, based
on official kaiHEN 20261201 plus upstream PR
#49 (HEN protocol 14). The RO,
bootstrap, hbmenu, hbloader, attach module and shared libraries are the
official 20261201 builds.

What changed from 20261201.2

  • Upstream PR ouncebrew#49: HEN protocol 14, command 27
    GetFilesystemProcess, and henGetFilesystemProcess() in libkaihen. Every
    HEN client gets a copy of FS's process handle for kaihen/patch.h.
  • Switch 1 policy capture: the first stock R launch of a Switch 1 game
    mounts its code with content attributes 0. capturePolicy() now tries both
    1 and 0, so the signed policy is captured and later R launches can use the
    rtld path. This is the safe half of
    PR #1 by
    @superzeldalink.
  • The waitForInput() gate-parking hunk from PR #1 was not included: with
    a fresh policy it skips native first-launch policy capture. The attr
    fallback alone is enough.

Still from the fork

  • Switch 1 / Switch 2 Edition R launch fixes
    (ouncebrew/kaihen#47): a
    Switch 2 Edition running its Switch 1 program is served through the rtld
    path, and a native Switch 2 launch accepts a reused CodeFS object address.
  • SD log: [log] sd = 1 in sdmc:/kaihen/config/kaihen.ini appends HEN's
    log to sdmc:/kaihen/hen-log.txt every two seconds. Off by default.

Testing

Fresh policy tested on Switch 2 23.0.1 with:

  • a plain 64-bit Switch 1 game first: first R stays stock, captures the
    policy; second R opens hbmenu;
  • a native Switch 2 game first: first R stays stock, captures the policy;
    second R opens hbmenu;
  • a Switch 2 Edition first: first R stays stock, captures the policy; second R
    opens hbmenu.

Install

  1. Copy the contents of sdcard/ to the SD card root. The copy includes
    kaihen/bootstrap.bin, which Civ-Autoloader reads.
  2. The bootstrap.bin at the zip root is the same file, for acquisition tools
    that read it themselves.
  3. Restart the console.

Warning

Experimental. Use it at your own risk. LayeredFS can swap the saves of an
installed title: back up your saves first. Use only dumps of games you own.

Thanks to ouncebrew for kaiHEN, to the upstream contributors, and to
@superzeldalink for the Switch 1 policy-capture diagnosis.