install.sh run from a folder on FAT or exFAT under macOS stored every imported file and directory as 0700
root:root (the file system keeps no modes, macOS reports 0700, tools/vendor-overlay.py took what it was told).
modem_control and refnotify run as uid 1000 or mu300vnd and keep no capability that reads past a mode: the
property area unreadable ends at "can't get modem type!", vendor/etc unreadable at "can't get modem img!" - the
CP is never loaded, the AT ttys answer ENODEV. Reproduced on the F50-B on 7.2.10 and on 5.4.254 (the kernel makes
no difference), on Ubuntu and on openwrt-luci.
- android-vendor-start: before anything is started, the five imported trees are checked with one find and set
right where they are not: root's, directories 0755 (0711 left), programs 0755, the property files 0444, other
files 0644. One line says what was found, in the service's log and in the kernel's; marks in the boot
timeline. An update carries these files over as they are, so this is what repairs an installed system.
- tools/vendor-overlay.py: the mode of an entry comes from where it goes, never from the host's file system.
- The Magisk installer and android-install.sh run under umask 022 (magisk --install-module gives 000: sixteen
directories 0777 and ld.config.txt 0666 in a system the v2026.10.22 zip installed), and the overlay is packed
as root's (bionic was stored as Android's system, uid 1000: the first login account of the installed system).
- android-vendor-start makes /var/log before it starts logdw: on OpenWrt it can run before the boot script that
creates it, and then there was no vendor log at all - on three of four boots of the F50-B.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
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
A system the Magisk zip installed next to one already on the disk got a random
12-character password (build_password, KEEP_PW=0 without MU300_PASSWORD) that was
written only to /data/adb/mu300-linux-password.txt, root-only and replaced by every
later zip, so the user never saw it and the device offered a system nobody could log
in to (F50-B: Ubuntu first, openwrt-luci and openwrt added later). The one-boot
image's root::: was never the cause: the installer always replaced it.
Decision: a system the zip installs gets the images' well-known password - Ubuntu's
user ubuntu has the password ubuntu, OpenWrt's root has none (the empty field stock
OpenWrt ships with; dropbear and LuCI let root in until one is set with passwd or in
LuCI). No random password any more, for a first install or an added system. A trusted
MU300_PASSWORD still wins, hashed as before and never shown or written down. An update
of a system with accounts of its own keeps carrying them over (KEEP_PW).
- mu300-install.sh: build_password hashes "ubuntu" for Ubuntu (fresh salt), leaves the
hash empty for OpenWrt, and writes PW_SET=1 into mu300-install.env; the plan, the
closing message and the note in the password file say which account and password
work, in en/tr/zh; the file holds no secret any more
- android-install.sh: PW_SET=1 puts PWHASH in even when empty; the refusal of an
"empty or default" password is gone (those are the intended accounts now) and the
accounts-from-image mark is removed on every path
- tests: the images' password for a first install, a wipe and a system added beside
another (Ubuntu and OpenWrt); MU300_PASSWORD used, hashed and not shown; an update
kept; the device-side paths with and without PW_SET
- docs: FINDINGS 47, README, wiki/Installation.md, the site's install page (en/tr/zh)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Linux boots with its own slot's uboot, sml, teecfg, trustos and vbmeta but runs
Android's modem images (android-vendor-start swaps the slot suffix). After an OTA
the Linux slot still holds the factory chain (issue #86). Following kano's advice,
tools/android-bootchain.sh copies those five images from Android's slot to the
Linux slot where they differ: every check first (slot, model, Android's slot
marked successful in misc, no OTA pending on the other slot, never from Linux,
both links present, two devices, one size), both slots' images backed up to the
Linux filesystem (.mu300/bootchain/<date>, SHA256SUMS), each write read back, a
mismatch restored and the install stopped before Linux is armed. Nothing outside
the fixed list of five is ever written (NV names refused even if listed).
android-install.sh runs it (SYNC_BOOTCHAIN in mu300-install.env); install.sh,
install.ps1 and the Magisk installer show it in their plan, refuse before
anything is written, and the host installers pull the backup into
work/bootchain. MU300_SYNC_BOOTCHAIN=0 / -NoBootchainSync skip it. From Android
later: su -c 'mu300-linux bootchain [sync]' (the switch module's identical copy,
bootchain.sh). FINDINGS 40 records what LK and the SPL load per slot and why
the modem images and NV partitions are left alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Three more zips per release (openwrt-luci on 5.4, 6.18 and 7.2). The device
installer accepts the manifest of that system, sizes it like OpenWrt, puts
the device's firmware where OpenWrt keeps it, and keeps OpenWrt's password
block in the password file when Ubuntu is installed beside the panel system.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
When the release has no vpn extra of its own, install.sh and install.ps1 download mu300-linux-vpn.tar.gz from the
module's latest release (or MU300_VPN_MODULE, a copy on the computer), check it against SHA256SUMS and push it as the
vpn extra as before; android-install.sh accepts the module layout and the systems link it at their first boot. A
reinstall over a system that used the VPN without the module now warns that the VPN stays off, since engines alone
are no use without mu300-vpn. The question and the Magisk report name the module, in all three languages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
a hash only when it carried the accounts over
image_hash fails when the zip's image shadow or the account's line cannot be read, and default_hash then says
"default" (a new password is generated). android-install.sh installs a system without PWHASH only when the merge
of the old accounts ran and left a real hash that is not the image's; its refusal names MU300_PASSWORD_RESET=yes.
Tests: the image's own hash carried over, an unreadable image shadow.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
The Magisk installer keeps the password only when the system's account (ubuntu, OpenWrt's root) has a crypt hash
that is not empty or locked, not the image's hash and not a SHA-crypt hash of the images' "ubuntu" (checked with
the bundled mkpasswd); an unreadable shadow or accounts still marked as the image's get a generated password.
android-install.sh sets the password before the new system replaces the old one and refuses to install a system
whose account would end up with no hash, an empty one, the image's own or the image's accounts: the old system
stays, the install stops and the boot image is never armed. Review findings: comment width, the zip's own conf.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
The Ubuntu zip installed over an existing Ubuntu on the U30 Air (keep mode) generated a new password and put it into
the system: the user's own password stopped working. Update now passes no PWHASH, writes no password file and says
"unchanged"; android-install.sh carries the accounts over with mu300-update's merge_accounts (a copy, kept identical
by a test), also when install.sh's update brings a hash. A password is generated for a new filesystem, a wipe, a
system added beside another, a system whose accounts are still the image's, or when /data/adb/mu300-install.conf
says MU300_PASSWORD=... or the new MU300_PASSWORD_RESET=yes (trusted only, used once).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
FINDINGS: main's 34 (LEDs, the second F50) before this branch's 35, under its own heading. The F50 lamp states that
K68/K38 point to are on main now. Host 650 OK, busybox OK, check-i18n and luci-i18n clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Conflicts kept both sides: boot/init's region marker before the usb-net and pick-root blocks; android-vendor-start
links the partitions of the eMMC found by type, through the fork-free link_partitions; the OpenWrt build links the
shared path-commands list and keeps the panel's own services and mu300-sms; no VPN engine in either image (the vpn
extra) while the panel's docker mounts stay positional; assemble.sh enables mu300-atd2 next to the update notice;
android-install keeps openwrt-luci and the extras on a legacy wipe; make-release audits both the panel asset and the
vpn extra.
The third system in main's new places: mu300-extra counts a disk with only openwrt-luci as mounted, the Magisk
installer sees an installed openwrt-luci (space, plan, MU300_BOOT_OS) and names the installed systems in its last
hint (the fixed "ubuntu|openwrt" text became the {1} form install.sh already uses). Tests that read what git tracks
skip where there is no checkout (a container with only the worktree mounted).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Both systems are two zips, and the second one leaves the first system's password as it is. On the F50 the Ubuntu zip
replaced /data/adb/mu300-linux-password.txt with its own password, and the OpenWrt root password, still the one in
use, was then nowhere on the device. The file now keeps the other system's block when that system is on the
filesystem being kept (not after a wipe), newest first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
mu300-update keeps both: notice and the extras in its help and usage, the slot-aware boot next to the extras'
install and adopt. make-release.sh audits the vpn extra and the sdcard and linux-slot features of every kernel
bundle. The Magisk installer's report says that the VPN engines are the vpn extra and how to add them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
A wipe onto a blank region or a new card formatted the target but was not recorded as used, so it stayed in
/data/adb/mu300-install.conf and the next flash (the second zip, an update) wiped the system just installed.
The key is now used whenever it is set and the target is formatted. MU300_SD_ERASE and MU300_REGION_OVERWRITE
were already used in every path that formats or overwrites. Test: a first install with the wipe (blank region,
installed region, new card, mu300sd card), then the next flash with the conf it left is an update.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
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