15 Commits
Author SHA1 Message Date
Abdurrahman Kaan DikeçandClaude Opus 5.5 0aa83038ce Retire kernel 7.2: releases ship 5.4, 6.18 and 7.3; devices on 7.2 move to 7.3
kernel.org ended the 7.2 series with 7.2.15. Releases no longer build or carry
mu300-kernel-7.2.tar.gz or the -k7.2 Magisk zips (release and mainline
workflows, make-release, make-magisk-zips), patches/7.2 is gone (7.3 has its
own 0028) and parity/mainline.list drops the 7.2 series.

Migration: mu300-update takes a 7.2 choice for 7.3 (never the 5.4 an unknown
choice means), says so in apply/boot/check/kernel, installs 7.3 through the
usual boot update (image before kept for rollback-boot, one-boot fallback
unchanged) and writes 7.3 down once an image of 7.3 is in place.
"mu300-update kernel 7.2" refuses and names 7.3. rollback-boot to a 7.2 image
still works and says the next update brings 7.3. Zips and directories of older
releases with 7.2 are still read. install.sh, install.ps1, the GUI, the web
installer and the Ubuntu panel take an answer or a choice of 7.2 as 7.3 with
a note; the kernel menu is 1) 5.4, 2) 6.18, 3) 7.3, and 4 still means 7.3.
mu300-api and the LuCI adapter no longer accept 7.2. Docs, wiki and site
(en/tr/zh) list three kernels and describe the retirement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-11-02 02:25:17 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 f422526728 Installers (USB adb only): the tests' shape of OfferRepartition's exit, the web command's quoting
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-11-01 14:42:11 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 3c2235983f Installers: Android's USB set to adb alone for the run (MTP off)
On an F50 the stock firmware's MTP function hangs, and Windows then resets the
USB device about every ten seconds, which cuts the adb session the installer
uses each time. Reported by kanoqwq, who suggested turning MTP off from the
installer.

Early in every run (right after root is confirmed) install.sh, install.ps1,
uninstall.sh, uninstall.ps1 and the web installer push tools/android-usb.sh
and switch sys.usb.config to "adb" when it holds mtp or ptp: "none" first,
until sys.usb.state says none, then "adb" - what Android's UsbDeviceManager
does (UsbHandlerLegacy: no USB gadget HAL on these units). The F50's stock
vendor rc (init.ums9620_2h10_ufi.usb.rc, B09) builds "adb" as ffs.adb alone
(19d2:1352) for every persist.vendor.sys.modem.diag value, and AOSP's
init.usb.configfs.rc has it on every configfs Android, so the U30 Air and the
V50 get it too. Never persist.sys.usb.config: the next start of Android has
the user's functions again. The switch runs detached (adb drops with its
first step); the host then waits for adb with sys.usb.state "adb", bounded by
MU300_USB_WAIT (60 s), and stops with what to do when the device does not come
back. Android that sets its functions again is gone on with. MTP already off:
nothing happens. MU300_USB_ADB_ONLY=0 leaves the USB alone.

Where a run ends with the device still in that boot of Android (uninstall,
--check, a backup, a failure) the functions of before are set back; never
after a reboot (sys.powerctl set, or another boot_id). The web installer
switches after staging and tells the user to choose the device again (it
comes back as another USB product). Our Linux gadget (ncm/ecm/rndis + acm +
ffs.adb) has no MTP or PTP function; a test says so.

Not run on a board: it needs the owner's test in Android.

