Apple's open-source XNU kernel on Android phones: its own loader and drivers, Metal on the Adreno. Runs from RAM; a reboot gives the phone back to Android.
C
One name, and links that go somewhere: hakios everywhere, the common repository is hakios-xnu-kernel
shimoku74fd83af14eca4
diff --git a/README.md b/README.mdindex b4ea8c2..2dc6b0e 100644--- a/README.md+++ b/README.md@@ -42,7 +42,7 @@ back to its own Android. The one thing written by default is the loader's own lo## Quick start```sh-git clone https://github.com/oosexgang/hakios.git hakios+git clone -b hakios https://github.com/oosexgang/hakios-xnu-kernel.git hakioscd hakiosmake doctor # what this machine lacks, and what to domake qemu-open # the open kernel in QEMU: nothing of Apple's, nothing of a phone's@@ -61,15 +61,16 @@ make phone SECS=600 # a 10-minute session on the phone, in RAM| Repository | What ||---|---|-| [hakios](https://github.com/oosexgang/hakios) | **common**: the kernel port, every common driver, the loader, user space, the tools, this documentation, and `devices/qemu` |+| [hakios-xnu-kernel](https://github.com/oosexgang/hakios-xnu-kernel/tree/hakios) | **common**: the kernel port, every common driver, the loader, user space, the tools, this documentation, and `devices/qemu` || [hakios-sm7325](https://github.com/oosexgang/hakios-sm7325) | POCO X5 Pro 5G: its defconfig, status, UEFI platform, firmware script, and its SoC's layer (`soc/`: the Qualcomm SC7280 family) |-| [hakios-uefi](https://github.com/oosexgang/hakios-uefi) | HakiOS's UEFI: Mu-Silicium with HakiOS's boot path, banner and name |+| [hakios-uefi](https://github.com/oosexgang/hakios-uefi) | the firmware that starts the loader: Mu-Silicium with HakiOS's boot path, banner and name, and HakiOS's U-Boot (`u-boot/`) |+| [hakios-metal](https://github.com/oosexgang/hakios-metal) | Metal's command model on the Adreno, through the kernel's GPU driver |`devices/manifest.conf` in the common repository names each one and the revision it is at; `tools/hakios-device.py sync` clones theminto `devices/` and `uefi/`. One repository per device: it carries its SoC's layer, and `tools/hakios-device.py new` makes one. [How the repositories fit](docs/porting/repositories.md).```sh-git clone https://github.com/oosexgang/hakios.git && cd hakios+git clone -b hakios https://github.com/oosexgang/hakios-xnu-kernel.git hakios && cd hakiostools/hakios-device.py sync # the SoC, device and UEFI repositories, at the revisions the manifest names```diff --git a/README.uk.md b/README.uk.mdindex c2fd560..013af85 100644--- a/README.uk.md+++ b/README.uk.md@@ -76,7 +76,7 @@ HakiOS — це адаптація ядра Darwin (відкритий XNU віLinux x86-64, близько 12 ГБ на диску, 7-Zip 23 або новіший, `lz4`, `qemu-system-aarch64`, `edk2-aarch64`.```sh-git clone https://github.com/oosexgang/hakios.git hakios+git clone -b hakios https://github.com/oosexgang/hakios-xnu-kernel.git hakioscd hakiosmake doctor # чого бракує цьому комп'ютеру (дисплей QEMU, UEFI, пам'ять) і що робитиmake unpack IPSW=~/ваш.ipsw # ваш власний IPSW iOS 16.5, потрібне розпаковується (7,4 ГБ)diff --git a/README.zh.md b/README.zh.mdindex bb25f74..f6d6130 100644--- a/README.zh.md+++ b/README.zh.md@@ -68,7 +68,7 @@ Linux 电脑上的 QEMU(`virt`,aarch64)里运行,不需要任何 AppleLinux x86-64,约 12 GB 磁盘,7-Zip 23 或更新,`lz4`,`qemu-system-aarch64`,`edk2-aarch64`。```sh-git clone https://github.com/oosexgang/hakios.git hakios+git clone -b hakios https://github.com/oosexgang/hakios-xnu-kernel.git hakioscd hakiosmake doctor # 检查本机缺什么(QEMU 显示设备、UEFI 固件、内存)以及怎么办make unpack IPSW=~/your.ipsw # 你自己获取的 iOS 16.5 IPSW,解包所需部分(7.4 GB)diff --git a/devices/manifest.conf b/devices/manifest.confindex f237f5a..5780ffa 100644--- a/devices/manifest.conf+++ b/devices/manifest.conf@@ -11,11 +11,11 @@device redwoodrepository https://github.com/oosexgang/hakios-sm7325.git- revision 04fbfff933f52faf203a55aca9dd5680092e6ec5+ revision 9e62a4097bd422971ebe50d0a369d2302f47614cdevice qemupath devices/qemuuefi hakios-uefirepository https://github.com/oosexgang/hakios-uefi.git- revision 687fa6c6a5a70f43184de92980e0a76eea5f2c4b+ revision e235e91bf0a05be757f3da4df572f47c828153addiff --git a/docs/concepts/architecture.md b/docs/concepts/architecture.mdindex ccbf840..a1ea71e 100644--- a/docs/concepts/architecture.md+++ b/docs/concepts/architecture.md@@ -48,7 +48,7 @@ device's. A device's defconfig is three lines: the common kernel, its SoC's frag| common | the kernel port, every driver, the loader, user space, the tools, the documentation | this repository || SoC | the SoC's facts (cores, addresses that are the family's), its drivers; carried by each device that has the SoC | `devices/redwood/soc` || device | its defconfig, its status, its UEFI platform, its firmware script, drivers of its own | `devices/redwood` |-| UEFI | Mu-Silicium with HakiOS's boot path, banner and name | `uefi` ([its README](https://github.com/oosexgang/hakios/blob/main/uefi/README.md)) |+| UEFI | Mu-Silicium with HakiOS's boot path, banner and name | `uefi` ([its README](https://github.com/oosexgang/hakios-uefi/blob/main/README.md)) |## What is written to the phone@@ -58,7 +58,7 @@ device's. A device's defconfig is three lines: the common kernel, its SoC's frag| `/private/var` | only with `ufs_write=1 var_store=1` | the partition `darwin`, which you create yourself (`tools/userdata-carve.py` prints the commands; it changes nothing) || anything else | never | the loader refuses every other write; `tools/provenance.allow` lists each piece of code that can write, and why |-[LEGAL.md](https://github.com/oosexgang/hakios/blob/main/LEGAL.md) has the same, with what is and is not distributed.+[LEGAL.md](https://github.com/oosexgang/hakios-xnu-kernel/blob/hakios/LEGAL.md) has the same, with what is and is not distributed.## Where the code isdiff --git a/docs/devices/qemu.md b/docs/devices/qemu.mdindex de681a6..9ecc076 100644--- a/docs/devices/qemu.md+++ b/docs/devices/qemu.md@@ -9,7 +9,7 @@| SoC | `none` || Configuration | `make qemu_defconfig` || Maintainer | the HakiOS developers (README.md) |-| Repository | [`devices/qemu/`](https://github.com/oosexgang/hakios/tree/main/devices/qemu) |+| Repository | [`devices/qemu/`](https://github.com/oosexgang/hakios-xnu-kernel/tree/hakios/devices/qemu) |## What worksdiff --git a/docs/devices/redwood.md b/docs/devices/redwood.mdindex 91b151b..f682aac 100644--- a/docs/devices/redwood.md+++ b/docs/devices/redwood.md@@ -9,7 +9,7 @@| SoC | `sc7280` || Configuration | `make redwood_defconfig` || Maintainer | the HakiOS developers (README.md) |-| Repository | [`devices/redwood/`](https://github.com/oosexgang/hakios/tree/main/devices/redwood) |+| Repository | [hakios-sm7325](https://github.com/oosexgang/hakios-sm7325) || Firmware | `devices/redwood/pull-firmware.sh` pulls it from your own phone |## What worksdiff --git a/docs/getting-started/qemu.md b/docs/getting-started/qemu.mdindex 25dc8c8..e7dc4ab 100644--- a/docs/getting-started/qemu.md+++ b/docs/getting-started/qemu.md@@ -5,7 +5,7 @@The kernel, a placeholder loader and a tiny raw-syscall user space: **nothing of Apple's and nothing of any phone's**.```sh-git clone https://github.com/oosexgang/hakios.git hakios+git clone -b hakios https://github.com/oosexgang/hakios-xnu-kernel.git hakioscd hakiostools/hakios-device.py sync # the SoC, device and UEFI repositories (the open kernel needs none of them; the rest does)make doctor # what this machine lacks, and what to dodiff --git a/docs/index.md b/docs/index.mdindex 9e4a777..a07bc7c 100644--- a/docs/index.md+++ b/docs/index.md@@ -45,9 +45,10 @@ Android. What is and is not written to a phone: [Architecture](concepts/architec| Repository | What ||---|---|-| [hakios](https://github.com/oosexgang/hakios) | **common**: the kernel port, every common driver, the loader, user space, the tools, this documentation, and `devices/qemu` |+| [hakios-xnu-kernel](https://github.com/oosexgang/hakios-xnu-kernel/tree/hakios) | **common**: the kernel port, every common driver, the loader, user space, the tools, this documentation, and `devices/qemu` || [hakios-sm7325](https://github.com/oosexgang/hakios-sm7325) | POCO X5 Pro 5G: its defconfig, status, UEFI platform, firmware script, and its SoC's layer (`soc/`: the Qualcomm SC7280 family) |-| [hakios-uefi](https://github.com/oosexgang/hakios-uefi) | HakiOS's UEFI: Mu-Silicium with HakiOS's boot path, banner and name |+| [hakios-uefi](https://github.com/oosexgang/hakios-uefi) | the firmware that starts the loader: Mu-Silicium with HakiOS's boot path, banner and name, and HakiOS's U-Boot (`u-boot/`) |+| [hakios-metal](https://github.com/oosexgang/hakios-metal) | Metal's command model on the Adreno, through the kernel's GPU driver |`devices/manifest.conf` in the common repository names each one and the revision it is at; `tools/hakios-device.py sync` clones theminto `devices/` and `uefi/`. One repository per device: it carries its SoC's layer, and `tools/hakios-device.py new` makes one. [How the repositories fit](porting/repositories.md).diff --git a/docs/porting/drivers.md b/docs/porting/drivers.mdindex 43b2703..a11b809 100644--- a/docs/porting/drivers.md+++ b/docs/porting/drivers.md@@ -91,5 +91,5 @@ The boot log says `hakios-kernel: N drivers built in (... nt36672 ...)`, and `sy## 5. Write down what it doesThe driver's head says what has been seen (on the phone, in QEMU, compiled only). The device's `device.conf` has a `status` line-for the part it makes work. [docs/driver-review](https://github.com/oosexgang/hakios/tree/main/docs/driver-review)+for the part it makes work. [docs/driver-review](https://github.com/oosexgang/hakios-xnu-kernel/tree/hakios/docs/driver-review)holds the audits of the common drivers: a new common driver gets one before it is relied on.diff --git a/prebuilt/SHA256SUMS b/prebuilt/SHA256SUMSindex 1738842..995c214 100644--- a/prebuilt/SHA256SUMS+++ b/prebuilt/SHA256SUMS@@ -1,7 +1,7 @@Built 2026-10-25 22:53 from this tree.03e794e8e1d389a6abb9bcd2431eaccf9747271ff8c1234922225718c70441e9 prebuilt/hakios-kernel-adb2f30c01ad7e6842ce6cec43b8d75bc0f76d68543ffb41c0d02c1d285e4b73 prebuilt/loader.efi+fb856531febdc303af412c66e30921aaa2fd7158baad5986144eed922dd614a7 prebuilt/loader.efi932c856c04e87611b16c872da37c461d572c6258da0202ecd875d91c29886e03 prebuilt/userland/HakiosAudio45bffe2da6b2484836bd29074b39bd5cc67b4cdaa253c2aa39561ce5188d6ddc prebuilt/userland/child35f3065e4602965911a20d0666a289cafba16644e611ea870d40bda81ea67546 prebuilt/userland/cpu_testdiff --git a/prebuilt/loader.efi b/prebuilt/loader.efiindex 435de74..843f979 100755Binary files a/prebuilt/loader.efi and b/prebuilt/loader.efi differdiff --git a/tools/docs-gen.py b/tools/docs-gen.pyindex ea8cb11..3e2808d 100755--- a/tools/docs-gen.py+++ b/tools/docs-gen.py@@ -15,7 +15,7 @@ import sysHERE = os.path.dirname(os.path.abspath(__file__))ROOT = os.path.dirname(HERE)-REPO = "https://github.com/oosexgang/hakios/blob/main/"+REPO = "https://github.com/oosexgang/hakios-xnu-kernel/blob/hakios/"MARK = {"works": "works", "partial": "partly", "missing": "no"}HEADER = "<!-- Made by tools/docs-gen.py from %s. Do not edit: change that, then run tools/docs-gen.py. -->\n\n"@@ -74,11 +74,21 @@ def drivers_page(hc, hd):return "\n".join(out)+def repository_link(hd, name):+ """A device with a repository of its own (devices/manifest.conf) links there; one kept in this tree, here."""+ for kind, n, fields, _line in hd.manifest():+ repository = hd.one(fields, "repository")+ if kind == "device" and n == name and repository:+ url = repository[:-4] if repository.endswith(".git") else repository+ return "[%s](%s)" % (url.rsplit("/", 1)[-1], url)+ return "[`devices/%s/`](%sdevices/%s)" % (name, REPO.replace("/blob/", "/tree/"), name)++def device_page(hd, name, fields):out = [HEADER % "devices/%s/device.conf" % name, "# %s (`%s`)" % (hd.one(fields, "title"), name), ""]rows = [("Vendor", hd.one(fields, "vendor", "?")), ("SoC", "`%s`" % hd.one(fields, "soc", "?")),("Configuration", "`make %s`" % hd.one(fields, "defconfig", "?")), ("Maintainer", hd.one(fields, "maintainer", "?")),- ("Repository", "[`devices/%s/`](%sdevices/%s)" % (name, REPO.replace("/blob/", "/tree/"), name))]+ ("Repository", repository_link(hd, name))]if hd.one(fields, "firmware"):rows.append(("Firmware", "`devices/%s/%s` pulls it from your own phone" % (name, hd.one(fields, "firmware"))))out += ["| | |", "|---|---|"] + ["| %s | %s |" % r for r in rows] + ["", "## What works", "", "| Part | State | |", "|---|---|---|"]diff --git a/tools/hakios-device.py b/tools/hakios-device.pyindex 13216c6..3576778 100755--- a/tools/hakios-device.py+++ b/tools/hakios-device.py@@ -263,7 +263,7 @@ NEW_README = """# {title} ({name})A HakiOS device repository: what is true of this device and of no other. The kernel, the loader, the drivers and the tools arethe common repository's; the {soc} family's facts are in `soc/`, carried with the device. How the three are put together:-[docs/porting/repositories.md](https://github.com/oosexgang/hakios/blob/main/docs/porting/repositories.md).+[docs/porting/repositories.md](https://github.com/oosexgang/hakios-xnu-kernel/blob/hakios/docs/porting/repositories.md).| File | What ||---|---|