Rooting the Amazon Fire HD 8 (Onyx) 2020 device
- C 96.3%
- Python 2%
- Makefile 0.8%
- Shell 0.5%
- Java 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Chronological record with all hashes, versions, loop-bug post-mortems, the SBC revelation, and current bench state. Race scripts + UART capture rescued from tmpfs. README status updated. |
||
| amonet-koboreru | ||
| analysis-lk | ||
| analysis-preloader | ||
| apkbuild | ||
| dump | ||
| dump-emmc-dev2 | ||
| early-research | ||
| eng | ||
| mali22706 | ||
| onyxroot-app | ||
| publish | ||
| session-recovery | ||
| unlock7329 | ||
| .gitignore | ||
| craft-onyx-tee.py | ||
| fire-hd8-onyx-6241-root-writeup.md | ||
| fire-hd8-onyx-security-audit.md | ||
| koboreru-onyx-port.md | ||
| preloader-2021.bin | ||
| preloader.bin | ||
| README.md | ||
| tee1-onyx-exploit.img | ||
fire-hd8-onyx — Amazon Fire HD 8 2020 (onyx / KFONWI, MT8168) security research
Everything in this tree belongs to the onyx project: the CVE-2023-6241 kernel root (published as OnyxRoot), the boot-chain reversal, and the LineageOS unlock attempt (koboreru port). Read this index top to bottom before touching anything.
Status summary (2026-10-27)
- Kernel root: SOLVED. Mali buddy-spill exploit → EL1 root daemon
(
mp, port 4323, AUTH per build). Reliability fixed 2026-10-26 (health gate: only chain on nents==4096 states; WLO 1024: ident writes in mid-range L2 tables). Winning build:apkbuild/OnyxRoot-v3-sanitized.apk. - Boot chain: FULLY REVERSED. BROM (USBDL fused) → preloader (amzn_pl_verify_image_maybe: unconditional prod-RSA on lk, every boot, fail = no jump) → lk (unlock_code/t_unlock_code RSA-verified every boot; images always verified when locked). See the two writeup documents.
- Unlock attempt (koboreru port): EXECUTED, DEVICE CURRENTLY SOFT-BRICKED.
All four partitions flashed byte-verified (2021 preloader + lk + crafted
tee1 + donor tee2). The payload fires every boot but freezes the CPU
before completing (suspect: un-timeouted pwrap PMIC key read, MT6357
register table unverified). WDT does NOT cycle — each wake = one frozen
boot (~2.5 s USB beacon). No listener on USB. Stock USBDL keys ruled out
(power/vol-/vol+ all held during real boots — no stable loop).
Recovery paths: R0rt1z2 contact (top), UART diagnosis + eMMC CLK
short (XDA thread 4536179 has pad photos), see
session-recovery/. All stock partition images are backed up indump-emmc/(SHA256SUMS).
Directory index
Root exploit (published)
mali22706/— exploit sources (root.c= root5 with the 2026-10-26 reliability fixes,pte_child.c,mp.c) + session logs (reroot*.log, app_selfroot_success.log = the verified win)onyxroot-app/— private app project (Main.java, manifest, build-apk.sh)apkbuild/— app build chain (aapt2, android.jar, r8.jar, keystore, sanitized binaries).OnyxRoot-v3-sanitized.apk= the build to distribute (reliability fixes, zero identifying strings, tokenaf8ef35ba62664d0, sha256 a252ba5a…).OnyxRoot.apkin the same dir is the LEAKING build (contains /home/... paths) — reference only, never share.publish/— anonymous XDA publication kit (sanitized writeup, draft post, README-PUBLISH checklist, sanitized APK token13e2c7dbe1ceaacf)pubbuild/— workspace of the publish (sanitized) build
eMMC backup (the lifeline)
dump-emmc/— FULL eMMC dump incl. mmcblk0boot0/boot1/rpmb + all partitions +SHA256SUMS. Stock boot0/lk/tee1/tee2 restoration images live here. Never delete.
LineageOS unlock attempt (koboreru port)
koboreru-onyx-port.md— THE port sheet: every address, the verified boot order, exploit geometry, flash plan, failure analysis. Start here.amonet-koboreru/— exploit source incl. ourdevices/onyx.{h,c}port andinclude/devices/onyx.hfw-ps7318/— authentic 2021-07 firmware images (preloader/lk/tee/boot, MD5-verified against FTVDB records)craft-onyx-tee.py— buildstee1-onyx-exploit.img(the flashed exploit image; maddr=0, payload@0x100, forged bdev 0x22D8)preloader.bin/preloader-2021.bin— extracted preloader payloads (current 2023 build / flashed 2021 build)
Analysis (how the chain was reversed)
analysis-lk/— lk reversal: python scanners, Ghidra scripts, corpora, logs. The key insight chain is recorded in the scripts' final versions (lkdelta.py= the working ldr+add-pc scanner).analysis-preloader/— preloader reversal: corpora (pl-corpus*.c = decompiled functions), targeted decompiles, address solversgproj/,pyproj/— Ghidra projects (LK2/LKC2/PL1/PL21/PLFULL programs, analysis included)ghidra-scripts/— R0rt1z2's MediaTek loader scripts for Ghidra
Recovery session (2026-10-26/27, post-brick)
session-recovery/— mpserv.c (replacement mp daemon), probe2/3/4.py (raw USB handshake attempts vs the preloader beacon), race*.sh (root race loops with wedge handling), UART pad photos (uart-*.jpg), session logs, mtkclient logs, keys-eng.imgmtkclient/— R0rt1z2's mtkclient fork (pyusb deps installed user-side)
Reference / research
eng/— eng-unit dumps (lk-eng.img full-fastboot reference, boot0, tee, fastboot unlock transcript, ProjectConfig.mk)firmware-otas/— full OTA bins (ps7318/ps7322, ~2 GB), kernel_7327 tree, kindle/tahoe update APKs, ota7331early-research/— pre-exploit recon scripts, initial notesapp-teardown/— Fire OS app/framework smali+dex teardowns, jars, policy.32, seapp contexts, kconfiggpl-onyx/,aosp_ref/,lk-src/,panfrost/,kindle_x/— source references (Amazon GPL kernel, AOSP, generic MTK LK, panfrost driver)dump/— early on-device dump helper scripts (fserve, dodump)liblk/,lkpatcher/,dump_pllk_log/,Firmware_extractor/— R0rt1z2 tooling (cloned)platform-tools/— Google platform-tools (fastboot withoemsupport)
Documents
fire-hd8-onyx-security-audit.md— master audit documentfire-hd8-onyx-6241-root-writeup.md— root exploit writeup (private full version)
Tools (big, re-downloadable — keep or delete freely)
ghidra_12.2_PUBLIC/(879 M) — Ghidra install (scripts reference GHIDRA_INSTALL_DIR=/tmp/opencode/onyx/ghidra_12.2_PUBLIC)jdk-21.0.13+9/(347 M) — JDK for Ghidraarchives/— ghidra.zip, jdk21.tar.gz, pt.zip (source archives of the above; safe to delete)
Notes
/tmp/opencode/onyxis a symlink to this directory — session scripts that reference it keep working until reboot.- The sanitized-build recipe: copy sources to a scratch dir (e.g. /tmp/b),
zig cc -target arm-linux-musleabihf -static -O2 -DNDEBUG -swith ZIG_LOCAL_CACHE_DIR redirected; -DNDEBUG+-s removes all host paths. Verify with:strings <binary> | grep -iE 'moritz|/home/|fedora'. - USB ritual for the tablet: node churns on sleep —
lsusb→setfaclthe node →adb kill-serverif needed. Root daemon (when a win happens):(printf 'AUTH af8ef35ba62664d0\n<cmds>\n'; sleep 3) | toybox nc 127.0.0.1 4323(token differs per build — check build-apk.sh TOKEN=).