Reported-by: kanoqwq
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-11-01 14:29:24 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 d969207813 test_android_web: the status's region says what partition named mu300root there is
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-17 12:12:27 +03:00
Abdurrahman Kaan Dikeç 5644ad9e60 Merge origin/main into lossless-update
# Conflicts:
#	rootfs/overlay/opt/mu300/bin/mu300-update
#	tools/make-release.sh
#	wiki/Installation.md
2026-10-16 01:55:38 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 4422553881 tests: the downloader's size-limit test lost its stub to the watch's kill now and then
test_android_web.Bounds.test_a_server_that_sends_more_than_the_release_names_cannot_fill_the_storage failed
once on CI (no 'grew' file): once the file limit stops the stub's write the file is past the size, and the
watch (every 0.1 s in the tests) can kill the stub before it writes down how far the file grew. The stub now
ignores TERM, as a downloader may: the watch still ends the run, and waits for it. 0 failures in 60 runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-15 21:53:20 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 24170f36a3 android-web: a job that ended while it was looked at was "interrupted"
job_state looked for the job's status (rc) first and at its process after that. The job writes its status and
then ends: when it did both between the two looks, a job that went well was called interrupted, and follow
printed "EXIT interrupted" - the intermittent test_android_web.EndToEnd.test_install_then_uninstall failure
("installRc: 'interrupted' != 0"; the Mali GPU line in it is only the last warning of the run). A job whose process
is gone is looked for its status once more before it is called interrupted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-15 21:03:30 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 5886ac684a Magisk switch: no file on the way to misc; misc resolved once
Review of the first version: a mktemp -d directory in /data/local/tmp
(0771, no sticky bit) can still be renamed away by the shell user. Now
printf goes straight into dd (hex checked, 32 bytes counted), and
by-name/misc is resolved once to a block device under /dev/block whose
sysfs uevent says PARTNAME=misc; that path is read, written and read
back. Tests plant links at the old temp name and at by-name/misc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-15 20:18:51 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 4194e50b39 ZTE V50 (MU3351): experimental third device, ported from kano's line (FINDINGS 95)
kano (kanoqwq) ported this project to the ZTE V50 in his line (clean-tf-7.2: f6b0668d, 0438ab01). Brought over
as an experimental third device; nobody in this project has a V50, nothing of it is measured here.

- How it is told apart: mu300-device and boot/init (one rule, the same code): its device tree has an AW9523B at
  0x5b on I2C3, which no F50's or U30 Air's has (both read). An F50 label on such a tree (an older installer's
  "continue anyway") is a v50; a v50 label without the node is what the tree says. F50 and U30 Air unchanged.
- Installers (install.sh, install.ps1, the Magisk zip, the web installer, the boot chain scripts): exactly
  V50 / MU3351 on ums9620, with one line saying it is experimental; any other V50 refused, never offered as an
  F50; mainline kernel only.
- Kernel: kano's leds-aw9523b (binds only ZTE's binding), patch 0017 keeps the V50's eMMC host awake (his
  measured fix); a mainline bundle names v50 only with the driver, the 5.4 bundle never.
