The internal disk and its partitions were found in seven places, each with
its own copy of "the mmcblk disk of type MMC": init, early-recorder,
android-vendor-start, mu300-cpu, mu300-update, and on the Android side the
installers' /dev/block/mmcblk0. A unit with UFS storage (the 1 TB U30 Air of
issue #396: sda, partitions sda1..sda75, no mmcblk at all) was found by none.
- rootfs/overlay/opt/mu300/lib/storage.sh: the one lookup. The eMMC as
before (type MMC, else the first mmcblk disk that is not a card), else a
SCSI disk below the UFS host that holds misc; never a card or a USB disk.
Partitions are the disk's own sysfs children (mmcblk0pN or sdaN).
After kanoqwq's storage.sh (his fe52afe3).
- init sources it from the ramdisk (/etc/mu300-storage.sh, which
build-boot-image.py puts into every segment that has an init);
early-recorder, android-vendor-start and mu300-cpu from /opt/mu300/lib.
mu300-update carries a copy (a self-update runs it on a system that may
not have the file yet); a test keeps it the same.
- Android side: the internal disk is the one that holds misc, as Android's
by-name links say (tools/storage.sh's internal_disk, install.ps1,
uninstall.ps1, and the same lines in android-install.sh,
android-mount-mu300root.sh and android-web.sh); mmcblk0 when Android does
not say. On an eMMC unit every device command is the same text as before.
Not here: the make-room path on 4096-byte logical blocks and an identity
without the eMMC CID (step 2).
Co-Authored-By: kanoqwq <kanoqwq@qq.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
On the F50 (part 7 of docs/update-device-test.md), install.sh from the package of an older test release updated
the internal OpenWrt from v2026.10.16.91 to v2026.10.16.90 without a word, where mu300-update and the Magisk zip
refuse (the older release's updater may not carry everything over). android-install.sh now checks the release of
each image against the installed system before it writes anything (its downgrade block, the release-tag order);
DOWNGRADE=1 in the env file allows it: install.sh and install.ps1 with MU300_DOWNGRADE=yes, the Magisk installer
after its own check. The update texts of install.sh, install.ps1 and the window say what an update keeps now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
Until now an update kept a list of places and the image replaced the rest:
/etc/wireguard, a unit written by hand, crontabs, /var/lib/docker, /opt, a
changed /etc/sysctl.conf were gone from the system afterwards (measured on
the published images: 34 of 67 planted kinds of user state lost on Ubuntu,
26 of 52 on OpenWrt; docs/FINDINGS.md 85).
Every image now carries the manifest of its own files, and the ones of the
releases from v2026.09.21 on ship in the images. What the old image did not
bring, or brought and the user changed, goes into the new system (the carry
block of mu300-update); what cannot stay in its place is set aside under
/etc/mu300/update-kept and named in /etc/mu300/update-report. The block runs
from the new image, by its static busybox and with tools/carry/mu300-carry
(owners, modes, extended attributes, hard links, holes, times), the same for
mu300-update apply, the installers and the Magisk zip. An update never
leaves the device less protected than the user left it.
apply --no-rollback carries by link when there is no room for a copy; an
older release is not installed over a newer one by itself; the old way stays
reachable for one release (MU300_UPDATE_KEEP=list).
Measured in containers on real release images only; no device was free.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
The owner decided on 2026-10-13 that adb over USB to the Linux systems is on by default and accepts every
computer: the web installer (WebUSB) and a GUI must reach a device in Linux without a key having been put on it.
With the default, anyone who can plug a cable into the device gets a root shell without a password; the docs say
so wherever adb is described, with the two commands that close it.
- adbd: one switch, MU300_ADB_AUTH=open (ro.adb.secure=0), set by mu300-adbd; anything else keeps the keys. USB
only, as before.
- mu300-usb adb auth open|keys; adb off stays off. State in /etc/mu300 (adb, adb_auth), written whole. Open is
read only from no state at all or from "open" in a file of root's alone: a damaged state is keys (or off), a
device set up for keys under v2026.10.20-23 stays keys, keys without a key lets nobody in.
- The installers tell a device in Linux (MU300LINUX-... in adb devices, a root shell) from a rooted Android and
send it back to Android over adb or SSH; their question now offers keys-only from the first boot.
- mu300-device --json for tools (docs/ADB-INTERFACE.md).
- FINDINGS 70: the decision, the exposure, the rules, and the device checklist (nothing measured on a device yet).
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
The Ubuntu-side `sms send` had its own send path and none of what #177 gave mu300-sms. Now a send holds mu300-at's
client lock across the whole conversation (the same at_lock/at_unlock as mu300-sms, MU300_AT_LOCK_HELD for the calls
under it; taken only when the daemon's fifo is there, since without it mu300-at opens the tty itself and takes no
lock either) and writes the modem's own SMSC back unchanged first (the same smsc_refresh: AT+CSCA? parsed strictly,
AT+CSCA="<same>",<type>, CSCS untouched; a failed query or a refused write is logged and the send goes on). The
submission is the one request AT+CMGS=N<CR>PDU<Ctrl-Z> that mu300-at admits for exactly this: as two requests, the
"> " prompt has no line ending, so the daemon never saw an answer to AT+CMGS=N (its whole 10 s), counted a silent
command and drained up to 25 s before the PDU, and another client could get in between.
tools/android-install.sh: with the accounts carried over and PW_SET=1 (or a hash) the system's own account gets the
images' password again below, so "kept the accounts and passwords of the previous <os>" was untrue; the line now
says the other accounts were kept and what <user>'s password is (the images' own again: none, until one is set; or
the one the installer chose).
Tests: test_sms_pool.Send (the four commands in order under one lock holder, released on success and refusal; the
SMSC left alone when not given or refused; a live holder is busy with nothing sent, a dead one taken over; no fifo,
no lock), test_android_install (the log line per case, and an update with PW_SET=1 and a hash keeping a local
account). docs/FINDINGS.md 46: the Ubuntu side.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
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
tests/test_adb.py: the adbd patch line by line (keys always, keys from root's files only,
USB only, nothing world-writable), the pinned source, the kernel option, the images and
the release; mu300-adbd on a fake gadget (joins as f3 and leaves it as it was, RNDIS keeps
its MS OS descriptors, binds again after FunctionFS unbound it, an adbd that is not ready
never costs the network, the host role left alone); mu300-usb adb (on/off, refused where
it cannot run, root only, keys checked and cleaned). The installers: adb_pubkey and
AdbPubKey, ADB/ADB_KEY in mu300-install.env, android-install.sh's adb_keys.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
mu300-update and the installers' update mode replaced the new image's
etc/config with the old system's whole. A package the new image brought
lost its config file: /etc/config/sqm and /etc/config/xl2tp were missing
after an update, and LuCI's SQM QoS page failed with "uci/get: Resource
not found". The old settings stay; files only the image has are added, as
sysupgrade does. The image no longer carries the removed attendedsysupgrade
package's config or apk's .apk-new copies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
An update put the release's image in place and kept /etc/config and /etc/mu300: packages installed on the device
were gone and their settings stayed. OpenClash's dhcp change (dnsmasq forwarding to 127.0.0.1#7874, copied while it
ran) left the new system without DNS.
- mu300-update apply (and the installers' update, tools/android-install.sh, with a copy of the same block) writes down
the packages added by hand - OpenWrt's world file, Ubuntu's manual packages - less the image's own list
(etc/mu300/image-packages, now written by both image builds; older systems: the new image's set and packages.txt),
lists them before the switch, and moves their own etc/config files to etc/mu300/orphaned-config (never a file the
new image has). --no-reinstall / MU300_KEEP_PACKAGES=0 skips the reinstall.
- mu300-user-packages (a service at boot on both systems) installs them again once online (an hour of tries, five
boots at most), puts their settings back and their services as they were; a package the feeds lack stays out with
its settings aside. While one is missing, a loopback DNS forwarder nobody listens on is taken out of dnsmasq, and a
LuCI theme whose files are gone off LuCI's list. status/retry/skip/dismiss; a note at login; mu300-update check.
- The new image's version and package lists are no longer replaced by the old ones in etc/mu300 (the installers'
update kept the old image-version), and rc.d links of services the new system lacks are not carried over.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
lib/vpn-orphan.sh: the VPN wanted with its kill switch and no mu300-vpn.
mobile-data keeps the bearer down, wifi-client joins and shares nothing,
dashboard-info reports vpn.orphaned and the toolkit offers the install.
mu300-update warns loudly for a system it could not link; the installers
default the VPN question to yes when a replaced system has the VPN on and
refuse "no" with its kill switch on; android-install.sh refuses the same.
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
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
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
install.sh and install.ps1 ask whether to install the vpn extra (default no: a system without VPN does not carry
120 MB of engines). It comes from the same release download and SHA256SUMS, or tools/make-extra.sh in --build
mode, and android-install.sh unpacks every pushed mu300-extra-<name>.tar.gz into extra/<name> - offline. An update
of a system whose vpn.conf says ENABLE=1 and whose image carries the engines keeps them as the vpn extra. Turkish
and Chinese texts; README, BUILD.md and tests/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
boot/init starts a mu300sd card before anything on the eMMC, so choosing internal storage while such a card is
in the slot installed a system that never started. Both installers now offer the card as the default when it
holds mu300sd; internal (answered, or MU300_STORAGE=internal) prints why it will not start while the card is
in and goes on only after "internal" is typed. android-install.sh removes a root-on-sd marker left in the
internal filesystem it installs into, so init no longer waits for a card that is not what should boot.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn