Commit Graph
1 Commits
Author SHA1 Message Date
Abdurrahman Kaan DikeçandClaude Opus 5 971f291e8f magisk: start Linux from Android without a computer
A small Magisk module: the Action button in the Magisk app, or "su -c
mu300-linux" from a terminal, arms the one-shot slot-b trial and reboots into
Linux. Until now that needed adb and a computer.

It writes the same 32 bytes as the installer - the bootloader_control block at
0x800 of misc - and nothing else, so an unbootable Linux still falls back to
Android on its own. The block is not a canned blob: the module reads the live
one, sets the slot suffix and the two metadata bytes, and recomputes the CRC32
in awk (no strtonum, no bitwise builtins, so busybox awk is enough). It refuses
to run when the magic is not BCAB, when Android is not on slot a, or when
boot_b is missing, is not a boot image or is a copy of boot_a.

Also: mu300-update now keeps lib/modules on OpenWrt. A release only ships
modules for the kernel it was built with, so updating threw away the hand-built
6.18 set and left the mainline system without a modem stack.

Checked on hardware (Magisk 30.7, Android 13): status and --dry-run produce
exactly the trial block that boot/flash-trial.sh computes on a computer, and
the switch rebooted the device into Linux.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Z17MBkdHmZPvNPNSLxcHk
2026-09-18 22:11:17 +03:00