- mu300-led (NET1 network lamp, Wi-Fi lamp by band, never the PMIC's LEDs), no battery, the F50's USB role
  switch, USB network 192.168.79.1; SIM2, NFC and SIM selection stay off (mu300-nfc says so).
- README, wiki Hardware-Notes, FINDINGS 95 (kano's findings apart from what was checked here), ADB-INTERFACE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-15 19:41:51 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 3525e798cf android-web.sh: root writes only in its own directory, and everything it writes there has an end
Two findings of the security review of the web installer's device side.

Root wrote in the adb user's directory (/data/local/tmp/mu300-web): the device's own download, the copies
of a backup, a chown, rm -rf. Whoever can write a directory can put a link at any name in it. Now a pushed
file is moved into /data/adb/mu300-web (a rename follows no link) and judged there - a regular file, of a
bounded size, with the checksum asked for; the download, the backup's copies, the answers, logs and the
job's state are in root's directory only; the page reads a backup's copies as base64 ("cat NAME") and
removes what it pushed itself, without root. The uninstaller removes single names in /data/local/tmp and
walks no tree.

A download's size was checked after wget had ended, so a server that sent more, or never stopped, filled
/data first. Now nothing starts unless 512 MiB stay free (the Magisk installer's own reserve), the
downloader runs under a file size limit of the release's size with a watch beside it, and it ends after an
hour; the network question after 30 s. A zip is unpacked only within a bound, a pushed file has a largest
size, and a job's log stops growing at 8 MiB while the job goes on.

Measured on the F50 after the change: a backup (checksums equal to the device's), a plan from a pushed zip
and from a zip the device downloaded, nothing of root's in the adb user's directory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-13 13:35:54 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 4f9641fc0d web installer: run end to end on an F50, the device downloads the release itself, out of beta
Run on an F50 (Android 13, Magisk 30.6, v2026.10.25) from a Mac, with the page's modules from Node over
WebUSB and with the real page in Chrome 155: install (one system and two), a tab closed in the middle,
Linux started and managed, back to Android, uninstall. What it found and what is still not measured is
FINDINGS 72; the table of what ran is docs/web-installer.md.

The release reaches the device without the user downloading anything: the page names the zip of the
choice and its size, asks the device whether it can reach GitHub (android-web.sh net) and has it download
the zip itself (run fetch), with progress and speed, continued where it broke. Busybox wget cannot check a
certificate (measured), so the file must have the release's size and the SHA-256 the browser read from
GitHub's API, and a download sent on to a host that is not GitHub's is stopped. A browser-side download
from a release mirror (mirror.js, tools/make-release-mirror.sh, a step in magisk.yml) is built and
switched off until the owner creates the repository; a picked file is the last way.

Defects found on the device and fixed:
* android-web.sh refused every release zip for the device's own download (a sed with \| under bionic's
  regex), and the directory root made for it refused the page's next push
* the first packet of a session can be lost over USB and both ends then wait for ever: the handshake asks
  again when an answer comes without its header, tries up to three times and never hangs without a word
* a finished run nobody watched was not shown and its zip stayed on the device; two systems with a closed
  tab said "Linux is installed" about one
* "Restart into Android" makes Android the default boot: said so, with a way back in the Linux view
* the page reconnects by itself to a device it was allowed before, and offers it without the chooser
* texts for a device without a screen (adb asks nothing on an F50, Magisk's question times out), for a
  second browser window that holds the device, and for a run the page did not start

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-13 13:16:31 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 e763d776e2 tests: the web installer's device tests do not assume they run as root
The end-to-end test's su stand-in answers only the question a root manager answers (an id
that always said 0 made the vendor packing chown as a user); the switch script's own root
check is what a non-root run of boot-linux reaches; a job's process is waited for before
its status is taken away.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-13 09:47:21 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 60c21da6bd web installer: the page in three languages, the device-download fallback, FINDINGS 72
site/web-installer (en, tr, zh): connect over WebUSB, the device with root and the
bootloader's lock shown apart, the storage bar and make-room figures, the wizard (storage,
systems, kernel, release or beta, VPN module, boot default, backup, the device's own plan,
INSTALL), the job with its stages and what a cut leaves at each, uninstall, and a manage
view for a device that runs MU300 Linux. Marked beta: nothing of it has run on a device.
The page's policy allows this site and api.github.com only; it loads no web fonts.

android-web.sh run fetch: the device downloads a release zip itself, from an address made
of the zip's name. site/tools/stage.sh stages the site for pages.yml. Linked from the
navigation, the install guide and the sitemap; the Telegram channel on the final page, in
the help and the footer.

docs: FINDINGS 72 (the four questions, measured and not), docs/web-installer.md (what runs
where, testing without a device, the protocol for the first run on an F50), the wiki.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-13 09:15:25 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 76af3c9b0c web installer: the page's logic without a screen, tested against the real device scripts
privacy.js (serials masked; identity numbers, phone numbers and MAC addresses out of the
log), sha256.js (in pieces, for a backup checked while it is pulled), zip.js (the picked
zip's manifest, read in the browser), github.js (releases from the API, every value
checked for its shape; a beta only when it is newer than the release), flow.js (what fits
where, the choices the installer would refuse, the answers of each run, the installer's
marked lines) and device.js (Android through android-web.sh, MU300 Linux behind one
adapter around "a command over adb shell, JSON back").

tests/web/e2e-android.mjs runs that code through a scripted adbd whose shell is the real
android-web.sh and Magisk installer on the fake device: backup, plan, an installation
whose watcher goes away in the middle, uninstall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-13 08:48:23 +03:00
Abdurrahman Kaan DikeçandClaude Opus 5.5 4b48011fed web installer: the device side (android-web.sh), and a Magisk installer other callers can drive
mu300-install.sh (the installer inside every Magisk zip) for a caller that is not Magisk:
MU300_ANSWERS=FILE takes the settings from that file alone (root's, or the run is refused),
MU300_PROGRESS=1 prints MU300-STEP and MU300-PLAN lines beside the messages for people,
mu300/extras/ carries the VPN module or the panel to android-install.sh, and
MU300_ADB_KEY (trusted only) authorises one adb key for the installed Linux.

tools/android-web.sh is what the page runs on Android under su: status as JSON, a pushed
zip checked and moved to root's directory before its installer is unpacked, the
installation as a job in a session of its own (it does not need its watcher), an
uninstaller in the order of uninstall.sh (misc, then the boot partition, then the erase,
each verified), and the copies for a backup - never an NV, calibration or identity
partition. site/tools/stage.sh stages the site with those scripts for publishing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VVN2zDgf76kMDVSuWhHPUE
2026-10-13 08:37:48 +03:00