mirror of
https://github.com/dikeckaan/mu300-linux.git
synced 2026-12-06 08:03:36 +00:00
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