Files
mu300-linux/docs
Abdurrahman Kaan DikeçandClaude Fable 5.1 1e129cd9f9 installers: boot image read back from the medium, bounded SD-card stages, no re-run in the same boot (FINDINGS 48)
Three guards taken from kanoqwq's TF installer, in our shape (one android-install.sh,
no slot layout):

1. Every install reads the written boot image back from the partition with the page
   cache dropped - exactly its length in whole 4096-byte blocks, one dd into a file
   whose status counts - and compares the sha256; a difference never arms Linux. The
   Magisk installer's boot_readback (after write_boot's own check, the AVB footer
   too) says which step failed; install.sh/install.ps1 keep their message.
2. In SD mode android-install.sh runs the format, each unpack, the removal of the old
   system and a final flush through stage_run: the command in a session of its own
   (setsid), polled, never waited for; ended at its limit or after 120 s without
   movement of the card's completion counters (/sys/class/block/DISK/stat). On a
   timeout the group gets TERM/KILL, nothing more is written (no sync, no unmount),
   the user is told to reboot Android, and the OK line never comes.
3. The timeout leaves mu300-install.stalled (boot_id, stage, reason) in the lock dir
   (/data/local/tmp; /data/adb for the zip). Both the device script and the Magisk
   installer refuse a run in the same Android boot, remove a stale lock, and a clean
   run leaves none. The zip keeps the device log in /data/adb on failure;
   install.ps1 now writes work/device-install.log like install.sh.

Tests: test_android_install.Stages, test_magisk_installer.Install (a dd stub whose
read-back differs or fails; the lock; the lock dir; the kept log); fakedevice gets a
boot id. tr/zh lines for the three new messages. FINDINGS 48 with the device checks.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-12 14:46:32 +03:00
..
2026-10-10 21:37:24 +03:00