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
A card can carry an eMMC-style GPT (a raw clone of a device backup) with partitions named misc, boot_a and boot_b,
and the Linux-side lookups by name took any mmc disk's: init's misc and boot_<slot> (the BCB write, the persistent
log, /run/mu300/misc-dev for mu300-next-boot), early-recorder's 8 MiB log window and mu300-update's kernel partition.
All of them, and android-vendor-start's by-name links, now take the eMMC only: the disk of type MMC, else the first
mmcblk disk that is not SD - never a card on mmcblk0, as the old fallback could. ueventd-perms.sh drops Android's
mmcblk1p* rule (the card by number, root:system - gid 1000 is the first user on Linux; no vendor daemon here opens
the card) and takes the RPMB partition under any number. The kernel port says what its wait costs: no eMMC host,
no card. FINDINGS 31l: the verification tally.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
The script runs again on the first boot after every update (a fresh rootfs, the kept /etc/config). The NDP relay
deletes still run every time; everything else runs once, behind the marker luci.mu300.defaults written last in the
kept configuration. "Only when unset" could not tell a choice from a default: mediaurlbase and lang are always set
before it runs, and an unset wan.ipv6 is OpenWrt's own 'extend' (final review I3, ruling R42's premise).
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
The panel's rndis became the function list "rndis" alone, so a kernel without f_rndis bound a gadget with no
network function, boot after boot. It is now "rndis ncm ecm": RNDIS still wins and is still the one network function
with the console when it can be made (K6), and the applied marker names the function that was made (final review I2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
- mu300-vpn ensure_engines: with KILL_SWITCH=1 only the forward part of the kill switch is up during adopt/install
(clients blocked, the device may download); a failure leaves the full kill switch up. Before, run exited before
the kill switch and forwarded traffic went out unprotected, and a kill switch left from an earlier run blocked
the download for good. An adopt that leaves no usable engine now falls through to install.
- mu300-extra remove vpn refuses while ENABLE=1 unless --force.
- extra_put recovers a swap cut off between its two renames; android-install's keep step clears a leftover
extra/vpn before the rename; extra_desc says about 40 MB like the installers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Task 34 review I1, I2 and R38 (K30, K37).
- 91-mu300-luci no longer sets dhcp.lan.ndp/dhcp.wan.ndp to relay and deletes any earlier ndp or ndproxy_routing:
odhcpd's NDP relay pinned every br-lan neighbour entry, which a LAN host can spoof for any address, even
off-prefix, as a /128 to br-lan. NAT66 sends every client out under the router's own address, so the carrier
never needs NDP for a client. RA and DHCPv6 relay stay.
- ndp-learn routes the bearer's /64 to br-lan at metric 128, below the carrier RA's metric-256 route on sipa_eth0,
so NAT66 replies reach the clients; a metric-1024 route from an earlier ndp-learn is removed.
- The fork's fixed ULA fd66:1126:7956::/48 is gone: OpenWrt keeps its own random RFC 4193 prefix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
README and docs/BUILD.md describe openwrt-luci (the panel, MU300_SYSTEM, MU300_LUCI_THEME_APK, po2lmo, luci-i18n),
credit kanoqwq and eamonxg; BUILD.md's RNDIS line, upstream/README.md's mobile-data line and the app README's
stale TF sentences are corrected; the SMS pool's sync behaviour is documented; tests/README.md gets the
test_early_dhcp row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
Security review of the K37 port (kanoqwq/clean-tf-7.2 cd4fb28, 89b376d): the fork pinned a /128 to br-lan for
every global address in br-lan's neighbour table. Any LAN client can put any address there with a spoofed
neighbour advertisement, so it could pin another client's address, the router's own or an internet host's (a
DNS server) to br-lan: a route hijack. The pins were "a small latency optimisation" beside the /64 route, which
does the work, so they are left out (spec K37 says so) rather than given MAC binding, ageing and a cap.
What remains takes no LAN input: the /64 comes from the kernel's own global unicast address on sipa_eth0
(2000::/3 only), and the stray host routes removed from sipa_eth0 must be plain IPv6 addresses (hex and colons:
nothing ip reads as an option) inside the /64, never the subnet-router anycast. ndp-learn --once runs one round
for the tests: hostile neighbour entries (off-prefix, the router's own, anycast, link-local, multicast,
malformed) give no route and no proxy entry; hostile route lines never reach ip's arguments.
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
* init: the eMMC serial only from androidboot.emmcid. The /sys CID fallback ran before the modules that find the
eMMC, so it would have come and gone between boots; without the argument the identity is the serial number alone.
An emmcid without a serial number no longer gives "MU300LINUX--<emmc>".
* mu300-update: fetch_stdout retries only a failed connection (curl 6 7 35 52 56, GNU wget 4). A timeout (28) had
been retried by curl already; four more rounds held "check" for half an hour. A 404 through wget is not retried.
* mu300-at: a test of the loop itself (a writable directory, a dead owner's lock that cannot be removed: "busy").
* build-wlan.sh: a Wi-Fi patch either applies or is applied already, as in upstream/build.sh (it was `|| true`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
A device restored from another's backup has its androidboot.serialno, and with it the same USB serial number and
host MAC: macOS gave the one interface to whichever came last (an F50 and its clone on one Mac). The identity is now
serial number + eMMC serial (androidboot.emmcid, or the product serial in the eMMC's CID). For every device: each
host sees a new adapter once after the update (macOS sets it up by itself; Windows may ask the network type again),
written in FINDINGS 33i. Measured: U30 Air (7.2.9) MU300LINUX-323960377386-203edc81, host 02:50:bb:7e:78:02, the Mac
had an address 45 s after the reboot; F50 #1 (6.18, from its card) MU300LINUX-324950664950-2128e853,
02:50:d0:ca:77:02, 48 s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqKKtBQZCfxYnHuBCuDqqn
- Reported: after a toolkit reboot "because the hotspot was on", no SSH. "Reboot with the hotspot off" (to list
networks) armed /etc/mu300/wifi-scan-mode, which stayed until a network was joined, so the hotspot was off at
every boot and a session over it had no way back. mu300-wifi-scan-mode.service now takes the flag into /run for
that boot only; a transient timer brings the hotspot back after 10 minutes with nothing joined; the toolkit
warns before the reboot that a session over the hotspot ends and names the USB address to come back on.
- mu300-update notice: at boot and every 6 hours (a timer on Ubuntu, mu300-post on OpenWrt) the device asks for
the newest release and, when it is newer, says so in the login message (Ubuntu motd, OpenWrt profile.d) and at
the top of mu300-toolkit. Nothing is installed by itself.
- Tests: the notice (newer, same, a test release, offline). FINDINGS 33i, README.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
The traffic workflow committed to main every day, which a protected main no longer allows (a personal repository
cannot exempt GitHub Actions from a ruleset). The badges at the top still show releases, downloads, stars, forks
and issues.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
- Windows (fixes#7): a clone with core.autocrlf=true checked the device scripts out as CRLF, and Android's sh
ran none of android-install.sh ("unexpected 'do'"), with an empty log. .gitattributes keeps text LF on every
system; install.ps1 pushes scripts through PushUnix, and build-boot-image.py writes init, ueventd-perms.sh and
the module orders with LF, for clones made before. Checked on Windows: 5 of 5 scripts CRLF on main, 0 now.
- Wi-Fi (#8): the vendor driver had no dump_station, so iw, iwinfo assoclist and LuCI's Associated Stations
were empty although hostapd had the clients; nor get_channel ("Channel: 0"). dump_station lists the firmware's
peer table entries of the AP (address only: the firmware gives no signal or counters), get_channel returns
what cfg80211 kept from start_ap. Mainline copy and a 5.4 patch; the channel checked on the F50 under 6.18.
- A U30 Air restarted every ten minutes after mu300-linux from Android: boot_b's device segment, which
mu300-update keeps, still held an old experiment's --trial-guard. The generic segment carries an empty guard
file that replaces it; an experiment's guard goes last, into a segment of its own. Checked on the U30 Air.
- mu300-nfc on|off: ZTE's NFC switch is bit 5 of the tag's configuration byte 0x3bf (found by reading the chip
with the switch on and off); set, phones get nothing. mu300-nfc says so. Checked on the U30 Air.
- Tests: CRLF inputs, no plain adb push of scripts, the empty guard, NFC on/off. FINDINGS 33g, 33h.
Fixes#7
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
- The tag is a Fudan FM11NT08 at I2C 2-0x57, reachable while GPIO 190 is held low (libgpiod). mu300-nfc shows
it (a Wi-Fi record by its name only), writes the hotspot's name and password as ZTE's firmware does (the same
bytes), a URL (with the NDEF prefix codes), text, or nothing; each 16-byte page only when it differs, and read
back after writing.
- sync, at every hotspot start (Ubuntu) and at boot (OpenWrt): the Wi-Fi record again if that is what the tag
holds, so a changed password reaches it; a URL or text written by hand stays.
- Ubuntu and OpenWrt get i2c-tools and gpiod(-tools); mu300-nfc is on PATH.
- Tested on the U30 Air under 7.2: a phone joined the hotspot and opened a URL written from Linux, once NFC was
switched on in ZTE's web interface (a setting the tag keeps). Tests: a fake tag, ZTE's record byte for byte,
long URLs, what sync leaves alone. FINDINGS 33g.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
- The network and Wi-Fi lights never went out under mainline: they are PMIC LDOs (VDDCAMA0-2), which ZTE switches
with zte_ldo_leds and mainline left on. leds-zte-ldo makes them zte-ldo0..2 and starts them dark.
- The network LED's red is the PMIC's keypad backlight sink: leds-sc27xx-kpled, after Unisoc's driver, under its
Android name keyboard-backlight. The device tree's other GPIO LEDs light nothing, under Android too.
- mu300-led: battery white while Linux is up, network blue on 4G, white on 5G, red without service, Wi-Fi white on
2.4 GHz, blue on 5 GHz; under 5.4 the LDOs through vddcamaN_status. mobile-data re-reads the access technology
on every watchdog round.
- thermal-guard: the SoC at 85 C or the battery at 50 C sets off mu300-led alarm, the battery LED's colours one
at a time, until they cool down; it now runs on 5.4 too, where it only watches.
- Mapped by lighting each LED on the device and by sampling Android's LEDs with the radio off; 6.18 and 7.2 on
the U30 Air. Tests: 4G/5G, the siren, the 5.4 LDO switches, the heat alarm. FINDINGS 33f.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
- USB host under 6.18 and 7.2: a Logitech receiver (HID) and a flash drive (mounted, read) through a USB-C
adapter. The PHY now provides otg_set_vbus(), through which dwc3 hands it the role (host eye pattern, A-type ID,
D+/D- pull-downs). Patch 0007 is 6.18 only (7.2 has it upstream): patches/<major.minor>/ holds such patches.
mu300-usb waits for the role switch, which works in the background, and reads a fake /sys in tests.
- init applied a --trial-guard left in the device segment of boot_b to every boot of an installed system: it
restarted every 10 minutes (mu300-update keeps boot_b's device segment). A guard now counts in a trial only.
- install.sh, install.ps1, uninstall.ps1: with more than one adb device they always ask which one (the F50/U30 Air
is the default), and with the device in Linux and only a phone or tablet in Android they offer to send the
device to Android first - an installer about to work on a tablet was reported.
- tests: device selection, and mu300-usb against a fake charger (never 5 V against a supply, the boost off at
boot, the F50 refused); FINDINGS 33e; README.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
upstream/patches 0004-0006 teach mainline's sc27xx efuse, ADC and fuel gauge drivers the UMS9620's PMIC, from
the values in Unisoc's 5.4 drivers: the efuse read window, the ADC's scales, calibration and 26 MHz clock vote,
the FGU's enable bits and calibration field. On this board "bat-temp" is the NTC's voltage (the battery node's
voltage-temp-table converts it), the charger IC has no driver (the status comes from the battery current), and
mainline read every discharge current as ~2 billion (an unsigned subtraction; now s64 like the vendor driver).
Tested on the U30 Air (6.18 and 7.2): level, voltage, current (-2..-18 mA on USB power, full), 33 degC, status.
A first version recursed (status -> capacity -> calibration -> status) and overflowed the stack at every boot:
five failed boots later the device was back in Android by itself, and the panic was in pstore (FINDINGS 33d).
Also: mu300-wifi-band falls back to the hotspot's channel when it cannot read hotspot.conf (not root), and
mu300-led tells the band from the setting while the hotspot has no channel yet (it lit white on 5 GHz).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
- ssphy (6.18, 7.2): the U30 Air's device tree gives the PHY the PMIC's Type-C block as extcon, which has no driver
under mainline, and the PHY deferred for ever (no USB at all). When extcon names that block, the PHY now takes
VBUS from the extcon-usb-gpio node both boards have. CONFIG_LEDS_GPIO for its LEDs.
- init: the USB serial number is MU300LINUX-<serial number> (macOS gave a second device with the same one no network
interface), and the serial number is read from the device tree's bootargs as well, since a mainline kernel
forces its own command line.
- kernel bundles carry ./devices ("f50 u30air"); mu300-update and both installers keep a bundle without it off a
U30 Air (its 5.4 ramdisk lacks the U30 Air modules, its mainline kernel the fix above). This replaces the
"5.4 only" rule: the U30 Air gets every kernel and Ubuntu 26.04 from the next release on.
- FINDINGS 33c, README: what runs on the U30 Air under mainline (all but the battery reading).
Tested on the U30 Air with one-shot trials and --trial-guard, an F50 on the same Mac: 6.18 and 7.2 with USB network,
mobile data, VPN, hotspot (a Wi-Fi client for 3 minutes, no drops, 0% loss), Bluetooth and LEDs.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
- mu300-toolkit shows the battery (info and the live monitor) where there is one: level and whether it runs on
USB power (the SQC charger reports "Unknown" once the battery is full, so the status alone says little)
- mu300-device: f50 or u30air, from /run/mu300/device or, under a boot image from before it existed (an older
release's or a mainline kernel), from the device tree like init; mu300-led and mu300-lan-ip use it
- install.sh --build never put xray, hev-socks5-tunnel and sing-box into the image (only make-release did):
mu300-vpn failed with "xray: not found". Found installing the U30 Air from a local build.
- README: supported devices; FINDINGS 33: the U30 Air port, the misc/boot_b lookup, two devices on one computer
- mu300-scp.py honours MU300_HOST like mu300-ssh.py
Tested: U30 Air installed with install.sh --build (Linux by default, Ubuntu 24.04, 5.4): 192.168.78.1 with MACs
from its serial, 93/93 modules, power/network/Wi-Fi LEDs, VPN over mobile data (~110 Mbit/s to a USB client),
the device's own LAN kept out of the tunnel with an F50's vpn.conf.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN
A PCIe scan that timed out removed the half-probed card, and sprd_pcie_remove() completed remove_done, which only
sprd_pcie_remove_card() initialises: an oops in __wake_up_locked and a panic, back to Android (caught while
rebooting OpenWrt on 5.4 for v2026.09.29). remove_done is initialised before each scan, remove guards against a
probe that set no data, and a timed-out scan is retried once.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeuDBrAce8rrgSJDbFJQGN