fix: align U30 Air stock power and recovery and improve installers

This commit is contained in:
kanoqwq committed 2026-10-16 18:53:21 +08:00
1 parent 2af101f830
commit f59a2968f3
174 files changed
+6899 -222

No files matched your search

+3
View File
@@ -1,5 +1,8 @@
# Linux on the ZTE F50 / MU300 and U30 Air
Maintainer notes: [stock behavior and new-device adaptation checklist](docs/NEW-DEVICE-STOCK-ADAPTATION.zh-CN.md),
[U30 Air charge/power/recovery evidence](docs/U30AIR-STOCK-CHARGE-20261016.zh-CN.md).
Windows desktop installer: extract the complete release package and run root `OpenWrt-Installer.exe`. Device selection, persistent recovery and the two-stage Android reset flow share the existing backend. Python/CLI and Magisk entries remain available. See the bilingual [user guide](installer/GUIDE.md), [build instructions](installer/README.md), and [verification/screenshots](installer/VERIFICATION.md). Multiple ADB devices can be selected in the GUI or interactive CLI, or explicitly bound with `--serial SERIAL`.
+9 -3
View File
@@ -1,3 +1,6 @@
New installations use username `root` and password `root`. Updates preserve the existing password.
首次安装默认账号/密码为 `root`/`root`;保留配置更新沿用原密码。
User instructions: open **START-HERE.md** at the package root, then run **OpenWrt-Installer.exe** or **OpenWrt-Installer.py**. This document describes technical details.
# MU300 desktop deployment
@@ -25,7 +28,7 @@ desktop helpers and ADB in `desktop/` and `tools/`.
| install-to-internal-storage | Independent `mu300root`; use unallocated eMMC first, otherwise offline userdata shrink |
| reinstall-internal-system | Erase and reinstall only existing `mu300root` |
| resume-internal-install | Continue after encrypted-data preparation and Android reset |
| switch-to-openwrt | Select installed Linux without automatic reboot |
| switch-to-openwrt | Verify misc and restart into installed Linux |
| update-openwrt | SSH upload, preserve settings/capacity, then reboot |
Windows uses `OpenWrt-Installer.exe` when included. Otherwise install Python
@@ -132,8 +135,11 @@ Runtime firmware comes from the existing installation. A plain filesystem
view excludes live vendor device/proc mounts during copying. Root/boot checks
precede slot selection; boot failures attempt root and boot restoration.
The persistent boot log and filesystem capacity are preserved.
Use the package for the intended kernel family. Legacy raw free-region installs
continue using native `mu300-update`; desktop updating rejects that layout.
Use the package for the intended kernel family. Legacy eMMC hidden-area installs
are also supported after verifying the live OpenWrt container, its loop backing,
ext4 identity, GPT boundaries and boot-discovery offset. Updating preserves that
layout and capacity; it does not create a partition or resize Android. An
unrecognized or inconsistent layout stops before uploading or writing.
## Building
+7 -3
View File
@@ -1,3 +1,6 @@
New installations use username `root` and password `root`. Updates preserve the existing password.
首次安装默认账号/密码为 `root`/`root`;保留配置更新沿用原密码。
# MU300 / F50 / V50 / U30Air:OpenWrt 使用指南
**电脑安装和维护从根目录的 `OpenWrt-Installer.exe` 或 `OpenWrt-Installer.py` 开始。**
@@ -40,7 +43,7 @@ python3 -m pip install paramiko lz4
| 4 — Reinstall internal system | 重装已有内置 OpenWrt | 清空原 OpenWrt 分区和配置,不重复缩容 userdata |
| 5 — Resume after Android reset | 加密 data 缩容、重置 Android 后续装 | 写入已准备的分区,不重新执行缩容 |
| 6 — Update OpenWrt | 保留配置更新正在运行的 OpenWrt | 替换系统和内核,完成后重启 |
| 7 — Boot OpenWrt once | Android 临时启动已安装的 OpenWrt | 仅修改 misc;成功后手动重启,不改默认启动设置 |
| 7 — Boot OpenWrt once | Android 临时启动已安装的 OpenWrt | 仅修改 misc;校验成功后自动重启,不改默认启动设置 |
**菜单 2 是实验性功能:userdata 镜像模式可能破坏 Android 的 F2FS 文件系统。**
一般选 TF 卡或独立内置分区。它只接受确认未加密、未经过加密映射的 userdata。
@@ -129,11 +132,12 @@ python3 OpenWrt-Installer.py --resume --transaction "/path/to/transaction.json"
- **更新(6)**:设备运行 OpenWrt,通过 USB 网络连接电脑。输入实际 root 密码,
电脑经 SSH 上传、验证并更新系统,保留配置和原容量,完成后重启。
重要文件仍需事先备份;旧的无分区表原始偏移安装不适用此桌面更新入口。
重要文件仍需事先备份。旧版使用 eMMC 隐藏额外空间的安装也可更新;安装器确认
当前挂载及空间范围后保留原布局和容量,无法确认时会停止。不要为更新改选重装。
- **重装(4)**:设备运行 Android,仅覆盖已有 `mu300root` 和 Linux 启动镜像。
原 OpenWrt 配置会清除,Android userdata 不重新缩容。
- **切回 OpenWrt(7)**:设备运行 Android,检查另一槽的 Linux 启动镜像后选择它,
仅修改并回读 misc 的 32 字节启动控制块,成功后按提示手动重启。
仅修改并回读 misc 的 32 字节启动控制块,校验成功后自动重启。
不挂载/修复 OpenWrt 分区,不改根选择文件、默认启动设置,不自动同步启动链。
启动后沿用原有默认启动策略;永久默认启动需在 OpenWrt 中另行设置。
- **回 Android**:在网页系统切换入口选择 Android,再按提示重启。
+50
View File
@@ -0,0 +1,50 @@
"""Shared binary downloads for the GUI backend and generated MU300 CLI helper."""
import hashlib
import os
from pathlib import Path
import re
import secrets
import shlex
def pull_binary(call, shell, command, destination, expected_size=None, limit=16 << 20):
"""Stage in shell-owned Android storage, pull bytes and verify all hashes."""
destination = Path(destination)
partial = destination.with_name(destination.name+'.partial')
directory = '/data/local/tmp/openwrt-read-'+secrets.token_hex(12)
remote = directory+'/data.bin'
free = int(shell("df -Pk /data/local/tmp | tail -n1 | awk '{print $4}'", root=False, timeout=20).strip())*1024
if expected_size is not None and expected_size <= 0:
raise ValueError('Invalid binary read size')
if free < (expected_size if expected_size is not None else limit)+(32 << 20):
raise ValueError('Insufficient Android temporary space / Android 临时空间不足')
shell('umask 077; mkdir '+shlex.quote(directory), root=False, timeout=20)
try:
# Only ASCII sizes/hashes return through a root shell. Binary output
# never goes through a PTY, terminal codec, compressor or text encoder.
metadata = shell('set -e; set -o pipefail; ('+command+') > '+remote+
'; chmod 644 '+remote+'; wc -c < '+remote+'; sha256sum '+remote+
'; ('+command+') | sha256sum', root=True, timeout=120).splitlines()
if len(metadata) != 3 or not metadata[0].strip().isdigit():
raise ValueError('Invalid binary read verification / 二进制读取校验信息无效')
size = int(metadata[0].strip())
staged, source = (line.split()[0] if line.split() else '' for line in metadata[1:])
if size <= 0 or expected_size is not None and size != expected_size or expected_size is None and size > limit:
raise ValueError('Binary read size mismatch / 二进制读取大小不符')
if not re.fullmatch('[a-f0-9]{64}', staged) or source != staged:
raise ValueError('Source changed during binary read / 二进制源数据校验不一致')
call('pull', remote, str(partial), timeout=120)
if not partial.is_file() or partial.stat().st_size != size:
raise ValueError('Incomplete binary download / 二进制文件下载不完整')
digest = hashlib.sha256()
with partial.open('rb') as stream:
for block in iter(lambda:stream.read(1 << 20), b''): digest.update(block)
if digest.hexdigest() != staged:
raise ValueError('Binary download checksum mismatch / 二进制文件下载校验失败')
with partial.open('r+b') as stream: os.fsync(stream.fileno())
os.replace(partial, destination)
return size
finally:
try: shell('rm -f '+remote+'; rmdir '+directory, root=True, timeout=20)
except Exception: pass
if partial.exists(): partial.unlink()
+17 -4
View File
@@ -13,6 +13,21 @@
#
# Sourced by boot/init; install_part_pending DEV is called once per boot with
# userdata's device. Logs through the caller's log().
# A bounded answer declines the optional host-directory orphan dump. -f
# already enables filesystem fixes; -y alone does not suppress this prompt.
# Never inherit the console or feed unlimited answers to a metadata checker.
part_fsck() {
local dev=$1 output=$2 worker rc
printf "n\n" > /run/part-fsck.stdin || return 8
/repair/lib/ld-musl-aarch64.so.1 --library-path /repair/lib \
/repair/sbin/fsck.f2fs -f "$dev" < /run/part-fsck.stdin >"$output" 2>&1 &
worker=$!
printf "%s %s\n" "$worker" "$output" > /run/part-check
wait "$worker"; rc=$?
rm -f /run/part-check /run/part-fsck.stdin
return "$rc"
}
install_part_pending() {
. /etc/part-progress.sh
local dev=$1 node=${1##*/} disk=${1%p*}
@@ -109,8 +124,7 @@ install_part_pending() {
echo "2/6 shrinking userdata (fsck)" > /run/part-status
log "stage=part-install shrink cur=$((cur / 2048))MiB target=$((target / 2048))MiB"
blockdev --setrw "$dev" || { part_fail 'userdata read-only'; return 1; }
/repair/lib/ld-musl-aarch64.so.1 --library-path /repair/lib \
/repair/sbin/fsck.f2fs -f "$dev" >/run/part-fsck.log 2>&1
part_fsck "$dev" /run/part-fsck.log
rc=$?
case "$rc" in 0|1) ;; *) part_fail "F2FS check failed rc=$rc"; return 1 ;; esac
echo "2/6 shrinking userdata (moving blocks; this can take several minutes)" > /run/part-status
@@ -128,8 +142,7 @@ install_part_pending() {
# Check also when a previous attempt already changed the block count.
# A new count alone cannot prove that all block moves/checkpoints finished.
echo "2/6 verifying shrunk userdata" > /run/part-status
/repair/lib/ld-musl-aarch64.so.1 --library-path /repair/lib \
/repair/sbin/fsck.f2fs -f "$dev" >/run/part-shrink-check.log 2>&1
part_fsck "$dev" /run/part-shrink-check.log
rc=$?
case "$rc" in 0|1) ;; *) part_fail "shrunk userdata check failed rc=$rc"; return 1 ;; esac
low=$(od -An -tx4 -j 1060 -N 4 "$dev" | tr -d ' \n')
+11 -1
View File
@@ -23,6 +23,16 @@ part_progress_start() {
msg="$msg | $((written / 1048576))/$((total / 1048576)) MiB ($((written * 100 / total))%)"
fi
fi
if [ -s /run/part-check ]; then
read -r check_pid check_log < /run/part-check
check_state=$(awk "/^State:/ {print \$2}" "/proc/$check_pid/status" 2>/dev/null)
check_wait=$(cat "/proc/$check_pid/wchan" 2>/dev/null)
check_io=$(awk "/^read_bytes:/ {r=\$2} /^write_bytes:/ {w=\$2} END {if (NR) printf \"read=%.1fMiB write=%.1fMiB\", r/1048576, w/1048576}" "/proc/$check_pid/io" 2>/dev/null)
check_tail=$(tail -c 1024 "$check_log" 2>/dev/null | tr "\r" "\n" |
awk "NF {line=\$0} END {print substr(line,1,140)}")
msg="$msg | fsck pid=$check_pid state=${check_state:-?} wait=${check_wait:-?} $check_io"
[ -z "$check_tail" ] || msg="$msg | $check_tail"
fi
printf '<3>MU300-INSTALL: %s\n' "$msg" > /dev/kmsg
printf "%s\n" "$msg" > /run/mu300-desktop-www/progress.tmp
mv /run/mu300-desktop-www/progress.tmp /run/mu300-desktop-www/progress.txt
@@ -34,7 +44,7 @@ part_progress_start() {
part_beat=$!
}
part_stop() {
rm -f /run/part-install.running /run/part-worker /run/part-disk
rm -f /run/part-install.running /run/part-worker /run/part-disk /run/part-check /run/part-fsck.stdin
[ -z "${part_beat:-}" ] || { kill "$part_beat" 2>/dev/null; wait "$part_beat" 2>/dev/null; }
part_beat=
return 0
+120
View File
@@ -0,0 +1,120 @@
"""Shared installed-boot recognition and misc trial selection for both families."""
import hashlib
import struct
import zlib
def inspect_linux_boot(read, size, family, slot):
if family not in ('e5','mu300') or slot not in ('a','b'):
raise ValueError('Unsupported boot family or slot')
limit=(56 if family=='e5' else 48)<<20
if type(size) is not int or size < limit or size % 512:
raise ValueError('Invalid boot partition size / 启动分区大小无效')
header=read(f'dd if=/dev/block/by-name/boot_{slot} bs=512 count=8 2>/dev/null')
tail=read(f'dd if=/dev/block/by-name/boot_{slot} bs=512 skip={size//512-1} count=1 2>/dev/null')
if len(header)!=4096 or len(tail)!=512 or header[:8]!=b'ANDROID!':
raise ValueError('Installed boot header is missing or incomplete / 已安装启动镜像头缺失或不完整')
kernel,ramdisk=struct.unpack_from('<II',header,8)
header_size=struct.unpack_from('<I',header,20)[0]
version=struct.unpack_from('<I',header,40)[0]
if version!=4 or header_size!=1584 or not kernel or not ramdisk:
raise ValueError('Unsupported installed boot format / 已安装启动镜像格式不受支持')
raw=header[44:1580]
if b'\0' not in raw:
raise ValueError('Invalid installed boot command line / 已安装启动参数无效')
try:command=raw.split(b'\0',1)[0].decode('ascii').split()
except UnicodeDecodeError:raise ValueError('Invalid installed boot command line / 已安装启动参数无效') from None
recognized='e5.part_v=2' in command if family=='e5' else 'loglevel=5' in command and not any(item.startswith('e5.') for item in command)
if not recognized:
raise ValueError('No recognized '+family+' Linux boot in slot '+slot+' / 目标槽未识别到相应机型系列的 Linux 启动镜像')
if any(item.startswith('e5.part_prepare=') for item in command):
raise ValueError('Partition preparation is pending; resume the saved installation / 分区准备尚未完成,请从保存记录续装')
end=4096+((kernel+4095)//4096)*4096+((ramdisk+4095)//4096)*4096
footer=tail[-64:]
if footer[:4]!=b'AVBf':
raise ValueError('Installed boot footer is missing / 已安装启动镜像尾部无效')
original,offset,length=struct.unpack_from('>QQQ',footer,12)
if original!=end or offset!=end or not length or offset+length>limit or offset+length>size-64:
raise ValueError('Installed boot payload bounds are invalid / 已安装启动镜像范围无效')
return {'header_version':version,'kernel_bytes':kernel,'ramdisk_bytes':ramdisk,'header_sha256':hashlib.sha256(header).hexdigest()}
def inspect_e5_boot(read,size):
return inspect_linux_boot(read,size,'e5','b')
def trial_control(before,slot):
if (slot not in ('a','b') or len(before)!=32 or before[4:8]!=b'BCAB' or before[8]!=1 or before[9]&7!=2 or
struct.unpack_from('<I',before,28)[0]!=zlib.crc32(before[:28])):
raise ValueError('Invalid current slot or BCAB format/CRC / 当前槽位或 misc 校验无效')
current=12 if slot=='a' else 14
opposite=14 if slot=='a' else 12
if not before[current]&0x80 or not before[current]&15 or before[13]&1 or before[15]&1:
raise ValueError('Android slot is not healthy; finish Android setup/update first / Android 槽位未就绪,请先完成 Android 初始化或更新')
if before[opposite]&15 > before[current]&15:
raise ValueError('Another slot has higher priority; finish or cancel the pending boot first / 另一槽位优先级较高,请先完成或取消待执行的启动')
result=bytearray(before)
result[:4]=b'_b\0\0' if slot=='a' else b'_a\0\0'
result[current]=(before[current]&0xf0)|14
result[opposite]=0x2f
struct.pack_into('<I',result,28,zlib.crc32(result[:28]))
return bytes(result)
def boot_installed_mu300(api,android,root):
"""Select the installed opposite slot without root mounts or boot writes."""
if android.slot not in ('a','b') or android.linux!=('b' if android.slot=='a' else 'a'):
raise ValueError('Invalid Android/Linux slot selection')
target='/dev/block/by-name/boot_'+android.linux
installed=inspect_linux_boot(android.read,int(android.shell('blockdev --getsize64 '+target).strip()),'mu300',android.linux)
current=android.read('dd if=/dev/block/by-name/boot_'+android.slot+' bs=512 count=8 2>/dev/null')
if len(current)!=4096 or current[:8]!=b'ANDROID!':
raise ValueError('Current Android boot header is incomplete / 当前 Android 启动镜像头不完整')
if hashlib.sha256(current).hexdigest()==installed['header_sha256']:
raise ValueError('Opposite slot has the same Android boot header; no distinct Linux boot identified / 另一槽与当前 Android 启动镜像头相同,未识别到独立 Linux 镜像')
before=android.live()
wanted=trial_control(before,android.slot)
for name in ('busybox','android-bootchain.sh'):
source=root/'desktop'/name if name=='android-bootchain.sh' else api['payload_file'](root,name)
android.push(source,name)
android.shell('chmod 755 '+android.bb)
android.run('"$BB" sh "$P/android-bootchain.sh" check')
android.put(wanted,'misc-trial.bin')
expected=hashlib.sha256(before).hexdigest();checksum=hashlib.sha256(wanted).hexdigest()
body='''set -o pipefail
[ "$(getprop ro.boot.slot_suffix)" = "_'''+android.slot+'''" ]
umask 077
mkdir -p /data/adb/openwrt-boot-control
backup=$(mktemp /data/adb/openwrt-boot-control/before.XXXXXX)
dd if=/dev/block/by-name/misc of="$backup" bs=1 skip=2048 count=32
[ "$(sha256sum "$backup" | cut -d ' ' -f1)" = '''+expected+''' ]
[ "$(stat -c %s "$P/misc-trial.bin")" = 32 ]
[ "$(sha256sum "$P/misc-trial.bin" | cut -d ' ' -f1)" = '''+checksum+''' ]
sync
if dd if="$P/misc-trial.bin" of=/dev/block/by-name/misc bs=1 seek=2048 count=32 conv=notrunc,fsync &&
[ "$(dd if=/dev/block/by-name/misc bs=1 skip=2048 count=32 | sha256sum | cut -d ' ' -f1)" = '''+checksum+''' ]; then
echo 'MISC-TRIAL-VERIFIED'
else
dd if="$backup" of=/dev/block/by-name/misc bs=1 seek=2048 count=32 conv=notrunc,fsync
[ "$(dd if=/dev/block/by-name/misc bs=1 skip=2048 count=32 | sha256sum | cut -d ' ' -f1)" = '''+expected+''' ] || echo 'MISC RESTORE FAILED; do not reboot'
exit 1
fi
'''
observer=api.get('GUI')
if observer:observer.action('misc-trial',lambda:android.run(body))
else:android.run(body)
android.reboot()
return api['Outcome']('success','OpenWrt trial selected; only misc changed / 已选择临时启动 OpenWrt,仅修改 misc。',
'Device is restarting; default-boot settings are unchanged / 设备正在重启,原默认启动设置保持不变。')
def boot_installed_e5(api, read):
"""Shared CLI/GUI trial selection, independent of the current package hash."""
api['steps'](2)
api['find_adb']()
api['android_checks']()
inspect_e5_boot(read,api['device_size']('/dev/block/by-name/boot_b'))
api['bootchain']('check')
api['arm_slot_b']()
api['say']('正在临时启动 OpenWrt(未更改默认设置)/ booting OpenWrt without changing defaults')
api['adb']('reboot')
+25 -66
View File
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
"""MU300 desktop installer. The ZIP's original Magisk deployment is independent."""
import argparse
import base64
from contextlib import contextmanager
import getpass
import hashlib
@@ -330,12 +329,17 @@ class Android:
p=Path(t)/'upload';p.write_bytes(data.encode() if isinstance(data,str) else data)
return self.push(p,name)
def download(self,command,destination,expected_size=None):
helper=package_root()/'desktop/binary_io.py'
spec=importlib.util.spec_from_file_location('desktop_binary_io',helper)
binary=importlib.util.module_from_spec(spec);spec.loader.exec_module(binary)
return binary.pull_binary(self.call,self.shell,command,destination,expected_size)
def read(self,command):
# Some rooted Android builds transform raw su output even through
# exec-out. ASCII transport preserves all boot/GPT/misc bytes.
encoded='set -o pipefail; '+command+' | base64'
cmd='su -c '+shlex.quote(encoded) if self.su else 'sh -c '+shlex.quote(encoded)
return base64.b64decode(b''.join(self.call('exec-out',cmd).split()),validate=True)
with tempfile.TemporaryDirectory() as temp:
local=Path(temp)/'read.bin'
self.download(command,local)
return local.read_bytes()
def run(self,body,effect=None):
if GUI and effect:
@@ -424,8 +428,11 @@ class Android:
for slot in ('a','b'):items[f'{n}_{slot}.img']=f'cat /dev/block/by-name/{n}_{slot}'
for n,cmd in items.items():
print('Backing up / 备份:',n)
path.joinpath(n).write_bytes(self.read(cmd+' 2>/dev/null'))
if not path.joinpath(n).stat().st_size:raise ValueError('Empty backup: '+n)
if n=='misc-head.bin':size=4096
elif n=='gpt-first.bin':size=front*512
elif n=='gpt-last.bin':size=(s['DISK_SIZE']-tail)*512
else:size=int(self.shell('blockdev --getsize64 /dev/block/by-name/'+n.removesuffix('.img')).strip())
self.download(cmd+' 2>/dev/null',path/n,expected_size=size)
first=path.joinpath('gpt-first.bin').read_bytes();last=path.joinpath('gpt-last.bin').read_bytes()
if len(first)!=front*512 or len(last)!=(s['DISK_SIZE']-tail)*512:raise ValueError('Incomplete GPT backup')
table,count,entry=struct.unpack_from('<QII',primary,72)
@@ -553,15 +560,9 @@ def install(args,root,manifest):
a=Android(args);m=module(root)
print('Device / 设备:',a.model,'Android',a.slot,'Linux',a.linux)
if args.boot_openwrt:
for n in ('busybox','android-bootchain.sh','switch.sh'):
a.push(root/'desktop'/n if n=='android-bootchain.sh' else payload_file(root,n),n)
a.shell('chmod 755 '+a.bb)
a.run('"$BB" sh "$P/android-bootchain.sh" check')
header=a.read('dd if=/dev/block/by-name/boot_'+a.linux+' bs=1 skip=44 count=11 2>/dev/null')
if header!=b'loglevel=5\0':raise ValueError('The other slot does not contain a MU300 Linux boot image')
a.run('"$BB" sh "$P/switch.sh" --no-reboot')
return Outcome('success','OpenWrt trial selected; only misc changed / 已选择临时启动 OpenWrt,仅修改 misc。',
'Reboot manually; existing default-boot settings are unchanged / 请手动重启;原默认启动设置保持不变。')
helper=importlib.util.spec_from_file_location('desktop_boot_control',root/'desktop/boot_control.py')
control=importlib.util.module_from_spec(helper);helper.loader.exec_module(control)
return control.boot_installed_mu300(globals(),a,root)
s=a.storage()
if args.tf:
sd=a.shell('if [ -b /dev/block/mmcblk1p1 ]; then echo /dev/block/mmcblk1p1; elif [ -b /dev/block/mmcblk1 ]; then echo /dev/block/mmcblk1; fi').strip()
@@ -778,55 +779,13 @@ def ssh_upload(c,path,destination):
def update(args,root):
import paramiko
c=paramiko.SSHClient()
# Several physical devices share the USB management address. Accept the
# key for this connection without loading or saving a persistent IP pin.
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
host=args.host or input('Device IP / 设备 IP [192.168.77.1]: ').strip() or '192.168.77.1'
c.connect(host,username='root',password=GUI.password if GUI else os.environ.get('MU300_SSH_PASSWORD') or getpass.getpass('SSH root password: '),timeout=15,look_for_keys=False,allow_agent=False)
if GUI:GUI.validate_ssh(c)
try:
info=ssh_exec(c,'''set -e
cat /run/mu300/device
cat /run/mu300/linux-slot
cat /run/mu300/misc-dev
if [ -s /etc/mu300/desktop-mode ]; then cat /etc/mu300/desktop-mode; else
d=$(cat /run/mu300/disk-dev)
case "$d" in /dev/mmcblk[1-9]*) echo sd ;; *) echo legacy ;; esac
fi''').strip().splitlines()
if len(info)!=4 or info[0] not in ('f50','v50','u30air') or info[1] not in ('a','b') or not re.fullmatch(r'/dev/mmcblk\d+p\d+',info[2]):raise ValueError('Not a supported MU300 runtime')
mode=info[3]
if mode not in ('sd','part','data-image'):raise ValueError('Unsupported root layout; use native mu300-update for legacy installations')
family=json.loads((root/'desktop/manifest.json').read_text())['kernel']
running=ssh_exec(c,'uname -r').strip()
if not running.startswith(family+'.'):raise ValueError('Kernel family mismatch: running '+running+', package '+family)
live=ssh_read_exact(c,f'dd if={info[2]} bs=1 skip=2048 count=32',32)
slot='b' if info[1]=='a' else 'a';m=module(root)
newboot=boot(root,m,mode,live,slot);bc=m.boot_control(live,slot)
confirm('Update OpenWrt while preserving settings and disk size; then reboot / 保留配置及容量更新,完成后重启。')
# Stage on the Linux filesystem: sufficient space for a new root + old
# root and upload, without consuming all tmpfs/RAM on a 256 MiB unit.
p='/mnt/mu300-disk/.mu300-desktop-'+secrets.token_hex(6)
ssh_exec(c,'mkdir -m 700 '+p)
def send(local,name):
ssh_upload(c,local,p+'/'+name)
got=ssh_exec(c,'sha256sum '+p+'/'+name).split()[0]
if got!=digest(local):raise ValueError('SSH upload checksum: '+name)
with payload_rootfs(root) as archive:
send(archive,'mu300-openwrt-rootfs.tar.gz')
for name in ('local-update.sh','mu300-update-library.sh'):send(root/'desktop'/name,name)
send(payload_file(root,'busybox'),'busybox')
for name in ('rootfs-critical.sha256','rootfs.requirements'):send(payload_file(root,name),name)
with tempfile.TemporaryDirectory() as t:
for name,data in (('boot-desktop.img',newboot),('misc-linux.bin',bc)):
f=Path(t)/name;f.write_bytes(data);send(f,name)
command='chmod 700 '+p+'/busybox && sh '+p+'/local-update.sh '+p
if GUI:GUI.action('update-commit',lambda:ssh_exec(c,command))
else:ssh_exec(c,command)
finally:c.close()
return Outcome('success','Update verified; device is rebooting / 更新校验完成,设备正在重启。',
'Wait for OpenWrt to start / 等待 OpenWrt 启动。')
# Same implementation as the GUI backend, including older hidden-area roots.
helper=Path(__file__).resolve().parent/'update_control.py'
if not helper.is_file():helper=Path(root)/'desktop/update_control.py'
spec=importlib.util.spec_from_file_location('mu300_update_control',helper)
control=importlib.util.module_from_spec(spec);spec.loader.exec_module(control)
return control.update_mu300(globals(),args,root)
def main(argv=None):
p=argparse.ArgumentParser(description=__doc__)
+10 -2
View File
@@ -45,8 +45,9 @@ MODPATH=$MU300_DEPLOY_ROOT
unset MU300_DEPLOY_ROOT
''',newline='\n')
dest = stage/'desktop'; assets = dest/'files/boot'; assets.mkdir(parents=True)
for n in ('installer.py', 'boot_image.py', 'android-image.sh', 'android-write-part.sh', 'android-write-free.sh', 'android-loop.sh', 'local-update.sh', 'configure.sh', 'PORT-SOURCES.json'):
shutil.copyfile(TOP/'desktop'/n, dest/n)
for n in ('installer.py', 'binary_io.py', 'boot_control.py', 'update_control.py', 'boot_image.py', 'android-image.sh', 'android-write-part.sh', 'android-write-free.sh', 'android-loop.sh', 'local-update.sh', 'configure.sh', 'PORT-SOURCES.json'):
shared={'binary_io.py':'binary_io.py','boot_control.py':'boot_image.py','update_control.py':'mu300_update.py'}
shutil.copyfile(TOP/'installer/backend'/shared[n] if n in shared else TOP/'desktop'/n, dest/n)
# Desktop fixes must apply even when augmenting an older Magisk archive;
# its original scripts stay byte-for-byte unchanged.
shutil.copyfile(TOP/'tools/android-bootchain.sh', dest/'android-bootchain.sh')
@@ -86,6 +87,13 @@ unset MU300_DEPLOY_ROOT
shutil.copyfile(Path(adb_dir)/n,stage/'tools'/n)
if os.environ.get('OPENWRT_GUI_OPTIONAL') != '1':
runpy.run_path(str(TOP/'installer/package_gui.py'))['attach'](stage,exe if exe and Path(exe).is_dir() else None)
# This guide is packaged per firmware; keep the shared GUI sources unchanged.
guide = stage/'START-HERE.md'
login = ('**MU300 / F50 / V50 / U30Air initial login:** username `root`, password `root`. '
'Updates that preserve settings retain your existing password.\n\n'
'**MU300 / F50 / V50 / U30Air 首次登录:**用户名 `root`,默认密码 `root`。'
'保留配置更新继续使用原密码。\n\n')
guide.write_text(login + guide.read_text(encoding='utf-8'), encoding='utf-8', newline='\n')
after={n:sha(stage/layout[n]) for n in before}
if after!=before: raise ValueError('original Magisk payload changed')
relocated={layout[n]:h for n,h in before.items()}
+149
View File
@@ -0,0 +1,149 @@
"""MU300 desktop updates, shared with CLI and older compatible package entries."""
import getpass
import json
import os
from pathlib import Path
import re
import secrets
import struct
import tempfile
LEGACY_LAYOUT_PROBE = '''set -eu
[ / -ef /mnt/mu300-disk/openwrt ] || { echo 'running root is not the MU300 OpenWrt container' >&2; exit 1; }
d=$(readlink -f "$(cat /run/mu300/disk-dev)")
case "$d" in /dev/loop[0-9]*) ;; *) echo 'legacy root is not a loop device' >&2; exit 1 ;; esac
[ -b "$d" ]
n=${d##*/}
id=$(cat /sys/class/block/$n/dev)
awk -v id="$id" '$3 == id && $5 == "/mnt/mu300-disk" {for (i=7;i<=NF;i++) if ($i == "-" && $(i+1) == "ext4") ok=1} END {exit !ok}' /proc/self/mountinfo
backing=$(readlink -f "$(cat /sys/class/block/$n/loop/backing_file)")
[ "$backing" = /dev/mmcblk0 ]
end=0
for p in /sys/class/block/mmcblk0p*; do
[ -r "$p/start" ] || continue
start=$(cat "$p/start"); size=$(cat "$p/size")
case "$start:$size" in *[!0-9:]*|:*|*:) exit 1 ;; esac
next=$((start + size))
[ "$next" -le "$end" ] || end=$next
done
printf 'MU300-LEGACY-LAYOUT-V1\\n%s\\n%s\\n' "$d" "$backing"
cat /sys/class/block/$n/loop/offset /sys/class/block/$n/size /sys/class/block/mmcblk0/size /sys/class/block/$n/loop/sizelimit
printf '%s\\n' "$end"
'''
def legacy_layout(client, root, execute, read_exact):
"""Prove the mounted hidden-area layout using bounded, read-only evidence."""
values = execute(client, LEGACY_LAYOUT_PROBE).strip().splitlines()
if (len(values) != 8 or values[0] != 'MU300-LEGACY-LAYOUT-V1'
or not re.fullmatch(r'/dev/loop[0-9]+', values[1]) or values[2] != '/dev/mmcblk0'
or any(not re.fullmatch(r'[0-9]+', v) for v in values[3:])):
raise ValueError('Cannot verify legacy hidden-area layout / 无法确认旧版隐藏区域布局,已停止更新')
offset, sectors, disk_sectors, limit, partition_end = map(int, values[3:])
if (not offset or offset % 512 or sectors <= 0 or partition_end <= 0
or offset//512 < partition_end or offset//512+sectors > disk_sectors-34
or limit not in (0, sectors*512)):
raise ValueError('Legacy root overlaps GPT partitions or exceeds eMMC bounds / 旧版根区域与分区重叠或超出 eMMC 范围')
# The legacy boot searches the first aligned region after GPT, then its
# saved ROOT_OFFSET. Do not accept a region the packaged boot cannot find.
original = (Path(root)/'desktop/files/boot/original-init').read_text(encoding='utf-8')
defaults = re.findall(r'^ROOT_OFFSET=([0-9]+)\b', original, re.MULTILINE)
offsets = {(partition_end//4096+1)*4096*512, *map(int, defaults)}
if offset not in offsets:
raise ValueError('Packaged legacy boot cannot locate this root offset / 安装包启动逻辑无法定位当前旧版根区域,已停止更新')
superblock = read_exact(client, f'dd if={values[1]} bs=1024 skip=1 count=1 2>/dev/null', 1024)
if (len(superblock) != 1024 or superblock[56:58] != b'\x53\xef'
or superblock[120:136].rstrip(b'\0') != b'mu300root'):
raise ValueError('Legacy root is not a verified mu300root ext4 filesystem / 旧版根区域不是可确认的 mu300root ext4 文件系统')
log_size = struct.unpack_from('<I', superblock, 24)[0]
blocks = struct.unpack_from('<I', superblock, 4)[0]
if struct.unpack_from('<I', superblock, 96)[0] & 0x80:
blocks |= struct.unpack_from('<I', superblock, 336)[0] << 32
capacity = blocks*(1024 << log_size) if log_size <= 6 else 0
if not 0 < capacity <= sectors*512:
raise ValueError('Legacy ext4 capacity exceeds its loop extent / 旧版 ext4 容量超出挂载区域')
return dict(mode='legacy', device=values[1], backing=values[2], offset=offset,
sectors=sectors, disk_sectors=disk_sectors, limit=limit,
partition_end=partition_end, capacity=capacity)
def update_mu300(api, args, root):
"""Reuse native config/vendor migration, locking, swap and verified writes."""
import paramiko
root = Path(root)
gui = api.get('GUI')
execute, read_exact = api['ssh_exec'], api['ssh_read_exact']
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
host = args.host or input('Device IP / 设备 IP [192.168.77.1]: ').strip() or '192.168.77.1'
try:
client.connect(host, username='root', password=gui.password if gui else os.environ.get('MU300_SSH_PASSWORD') or getpass.getpass('SSH root password: '),
timeout=15, look_for_keys=False, allow_agent=False)
if gui:
gui.validate_ssh(client)
info = execute(client, '''set -e
cat /run/mu300/device
cat /run/mu300/linux-slot
cat /run/mu300/misc-dev
if [ -s /etc/mu300/desktop-mode ]; then cat /etc/mu300/desktop-mode; else
d=$(cat /run/mu300/disk-dev)
case "$d" in /dev/mmcblk[1-9]*) echo sd ;; *) echo legacy ;; esac
fi''').strip().splitlines()
if (len(info) != 4 or info[0] not in ('f50', 'v50', 'u30air') or info[1] not in ('a', 'b')
or not re.fullmatch(r'/dev/mmcblk\d+p\d+', info[2])):
raise ValueError('Not a supported MU300 runtime')
mode = info[3]
if mode not in ('sd', 'part', 'data-image', 'legacy'):
raise ValueError('Unsupported root layout / 不支持的根区域布局: '+mode)
layout = legacy_layout(client, root, execute, read_exact) if mode == 'legacy' else None
if layout and gui:
planned = gui.ctx.record['plan']['openwrt_bytes']
if planned != layout['capacity']:
raise ValueError('Legacy root capacity changed since review / 旧版根区域容量与确认计划不一致,请重新检查设备')
gui.ctx.record['update_layout'] = layout
gui.ctx.store.save(gui.ctx.record)
gui.ctx.log(f'Verified legacy eMMC hidden-area root: offset={layout["offset"]}, '
f'capacity={layout["capacity"]}, loop_sectors={layout["sectors"]}; preserving layout', scope='update')
family = json.loads((root/'desktop/manifest.json').read_text(encoding='utf-8'))['kernel']
running = execute(client, 'uname -r').strip()
if not running.startswith(family+'.'):
raise ValueError('Kernel family mismatch: running '+running+', package '+family)
live = read_exact(client, f'dd if={info[2]} bs=1 skip=2048 count=32', 32)
slot = 'b' if info[1] == 'a' else 'a'
module = api['module'](root)
newboot = api['boot'](root, module, mode, live, slot)
control = module.boot_control(live, slot)
api['confirm']('Update OpenWrt while preserving settings and disk size; then reboot / 保留配置及容量更新,完成后重启。')
# Stage on disk, never upload a complete rootfs to the device's tmpfs.
destination = '/mnt/mu300-disk/.mu300-desktop-'+secrets.token_hex(6)
execute(client, 'mkdir -m 700 '+destination)
def send(local, name):
api['ssh_upload'](client, local, destination+'/'+name)
if execute(client, 'sha256sum '+destination+'/'+name).split()[0] != api['digest'](local):
raise ValueError('SSH upload checksum: '+name)
with api['payload_rootfs'](root) as archive:
send(archive, 'mu300-openwrt-rootfs.tar.gz')
for name in ('local-update.sh', 'mu300-update-library.sh'):
send(root/'desktop'/name, name)
send(api['payload_file'](root, 'busybox'), 'busybox')
for name in ('rootfs-critical.sha256', 'rootfs.requirements'):
send(api['payload_file'](root, name), name)
with tempfile.TemporaryDirectory() as temp:
for name, data in (('boot-desktop.img', newboot), ('misc-linux.bin', control)):
path = Path(temp)/name
path.write_bytes(data)
send(path, name)
if layout and legacy_layout(client, root, execute, read_exact) != layout:
raise ValueError('Legacy root layout changed during upload; nothing committed / 上传期间旧版根区域发生变化,未执行更新写入')
command = 'chmod 700 '+destination+'/busybox && sh '+destination+'/local-update.sh '+destination
if gui:
gui.action('update-commit', lambda: execute(client, command))
else:
execute(client, command)
finally:
client.close()
return api['Outcome']('success', 'Update verified; device is rebooting / 更新校验完成,设备正在重启。',
'Wait for OpenWrt to start / 等待 OpenWrt 启动。')
+120
View File
@@ -0,0 +1,120 @@
# 原厂对照与新机型适配清单(2026-10-16)
本清单汇总本次电量、充电、功耗、失去覆盖恢复、通话挂断及热点客户端修复。
“源码覆盖”“编译通过”“已部署”和“用户实际验证”分别记录,不能互相替代。
新机型先确认硬件及原厂行为,再选择公共实现;不要按 SoC 相同整包复制板级策略。
## 先识别机器与原厂基线
1. 保存型号、板号、Android 内核版本、原厂 DT/DTBO、模块哈希、实际启动槽和根分区类型。
2. 多设备共用网关时使用明确的管理地址,并核对设备 profile、eMMC CID、boot 分区映射。
本次 U30 Air 与 F50 同为 192.168.77.1,使用 U30 专属 IPv6 链路地址避免误写。
3. 原厂 boot/vendor/vendor_dlkm 只读提取到电脑分析;不挂载写入 Android/NV,
不重置有效电池保存值,不假设 runtime NV 或校准数据可以清除。
4. 有无电池、屏幕、相机、独立听筒及充电芯片是独立能力。U30 Air 无屏、无相机,
不接入 E5 的 DPU/GPU/相机电源域补丁;无电池 F50/V50 不进入 U30 电池管理。
5. 保存寄存器、库仑计、charger Full、真实电压电流和原厂函数的对应关系。
显示 100% 不代表电气满电,USB 输入电流也不等于电池充电电流。
## 修复索引与适用范围
| 项目 | E5 仓库实现 | MU300 仓库实现 | 新机型要求 |
| --- | --- | --- | --- |
| 电量锁存、开机恢复 | `devices/common/fuel-gauge.py`;state、diagnostics、stock-latches 补丁 | `upstream/patches/0020-power-UMP9620-stock-retained-soc.patch` | 先核对 PMIC 格式、有效位、masked RMW 与等待时间,不把有效旧值按 OCV 重算 |
| 满电/回充 | `charger-stock-policy.patch` 恢复电气判断、平滑及滞回 | 0020 使用 charger Full + 原厂 DT 的 fullbatt-voltage/current | 不加 99% 上限,不因 UI 100% 直接退出管理,不搬其他板电流电压 |
| 电池板隔离 | 按设备 DT 的充电节点及实际驱动选择 | 0019 + `ump9620_has_battery_policy()`;BQ/FGU/PD 首次硬件访问前校验 | UMP9620 vendor 路径要求启用的 charger_policy_service,主、备用地址都覆盖 |
| 空闲省电 | 三机 CPU idle;watchdog/DPU/GPU/camera 补丁按 compatible 及设备配置应用 | `upstream/mu300-mainline.config` 启用 NO_HZ_IDLE/HIGH_RES_TIMERS | 对照原厂配置;HZ=250 不变,不降低看板/业务轮询频率;无屏板不带显示/相机修改 |
| 未满足的自动拨号恢复 | `e5-network-recovery` 订阅 MM D-Bus 与 netifd;检查 PS 附着/注册/RAT | `mu300-network-recovery` 订阅既有 owner 的 EPS 注册变化与 netifd | 手动断网不得复活;仅当前上网槽;不新增串口 owner、不重置射频 |
| 已连接期间的移动性 | Unisoc MM mobility 补丁 + renew helper | 原有 `mu300cell-v6.sh` 的 CGEV/SPPCODATA 与 netlink 更新 | 保留 IP/DNS 原地更新;读不到状态不等于明确脱网,不能直接判定需要重拨 |
| 通话挂不断 | `modemmanager-17-unisoc-stock-hangup.patch`:Unisoc 按原厂 CHLD=7index;错误保持可重试 | 无电话 UI,不搬入电话服务 | 先确认 RIL 的具体命令;不把单通话挂断失败变成挂断全部通话 |
| SIPC 调试类 | 检查对应分支初始化入口 | `sipc.c` 全局 class 只创建一次,驱动注册失败清理 | 不能每个 remote probe 重建同名 class |
| 热点客户端 | `devices/common/wifi-stations.py` + hostapd JSON 回退 | `cfg80211.c`、AP stats scope 补丁 + 同类回退 | AP 按 peer MAC,拒绝未知 MAC;空 dump 成功也回退;未知速率保持空,不编造 433.3 Mbps |
| 网页终端 | rootfs 包含 ttyd / luci-app-ttyd | 同左 | 仅本地管理使用,保留身份认证与现有防火墙,不开放外网端口 |
E5 公共充电修复覆盖 E5/T551M/M8 的构建入口;不表示三台已经完成全部实机验证。
MU 公共恢复逻辑适用于现有 mu300cell 框架;没有把 ModemManager 强行引入 MU300。
具体二进制证据与测试结果见各仓库的日期报告。
## U30 Air 本次增量
- 从本机 Android A 槽 boot 提取的原厂 `5.4.254-android12-9-g9444efdc6885` 配置确认:
`NO_HZ_IDLE=y`、`HIGH_RES_TIMERS=y`、`HZ=250`、PSCI cpuidle/menu。
原 OpenWrt 7.2.8 为 HZ_PERIODIC,空闲时仍有周期 tick。本次改为空闲停表,
不启用 NO_HZ_FULL,不改变全系统挂起策略、充电/OTG/LED 和业务轮询频率。
- 不带 E5 相机、屏幕或其电源域修改。时钟停止只影响空闲 tick,
CPU 有工作时和定时器截止时仍正常唤醒;没有宣称固定百分比的续航提升。
- EPS 注册缓存由现有 nr0/nr3 drainer 更新,只保存槽号、stat、AcT,
不保存号码、短信正文或位置。相同状态/RAT 不重复发事件;owner 重新建立时清除旧缓存。
原有拨号中的 CEREG? 结果也更新缓存,不增加查询。
- 失去覆盖等待结束与“无模块”“双卡射频需重启”“已注册但取不到 IP”分开处理。
仅前者返回专用码 5,netifd 保存 autostart、等待注册事件。
- 仅 stat=1/5 且槽位匹配时恢复可用性;SMS-only、紧急状态及无效 RAT 不触发。
随后的实际注册确认、APN、CGACT、CGCONTRDP、CGDATA 仍走原流程。
- native SIM 运行槽优先于网页下一次启动保存槽;切卡、native RF 尚未 ready 的 freeze、active unknown、
手动 mobile-data down、netifd autostart=false 均阻止自动恢复。
U30 的 freeze 在正常 native 双卡工作时会保留,ready 后不拦截 PDP 恢复,也不解除该射频保护。
- 事件服务空闲阻塞;50 ms 单次定时器只合并事件,非轮询。重复 netifd 事件不自激重拨。
已有正常 watch 和已连接期间的 CGEV/netlink 更新机制保留。
- 本机读取的 CEREG reporting mode 为 2,nr0 已持续上报注册变化;
没有为接入事件通知额外插入 AT 初始化指令。新机型必须核对实际 URC 模式及归属通道。
- 这不是宣称完整复刻厂商 RIL 的全部重试参数、SQC/CAS 电池学习或 JEITA。
有明确原厂证据的路径对齐;外场无信号、完整充放电及续航由用户继续验证。
## 本次状态矩阵
| 设备 | 源码适配 | 本次实机状态 | 仍不能声称完成 |
| --- | --- | --- | --- |
| E5 | 公共 FGU/CM、省电、恢复、电话及热点修复 | 前一轮电量/省电修复已部署;后增的挂断、客户端修复本轮未再部署 | 新挂断的实际通话及完整充放电 |
| T551M | 同一公共入口,保留本机充电和双卡差异 | 完整 stockpower1 内核及配套模块、MM r934、客户端回退已部署 | 新挂断实际通话、长期续航及无覆盖外场 |
| M8 | 同一公共入口,保留共享喇叭等板级策略 | 公共驱动对象编译,本轮未连接/部署 | 本轮全部硬件效果 |
| U30 Air | 电量恢复、battery-policy 隔离、SIPC、热点、省电时钟、注册恢复 | 7.2.8 完整内核及配套模块已部署;WAN、AP、USB、服务和配置检查正常 | 电池完整周期、实际续航、长时间失去覆盖与充电/扩展坞物理插拔 |
| F50/V50 | 公共初始化、热点、注册恢复、空闲时钟适配;不启用 U30 电池路径 | 本轮未刷入;连接 F50 仅只读核对 | TR3000 启动报告的物理复现及新包实测 |
状态按 2026-10-16 本次工作记录,不覆盖此前用户已经完成的其他机型测试。
## 构建与部署规则
1. 公共修复放共享构建入口,板级能力放 profile/DT 判断,避免只热改实机。
2. 同时检查干净构建和缓存源码的补丁应用。对串口、短信、双卡和拨号顺序运行已有回归。
3. 内核、BTF、initramfs 模块、根文件系统模块必须来自同一构建。
uname/vermagic 相同也可能 BTF 不同;只换内核而保留旧模块属于部署错误。
4. 重打内核 LK 包装,不能复用旧 `Image.lk`。保留现有 init、cmdline、
vendor fallback 档案、根分区选择和启动日志区;本次 U30 boot 日志保留区从 48 MiB 开始,
E5 系部署工具的其他机型可不同,不能套用固定偏移。
5. 刷入前核对型号、CID、分区别名、boot_id 和原 boot 头哈希;备份并验证新文件校验值。
原子更新用户态文件,配套全部模块;sync 后正常重启,不硬复位,不改 misc/NV/Android。
6. 不在线重启 U30 的 persistent AT owner 来加载脚本,它会关闭 SIPC 通道。
新脚本随计划内核重启生效。
7. 重启后核对实际内核配置、PSCI idle、initramfs/root 模块哈希、WAN IP、
热点/USB/充电节点、服务日志、BTF/Oops/存储错误。保留可复查部署回执。
8. 本次没有把 eMMC 全局改成禁止休眠,也没有强制 HS200;这两项不能作为通用可靠性补丁。
## 回归命令
MU300:
```sh
python3 -m unittest discover -s tests -p 'test_registration*.py'
python3 -m unittest discover -s tests -p test_cellular_mobility.py
python3 -m unittest discover -s tests -p 'test_u30air*.py'
ucode tests/network_recovery.uc
# 隔离 OpenWrt 容器内,有 ubusd/fs/uci/uloop 模块,不要在正在工作的设备上起第二个 ubusd:
sh tests/network-recovery-runtime.sh
python3 tests/stock_power_driver.py KERNEL_TREE
```
E5:
```sh
python3 openwrt/tests/voice-hangup.py MODEMMANAGER_SRC_DIR
python3 openwrt/tests/wifi-hostapd-clients.py
```
具体脚本参数以各报告及脚本帮助为准。硬件听感、充电器握手、长时间移动恢复、
完整电池周期不能由离线策略测试替代。不要将“源码已修”写为“所有用户故障已确认解决”。
## 详细记录
- [U30 原厂电量、空闲省电与注册恢复](U30AIR-STOCK-CHARGE-20261016.zh-CN.md)
- [U30 上游适配与验证记录](U30AIR-UPSTREAM-20261015.zh-CN.md)
- [V50 板级适配记录](V50-MU3351-20261014.zh-CN.md)
- [Wi-Fi 发送路径分析](WIFI-TX-RETRY-20261015.zh-CN.md)
+24
View File
@@ -0,0 +1,24 @@
# F2FS 缩容检查长时间停留:交互输入和进度修复(2026-10-16)
用户反馈 E5 安装长期显示 `2/6 shrinking userdata (fsck)`,总耗时达到 7337 秒。
该行由安装脚本心跳生成,只证明检查尚未返回,不足以判定检查器仍在扫描。
群友的 fsck 原始日志和进程状态尚未取得,因此不能认定本次故障只有一种原因。
静态检查发现:两次缩容 fsck 都继承控制台输入,但输出重定向到文件。
f2fs-tools 1.16.0 即使启用 -f/-y,仍可能询问是否导出孤立节点到当前目录的 lost_found。
此时询问不在屏幕上,检查器可能一直等待输入。普通启动修复已有对应处理,缩容路径遗漏。
本次修改:
- 缩容前检查和缩容后复查均使用独立输入文件,只提供一次 n,拒绝可选目录导出。
- 随后是 EOF;不使用 yes 无限回答,也不扩大允许继续安装的 fsck 返回码。
- E5 前置检查失败会明确失败并停止,不再按正常启动返回而隐藏检查失败。
- 进度附带 fsck PID、进程状态、等待点、累计磁盘读写量及最后一行检查输出;不伪造完成百分比。
- 不添加强制终止检查或自动重启的超时,避免中断仍在进行的元数据写入。
- 保持先检查/缩容文件系统,后修改 GPT 的顺序。未更改加密 userdata 的两阶段重置流程。
- E5 公共路径适用于 E5、T551M、M8;MU300 桌面安装对应的 F2FS 路径同步处理,ext4 路径不变。
验证:E5 安装回归 10 项、既有恢复回归 8 项通过;新增 MU300 检查器输入边界回归通过。
模拟包括孤立节点询问、第二次意外询问、返回码失败不进入 resize/GPT,以及真实心跳显示模拟 D 状态和读写量。
未在群友的实际故障设备复现;若设备仍为 D 状态或有 mmc/I/O 错误,需继续分析存储问题。
本次仅修改源码,既有安装包和已经运行的 initramfs 不会自动获得修复。
+113
View File
@@ -0,0 +1,113 @@
# 2026-10-16:U30 Air 原厂电量、空闲省电及注册事件恢复
## 修复
- `0019-power-UMP9620-battery-board-isolation.patch`:vendor BQ、UMP9620 FGU
在首次硬件操作前要求原厂启用的 `/charger_policy_service`。
同一条件用于 UMP9620 PD 入口,覆盖主、备用 I²C 地址。
无电池 F50/V50 不进入 U30 Air 的电池管理路径。
- `0020-power-UMP9620-stock-retained-soc.patch`:合法原厂格式保存值直接恢复,
删除低电流下“旧格式歧义”猜测;锁存寄存器恢复原厂 masked RMW,
保留关机前读取实际库仑计并保存。
- 满电校准移除任意 OCV 70% 条件,使用真实 charger Full 和原厂 battery 节点的
`fullbatt-voltage/current`。连接 U30 Air 对应 4.2 V、120 mA。
本轮不修改充电器电压、电流限制。
- SIPC 全局调试类改为模块初始化一次创建,避免多个 IPC 子设备重复创建同名节点、
覆盖原指针。补驱动注册失败清理。
- 看板空列表增加 hostapd JSON 回退,仅统计已关联 MAC;
AP 不再用 STA/整接口指标冒充客户端数据,未知速率保持为空。
## 原厂依据
从已连接 U30 Air 的 Android A 槽只读提取模块,在电脑离线分析:
| 模块 | SHA-256 |
| --- | --- |
| sc27xx_fuel_gauge.ko | b677aef2019ac95da686bbf80ce72f2a3f12f22bc5a151e9f6bd187f1e13f074 |
| sqc_bq2560x.ko | ce42c87c42f9ed7e5b5aba8277d4245c03c2c41a569e8ca24d749f07bc3a0efc |
| charger_policy_service.ko | 808b23dce5aee9886df868cd796c8382105b9d99cc80bd2240f8a93fc7b2ac1e |
原厂版本 `5.4.254-android12-9-g9444efdc6885`。
FGU probe `0x1bd0` 为低字节整数百分比、高 nibble 小数;
`save_last_cap 0x4ba4` 使用 masked RMW、200 μs 级等待。原厂模块不进入安装包。
合法保存值如 `580/0x244`(原厂格式 68.2%)不应被当成旧格式并在静置时重算。
现仅无效保存值走 OCV,没有强制校准、99% 上限或重设电池数据。
未声称完整复刻 SQC/CAS、老化学习及全部 JEITA 策略。
## F50/TR3000 报告
原 0016 仅保护 0x1a 备用地址,主地址有响应时仍可能初始化电池路径;
FGU/PD 也缺少统一入口,这是已确认源码问题。
连接 F50 的充电器当前未绑定,但 FGU 暴露虚假电池状态。
本轮 F50 只读检查,未刷入,也未在 TR3000 上复现。
不能把全部启动失败都认定由此造成,也不能认定只是电源问题。
## 验证与部署
- 6.18.54、7.2.8 的 BQ/FGU/PD 对象编译通过;
7.2.8 完整 Image、BTF 配套根模块及 initramfs 模块已编译、部署。
- `python3 tests/stock_power_driver.py KERNEL_TREE`:4096 电量编码、
合法值不迁移、电气边界、I/O 错误和无电池入口测试通过。
- `test_u30air_pd.py` 3 项、`test_u30air_integration.py` 8 项、
`test_power_supply.py` 6 项、`test_fgu_shutdown.py`、
`test_sipc_debug_once.py` 通过。
- U30 Air 已启动,蜂窝 IP、热点、USB 管理正常;
SIPC 重复注册告警消失,未见 BTF 或存储异常。
- hostapd 回退已热部署,在实际 ucode 上验证 JSON 和空 dump 分支。
操作检查 `mu300-device=u30air` 和 eMMC 身份,通过独立 IPv6 管理地址连接,
避免两台机器共用 192.168.77.1 时误写 F50。
## 增量:原厂空闲时钟与失去覆盖恢复
再次只读提取本机 Android A 槽 boot,确认原厂启用 NO_HZ_IDLE、
HIGH_RES_TIMERS、HZ=250、PSCI idle/menu。原 OpenWrt 7.2.8 却是 HZ_PERIODIC,
本次在公共配置恢复空闲停表,保留 HZ=250 和业务轮询频率。
这是有原厂依据的时钟配置对齐,不是新增整机休眠,不包含相机、显示电源域修改。
原厂 boot SHA-256:
`e952f155ad9999f9791cbf0098c5ebb8ba2b95d515adf58c383169fdec99c530`;
提取配置 SHA-256:
`c5983d710b35a013d2a0ee63364719e168bbccc3c5520849d959d8b0f220f087`。
原厂 F50 B09 配置也启用了同类 idle tick 策略,因此放在 MU 公共内核配置,
没有给无电池板加入 U30 的充电逻辑。
公共 `mu300-network-recovery` 利用现有 AT owner 的 CEREG 变化,
在当前上网槽恢复 EPS 注册后通知 netifd,继续之前未完成的自动拨号。
新增服务空闲阻塞,不新增串口或 AT 查询;不会插入第二次 SFUN,
不改 APN、CGACT、CGCONTRDP、CGDATA 及预拨号回放顺序。
首次等待无覆盖使用专用退出码 5,区别于无模块、射频需重启和取 IP 失败。
本机原有 CEREG mode=2,已在 nr0 发注册 URC,本次不增加初始化 AT。
U30 的 `mu300-radio-freeze` 在 native 双卡正常工作时也会保留,
用于禁止旧 SFUN 初始化;不能仅凭该文件阻止 PDP 恢复。
新实现要求 native radio-ready,保留切卡和 active-unknown 保护,
尊重手动断网、autostart=false,且只处理当前实际卡槽。
验证:7 项解析/卡槽与 protocol 分支测试、30 项实际 ucode 策略检查、
真实 ubusd/uloop 订阅与退出测试通过;原有移动性 15 项、U30 integration 8 项、
PD 3 项回归通过。7.2.8 完整 Image、26 个 initramfs 模块记录、
根模块树 213 个文件配套重编译,正常重启后确认:
- 实际配置 NO_HZ_IDLE/HIGH_RES_TIMERS 生效,HZ 仍为 250;
- PSCI governor 从 ladder 变为 menu,WFI/core-sleep-lit/cluster-pd 可用;
- 注册缓存由 owner 正常产生,服务运行,WAN 自动取得 IPv4;
- hostapd AP-ENABLED,5 GHz/80 MHz 热点、USB 管理及根分区读写正常;
- 无新的 BTF、Oops、SIPC class 重复注册和存储错误;
- 原 init、cmdline、vendor fallback、48 MiB 后启动日志区和 misc 均保留。
本轮仅对 U30 Air 部署,未刷 F50/V50。备份目录:
`/root/update-backups/stock-power-20261016-184201`。
部署回执保存在工作区 `work/u30air-nohz-recovery-20261016/`。
没有把短时运行检查解释为长时间续航提升或外场无覆盖测试已完成。
后续新机型请使用 [原厂对照与适配清单](NEW-DEVICE-STOCK-ADAPTATION.zh-CN.md)。
收尾:6.18.54 也完成完整 Image 和全部配套模块构建,NO_HZ_IDLE、
HIGH_RES_TIMERS 和 HZ=250 均从最终配置核验;两个版本 Image/config 校验通过。
静态脚本 11 项、SIPC 与 FGU shutdown 回归通过。
静态主题测试同步兼容已有的 apk_retry 包装,保留主题必须内置的检查。
U30 恢复服务实际 RSS 约 1.4 MiB、单线程,空闲阻塞在 epoll。
本次未生成发行安装包,未把 6.18 内核刷到正在使用 7.2.8 的 U30。
未修改 NV、Android A 槽、网络配置或灯控制。
实际充放电、弱电源启动及 PD 扩展坞插拔留给用户验证。
+9 -4
View File
@@ -61,21 +61,26 @@ OpenWrt 把 NET1/NET2 适配为 SIM1/SIM2 注册状态,LTE 蓝、NR 白、无
Wi-Fi 5 GHz 白、2.4 GHz 蓝。注册变化从现有持久 AT URC 读者传递,
Wi-Fi 使用 ubus 事件,闪烁使用内核 LED timer,不增加常驻 AT 轮询或用户态闪烁线程。
## Android 二进制传输修复
## Android 二进制传输修复(2026-10-14 历史记录)
实机 `adb exec-out` 的 `su` 输出仍发生 LF → CRLF 转换:
296523 字节 DTB 读成 296768 字节,按 DTB 头长度截断无法修复。
安装器改成设备端 base64 编码、电脑严格解码,并启用 pipefail,
当时安装器改成设备端 base64 编码、电脑严格解码,并启用 pipefail,
避免源命令失败被编码器掩盖。覆盖 GPT、misc、boot 的读取和备份。
新传输实机 DTB 长度准确,SHA256 为
`cb078f2cea210bca36a2976dca99eb59c86afdc39ee116f59d608a81b9839870`。
新增 `--probe --serial SERIAL`:只读检查型号、加密、容量、A/B 元数据、DTB,
不创建 Android 暂存目录或写分区。新版冻结 EXE 在本机预检通过:
该历史版本新增 `--probe --serial SERIAL`:只读检查型号、加密、容量、A/B 元数据、DTB,
不创建 Android 暂存目录或写分区。当时的冻结 EXE 在本机预检通过:
`v50`、Android A 槽、FBE、userdata 剩余约 18.92 GiB。
新版 bootchain 的只读实机检查也通过:`BOOTCHAIN-PLAN a b`,五个启动链分区两槽一致,
本机这次不需要同步差异分区。
2026-10-16 更新:上面的 Base64 方案已移除。当前二进制读取在 `/data/local/tmp/`
创建私有临时目录,通过 `adb pull` 拉取并核对大小及 SHA-256;探测只写普通临时文件,
不写设备分区。GUI 已接管兼容入口的读取和备份,复用电脑上已校验的备份,避免第二次整分区备份。
上面的实机 DTB 数据属于历史方案验证;本次替换通过模拟传输及实际打包程序检查,未重新进行实机验证。
桌面补充目录携带新版 bootchain,安装及切换均使用它;
TF 私有载荷校验清单相应更新,原 ZIP 的 Magisk 文件不被修改。
+20 -4
View File
@@ -6,9 +6,11 @@
安装前备份重要文件,确认安装包适用于你的机型,并保持设备稳定供电。在 Android 中开启 USB 调试,允许这台电脑调试,并准备好 Magisk/root。
Apple Silicon Mac(M1 及更新芯片)完整解压后,打开根目录的 **OpenWrt-Installer.app**。无需另装 Python、ADB 或 Rosetta;请将 app 与 tools、payload 等目录放在一起,不要单独拖入“应用程序”。如果系统将 app 隔离运行、要求选择安装包,请选择包含 payload 与 desktop 的解压根目录。此版本采用临时签名,未做 Apple 公证;首次启动若被系统拦截,可在“系统设置 → 隐私与安全性”中核对来源并允许打开。
只有无线 ADB 时,先将电脑连接到设备所在网络,展开设备选择区的“无线 ADB 连接”,填写 `192.168.0.1` 并点击“连接”。地址或端口不同请填写实际值,例如 `192.168.0.1:5555`。设备需已开启无线 ADB;Android 要求配对时,先按设备提示完成配对。
Linux、Intel Mac 或需要命令行操作时,可使用 **OpenWrt-Installer.py**,需另行安装 Python 和依赖。使用 Magisk 安装时,直接选择完整 ZIP;这会部署到 TF 卡并清空选定目标,请先备份卡内数据。
也可手动运行 `adb connect 192.168.0.1`。Windows 可在安装包目录打开 PowerShell,运行 `.\tools\adb.exe connect 192.168.0.1`。
Linux、macOS 或需要命令行操作时,可使用 **OpenWrt-Installer.py**,需另行安装 Python 和依赖。使用 Magisk 安装时,直接选择完整 ZIP;这会部署到 TF 卡并清空选定目标,请先备份卡内数据。
### 选择用途
@@ -76,6 +78,8 @@ Linux、Intel Mac 或需要命令行操作时,可使用 **OpenWrt-Installer.py
看到完成页面后,按显示的管理地址访问设备,检查服务并修改管理员与无线密码。E5/M8/T551M 默认地址为 `http://192.168.9.1`,MU300/F50/V50/U30Air 为 `http://192.168.77.1`;修改过地址时使用实际值。保留安装记录和备份,以便后续恢复。
**全新安装的管理页面和 SSH 登录用户名为 `root`,默认密码为 `root`。** 登录后请修改密码。更新会保留原密码;之前改过密码的设备,请使用当前密码。
### 连接与常见问题
#### 第一次使用,从哪里开始?
@@ -86,6 +90,10 @@ Linux、Intel Mac 或需要命令行操作时,可使用 **OpenWrt-Installer.py
确认 USB 线支持数据传输,Android 已开启 USB 调试,然后点击“刷新设备”。仍无设备时,尝试更换线缆或 USB 口,并在 Windows 设备管理器中检查 USB 驱动。多台设备会显示在设备列表中,请核对型号和序列号末四位后选择。
只有无线 ADB 时,展开“无线 ADB 连接”,填写地址并连接。未授权时请在设备上允许调试;离线时检查设备调试状态后刷新。多台设备连接时,列表会显示无线设备的地址,请选准目标。
要断开某台无线设备,先在列表中选择它,再点击“断开所选无线设备”。USB 设备不能用此按钮断开;任务执行中需要先暂停。重置 Android 后等待重连时,也可在当前页面重新连接原设备的无线 ADB。
#### 显示“等待调试授权”或“离线”?
解锁 Android,允许“USB 调试”请求。没有弹窗时,确认 USB 调试已开启,再重新插拔数据线并刷新。设备正在重启时先等待开机;已有安装任务时保留原记录。
@@ -108,9 +116,11 @@ Extract the complete package and run **OpenWrt-Installer.exe** at its root. Keep
Back up important files, check that the package matches your model and keep the device powered. Enable USB debugging in Android, authorize this computer and have Magisk/root ready.
On Apple Silicon Macs (M1 or newer), extract everything and open **OpenWrt-Installer.app** at the package root. Python, ADB and Rosetta are not required. Keep the app beside tools, payload and desktop; do not move it into Applications alone. If macOS translocates the app and a folder picker appears, select the extracted package root containing payload and desktop. This build is ad-hoc signed and not Apple-notarized. If macOS blocks the first launch, review the source and allow opening in System Settings → Privacy & Security.
For wireless ADB only, connect the computer to the device’s network, expand Wireless ADB connection, enter `192.168.0.1` and select Connect. Use the actual address and port if different, for example `192.168.0.1:5555`. Wireless ADB must already be enabled. If Android requires pairing, complete it on the device first.
For Linux, Intel Macs or command-line use, run **OpenWrt-Installer.py** with Python and its dependencies installed. To install through Magisk, select the complete ZIP. This installs to the TF card and erases the selected target, so back up the card first.
Alternatively, manually run `adb connect 192.168.0.1`. On Windows, open PowerShell in the package folder and run `.\tools\adb.exe connect 192.168.0.1`.
For Linux, macOS or command-line use, run **OpenWrt-Installer.py** with Python and its dependencies installed. To install through Magisk, select the complete ZIP. This installs to the TF card and erases the selected target, so back up the card first.
### Choose your purpose
@@ -172,6 +182,8 @@ When asked to restart manually, use the device’s normal restart control. Do no
After completion, open the management address shown, check services and change administrator and wireless passwords. Default addresses are `http://192.168.9.1` for E5/M8/T551M and `http://192.168.77.1` for MU300/F50/V50/U30Air. Use the actual address if changed. Keep the installation record and backups for recovery.
**A fresh installation uses username `root` and default password `root` for the management page and SSH.** Change the password after signing in. Updates preserve the existing password; use the current password if it has been changed.
### Connection and troubleshooting
#### Where should a beginner start?
@@ -182,6 +194,10 @@ Extract the complete package and open the root EXE. Read Getting started, then c
Use a data-capable USB cable, enable Android USB debugging and select Refresh devices. If the list stays empty, try another cable or USB port and check the USB driver in Windows Device Manager. With multiple devices, check the model and last four serial characters before selecting one.
For wireless ADB only, expand Wireless ADB connection, enter the address and connect. Allow debugging on the device if it is unauthorized; check debugging and refresh if offline. When several devices are connected, use the addresses shown in the list to select the intended wireless device.
To disconnect one wireless device, select it in the list and choose Disconnect selected wireless device. This button cannot disconnect USB devices. Pause an active task first. While waiting for Android after a reset, the current page also lets you reconnect the original device’s wireless ADB.
#### Awaiting debugging authorization, or offline?
Unlock Android and allow the USB debugging request. If no prompt appears, confirm debugging is enabled, reconnect the cable and refresh. Wait for startup if the device is restarting. Keep the original record for an installation already in progress.
+3 -1
View File
@@ -4,7 +4,9 @@ The canonical implementation is `e5-linux/installer`. `sync.py <mu300-repository
Protocol 1: one JSON object per line on stdin/stdout. A request is `{"protocol":1,"id":1,"command":"hello","params":{}}`. Responses contain the same `id`, `type:"response"` and `data:{ok,result}` or `{ok:false,error}`. Events use `type:"transaction"`, `"transfer"`, `"log"`. No terminal-text matching. Legacy stdout/stderr becomes sanitized diagnostic log events, independently of named state/effect callbacks.
Commands are allowlisted in both Rust and Python: hello, snapshot, list, package, devices, probe, probe_update, plan, start, resume, retry, cancel, can_close, export, import, diagnostics, verify_openwrt. There is no shell/exec command. A frontend-selected serial is checked against an actual device. All ADB operations use that serial; eMMC CID and profile are rechecked after reset. SSH maintenance binds the key fingerprint between planning and execution; final verification binds the hardware CID. A plan cannot become executable without `confirmed:true` on its persisted transaction ID.
Commands are allowlisted in both Rust and Python: hello, snapshot, list, package, devices, adb_connect, adb_disconnect, probe, probe_update, plan, start, resume, retry, cancel, can_close, export, import, diagnostics, verify_openwrt. There is no shell/exec command. A frontend-selected serial is checked against an actual device. All device ADB operations use that serial; eMMC CID and profile are rechecked after reset. SSH maintenance binds the key fingerprint between planning and execution; final verification binds the hardware CID. A plan cannot become executable without `confirmed:true` on its persisted transaction ID.
`adb_connect` accepts one validated `address` (IPv4, hostname or bracketed IPv6, optional port defaulting to 5555). It invokes only the host ADB connect service, then enumerates devices; readiness comes from that list, never connect-output text. The result contains `endpoint`, `state` and `devices` (with a `wireless` flag). No package verification is needed. During an installation, connection is allowed only at safe Android setup/authorization waits and cannot rebind the transaction. `adb_disconnect` requires an exact observed wireless `serial`, returns the remaining devices, and is rejected while a worker is active. It also acquires the shared serial device mutex, so another installer cannot disconnect a transport in use. It cannot disconnect USB devices or all devices. Neither command enables debugging, runs a device shell, pairs Android, restarts ADB or changes network adapters/routes.
`verify_openwrt` accepts only the active transaction ID, a management host and in-memory SSH password during safe `openwrt_boot` waiting. It queues an endpoint change/boot acknowledgement for the existing worker and wakes its retry loop; it cannot mark a transaction completed or execute an installation. The worker persists the endpoint and boot acknowledgement, never the password. Details include `reboot_manually`, `boot_confirmed`, `host` and optional `verification_error`. Manual paths wait for user action; automatic reboot paths identify that request. Wrong CID and SSH authentication/connection errors remain editable waits. Actual filesystem-capacity failure remains a failure and cannot be bypassed with confirmation.
+2
View File
@@ -41,6 +41,8 @@ For the complete browser regression suite, install development-only Playwright (
## Desktop layout, feedback and motion
MU300 updates use `backend/mu300_update.py`; packaging generates the compatible CLI helper `desktop/update_control.py` from the same file. The adapter calls the shared implementation even when an older package's Python entry rejects `legacy`. Hidden-area support requires the live OpenWrt container, ext4 label/capacity and loop backing/offset/extent to agree with eMMC/GPT bounds and the packaged boot's existing discovery logic. Checks run before uploads and immediately before commit. The native upgrade lock, config/account/vendor migration, disk staging, rollback and readback checks remain in the packaged updater. Unknown layouts stop; no GPT edit, resize or format is introduced by this compatibility path.
The window has a fixed viewport: header, sidebar, primary actions and footer stay visible. Purpose lists, recovery records, installation content and expanded logs have independent scroll areas. The package extraction reminder and transaction-folder shortcut stay at the bottom of the sidebar. Recovery controls remain compact at the minimum 800×650 window size, including when the log is open.
Device enumeration is independent of payload verification: the install/advanced/one-time-boot views refresh once on entry, and Refresh devices remains available with an empty list or before verification. Device inspection and installation still require a verified package. Every refresh clears the old inspection so stale root/readiness cannot authorize a later action. Empty responses and enumeration failures clear stale selection; multiple-device responses retain only an explicitly selected device that is still present.
+123 -47
View File
@@ -5,55 +5,55 @@
".gitignore": "a5773f83330fc9adddfd159fe0391bccffbf7663dccb2b873f6b2d1b2d2eca11",
"backend_entry.py": "238a3534a790ce46ae396040623117299f78b9fc9fc89fe152bfdd5788f7b664",
"build.py": "e3adff7e7c6a20e19ed541a4fc22589ba65306cd70dae2b4afde582e8c55a976",
"GUIDE.md": "52d4c6526353b45d68b5f4a3072e82ab139978eaa8f3a6129a004037b3c14176",
"GUIDE.md": "89997f6fdbe1076d69f5254fdf128ca9660a6ab3cb9903687cdccf6b421b0fee",
"package_gui.py": "76435dcfd5c6386f39735b74e8c1dd541dbfdf4da391d02636c4482cc1b6d715",
"platform-tools.json": "d8fcf938e150bc314b5e6b2660c540976bb12ea6108fa75a8fb183115ebbd01e",
"PROTOCOL.md": "542b7909ffbcc9aa6c3ca5acffdbf8137f5a64487d52ba3997514d8cb5cbd2cc",
"README.md": "d047f2a46c9cc0f967e8065fd0d1397f91152909907ee1f58a349ef9b90a1e40",
"release.py": "c1432d3b4e48e094d79753d6be3f432d9e05744abfa816bd4d6e1a04d06b6432",
"PROTOCOL.md": "79e6101aa02d7f3c2d6326958b4f8cca0d94714f51c58db69ad96b11c703c528",
"README.md": "663a3fc6ef16fcd6f91d85b8fcbe6c1072958cde64ec12c0bfd4abb30a827eda",
"release.py": "65cb2d912005b203af196c0465debc471b3cc385a3bdaa045a4e6e5b31eaa80b",
"requirements-build.txt": "762ee573a22c790eb3c5ccba4616632373d947dc88eb91fc85f3c678ac7b2259",
"sync.py": "8a6160a68cadbb3295303505c94d6cb5a8229c9ccb2d652408660b1711fccfdf",
"VERIFICATION.md": "ec52d3d0c0673ddf031d79a293e4f277f94b03f04dbd44a042b826a1f566044c",
"backend/adapter.py": "a286a92894b9aa800a9671fb94caf37997a2a0207da0542a484c209f27b4cf77",
"backend/diagnostics.py": "9660b22d3bf9be229ce16d6dafd7c26c8180abe5b7e2b00bbb32bec7ce9bb1f5",
"sync.py": "978d022cc59ec653b64f58d1feec59b8a07dd37aa354324d99e78b5e6fe3522c",
"VERIFICATION.md": "c886d22e6e398b167dc42f22ffd9c7c3483db4bafac5ba1380bb0579acde4f55",
"backend/adapter.py": "5f044688f4611370081cef78ec73d886dbdd19cd67512d2e4b5a720cf68b64b4",
"backend/diagnostics.py": "529a7e2ac8d173c51a27ed825586263e9c0808f003c7ab1b36ca27e647e663df",
"backend/gpt.py": "4eca5ccf458ef86b9dfcea6388da61defe61af6389565cadf2fda6616e28b791",
"backend/helpers.py": "ac5422e60bcdd0273baa5d5796d64aa5b1e0687a709afc5bdf9c8501a7154d36",
"backend/package.py": "5c55e91f2c348ac957d7803810e6396edf3aae573da401ecf46e773ac75e70ee",
"backend/service.py": "b80c9bc9a92e2b5ef2fc9fa810be01c65873c76e986bc879d6cb7aa9d12ba7a4",
"backend/service.py": "01009eab009a3d46160a12859829098fb7dc03174767438a23be9b9d1fcf85f6",
"backend/state.py": "bc17eac46b099524b2f2ad687d9fd6fcd3d867929487ef4a80d528992d6b3d48",
"backend/transport.py": "b022c4b6c2bc63090ebc2bf64ce6f3720a71cc90c95cfd5fa81836c156d956ba",
"backend/transport.py": "2986b9da8ac8c72cfbcca0e628b82cb6bc7625ea50abaaf977d6937492762109",
"backend/__init__.py": "4227d63763e764fd2de7fc2bc13e474ae5de33176fb57aa0fd51cbb4ad80b88c",
"screenshots/author-sidebar-zh.png": "c1e4aefe0c6676e5c34228ed3633d375cc940ff6489eb414f1b5c0e41192c11f",
"screenshots/automatic-restart-log-en.png": "bb0fefb84e70c02473b7ecf4433b9bd61760c180bca24aeee2383da9d28e651c",
"screenshots/backup-progress-debug-zh.png": "f2653249edfee89403812cf741dd52ac1c900e3155c8f183e431aced116d9fc1",
"screenshots/complete-dark-en.png": "0b67f30e2a2cc5e55a4fac3fc5087edf29af0a1bb203084ac5eab3810b081ff9",
"screenshots/failure-copy-diagnostics-zh.png": "3b67dc78efaed2fd38e2c9f8a65f2a47b91ebca9227cc4173bceec34c17b16e0",
"screenshots/firmware-convert-debug-zh.png": "bc286a505a33d477033c148cbbe413b02f4352c70bf83222efab60f7136b29da",
"screenshots/help-recovery-light-zh.png": "68dbb2b5486145ed58998c43e4ae95dc08b65671abed714770f6721900f4f4f3",
"screenshots/automatic-restart-log-en.png": "e4642fe70b43556fae378e7b11f38b6ec4ebc97d36ce92692c3ef4f4aaf74716",
"screenshots/backup-progress-debug-zh.png": "147911e2406e6ce18967372bf1712f712d291b11946378c2bf96a4496c4a8ad0",
"screenshots/complete-dark-en.png": "e89537309f552f7ee03ded3b3c9489bc6b9f64bd8b786a978a6bebf40c5ada31",
"screenshots/failure-copy-diagnostics-zh.png": "bc0d7ea1a1eb6b83cbbba2b429f142546595d68e3d20ef8e3d48dacb43a2c624",
"screenshots/firmware-convert-debug-zh.png": "fd24ed122403f0f95ecb916b1cbee461f60d3259dbb557495dd3c629e4ac302e",
"screenshots/help-recovery-light-zh.png": "6a68454cf45953f46defb1ec527e0263a385dae4cde320e51c9b468ce0c35f0b",
"screenshots/help-small-dark-en.png": "b5041781331d04c036be44f956efcc36d8bc2757022d270486f78247f5dedd42",
"screenshots/home-light-zh.png": "ab65bda3e997c4698abc81678718d0f1e513d4cc456c54efdd39a3bebe4f8138",
"screenshots/install-activity-debug-zh.png": "de2721e5d34e66bf47af67cc76bd63f0b7f21fce42d518b65148ccbc20e5ff12",
"screenshots/install-small-light-zh.png": "9c088b24f9062b7afef64c3a4a6884add25592d0a46f6db9e5ac40daf1edb0b2",
"screenshots/manual-restart-log-zh.png": "a0e18e1be24079ba03da42a5534bc27c849be001831f721585b10e590620bd92",
"screenshots/install-activity-debug-zh.png": "f208a8389d3a443ebbf37f680d8f793d743863d41b5c5f56f748401b54196329",
"screenshots/install-small-light-zh.png": "224630bc28cf0f8d0bdf8d9e27274017214f3c865393e3ce40660fb34f3d6d5f",
"screenshots/manual-restart-log-zh.png": "afb6c7605b1af04c548fb0fa37f94809d62171792fbbd83a4f12c9754ff312d9",
"screenshots/native-home.png": "7b6709a73d05acccba0e199fe31fb0b862e555a5dd18f12ec94584fc80aaddc7",
"screenshots/native-mu300-home.png": "48ca20b2732f9a3d9522512ddd6121fc5eac4943d2cd928d7a21f0ba7c82a3a3",
"screenshots/native-support.png": "112d5086a0274a4a185e742338128b4721168eb74c12eafab24852e6be763e1a",
"screenshots/no-device-refresh-light-zh.png": "d8fc555f38c1b88c777bc405e65f959d6e152fb66380f93342286cde78c76135",
"screenshots/onboarding-light-zh.png": "f52022eb357ee8f2b494dad993545c61ec3a9a68d65a6eff83bda9af1add2194",
"screenshots/onboarding-small-dark-en.png": "0f6b877e0504ea92397b0073dd3d0205056bdf98238d9b6bb0c4a3da592d1aa7",
"screenshots/openwrt-endpoint-mismatch-zh.png": "6b8d5fdaf20a2191e1ca4f316b5af9616fcff46fbf8c6074b855b7a27884ebb2",
"screenshots/onboarding-light-zh.png": "771d792b76cbf658e774f0c562b5d437ce5974a3845f02bba5898bc0931ed208",
"screenshots/onboarding-small-dark-en.png": "2706caadd669d5d1bd049b85b5906589e7a5f7e4a31a157c4d746fe13eadc71c",
"screenshots/openwrt-endpoint-mismatch-zh.png": "07a4489b4ba469650c2a179f33e1b29ff38a7c77db01a776da952aaf123d3f8b",
"screenshots/plan-light-zh.png": "af27983a24c5098052a3ba61ab107bd3a03cc7eb83a290de1d26b38dd78fd4ae",
"screenshots/plan-small-dark-en.png": "46445c164d1bce9748bbef405381b4fcd4b4792bebe10630393931a4b5097320",
"screenshots/plan-small-dark-en.png": "0e41a92614671dc7b8cccdbca0caf115a0aa4ad96bec2688ec0c38cf101fb6f5",
"screenshots/reinstall-no-card-plan-zh.png": "22a4271252b3d849ef64c4f050f34e6ad8fce5d893fadad009cd63d2403e2121",
"screenshots/resume-small-light-zh.png": "e34f32331347b88b759c2de1ed9fb62233b37b7834c1aa1d65e6b8efbc891b9e",
"screenshots/resume-small-light-zh.png": "f5fbae90234684d8114c94aaaf739b25cc625a02199b59bbc56d1d0b8027527a",
"screenshots/support-first-launch-zh.png": "a10da09083fd1a430427d11206ad94780b8e5c5187ddc6f54e34eeaf6bc8efac",
"screenshots/support-offline-dark-en.png": "3fbb1c15f1848e5f638ef51b9c2fca1f1b82f7955f3f1cd81f8c26ce384db868",
"screenshots/update-complete-clock-en.png": "10158e8e766a7d866bd3002d3277ae9df3ca83d5a1cecd6decfe15cde89599a5",
"screenshots/update-reboot-zh.png": "8287b75a57c71c25b9c550abd0692ec7716081ef635b06c2db652b7ca19ea7a2",
"screenshots/update-reconnecting-zh.png": "c8516e19f9fa65744b7968697a762342d4d5efeb227aceeb952e2cb15a15249a",
"screenshots/wait-root-dark-en.png": "84de205d53e92ed610333f31fb1289f7c5e37441b008e4872626dd41a4e7d479",
"screenshots/wait-setup-light-zh.png": "60988a52fce638892c4be36ae2ef84894a58ec80dbbe4e3dc210693d611f84bc",
"tests/diagnostics_smoke.py": "696ae478e24f4e227e334201812bf3c403a596028d8c04b16a26c2069a222893",
"screenshots/support-offline-dark-en.png": "0c50fbd450f322b50823d4c73b59efa82384c1208a3a6656f4b2f269785889f7",
"screenshots/update-complete-clock-en.png": "b936ffa7723b4cb7a020a277129bce5ac996ec494a066d16facc0f6916bc867c",
"screenshots/update-reboot-zh.png": "5e9500fcba8b45acd0773c6688c2786dd8d2740c86d2c17a6bd36f5bda0dc482",
"screenshots/update-reconnecting-zh.png": "f6af22f7e4089a4e3ef92dc468c1383779946b13a3e42280f80fea2fd841bc96",
"screenshots/wait-root-dark-en.png": "cebd77f8386432979c98e69c13e7c5f4761f50c45df2f7763f1bd8e8b9881e79",
"screenshots/wait-setup-light-zh.png": "d160aab38ce3fbcd4db8c77618592497cca10454711f76696cc9351eb5a27867",
"tests/diagnostics_smoke.py": "80ef9e30e65ecc64c27fc33837cfd12227cbfa4a3c6d9cab9176d01a0c684c33",
"tests/enumeration_smoke.py": "289a34ebaf95eb6e41fda57d6386d9aa848ba7f219a16ec05d49497ef93345d9",
"tests/frozen_flow_smoke.py": "9c451b8dcfa36154063a68c1690dbe0eefbdc48a73d58e3ace4a3d7ff6afd8af",
"tests/frozen_method_smoke.py": "5741114dc5468c36652d832c5206c1f207a10010f43bc29f0f8e4ce68f9da2de",
@@ -61,22 +61,22 @@
"tests/method_smoke.py": "698cc41317139f50bc5cac8252a8c31310856ba87ab1ddf421c3197a320ed072",
"tests/ordering_smoke.py": "b96022ebdd80fe1d9f2e8b3e1c543aeb96534c0323bc4e36f619d80fc7e3b3f5",
"tests/package_smoke.py": "f9ea830ae0e1801f52c8669b0b06033c6ee8c9a16745acc56c4b70b5f575ed26",
"tests/refresh_smoke.py": "237240fb2e2134a8fb4c23ebcb6ae431d12086fe2dc2598f327df2412b8a4311",
"tests/run_ui.py": "349e78749c13f760006e1d0214531d8f8e82af038c8a44a636c0fc2c31dfd80e",
"tests/refresh_smoke.py": "695014a20cc92705833d4459e5609c4ef121d05c12a6bb443361723b36e1d604",
"tests/run_ui.py": "2a86e6204a8f0a17cd258004a865b0c39efa11752a40aa6f57595d2513c71000",
"tests/support_smoke.py": "c0626f8a2490ffeeefe838cb852eb144742c935a68a3a4d000158220bba4190a",
"tests/test_backup.py": "1e9e877b592113c9778367de3fd5e19452d61b96a93163e5430a6328c9113793",
"tests/test_backup.py": "8b37a970334658b390e116549b913e22656be534675ea0ded38fd7395b85daa6",
"tests/test_diagnostics.py": "7abc3c103cba42a0eb10b62f12edcca3f40efc3a959efb5dbc7cd5fe5f24e581",
"tests/test_flow_boundaries.py": "e38366eb46c433ddc5080484f451ff072d2f40242893de3667ea792a89fe87ec",
"tests/test_helpers.py": "317f4c2216e8e60c1024931eef3e2a5a23d43ea152a931ae830865362576c4cb",
"tests/test_flow_boundaries.py": "1ad4828a56744052b59d030522cf6e5264c87ac466b57a1600972d002a3294a2",
"tests/test_helpers.py": "41dce69cae63b53e681981c5ca13ed5d825965b8ed9d4d589ca14bf644f74eef",
"tests/test_legacy_binding.py": "b2bbae1ef0c2ecdecb2b3caeaee47047293d89507bf890592c1bd23d76908c82",
"tests/test_method_routing.py": "b8a7f820c91a97bf73a980972850cacb00bb7968488a695911d55043cd67a744",
"tests/test_method_routing.py": "c503392e7a66a955179effb0667b99fab5cae281d57f29a3fdc5dd371b66ba7b",
"tests/test_openwrt_confirmation.py": "ed9fb932cb6be775a52cd569b61a245c787bbe2b2935a21d469f38daf3c0c469",
"tests/test_recovery.py": "7b066dc300ee5df2e4e819aa2a7c2ab6a9c1e8a07d044da2ca3d3b2860945a64",
"tests/test_state.py": "ee80f34e9b295ffd4a92280836ceb6090b17d531e5914f0f5b86fa3bce0dca19",
"tests/test_transfer.py": "9e32e05d43274a1910335c9fca212cd6eeb1c82e3265fdcbcd98612ef9cd14f7",
"tests/test_update_lifecycle.py": "2527f1cfc3f51dc332c857d658b9fc44f1e8f4df026ce535bfe406e602a15da0",
"tests/ui_smoke.py": "89bfa2514fce8eb90f982e8566c5d55771b435933f786e26ee92620eb157cee1",
"tests/update_smoke.py": "4f5d18756e9e9ae4546ad577dccae49efdca3e2c7c07aefd8671c0e957886b39",
"tests/ui_smoke.py": "94b8b4387f518f55bb7408dededfe83ed47a9a7327b7318995c2684d8937725d",
"tests/update_smoke.py": "c9002ae1dd8c3dafa559910c25cd7f874fdde1e1ad19e6a6eb73faf65099585e",
"ui/components.json": "c9956b81d4afe05c5df651ab933d75a4aae6782e499fba9a653fd992381b2fba",
"ui/index.html": "0ce43c18781e1d0d6184ab0e4dade150a2a79ab8afc3693c54f491bd19dae5d8",
"ui/package-lock.json": "20dc70b3177789a10c9de3f2d6bcdc3cbc570dac47bd8a5c4e31ff137cbe1cda",
@@ -150,7 +150,7 @@
"verification/ui-polish-mu300-sizes.json": "31e0df9b4645e98f1fe91c5b831b556424d413d2afa31000e6a90e2ea5c8a350",
"verification/ui-polish-t551m-package.json": "a59c13ef8903326cafae846b00803de934b28ff128c85c55a5b1c3936685d726",
"verification/ui-polish.json": "014d2e86010336d9fafac14eb5852139172cc228c389d5efb1a74fd9acfd7245",
"verification/ui-regression.json": "687c0dd400a3c6c6b98d31bc9ee31be05e24438dd203277808bacbc92a290877",
"verification/ui-regression.json": "33d575d1b919806aec8ddb4250045178eb03e727d855837822835c66a43193f7",
"verification/update-reboot-e5-sizes.json": "d8a2d1aa7d06e48e79198c5374a126a3c69216761d2d060dcfd476313786042f",
"verification/update-reboot-frozen-flows.json": "8c40288dfb40fbe9c4933730f47c2d6789725bfb51f96d27e5af5e91346e4ef9",
"verification/update-reboot-frozen-methods.json": "f91e016535fd1d473a87dcca44919f2aa338372945dbf79716c982a20114f0d0",
@@ -158,11 +158,11 @@
"verification/update-reboot.json": "26d586d25315c1d290d3e6ddae83322dd294a00a43a60ec232d7e47af7f61dee",
"verification/windows-packages.json": "2527a520a27d9eb0f9243aa9e2ed05b0e4b90caefc8257ea3afe76acdb75a19d",
"ui/src/help-data.ts": "e89b63d2fc496cf954bea237b2ff193bf1cfb93c8416d4860bbc4825e74fdb78",
"ui/src/help-i18n.ts": "4fb623fdc31fbd5f78d7e362389739b37529978b8625291d25547c15ae1fc4cd",
"ui/src/i18n.ts": "08a2eae0c6452589f56618cdfe22957fc1d4eae13af22a956137b261593f7bc5",
"ui/src/main.tsx": "624b34b1d51148dd8eb19d324558e3bd4a58fda5542b7f307364798523a85680",
"ui/src/protocol.ts": "acee2ee6a5608024563087a194998ebc4f2b55df01b449075bac3cb8e9f7e723",
"ui/src/style.css": "d5eec0a99a097581b43e02ef9bed2b7f0489817192e663d0e94e76263a7156b3",
"ui/src/help-i18n.ts": "041a7fa8ac2c3f0adfc3d2f25331801e907915ad58d08eaa464d4165f0a6e5f1",
"ui/src/i18n.ts": "a5ea5724e14076c6bac9bd652bbeb15a8981fc4d69e1ff371a65397652adacc7",
"ui/src/main.tsx": "1767455eb7861ec68d29b48095bc0bf4db5bdf35180f35ea2e7363f9ca7d71ab",
"ui/src/protocol.ts": "7a8733b484cefede5b761fd8778497ec65ec6961524ef67192d4db88773b3cd8",
"ui/src/style.css": "87be929af767ca8213b4ef958067dcd2c5696270fe4f8dfdecad51af098204fd",
"ui/src/utils.ts": "dd51582c0905c3507bd5dc3d32215a43fc156f6432042a7deb393fe4258b05ba",
"ui/src/vite-env.d.ts": "65996936fbb042915f7b74a200fcdde7e410f32a669b1ab9597cfaa4b0faddb5",
"ui/src-tauri/build.rs": "8af41c0062014fc594e4bb9899e60ee9930ab57d4cf0c73041ff557d6ec736e6",
@@ -177,10 +177,86 @@
"ui/src/components/ui/sonner.tsx": "59738d9ced20160c9d74971beb4fd23b794e5ff0682b998af55f604f92fdc9f8",
"ui/src-tauri/capabilities/default.json": "84a9a609f4cae132de6b7ee626a8d5c396eee5c2030d416922f4db5dc9624299",
"ui/src-tauri/icons/icon.ico": "5851131da4274abc593d41fa701a14ea3a99fda2da02bc5845c70664f7766094",
"ui/src-tauri/src/main.rs": "19b4cde7d66c877a3279e6dcced05d223c2ff5baa208f3bb50ad896218a0250f",
"ui/src-tauri/src/main.rs": "cf0f10d113b930b18bdfa7203c7938acf9b3caedaf5c86cf7d8e5c8b836be2f9",
"ui/src-tauri/gen/schemas/acl-manifests.json": "bdc3ced2ae416f11b23bc9c9b62341a3a59aa7bb5322f04f197bb08cb610409f",
"ui/src-tauri/gen/schemas/capabilities.json": "a4a9ce710aadc06946c296cfb8a0df506767ed310de13e32b5914d295fc81e56",
"ui/src-tauri/gen/schemas/desktop-schema.json": "4a946fe48fbb0c7c535ea53e6070bd8276f3f3d74f96efbaa6d85bd7b53b0f05",
"ui/src-tauri/gen/schemas/windows-schema.json": "4a946fe48fbb0c7c535ea53e6070bd8276f3f3d74f96efbaa6d85bd7b53b0f05"
"ui/src-tauri/gen/schemas/windows-schema.json": "4a946fe48fbb0c7c535ea53e6070bd8276f3f3d74f96efbaa6d85bd7b53b0f05",
"tests/test_wireless_adb.py": "1597f41bb840338eff40d2cdb46f0a138a987253de2ca3df84a61e4f10683bee",
"tests/wireless_smoke.py": "fc13be671a30fd553263c6af5d4f6ddb5890c3a8567f02ce189f11aae68566bb",
"tests/frozen_wireless_smoke.py": "1305dcc20b07c3ad0fca455eda4d8add3ff5d859d79f00f11211eff816a6f52e",
"screenshots/wireless-adb-zh.png": "40508a8983a8cea7777689ab7294979dd18abf884ca0da81f33376ba6ee91a36",
"screenshots/wireless-adb-wait-en.png": "e9503fd3e6f1a55f4c06122220e0dbd4b4d376431b6e6b5657c5c2eef718ac75",
"verification/wireless.json": "b31daedcdf11238c84b4d35f96a28cd91642964dbc1999698d36033be5421033",
"verification/wireless-e5-sizes.json": "0b65aeff096c13b87f5f9be1fc4d0a4bc621c31e5dbfab2c7a8b72aa0e9f518c",
"verification/wireless-mu300-sizes.json": "4bd7bf9511b50b3b493dc8a0886c31193ef68d57f916f09925230f646ecb018b",
"backend/binary_io.py": "25e30cf4f3b23e960b05ae512f06d617dd958835125678ea4c07a2fbc4d3420f",
"tests/frozen_binary_smoke.py": "f80f8a2bb203f8730206b133a4c920bdd6f54f71e4925c59e0aea095f9842e5c",
"tests/test_binary_io.py": "eea49cb7566a9e3c37af2be6ddda3d010e646224a2a77d9c84d9d6f2987cae9b",
"verification/binary-e5-sizes.json": "d1d5fc5037b1d2cd9853ba8e737bd558d55410a2e057fa8a23fca666ecd7cc0f",
"verification/binary-frozen-connections.json": "9f585ab432339c19295d7c2a8ffadf73ff0d0097239f9d771b49e02fa133135d",
"verification/binary-frozen-flows-e5.json": "f540a729bd259bb7278865c0a384dfeb2a0cb048db76b41e30715ed4ff87b21c",
"verification/binary-frozen-flows-mu300.json": "9cb3adf06e85413f8402fe41243854fd0f98ec1391f5b27175011831092b0c3f",
"verification/binary-frozen-methods-e5.json": "780394c42ee21fceaae7b2c9f66dbdae79e16d252cd5db55d000963692aff44a",
"verification/binary-frozen-methods-mu300.json": "c61abdac12d0f727ceba972f2e6a3c4bbaa82df713c208875bb41550418913d5",
"verification/binary-frozen-transfers-e5.json": "eb6e0664f2bd185677cce9647ebf5212ddbdadbe84628bc09a7e1c778e9fa413",
"verification/binary-frozen-transfers-mu300.json": "76a0c5a172bfa2775cfb73db53e4947faf0ca65a0bdd85530c245b56c7cde232",
"verification/binary-mu300-sizes.json": "e3ffb3e35292557f78982a958880d3129e3f259b07331377e1cecda2fd2cfe1b",
"verification/binary-packages-e5.json": "e82e57d6a2c7424c451abd3ae4db7b57295c4bf8e101539543311f838cbbae8e",
"verification/binary-packages-mu300.json": "a7e21c96bcc0f5c1b75ff8d272740ce77960eb2f37b6e109fdb3ed752920343e",
"verification/binary-transfer.json": "0d1680594aa5790284b59544e75187e3241b6ca1e0cec50405e4dddcfc943300",
"tests/audit_binary_transport.py": "dce5ac65283b27c82047f1309a9b80a92deab5fc3d6f314edd743f6ec0dc2215",
"verification/binary-audit-e5.json": "e8a2221ea3e3f4c0759e0abf865bad799e3a1214230f728991a96c5159a2b4c6",
"verification/binary-audit-frozen-e5.json": "5ff7e2ee459f63f9be15546cc446c42148c1ef1bfb01f9b504cc85fae20a8399",
"verification/binary-audit-old-cli-overrides.json": "943f7be0b65e41c3368e9b9a99142cdb16547b12c978bd6ebb799f35d02d1d66",
"verification/binary-audit-frozen-mu300.json": "82b514b6cc389cae87db2ff2246e3dd8f6979bc6bb8e54a95f58cd95d306bf70",
"verification/binary-audit-mu300.json": "e9a45ef635c114ca959f1ca280766ba42923819ebcd5116b2b5c60777bd0d4ee",
"backend/boot_image.py": "56fe461ba82e25ac84bbd1cc054727bbc2d708a69d49368e8fd2b3b1acec18e1",
"tests/test_boot_switch.py": "e431485ad8ae7d7f02a92c27f54d0574a6db89367d3ea61eedefbc600ad78d76",
"tests/frozen_boot_switch_smoke.py": "6ec0d0ac8f406799fc5b750b8ccefde5364487465dc8d4e10b4518df3f820586",
"verification/boot-switch-e5-sizes.json": "e9ae0e9f57598917875ff383c9231025c0a08962da08907c3b7ee1d35244d8df",
"verification/boot-switch-frozen-connections.json": "62b320e982751de8583823e2d7eecf347f2c46fda82ba45256a9c6223e4cd387",
"verification/boot-switch-frozen-entrypoints.json": "4e2a10ebdfa5d0f42a7487c021c38780ef76ce6b393bee1abadd53316c021031",
"verification/boot-switch-frozen-flows-e5.json": "c0bf159381673e3b98cc7256905d796762537873798c702a1f17ad3afe3a4c4c",
"verification/boot-switch-frozen-methods-e5.json": "a84b27c79e350c3fd8f622b3b906b0d966c219693e2dcb3b7d8acb4d30223613",
"verification/boot-switch-frozen-old-entrypoints.json": "95a280ce93887d8b981b328dd5170a55ef008e4b57c3015fe74e50346ab8f7dc",
"verification/boot-switch-frozen-transfers-e5.json": "dec425a7a50171f5521becfbcc04bc097a8bba7f27c13a414306b531cdd4e2b9",
"verification/boot-switch-packages-e5.json": "85ceb3a54a4da55b5d64cc8a18eb106458bccbb556e14f08adb3ea649976d1cb",
"verification/boot-switch.json": "55398f724f36ee49eea4e4a4bebe0b4767afa913a77efe084b6a3fc80c85c38d",
"verification/boot-switch-frozen-flows-mu300.json": "436b5b399fb783193c95b711b70c176260157ad46a6ec2d1523384331171302c",
"verification/boot-switch-frozen-methods-mu300.json": "8677b6225a648ca41c96c68cf736bc2ef92e4995327bfefd275558d638b385ec",
"verification/boot-switch-frozen-transfers-mu300.json": "a2fff9d4ae28e8cc22e1c29946058cb0dd4cf4a82f476feba15574ec6bd82c85",
"verification/boot-switch-mu300-sizes.json": "931abd1f2df71c1727674da64ee14bc53c96c8f743f75ac40c6aedd8d526aff9",
"verification/boot-switch-packages-mu300.json": "384aeac2b451b5cb41344cd790e1b0c87d15a7cd98a51d97c3e7f186dc95b5cc",
"tests/test_mu300_boot_switch.py": "144a07dad2fc73399d3c5a2086438867c8da880f5a6249954f71b896c25e5683",
"tests/test_misc_trial_script.py": "f254cf823d0f108961a99ebd51709aa1e95ffbf362aa4656af8c7d03e202e7cb",
"verification/all-models-boot-e5-sizes.json": "e4607957447932f79dc407002cda9f0d408d726e773fcfe1381f02c273fd87fd",
"verification/all-models-boot-flows-e5.json": "3454232a80d4a18d7b90eccb0eb9c5d788f13efb373adc3ee3987c9e93c913f3",
"verification/all-models-boot-frozen-connections.json": "c01ebbf6d4a1d923a9652600794500ac6e2813b1c7e30e5d09086398d54e45b7",
"verification/all-models-boot-frozen-e5.json": "7172575f00c2afd6e6408aa8ee6fb0452e157a343ddacacc8e3568e314967c5a",
"verification/all-models-boot-methods-e5.json": "5d8311d5318f65722eae88170c025551a92bb06b91cd78ae8c1cbbcba0226f0f",
"verification/all-models-boot-old-e5-entrypoints.json": "95a280ce93887d8b981b328dd5170a55ef008e4b57c3015fe74e50346ab8f7dc",
"verification/all-models-boot-old-mu300-entrypoints.json": "b6d8bf4a8da4b0712ff740f0e596806bc8bdd181d4d31229c7a734117a4732e3",
"verification/all-models-boot-packages-e5.json": "b77b455236beb7c5df3199ecd204bedd3e5d6869c52ee61186f69f70233f5bd2",
"verification/all-models-boot-transfers-e5.json": "5f88b2bbfa19624c1aa2d26c4ea52afdaa97bef4308d0641d62a2cbbcf479779",
"verification/all-models-boot.json": "73662619e9bd02dc177c2ac6dc00cb77e5cf4d004b4bd8d2569d726c23d86f3d",
"verification/all-models-boot-flows-mu300.json": "cd4e9f6f0357f53a7c4d0e6e58e1a641fe886b58f39cd8a4cfd941b28aceec2b",
"verification/all-models-boot-frozen-mu300.json": "577144baf745730f786facf9670bfe112a1f3e000d4ba2cceae494d4df72be84",
"verification/all-models-boot-methods-mu300.json": "89960cd435419c34ff510b4b67b16c92b0cd1526c096a1d06a085d6032becb15",
"verification/all-models-boot-mu300-sizes.json": "4ab10e2ee3f9466490f0ab8ea9a17912efe004d5f5cc166a2c28adc0b0668a9f",
"verification/all-models-boot-packages-mu300.json": "b4f56351d8292e3a6b119c9a267d18decd5f9f547ace63cbcd23cfe81c27e35d",
"verification/all-models-boot-transfers-mu300.json": "4df40f68de91d77211b837b9c1b6e33666961c4ce79ac1fb89ac864add95d72d",
"backend/mu300_update.py": "99c86765f0c6de1358d88aa4b44e3988a46fcbc3232fe2ea31f929f705cbeedb",
"tests/test_mu300_update.py": "1390f40adcabd7560c3b8cc87322f0aee37eaa9844e5339f8be24b1c40f3ddd2",
"verification/legacy-hidden-area-update.json": "c169ef722b1445cbe9ca203dc1ef5b375f2adbfe5e319c0513c7f68c36b38805",
"hotfix.py": "c1e9b27f3cbf625f9d45c3e363ceb99e710cff8af32c3ef80c92ba9a6658ca01",
"apply_hotfix.py": "ed0f74205772141bb0c489b32d3907ba9fb0b357d0465f0769f446ad158ae956",
"tests/test_hotfix.py": "a00b467bec8ecbd54d2615fe517710ea8ccfddf7eb3b0ad04cce347aff855bb4",
"tests/frozen_update_smoke.py": "0d1bf20412697c483b42064a903057264d413a7aac773f4297236f6656e59b25",
"tests/hotfix_smoke.py": "4bc74a3e906eff2609164e1fb704f6c67b8cbce0b1a92c41a62b3e6d3843adca"
},
"compatibility_files": {
"desktop/binary_io.py": "25e30cf4f3b23e960b05ae512f06d617dd958835125678ea4c07a2fbc4d3420f",
"desktop/boot_control.py": "56fe461ba82e25ac84bbd1cc054727bbc2d708a69d49368e8fd2b3b1acec18e1"
}
}
+61
View File
@@ -1,5 +1,11 @@
# Windows installer verification — 2026-10-15
## Wireless ADB Windows revision (2026-10-16)
The device section connects a user-supplied TCP endpoint and disconnects only the selected observed wireless device. Actual enumeration determines connected/unauthorized/offline state; terminal wording is ignored. Connection is also available at safe Android setup/root waits without changing the saved device binding. Disconnect is blocked for an active worker and by the shared serial mutex if another installer process owns the transport. The endpoint validator rejects options and command text. No debugging enablement, pairing, device shell, ADB-server restart or network-adapter changes are performed.
E5 runs 88 backend tests successfully; MU300 runs 88 with 86 passing and two E5-specific checks skipped. All nine production-UI suites pass, including wireless retry, multiple endpoints, exact disconnect, USB protection, resume binding and 800x650 bilingual layouts. Both Windows release executables and frozen backends build successfully; `tests/frozen_wireless_smoke.py` exercises each actual frozen coordinator with a fake ADB process. No real wireless connection, disconnect or device writes were performed. Current package evidence and sizes are in `verification/wireless-*.json`.
Implemented in both repositories with one canonical shared source and a hash-checked generated MU300 mirror. Existing unrelated working-tree changes were preserved. FM_U20 support was not restored.
## Executed
@@ -116,3 +122,58 @@ The latest author/support revision is in e5 `out/gui-releases/20261015-support/`
The latest support/Star revision is in e5 `out/gui-releases/20261015-support-star/` and MU300 `release/gui-20261015-support-star/`. The notice now appears on every application launch, ignoring prior dismissal flags, while still allowing immediate close. Both the sidebar and dialog show GitHub icons; the dialog includes the repository URL and an invitation to Star. The sidebar support entry has a heart and a visible text label. The image fallback and sequential onboarding remain intact. The support browser suite verifies a second launch with an existing old acknowledgement, the fixed native repository command from the Star link, labeled reopening, clipboard controls, online/error/timeout image paths and both themes/languages at 800×650. Other UI fixtures automatically dismiss this notice and intercept its image request to keep independent tests deterministic. Eight suites and frozen-package checks are recorded under `verification/ui-regression.json` and `verification/support-star-*.json`; no device or payment operation was performed.
The latest two-project credit revision is in e5 `out/gui-releases/20261015-projects/` and MU300 `release/gui-20261015-projects/`. Both the sidebar and support dialog link to `sprd-linux-devs/e5-linux` (Enceka and Minikano) and `dikeckaan/mu300-linux` (dikeckaan and Minikano), explicitly crediting Minikano as a co-author of both while retaining the installer credit. Each project has a GitHub icon and Star entry; support opens on every launch and has a labeled sidebar button. The native opener maps only two known project IDs to literal HTTPS URLs. UI tests exercise both entries/IDs, credits, launch/relaunch, imagery and bounded bilingual layouts. This supersedes the intermediate single-project `support-star` build. Evidence uses `verification/projects-*.json`; no real device or payment operation was performed.
## MU300 binary-transfer correction (2026-10-16)
A source audit found that the MU300 compatibility CLI still encoded `Android.read()` results as Base64. Its boot-chain backup called that reader, and the GUI could invoke that legacy backup after completing the shared backend backup. The earlier statement about removing this transport was therefore incomplete for MU300.
Both the CLI and shared metadata reader now use the same `backend/binary_io.py` implementation: stage bytes in a private shell-owned `/data/local/tmp/` directory, use serial-bound `adb pull`, verify source/staged/local SHA-256 and size, atomically retain the verified destination, and clean temporary files. Bulk CLI backup streams directly into local files. The GUI overrides old compatible packages' readers and backup hooks, verifies device geometry and cached checksums, and copies its existing verified host backup into the legacy layout without a second device backup. Payload upload remains binary ADB push; SSH upgrades retain the binary transport.
The generated `desktop/binary_io.py` is copied from the shared backend by normal MU300 packaging, GUI refresh and synchronization. Binary fidelity, CRLF/NUL/all-byte values, insufficient temporary space, truncation, corruption, changed source, serial binding and legacy cache reuse are covered by automated tests. The shared suites run 93 tests per repository (MU300 has two existing E5-only skips); MU300 additionally runs 34 desktop installer tests and two bulk-backup/helper tests. `tests/frozen_binary_smoke.py` exercises the shipped optimized sidecar, actual packaged CLI and GUI cache hook with simulated transports. No MU300 device backup or installation was performed, so no physical transfer-time guarantee is made.
Corrected Windows packages are in E5 `out/releases/20261016-binary-transfer/` and MU300 `release/20261016-binary-transfer/`. Earlier packages are preserved and do not receive this fix automatically. Firmware payload bytes remain unchanged. Evidence and separate GUI/tools/payload/archive sizes are recorded in `verification/binary-*.json`.
## Repository and preserved-release audit (2026-10-16)
`python -X utf8 installer/tests/audit_binary_transport.py <repository> --releases --report <report.json>` checks first-party backend, compatibility entrypoints, bundle/device scripts, backup tools, firmware extractors and build/packaging scripts. It skips third-party libraries, tests and comments, retaining executable Python strings so a remote `| base64` command is detected. The audit covered 95 E5 and 428 MU300 source files with no encoded-transfer candidates. Whole-repository search additionally found legitimate Base64 in email/MIME/HMAC, WebSocket handshakes, wallpaper/audio APIs and bundled web libraries; these are unrelated to installer payload or partition backup and were retained.
Preserved MU300 releases **do still contain the old reader**: both kernel variants under `20261016-wireless-adb`, `20261016-wireless-adb-r2`, `20261016-u30air-pd-win-macos` and `20261016-u30air-pd-root-win-macos`. Both extracted directories and ZIP entrypoints were inspected. These historical archives were not overwritten; the corrected Windows packages are under `20261016-binary-transfer`. E5 release entrypoints and the five corrected package/ZIP entrypoints contain no encoded reader. The old combined macOS packages have not received a rebuilt macOS backend.
The new actual frozen backend was also run against the two real old MU300 package scripts with fake transport: old read hooks are replaced with verified staging/pull, and old backup calls reuse validated local files without any second device transfer. Five corrected frozen packages passed the same binary-fidelity/corruption/cache regression again. An observed `BEGIN legacy ADB exec-out ... | base64` log therefore identifies execution of the obsolete path; replacing files cannot update an already running process. Evidence is `verification/binary-audit-*.json`. No connected-device commands or partition writes were performed.
## Installed OpenWrt trial-boot correction (2026-10-16)
The supplied E5 diagnostics stop in `prepare` with `boot_b holds another boot image`, before any misc write. The previous selector compared the first 56 MiB of installed boot_b to the current package (or its exact partition-mode variant), so a valid older/newer installation was rejected by an unrelated release package.
The CLI and GUI now share `backend/boot_image.py`. Two bounded boot_b reads (4096-byte header and 512-byte tail) recognize the installed E5-family Android v4 Linux boot, validate kernel/ramdisk/AVB layout bounds, require the installed `e5.part_v=2` marker, and reject pending destructive preparation. This is structural recognition, not a cryptographic attestation of the installed kernel. Current Android model/slot/unlock, boot-chain check and BCAB CRC/slot protection remain. Only the existing backed-up/readback-verified misc trial operation selects B; no boot image, root partition, GPT or permanent root selector is written. The GUI overrides old package entrypoints so the obsolete hash gate cannot run through compatibility imports. CLI packaging includes the exact shared helper under `scripts/installer/boot-control.py`.
Both shared suites run 97 tests (MU300 retains two E5-only skips), and the real E5 CLI regression adds two tests. All three preserved E5/M8/T551M boot payload headers were checked without device access. `tests/frozen_boot_switch_smoke.py` exercises real GUI and CLI entrypoints in the shipped optimized backend using a deliberately different installed command line, rejection cases and simulated transport. New Windows builds are in E5 `out/releases/20261016-boot-switch/` and MU300 `release/20261016-boot-switch/`; reports use `verification/boot-switch-*.json`. No connected device was switched or rebooted, and the user's installed boot payload itself was not available for inspection.
## All-model trial-boot alignment (2026-10-16)
E5/M8/T551M and MU300/F50/V50/U30Air now use the same bounded boot-image parser, with separate existing-family signatures and reserved-log bounds. MU300 no longer requires exactly eleven bytes `loglevel=5` at the command-line start: the legacy token is recognized among other arguments, while foreign-family/stock headers, truncated headers and invalid payload bounds are rejected. Android A and B are both supported for MU300. GUI dispatch bypasses old inline MU300 switch implementations, including old compatible packages; CLI packaging carries the same implementation as `desktop/boot_control.py`.
The desktop MU300 path no longer delegates misc writing to an archive's Magisk switch script. It validates live BCAB CRC/slot health and priority, checks the boot chain without synchronization, stages only the desired 32-byte block, verifies a durable on-device backup and the staged bytes, compares current state, writes misc, and reads it back. A failed/short/corrupt write restores the backup and exits without rebooting. Successful GUI writes are the persistent `misc-trial` effect; a restart after that effect goes directly to OpenWrt verification without writing misc again. A successful trial automatically reboots, with the expected disconnect recorded beforehand. No boot/GPT/root/default-selector write is added, and original Magisk payload files are unchanged.
Windows shared suites each run 103 tests (E5 one POSIX-only skip; MU300 adds its two existing E5-source skips). MU300's 34 desktop tests pass. The skipped POSIX misc-script test was executed separately in WSL against ordinary temporary files: eight cases cover both slots with success, corrupt write, short write and a changed source. The full frozen-entrypoint matrix covers each of the three E5-family packages and all four MU300-family model names, both Android slots and both GUI/CLI entrypoints in each kernel package. These are simulated transports and host files, not hardware installations.
Latest Windows packages: E5 `out/releases/20261016-all-models-boot-r2/`; MU300 `release/20261016-all-models-boot-r2/`. This build additionally rejects an opposite slot with a boot header identical to current Android. The earlier `boot-switch` builds predate the MU300-specific changes in this section. Firmware/Magisk payload hashes are preserved. Reports and separate program/tools/firmware/archive sizes use `verification/all-models-boot-*.json`.
## MU300 legacy hidden-area update compatibility (2026-10-16; source-only fix)
The supplied U30Air diagnostics show the desktop updater rejecting `legacy` during its read-only runtime check, before upload or commit. Hidden extra eMMC space is consistent with the native raw-region/loop layout; the supplied log alone does not establish its actual offset or backing device. The boot repacker already supports `legacy`, while the desktop update whitelist excluded it.
Both repositories now route MU300 GUI updates through `backend/mu300_update.py`, including older compatible Python package entries. The MU300 CLI loads the same generated helper as `desktop/update_control.py`; normal assembly, shared synchronization and host-only package refresh include it. Native hidden-area support requires the currently running OpenWrt container, an ext4 loop mount backed by eMMC, filesystem identity/capacity, GPT/physical-device bounds and an offset discoverable by the packaged legacy boot. Geometry is checked before staging and again before commit. Unverified layouts, changed geometry/capacity, kernel mismatch and upload corruption stop before update commit. Existing sd/part/data-image modes retain their boot targets. The original native update library, lock, settings/accounts/vendor migration, verified boot/misc writes and rollback remain in use. No new partition creation, resize, formatting, SFTP, od or encoded binary transfer is added.
Validation: E5 Windows backend suite 125 tests (121 passed, 4 skipped); MU300 suite 114 (110 passed, 4 skipped). Eleven focused hidden-area cases cover GUI and the actual compatible CLI, the reported 34,779,168,768-byte capacity on synthetic 256 GiB geometry, bounds and identity rejection, upload failure, changed loop binding, stale capacity, kernel mismatch and unchanged existing mode dispatch. The POSIX probe case runs separately in Linux/WSL with ordinary sysfs/mountinfo fixture files and an intercepted block-device predicate; valid input succeeds and wrong mount identity/backing fail. MU300 desktop regressions: 34 passed, including real synthetic boot repacking in legacy/prepare modes for both slots, native configuration/firmware preservation and assembly of the shared helper. Native updater/lock regressions in WSL: 12 + 6 passed. Binary-transfer source audits found no encoded-transfer candidates (E5 97 files; MU300 432 files).
No release executable or firmware package was rebuilt, no workflow was dispatched and no device was contacted or modified. Existing released programs still contain their prior implementation. The user's actual hidden-area layout and a real U30Air update remain unverified. Scoped whitespace checks pass. These test results are automation against mocks and temporary host files, not hardware validation.
## MU300 Windows replacement patch (2026-10-16)
A native Windows Tauri release and optimized PyInstaller backend were rebuilt from MU300 sources. `release/20261016-hidden-update-hotfix/MU300-Windows-Installer-Hotfix.zip` contains the GUI, complete Windows backend and compatible host helpers, without a device rootfs/boot payload. Extract over the original package, run `APPLY-HOTFIX.cmd` once, then open the installer and retry the original record. The command uses the bundled interpreter and does not depend on external Python or PowerShell. The applier verifies patch files and all unchanged original files, preserves Magisk hashes and source firmware, updates host checksums atomically, retains the original manifest and supports repeated application. The patch updates Windows only; existing Mac binaries are unchanged.
Validation passed against disposable copies of both original `20261016-pd-win-macos` kernel packages: actual frozen patch application twice, compatible CLI package check, NDJSON package verification and identical firmware payload hashes. The actual frozen update backend passed all four modes (legacy/sd/part/data-image) against both old and patched package entries, using real package boot repacking and simulated SSH. The frozen binary reader/backup checks pass for both old packages. The backend suite runs 118 tests: 114 passed, 4 skipped, including four patch corruption/path/idempotence tests. A real native EXE opened, spawned its private backend and closed normally with isolated application data; screenshot and JSON evidence are `verification/hidden-update-native-gui.*`. No ADB/SSH device connection or hardware write was performed.
Patch sizes: GUI 3.51 MiB; Windows backend 31.93 MiB; firmware 0 bytes; ZIP 15.50 MiB. Source/binary fingerprints and final ZIP SHA256/CRC were checked. Per-file evidence uses `verification/hidden-update-*`; the archive SHA256 is in the adjacent `.zip.sha256` file. Existing published firmware archives were preserved.
+92
View File
@@ -0,0 +1,92 @@
"""Apply a MU300 Windows host-only overlay using its bundled interpreter."""
import hashlib
import json
from pathlib import Path
import re
import sys
HOST_FILES = {'OpenWrt-Installer.exe', 'OpenWrt-Installer.py', 'APPLY-HOTFIX.cmd', 'HOTFIX-README.md',
'desktop/installer.py', 'desktop/binary_io.py', 'desktop/boot_control.py', 'desktop/update_control.py',
'desktop/local-update.sh', 'desktop/mu300-update-library.sh', 'desktop/android-write-part.sh',
'desktop/android-write-free.sh', 'docs/GUI-BUILD.json', 'tools/installer-hotfix/apply.py'}
def digest(path):
h = hashlib.sha256()
with Path(path).open('rb') as stream:
for block in iter(lambda: stream.read(1 << 20), b''):h.update(block)
return h.hexdigest()
def safe_file(root, name):
if not isinstance(name, str) or '\\' in name or name.startswith('/') or '..' in name.split('/'):
raise ValueError('Unsafe package path: '+str(name))
path = (root/name).resolve()
if not path.is_relative_to(root) or not path.is_file():
raise ValueError('Missing or unsafe package file: '+name)
return path
def apply(root):
root = Path(root).resolve()
metadata = safe_file(root, 'tools/installer-hotfix/patch.json')
patch = json.loads(metadata.read_text(encoding='utf-8'))
if patch.get('format') != 1 or not re.fullmatch(r'[0-9]{8}-[0-9]{6}-mu300-windows', patch.get('id','')):
raise ValueError('Unsupported installer patch')
files = patch.get('files', {})
if not {'OpenWrt-Installer.exe','tools/backend/openwrt-backend.exe','desktop/update_control.py'}.issubset(files):
raise ValueError('Incomplete installer patch')
for name, checksum in files.items():
if (name not in HOST_FILES and not name.startswith('tools/backend/')) or not re.fullmatch('[0-9a-f]{64}',checksum):
raise ValueError('Patch contains an unsupported host file: '+name)
if digest(safe_file(root, name)) != checksum:
raise ValueError('Patch file checksum failed; extract the complete ZIP again: '+name)
manifest_path = safe_file(root, 'desktop/manifest.json')
original = manifest_path.read_bytes()
manifest = json.loads(original)
if manifest.get('format') not in (1,2) or manifest.get('kernel') not in ('6.18','7.2'):
raise ValueError('Select an extracted MU300 6.18 or 7.2 desktop package')
previous = manifest.get('installer_hotfix', {}).get('id','')
if previous > patch['id']:
raise ValueError('This package already has a newer installer patch')
payloads, desktop = manifest['magisk'], manifest['desktop']
if len([name for name in payloads if name.endswith('mu300-openwrt.tar.gz')]) != 1:
raise ValueError('Expected exactly one original MU300 firmware payload')
if set(payloads) & set(files):
raise ValueError('Refusing to replace a Magisk or firmware payload file')
# Overlaid host files have their own expected hashes. Every other original
# entry, including Mac binaries, must still match the original manifest.
for name, checksum in {**payloads, **desktop}.items():
if name in files or name == 'tools/installer-hotfix/patch.json':continue
# A previous partial attempt may already have removed an obsolete
# backend dependency. Retrying must not require that removed file.
if name.startswith('tools/backend/') and not (root/name).exists():continue
if digest(safe_file(root, name)) != checksum:
raise ValueError('Original package checksum failed; use a complete original package: '+name)
backup = root/'tools/installer-hotfix'/('manifest-before-'+hashlib.sha256(original).hexdigest()+'.json')
if not backup.exists():backup.write_bytes(original)
# Only obsolete files from the recorded Windows backend may be removed.
obsolete = [name for name in desktop if name.startswith('tools/backend/') and name not in files]
for name in obsolete:
if (root/name).exists():safe_file(root, name).unlink()
desktop.pop(name)
desktop.update(files)
desktop['tools/installer-hotfix/patch.json'] = digest(metadata)
if 'desktop/installer.py' in files:
manifest.setdefault('source', {})['installer.py'] = files['desktop/installer.py']
manifest['installer_hotfix'] = {'id':patch['id'], 'platform':'windows-x64'}
temporary = manifest_path.with_suffix('.json.hotfix-partial')
temporary.write_text(json.dumps(manifest,indent=2)+'\n',encoding='utf-8',newline='\n')
temporary.replace(manifest_path)
print('Installer patch verified / 安装器补丁校验完成。')
print('Open OpenWrt-Installer.exe and retry from the original saved record.\n请打开 OpenWrt-Installer.exe,从原记录重试更新。')
print('Firmware and saved installation records were preserved / 固件载荷和电脑续装记录均已保留。')
return patch['id']
if __name__ == '__main__':
try:apply(Path(sys.argv[1]) if len(sys.argv)>1 else Path(__file__).resolve().parents[2])
except (OSError,ValueError,KeyError,TypeError) as error:
print('Patch stopped / 补丁已停止: '+str(error),file=sys.stderr)
raise SystemExit(1)
+49 -2
View File
@@ -17,6 +17,8 @@ from types import SimpleNamespace
from . import gpt
from .state import Pending, RecoveryRequired, atomic_json, sha
from .transport import Adb, push_chunks
from .boot_image import boot_installed_e5, boot_installed_mu300
from .mu300_update import update_mu300
from .diagnostics import DebugStream, traced
@@ -65,7 +67,7 @@ def installation_committed(record):
if record['package']['adapter'] == 'e5':
return method in ('tf', 'part', 'image', 'boot') and 'misc-trial' in done
return record['package']['adapter'] == 'mu300' and (
method == 'tf' and 'root-tf-write' in done or
method == 'boot' and 'misc-trial' in done or method == 'tf' and 'root-tf-write' in done or
method in ('part', 'reinstall', 'image') and any(name.startswith('boot-and-misc-') for name in done))
@@ -79,8 +81,15 @@ class Adapter:
self.legacy.GUI = self
if self.kind == 'e5':
self.legacy.B, self.legacy.F, self.legacy.SCRIPTS = str(self.root), str(self.root/'files'), str(self.root/'scripts')
# Old compatible package scripts must not retain their exact-hash
# gate when selecting the already installed system.
self.legacy.boot_openwrt = lambda args:boot_installed_e5(vars(self.legacy), self.adb.read)
else:
self.legacy.package_root = lambda: self.root
# Override older compatible packages too: no legacy binary codec
# or second full device backup may run behind the GUI coordinator.
self.legacy.Android.read = lambda android, command:self.read_legacy(android, command)
self.legacy.Android.backup = lambda android, path, storage:self.backup_legacy(android, path, storage)
self.adb = None
self.password = ''
self.expected_ssh_key = None
@@ -136,6 +145,37 @@ class Adapter:
def backup_base(self):
return str(self.ctx.directory)
def read_legacy(self, android, command):
if not self.adb or android.serial != self.adb.serial:
raise ValueError('Binary read device differs from the selected device')
return self.adb.read(command)
def backup_legacy(self, android, directory, storage):
import shutil
if not self.ctx or not self.adb or android.serial != self.ctx.record['device']['serial']:
raise ValueError('Backup device differs from the saved transaction')
expected=self.ctx.record['device']['storage']
if any(storage.get(k)!=expected.get(k) for k in ('CID','NODE','START','SIZE','DISK_SIZE')):
raise ValueError('Storage changed since the verified backup / 分区与已校验备份不一致')
directory=Path(directory).resolve()
if not directory.is_relative_to(self.ctx.directory.resolve()):
raise ValueError('Legacy backup directory is outside the transaction')
self.backup(self.ctx.record['device'])
source=self.ctx.directory/'backup'
sums=json.loads((source/'checksums.json').read_text())
mapping={'misc-head.bin':'misc.bin','gpt-first.bin':'gpt-first.bin','gpt-last.bin':'gpt-last.bin'}
mapping.update({f'{name}_{slot}.img':f'{name}_{slot}.bin' for name in ('boot','uboot','sml','teecfg','trustos','vbmeta') for slot in ('a','b')})
if any(name not in sums or sha(source/name)!=sums[name] for name in mapping.values()):
raise ValueError('Verified backup is incomplete or damaged / 已校验备份缺失或损坏')
directory.mkdir(parents=True,exist_ok=False)
atomic_json(directory/'identity.json',{**storage,'serial':android.serial,'android_slot':android.slot})
for target,name in mapping.items():
self.ctx.boundary()
shutil.copyfile(source/name,directory/target)
if sha(directory/target)!=sums[name]:raise ValueError('Legacy backup copy checksum mismatch')
(directory/'SHA256SUMS').write_text(''.join(sums[name]+' '+target+'\n' for target,name in mapping.items()),encoding='utf-8')
self.ctx.log('Reused verified computer backups for the compatible installer; no second device backup',scope='backup')
def wait_android(self, *_):
self.stage('android_boot', 'waiting_device')
raise Pending()
@@ -334,7 +374,9 @@ class Adapter:
self.stage('transfer_install')
if self.kind == 'e5':
return self.update_e5(a)
return self.legacy.update(a, self.root)
# Older compatible package entries reject the native hidden
# eMMC layout. Use the shared update path for those entries too.
return update_mu300(vars(self.legacy), a, self.root)
self.probe(record['device']['serial'], method)
if record.get('legacy'):
self.stage('recheck')
@@ -370,6 +412,8 @@ class Adapter:
self.backup(record['device'])
self.stage('prepare')
if self.kind == 'mu300':
if method == 'boot':
return self.boot_mu300(a)
return self.legacy.install(a, self.root, json.loads((self.root/'desktop/manifest.json').read_text()))
if method == 'tf':
return self.legacy.install_sd(a)
@@ -383,6 +427,9 @@ class Adapter:
return self.e5_free(a)
return self.legacy.install_part(a)
def boot_mu300(self,args):
return boot_installed_mu300(vars(self.legacy),self.legacy.Android(args),self.root)
def e5_free(self, args):
"""Add a GPT entry in verified free space, then use the existing writer.
+50
View File
@@ -0,0 +1,50 @@
"""Shared binary downloads for the GUI backend and generated MU300 CLI helper."""
import hashlib
import os
from pathlib import Path
import re
import secrets
import shlex
def pull_binary(call, shell, command, destination, expected_size=None, limit=16 << 20):
"""Stage in shell-owned Android storage, pull bytes and verify all hashes."""
destination = Path(destination)
partial = destination.with_name(destination.name+'.partial')
directory = '/data/local/tmp/openwrt-read-'+secrets.token_hex(12)
remote = directory+'/data.bin'
free = int(shell("df -Pk /data/local/tmp | tail -n1 | awk '{print $4}'", root=False, timeout=20).strip())*1024
if expected_size is not None and expected_size <= 0:
raise ValueError('Invalid binary read size')
if free < (expected_size if expected_size is not None else limit)+(32 << 20):
raise ValueError('Insufficient Android temporary space / Android 临时空间不足')
shell('umask 077; mkdir '+shlex.quote(directory), root=False, timeout=20)
try:
# Only ASCII sizes/hashes return through a root shell. Binary output
# never goes through a PTY, terminal codec, compressor or text encoder.
metadata = shell('set -e; set -o pipefail; ('+command+') > '+remote+
'; chmod 644 '+remote+'; wc -c < '+remote+'; sha256sum '+remote+
'; ('+command+') | sha256sum', root=True, timeout=120).splitlines()
if len(metadata) != 3 or not metadata[0].strip().isdigit():
raise ValueError('Invalid binary read verification / 二进制读取校验信息无效')
size = int(metadata[0].strip())
staged, source = (line.split()[0] if line.split() else '' for line in metadata[1:])
if size <= 0 or expected_size is not None and size != expected_size or expected_size is None and size > limit:
raise ValueError('Binary read size mismatch / 二进制读取大小不符')
if not re.fullmatch('[a-f0-9]{64}', staged) or source != staged:
raise ValueError('Source changed during binary read / 二进制源数据校验不一致')
call('pull', remote, str(partial), timeout=120)
if not partial.is_file() or partial.stat().st_size != size:
raise ValueError('Incomplete binary download / 二进制文件下载不完整')
digest = hashlib.sha256()
with partial.open('rb') as stream:
for block in iter(lambda:stream.read(1 << 20), b''): digest.update(block)
if digest.hexdigest() != staged:
raise ValueError('Binary download checksum mismatch / 二进制文件下载校验失败')
with partial.open('r+b') as stream: os.fsync(stream.fileno())
os.replace(partial, destination)
return size
finally:
try: shell('rm -f '+remote+'; rmdir '+directory, root=True, timeout=20)
except Exception: pass
if partial.exists(): partial.unlink()
+120
View File
@@ -0,0 +1,120 @@
"""Shared installed-boot recognition and misc trial selection for both families."""
import hashlib
import struct
import zlib
def inspect_linux_boot(read, size, family, slot):
if family not in ('e5','mu300') or slot not in ('a','b'):
raise ValueError('Unsupported boot family or slot')
limit=(56 if family=='e5' else 48)<<20
if type(size) is not int or size < limit or size % 512:
raise ValueError('Invalid boot partition size / 启动分区大小无效')
header=read(f'dd if=/dev/block/by-name/boot_{slot} bs=512 count=8 2>/dev/null')
tail=read(f'dd if=/dev/block/by-name/boot_{slot} bs=512 skip={size//512-1} count=1 2>/dev/null')
if len(header)!=4096 or len(tail)!=512 or header[:8]!=b'ANDROID!':
raise ValueError('Installed boot header is missing or incomplete / 已安装启动镜像头缺失或不完整')
kernel,ramdisk=struct.unpack_from('<II',header,8)
header_size=struct.unpack_from('<I',header,20)[0]
version=struct.unpack_from('<I',header,40)[0]
if version!=4 or header_size!=1584 or not kernel or not ramdisk:
raise ValueError('Unsupported installed boot format / 已安装启动镜像格式不受支持')
raw=header[44:1580]
if b'\0' not in raw:
raise ValueError('Invalid installed boot command line / 已安装启动参数无效')
try:command=raw.split(b'\0',1)[0].decode('ascii').split()
except UnicodeDecodeError:raise ValueError('Invalid installed boot command line / 已安装启动参数无效') from None
recognized='e5.part_v=2' in command if family=='e5' else 'loglevel=5' in command and not any(item.startswith('e5.') for item in command)
if not recognized:
raise ValueError('No recognized '+family+' Linux boot in slot '+slot+' / 目标槽未识别到相应机型系列的 Linux 启动镜像')
if any(item.startswith('e5.part_prepare=') for item in command):
raise ValueError('Partition preparation is pending; resume the saved installation / 分区准备尚未完成,请从保存记录续装')
end=4096+((kernel+4095)//4096)*4096+((ramdisk+4095)//4096)*4096
footer=tail[-64:]
if footer[:4]!=b'AVBf':
raise ValueError('Installed boot footer is missing / 已安装启动镜像尾部无效')
original,offset,length=struct.unpack_from('>QQQ',footer,12)
if original!=end or offset!=end or not length or offset+length>limit or offset+length>size-64:
raise ValueError('Installed boot payload bounds are invalid / 已安装启动镜像范围无效')
return {'header_version':version,'kernel_bytes':kernel,'ramdisk_bytes':ramdisk,'header_sha256':hashlib.sha256(header).hexdigest()}
def inspect_e5_boot(read,size):
return inspect_linux_boot(read,size,'e5','b')
def trial_control(before,slot):
if (slot not in ('a','b') or len(before)!=32 or before[4:8]!=b'BCAB' or before[8]!=1 or before[9]&7!=2 or
struct.unpack_from('<I',before,28)[0]!=zlib.crc32(before[:28])):
raise ValueError('Invalid current slot or BCAB format/CRC / 当前槽位或 misc 校验无效')
current=12 if slot=='a' else 14
opposite=14 if slot=='a' else 12
if not before[current]&0x80 or not before[current]&15 or before[13]&1 or before[15]&1:
raise ValueError('Android slot is not healthy; finish Android setup/update first / Android 槽位未就绪,请先完成 Android 初始化或更新')
if before[opposite]&15 > before[current]&15:
raise ValueError('Another slot has higher priority; finish or cancel the pending boot first / 另一槽位优先级较高,请先完成或取消待执行的启动')
result=bytearray(before)
result[:4]=b'_b\0\0' if slot=='a' else b'_a\0\0'
result[current]=(before[current]&0xf0)|14
result[opposite]=0x2f
struct.pack_into('<I',result,28,zlib.crc32(result[:28]))
return bytes(result)
def boot_installed_mu300(api,android,root):
"""Select the installed opposite slot without root mounts or boot writes."""
if android.slot not in ('a','b') or android.linux!=('b' if android.slot=='a' else 'a'):
raise ValueError('Invalid Android/Linux slot selection')
target='/dev/block/by-name/boot_'+android.linux
installed=inspect_linux_boot(android.read,int(android.shell('blockdev --getsize64 '+target).strip()),'mu300',android.linux)
current=android.read('dd if=/dev/block/by-name/boot_'+android.slot+' bs=512 count=8 2>/dev/null')
if len(current)!=4096 or current[:8]!=b'ANDROID!':
raise ValueError('Current Android boot header is incomplete / 当前 Android 启动镜像头不完整')
if hashlib.sha256(current).hexdigest()==installed['header_sha256']:
raise ValueError('Opposite slot has the same Android boot header; no distinct Linux boot identified / 另一槽与当前 Android 启动镜像头相同,未识别到独立 Linux 镜像')
before=android.live()
wanted=trial_control(before,android.slot)
for name in ('busybox','android-bootchain.sh'):
source=root/'desktop'/name if name=='android-bootchain.sh' else api['payload_file'](root,name)
android.push(source,name)
android.shell('chmod 755 '+android.bb)
android.run('"$BB" sh "$P/android-bootchain.sh" check')
android.put(wanted,'misc-trial.bin')
expected=hashlib.sha256(before).hexdigest();checksum=hashlib.sha256(wanted).hexdigest()
body='''set -o pipefail
[ "$(getprop ro.boot.slot_suffix)" = "_'''+android.slot+'''" ]
umask 077
mkdir -p /data/adb/openwrt-boot-control
backup=$(mktemp /data/adb/openwrt-boot-control/before.XXXXXX)
dd if=/dev/block/by-name/misc of="$backup" bs=1 skip=2048 count=32
[ "$(sha256sum "$backup" | cut -d ' ' -f1)" = '''+expected+''' ]
[ "$(stat -c %s "$P/misc-trial.bin")" = 32 ]
[ "$(sha256sum "$P/misc-trial.bin" | cut -d ' ' -f1)" = '''+checksum+''' ]
sync
if dd if="$P/misc-trial.bin" of=/dev/block/by-name/misc bs=1 seek=2048 count=32 conv=notrunc,fsync &&
[ "$(dd if=/dev/block/by-name/misc bs=1 skip=2048 count=32 | sha256sum | cut -d ' ' -f1)" = '''+checksum+''' ]; then
echo 'MISC-TRIAL-VERIFIED'
else
dd if="$backup" of=/dev/block/by-name/misc bs=1 seek=2048 count=32 conv=notrunc,fsync
[ "$(dd if=/dev/block/by-name/misc bs=1 skip=2048 count=32 | sha256sum | cut -d ' ' -f1)" = '''+expected+''' ] || echo 'MISC RESTORE FAILED; do not reboot'
exit 1
fi
'''
observer=api.get('GUI')
if observer:observer.action('misc-trial',lambda:android.run(body))
else:android.run(body)
android.reboot()
return api['Outcome']('success','OpenWrt trial selected; only misc changed / 已选择临时启动 OpenWrt,仅修改 misc。',
'Device is restarting; default-boot settings are unchanged / 设备正在重启,原默认启动设置保持不变。')
def boot_installed_e5(api, read):
"""Shared CLI/GUI trial selection, independent of the current package hash."""
api['steps'](2)
api['find_adb']()
api['android_checks']()
inspect_e5_boot(read,api['device_size']('/dev/block/by-name/boot_b'))
api['bootchain']('check')
api['arm_slot_b']()
api['say']('正在临时启动 OpenWrt(未更改默认设置)/ booting OpenWrt without changing defaults')
api['adb']('reboot')
+1 -1
View File
@@ -55,7 +55,7 @@ def traced(context, label, operation, output=False):
raise
context.log(f'END {label} ({time.monotonic()-started:.2f}s)', scope='transport')
if output and isinstance(result, str) and result.strip():
# Large base64/root-image output is not a useful CLI diagnostic.
# Large encoded or root-image output is not a useful CLI diagnostic.
if len(result) > 32768:context.log(f'Captured {len(result)} characters; tail:\n'+result[-4096:], scope='transport')
else:context.log(result, scope='transport')
return result
+149
View File
@@ -0,0 +1,149 @@
"""MU300 desktop updates, shared with CLI and older compatible package entries."""
import getpass
import json
import os
from pathlib import Path
import re
import secrets
import struct
import tempfile
LEGACY_LAYOUT_PROBE = '''set -eu
[ / -ef /mnt/mu300-disk/openwrt ] || { echo 'running root is not the MU300 OpenWrt container' >&2; exit 1; }
d=$(readlink -f "$(cat /run/mu300/disk-dev)")
case "$d" in /dev/loop[0-9]*) ;; *) echo 'legacy root is not a loop device' >&2; exit 1 ;; esac
[ -b "$d" ]
n=${d##*/}
id=$(cat /sys/class/block/$n/dev)
awk -v id="$id" '$3 == id && $5 == "/mnt/mu300-disk" {for (i=7;i<=NF;i++) if ($i == "-" && $(i+1) == "ext4") ok=1} END {exit !ok}' /proc/self/mountinfo
backing=$(readlink -f "$(cat /sys/class/block/$n/loop/backing_file)")
[ "$backing" = /dev/mmcblk0 ]
end=0
for p in /sys/class/block/mmcblk0p*; do
[ -r "$p/start" ] || continue
start=$(cat "$p/start"); size=$(cat "$p/size")
case "$start:$size" in *[!0-9:]*|:*|*:) exit 1 ;; esac
next=$((start + size))
[ "$next" -le "$end" ] || end=$next
done
printf 'MU300-LEGACY-LAYOUT-V1\\n%s\\n%s\\n' "$d" "$backing"
cat /sys/class/block/$n/loop/offset /sys/class/block/$n/size /sys/class/block/mmcblk0/size /sys/class/block/$n/loop/sizelimit
printf '%s\\n' "$end"
'''
def legacy_layout(client, root, execute, read_exact):
"""Prove the mounted hidden-area layout using bounded, read-only evidence."""
values = execute(client, LEGACY_LAYOUT_PROBE).strip().splitlines()
if (len(values) != 8 or values[0] != 'MU300-LEGACY-LAYOUT-V1'
or not re.fullmatch(r'/dev/loop[0-9]+', values[1]) or values[2] != '/dev/mmcblk0'
or any(not re.fullmatch(r'[0-9]+', v) for v in values[3:])):
raise ValueError('Cannot verify legacy hidden-area layout / 无法确认旧版隐藏区域布局,已停止更新')
offset, sectors, disk_sectors, limit, partition_end = map(int, values[3:])
if (not offset or offset % 512 or sectors <= 0 or partition_end <= 0
or offset//512 < partition_end or offset//512+sectors > disk_sectors-34
or limit not in (0, sectors*512)):
raise ValueError('Legacy root overlaps GPT partitions or exceeds eMMC bounds / 旧版根区域与分区重叠或超出 eMMC 范围')
# The legacy boot searches the first aligned region after GPT, then its
# saved ROOT_OFFSET. Do not accept a region the packaged boot cannot find.
original = (Path(root)/'desktop/files/boot/original-init').read_text(encoding='utf-8')
defaults = re.findall(r'^ROOT_OFFSET=([0-9]+)\b', original, re.MULTILINE)
offsets = {(partition_end//4096+1)*4096*512, *map(int, defaults)}
if offset not in offsets:
raise ValueError('Packaged legacy boot cannot locate this root offset / 安装包启动逻辑无法定位当前旧版根区域,已停止更新')
superblock = read_exact(client, f'dd if={values[1]} bs=1024 skip=1 count=1 2>/dev/null', 1024)
if (len(superblock) != 1024 or superblock[56:58] != b'\x53\xef'
or superblock[120:136].rstrip(b'\0') != b'mu300root'):
raise ValueError('Legacy root is not a verified mu300root ext4 filesystem / 旧版根区域不是可确认的 mu300root ext4 文件系统')
log_size = struct.unpack_from('<I', superblock, 24)[0]
blocks = struct.unpack_from('<I', superblock, 4)[0]
if struct.unpack_from('<I', superblock, 96)[0] & 0x80:
blocks |= struct.unpack_from('<I', superblock, 336)[0] << 32
capacity = blocks*(1024 << log_size) if log_size <= 6 else 0
if not 0 < capacity <= sectors*512:
raise ValueError('Legacy ext4 capacity exceeds its loop extent / 旧版 ext4 容量超出挂载区域')
return dict(mode='legacy', device=values[1], backing=values[2], offset=offset,
sectors=sectors, disk_sectors=disk_sectors, limit=limit,
partition_end=partition_end, capacity=capacity)
def update_mu300(api, args, root):
"""Reuse native config/vendor migration, locking, swap and verified writes."""
import paramiko
root = Path(root)
gui = api.get('GUI')
execute, read_exact = api['ssh_exec'], api['ssh_read_exact']
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
host = args.host or input('Device IP / 设备 IP [192.168.77.1]: ').strip() or '192.168.77.1'
try:
client.connect(host, username='root', password=gui.password if gui else os.environ.get('MU300_SSH_PASSWORD') or getpass.getpass('SSH root password: '),
timeout=15, look_for_keys=False, allow_agent=False)
if gui:
gui.validate_ssh(client)
info = execute(client, '''set -e
cat /run/mu300/device
cat /run/mu300/linux-slot
cat /run/mu300/misc-dev
if [ -s /etc/mu300/desktop-mode ]; then cat /etc/mu300/desktop-mode; else
d=$(cat /run/mu300/disk-dev)
case "$d" in /dev/mmcblk[1-9]*) echo sd ;; *) echo legacy ;; esac
fi''').strip().splitlines()
if (len(info) != 4 or info[0] not in ('f50', 'v50', 'u30air') or info[1] not in ('a', 'b')
or not re.fullmatch(r'/dev/mmcblk\d+p\d+', info[2])):
raise ValueError('Not a supported MU300 runtime')
mode = info[3]
if mode not in ('sd', 'part', 'data-image', 'legacy'):
raise ValueError('Unsupported root layout / 不支持的根区域布局: '+mode)
layout = legacy_layout(client, root, execute, read_exact) if mode == 'legacy' else None
if layout and gui:
planned = gui.ctx.record['plan']['openwrt_bytes']
if planned != layout['capacity']:
raise ValueError('Legacy root capacity changed since review / 旧版根区域容量与确认计划不一致,请重新检查设备')
gui.ctx.record['update_layout'] = layout
gui.ctx.store.save(gui.ctx.record)
gui.ctx.log(f'Verified legacy eMMC hidden-area root: offset={layout["offset"]}, '
f'capacity={layout["capacity"]}, loop_sectors={layout["sectors"]}; preserving layout', scope='update')
family = json.loads((root/'desktop/manifest.json').read_text(encoding='utf-8'))['kernel']
running = execute(client, 'uname -r').strip()
if not running.startswith(family+'.'):
raise ValueError('Kernel family mismatch: running '+running+', package '+family)
live = read_exact(client, f'dd if={info[2]} bs=1 skip=2048 count=32', 32)
slot = 'b' if info[1] == 'a' else 'a'
module = api['module'](root)
newboot = api['boot'](root, module, mode, live, slot)
control = module.boot_control(live, slot)
api['confirm']('Update OpenWrt while preserving settings and disk size; then reboot / 保留配置及容量更新,完成后重启。')
# Stage on disk, never upload a complete rootfs to the device's tmpfs.
destination = '/mnt/mu300-disk/.mu300-desktop-'+secrets.token_hex(6)
execute(client, 'mkdir -m 700 '+destination)
def send(local, name):
api['ssh_upload'](client, local, destination+'/'+name)
if execute(client, 'sha256sum '+destination+'/'+name).split()[0] != api['digest'](local):
raise ValueError('SSH upload checksum: '+name)
with api['payload_rootfs'](root) as archive:
send(archive, 'mu300-openwrt-rootfs.tar.gz')
for name in ('local-update.sh', 'mu300-update-library.sh'):
send(root/'desktop'/name, name)
send(api['payload_file'](root, 'busybox'), 'busybox')
for name in ('rootfs-critical.sha256', 'rootfs.requirements'):
send(api['payload_file'](root, name), name)
with tempfile.TemporaryDirectory() as temp:
for name, data in (('boot-desktop.img', newboot), ('misc-linux.bin', control)):
path = Path(temp)/name
path.write_bytes(data)
send(path, name)
if layout and legacy_layout(client, root, execute, read_exact) != layout:
raise ValueError('Legacy root layout changed during upload; nothing committed / 上传期间旧版根区域发生变化,未执行更新写入')
command = 'chmod 700 '+destination+'/busybox && sh '+destination+'/local-update.sh '+destination
if gui:
gui.action('update-commit', lambda: execute(client, command))
else:
execute(client, command)
finally:
client.close()
return api['Outcome']('success', 'Update verified; device is rebooting / 更新校验完成,设备正在重启。',
'Wait for OpenWrt to start / 等待 OpenWrt 启动。')
+21 -1
View File
@@ -18,7 +18,7 @@ import zipfile
from .adapter import Adapter, installation_committed
from .package import inspect_package
from .state import Cancelled, Context, DeviceLock, Pending, RecoveryRequired, Store, compatible
from .transport import Adb
from .transport import Adb, wireless_serial
METHODS = {'tf', 'part', 'reinstall', 'image', 'boot', 'update'}
@@ -165,6 +165,26 @@ class Service:
parts.append(name+'\n'+stream.read().decode('utf-8','replace'))
if len(parts)==1:parts.append('This older transaction has no debug log. Retry with the current installer to record detailed diagnostics.')
return {'text':'\n\n'.join(parts)}
if command == 'adb_connect':
if self.worker and self.worker.is_alive():
record = self.active.record if self.active else {}
if (record.get('unsafe') or record.get('status') not in ('waiting_user','waiting_device') or
record.get('stage') not in ('android_boot','android_setup','usb_debugging',
'debug_authorization','magisk','root_permission')):
raise ValueError('Pause before changing ADB connections / 请先暂停任务,再更改 ADB 连接')
return Adb(self.package_root).connect(p.get('address'))
if command == 'adb_disconnect':
if self.worker and self.worker.is_alive():
raise ValueError('Pause before disconnecting a device / 请先暂停任务,再断开设备')
serial = p.get('serial')
if not wireless_serial(serial):
raise ValueError('Select a wireless ADB device / 请选择无线 ADB 设备')
with ExitStack() as locks:
try:
locks.enter_context(DeviceLock(self.store.base, serial))
except (OSError, RuntimeError):
raise ValueError('Another installer is using this device; pause it first / 另一个安装器正在操作此设备,请先暂停其任务') from None
return Adb(self.package_root).disconnect(serial)
if self.worker and self.worker.is_alive() and command not in ('export',):
raise ValueError('An operation is active / 任务正在执行')
if command == 'package':
+77 -10
View File
@@ -1,5 +1,6 @@
"""Serial-bound ADB operations. Frontend never supplies shell text."""
import os
import ipaddress
from pathlib import Path
import re
import secrets
@@ -10,12 +11,56 @@ import time
from .state import sha
from .diagnostics import traced
from .binary_io import pull_binary
def hidden_process():
return {'creationflags': subprocess.CREATE_NO_WINDOW} if os.name == 'nt' else {}
def adb_endpoint(value):
"""Validate one TCP endpoint, never options or command text."""
invalid = 'Enter an address such as 192.168.0.1:5555 / 请输入地址,例如 192.168.0.1:5555'
if not isinstance(value, str) or len(value) > 270:
raise ValueError(invalid)
value = value.strip()
port = '5555'
if value.startswith('['):
match = re.fullmatch(r'\[([0-9a-fA-F:.]+)\](?::([0-9]{1,5}))?', value)
if not match: raise ValueError(invalid)
try: host = '['+str(ipaddress.IPv6Address(match[1]))+']'
except ValueError: raise ValueError(invalid) from None
port = match[2] or port
elif value.count(':') > 1:
try: host = '['+str(ipaddress.IPv6Address(value))+']'
except ValueError: raise ValueError(invalid) from None
else:
host, separator, supplied_port = value.partition(':')
if separator: port = supplied_port
if re.fullmatch(r'[0-9.]+', host or ''):
try: host = str(ipaddress.IPv4Address(host))
except ValueError: raise ValueError(invalid) from None
elif (len(host) > 253 or not host or
any(not re.fullmatch(r'[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?', label)
for label in host.split('.'))):
raise ValueError(invalid)
host = host.lower()
if not re.fullmatch(r'[0-9]{1,5}', port) or not 1 <= int(port) <= 65535:
raise ValueError(invalid)
return host+':'+str(int(port))
def wireless_serial(serial):
if not isinstance(serial, str): return False
if re.fullmatch(r'adb-[A-Za-z0-9_-]{1,200}\._adb-tls-connect\._tcp\.?', serial):
return True
if ':' not in serial: return False
try:
return adb_endpoint(serial) == serial.lower()
except ValueError:
return False
class Adb:
def __init__(self, package, serial=None):
self.serial = serial
@@ -30,7 +75,7 @@ class Adb:
def call(self, *args, timeout=20, check=True):
cmd = [self.exe]
if self.serial and args[0] != 'devices':
if self.serial and args[0] not in ('devices', 'connect', 'disconnect'):
cmd += ['-s', self.serial]
def perform():
result = subprocess.run(cmd + list(args), capture_output=True, timeout=timeout, **hidden_process())
@@ -46,9 +91,34 @@ class Adb:
values = line.split()
if len(values) >= 2:
result.append({'serial': values[0], 'state': values[1],
'wireless': wireless_serial(values[0]),
'label': next((v[6:] for v in values[2:] if v.startswith('model:')), values[0][-4:])})
return result
def connect(self, address):
endpoint = adb_endpoint(address)
try:
self.call('connect', endpoint, timeout=15)
except subprocess.TimeoutExpired:
raise ConnectionError('Wireless ADB connection timed out; check the address, network and device debugging / 无线 ADB 连接超时,请检查地址、网络和设备调试设置') from None
devices = self.devices()
found = next((d for d in devices if d['serial'] == endpoint), None)
if not found:
raise ConnectionError('Wireless ADB did not connect; check the address/port and enable wireless ADB on the device / 无线 ADB 未连接,请核对地址和端口,并在设备上开启无线 ADB')
return {'endpoint': endpoint, 'state': found['state'], 'devices': devices}
def disconnect(self, serial):
if not wireless_serial(serial) or not any(d['serial'] == serial for d in self.devices()):
raise ValueError('Select a connected wireless ADB device / 请选择列表中已连接的无线 ADB 设备')
try:
self.call('disconnect', serial, timeout=10)
except subprocess.TimeoutExpired:
raise ConnectionError('Disconnect timed out; refresh the device list / 断开连接超时,请刷新设备列表') from None
devices = self.devices()
if any(d['serial'] == serial for d in devices):
raise ConnectionError('Wireless ADB is still connected; refresh and retry / 无线 ADB 仍然连接,请刷新后重试')
return {'endpoint': serial, 'devices': devices}
def shell(self, script, root=False, timeout=20):
if root and self.su is None:
raise ValueError('Root has not been verified / 尚未验证 root')
@@ -75,16 +145,13 @@ class Adb:
return 'root_permission' if found else 'magisk'
def read(self, script):
"""Small binary metadata reads; partition backups use dd + adb pull."""
"""Small metadata uses the same verified staging/pull transport as CLI."""
if self.su is None:raise ValueError('Root has not been verified / 尚未验证 root')
command=(self.su+' -c ' if self.su else 'sh -c ')+shlex.quote('stty raw -echo -onlcr 2>/dev/null || true; '+script)
args=[self.exe]+(['-s',self.serial] if self.serial else [])+['exec-out',command]
def perform():
result=subprocess.run(args,capture_output=True,timeout=45,**hidden_process())
if result.returncode or not result.stdout:
raise ConnectionError('ADB metadata read failed / ADB 元数据读取失败')
return result.stdout
return traced(self.context,'ADB metadata read '+script,perform)
import tempfile
with tempfile.TemporaryDirectory() as temp:
local=Path(temp)/'metadata.bin'
pull_binary(self.call,self.shell,script,local)
return local.read_bytes()
def _backup_directory(self, context, total):
free=int(self.shell("df -Pk /data/local/tmp | tail -n1 | awk '{print $4}'").strip())*1024
+87
View File
@@ -0,0 +1,87 @@
"""Create a Windows-only MU300 host overlay, without copying device payloads."""
import argparse
from datetime import datetime
import json
from pathlib import Path
import shutil
import zipfile
from package_gui import digest, sources
HERE = Path(__file__).resolve().parent
TOP = HERE.parent
def build_patch(destination, artifact=None):
destination = Path(destination).resolve()
if destination.exists():raise ValueError('Choose a new patch directory; existing output is preserved')
artifact = Path(artifact or HERE/'artifacts/windows')
metadata = json.loads((artifact/'build.json').read_text(encoding='utf-8'))
if metadata.get('platform') != 'windows-x64' or metadata['source'] != sources():
raise ValueError('Build the current Windows installer first')
for name, checksum in metadata['files'].items():
path = (artifact/name).resolve()
if not path.is_relative_to(artifact.resolve()) or digest(path) != checksum:
raise ValueError('Build artifact checksum failed: '+name)
destination.mkdir(parents=True)
shutil.copy2(artifact/'OpenWrt-Installer.exe',destination/'OpenWrt-Installer.exe')
shutil.copytree(artifact/'tools/backend',destination/'tools/backend')
files = {'OpenWrt-Installer.py':TOP/'desktop/installer.py', 'desktop/installer.py':TOP/'desktop/installer.py',
'desktop/binary_io.py':HERE/'backend/binary_io.py','desktop/boot_control.py':HERE/'backend/boot_image.py',
'desktop/update_control.py':HERE/'backend/mu300_update.py',
'desktop/mu300-update-library.sh':TOP/'rootfs/overlay/opt/mu300/bin/mu300-update',
'docs/GUI-BUILD.json':artifact/'build.json','tools/installer-hotfix/apply.py':HERE/'apply_hotfix.py'}
for name in ('local-update.sh','android-write-part.sh','android-write-free.sh'):
files['desktop/'+name] = TOP/'desktop'/name
for name, source in files.items():
target = destination/name
target.parent.mkdir(parents=True,exist_ok=True)
shutil.copy2(source,target)
(destination/'APPLY-HOTFIX.cmd').write_bytes(
b'@echo off\r\nchcp 65001 >nul\r\ncd /d "%~dp0"\r\n'
b'"tools\\backend\\openwrt-backend.exe" --run-tool "tools\\installer-hotfix\\apply.py" "%cd%"\r\n'
b'set "PATCH_EXIT=%ERRORLEVEL%"\r\npause\r\nexit /b %PATCH_EXIT%\r\n')
guide = '''# MU300 Windows installer fix / MU300 Windows 安装器修复
1. 关闭旧安装器。将本 ZIP 的全部文件解压到原安装包目录,允许覆盖。不要只复制 EXE。
2. 双击 APPLY-HOTFIX.cmd。看到“安装器补丁校验完成”后关闭窗口。
3. 双击 OpenWrt-Installer.exe,选择“继续未完成的安装”,使用原记录重试更新。
本补丁适用于 MU300/F50/V50/U30Air 的 6.18、7.2 安装包,仅更新 Windows 安装器。
它修复旧版隐藏额外空间安装被 legacy 检查拒绝的问题。
无需重新分区、重装或清空 Android。请保留原包全部载荷、子目录和备份。
Mac 版本未更新。补丁不会连接或操作设备。
若提示校验失败,停止并保留完整提示;不要跳过校验或改选首次分区安装。
Close the installer. Extract every ZIP member over the original package, run
APPLY-HOTFIX.cmd once, then open OpenWrt-Installer.exe and retry the original record.
The patch updates Windows host files only; device payloads, Mac binaries and saved
transactions stay in place. No separate Python or PowerShell installation is needed.
'''
(destination/'HOTFIX-README.md').write_text(guide,encoding='utf-8',newline='\n')
patch = {'format':1,'id':datetime.now().strftime('%Y%m%d-%H%M%S')+'-mu300-windows',
'platform':'windows-x64','files':{p.relative_to(destination).as_posix():digest(p) for p in sorted(destination.rglob('*')) if p.is_file()}}
(destination/'tools/installer-hotfix/patch.json').write_text(json.dumps(patch,indent=2)+'\n',encoding='utf-8',newline='\n')
archive = destination.with_suffix('.zip')
if archive.exists():raise ValueError('Patch archive already exists')
with zipfile.ZipFile(archive,'w',zipfile.ZIP_DEFLATED,compresslevel=6) as output:
for path in sorted(destination.rglob('*')):
if path.is_file():output.write(path,path.relative_to(destination).as_posix())
with zipfile.ZipFile(archive) as output:
if output.testzip():raise ValueError('Patch ZIP CRC failed')
report = {'archive':str(archive),'sha256':digest(archive),'archive_bytes':archive.stat().st_size,
'gui_bytes':(destination/'OpenWrt-Installer.exe').stat().st_size,
'backend_bytes':sum(p.stat().st_size for p in (destination/'tools/backend').rglob('*') if p.is_file()),
'firmware_payload_bytes':0,'patch_id':patch['id']}
archive.with_suffix('.size.json').write_text(json.dumps(report,indent=2)+'\n',encoding='utf-8')
archive.with_suffix('.zip.sha256').write_text(report['sha256']+' '+archive.name+'\n',encoding='utf-8')
print(json.dumps(report,indent=2))
return archive
if __name__ == '__main__':
parser=argparse.ArgumentParser(description=__doc__)
parser.add_argument('destination',type=Path)
parser.add_argument('--artifact',type=Path)
args=parser.parse_args()
build_patch(args.destination,args.artifact)
+3
View File
@@ -20,6 +20,9 @@ def refresh(package):
shutil.copy2(TOP/'desktop/installer.py',package/'desktop/installer.py')
for name in ('android-write-part.sh','android-write-free.sh'):
shutil.copy2(TOP/'desktop'/name,package/'desktop'/name)
shutil.copy2(TOP/'installer/backend/binary_io.py',package/'desktop/binary_io.py')
shutil.copy2(TOP/'installer/backend/boot_image.py',package/'desktop/boot_control.py')
shutil.copy2(TOP/'installer/backend/mu300_update.py',package/'desktop/update_control.py')
attach(package)
manifest_path=package/'desktop/manifest.json'
manifest=json.loads(manifest_path.read_text())
Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

+5
View File
@@ -16,12 +16,17 @@ def main():
a=p.parse_args(); destination=a.repository.resolve()/'installer'
files={p.relative_to(HERE).as_posix():p for p in HERE.rglob('*') if p.is_file() and not any(x in EXCLUDE for x in p.relative_to(HERE).parts) and p.name!='SHARED-SOURCE.json'}
hashes={name:hashlib.sha256(path.read_bytes()).hexdigest() for name,path in files.items()}
compatibility = {'desktop/binary_io.py':HERE/'backend/binary_io.py','desktop/boot_control.py':HERE/'backend/boot_image.py',
'desktop/update_control.py':HERE/'backend/mu300_update.py'} if (a.repository/'desktop/installer.py').is_file() else {}
if a.check:
if any(not (destination/name).is_file() or hashlib.sha256((destination/name).read_bytes()).hexdigest()!=h for name,h in hashes.items()):
raise SystemExit('Shared installer differs; run installer/sync.py without --check')
if any(not (a.repository/name).is_file() or (a.repository/name).read_bytes()!=path.read_bytes() for name,path in compatibility.items()):
raise SystemExit('CLI binary helper differs; regenerate it from the shared backend')
else:
for name,path in files.items():
target=destination/name;target.parent.mkdir(parents=True,exist_ok=True);shutil.copy2(path,target)
for name,path in compatibility.items():shutil.copy2(path,a.repository/name)
(destination/'SHARED-SOURCE.json').write_text(json.dumps({'source':'e5-linux/installer','policy':'Generated mirror. Edit upstream then run sync.py; do not fork UI/protocol.','sha256':hashes},indent=2)+'\n')
print('Shared installer synchronized:',len(files))
+78
View File
@@ -0,0 +1,78 @@
"""Audit first-party installer sources and preserved releases; never run ADB."""
import argparse
import io
import json
from pathlib import Path
import re
import tokenize
import zipfile
PATTERN=re.compile(r'\b(?:base64|b64encode|b64decode|encodebytes|decodebytes|btoa|atob|FromBase64String|ToBase64String)\b',re.I)
SUFFIXES={'.py','.sh','.ps1','.cmd','.bat','.rs','.ts','.tsx','.java','.c'}
EXCLUDE={'node_modules','target','artifacts','__pycache__','tests','test','.git'}
ROOTS=('installer/backend','desktop','openwrt/bundle','boot','tools','android-vendor','upstream')
def matches(name, data):
text=data.decode('utf-8-sig',errors='replace')
if name.endswith('.py'):
# Keep executable strings (including remote shell commands), drop
# Python comments. A mention in a docstring is conservatively reported.
tokens=tokenize.generate_tokens(io.StringIO(text).readline)
return sorted({token.start[0] for token in tokens if token.type!=tokenize.COMMENT and PATTERN.search(token.string)})
return [number for number,line in enumerate(text.splitlines(),1)
if not line.lstrip().startswith(('#','//','/*','*')) and PATTERN.search(line)]
def source_audit(repo):
paths=set()
for root in ROOTS:
for path in (repo/root).rglob('*'):
relative=path.relative_to(repo)
if path.is_file() and path.suffix in SUFFIXES and not EXCLUDE.intersection(relative.parts) and not path.name.startswith(('test_','test-')):
paths.add(path)
paths.update(path for path in repo.glob('*') if path.is_file() and path.suffix in SUFFIXES)
findings=[]
for path in sorted(paths):
lines=matches(path.name,path.read_bytes())
if lines:findings.append({'file':path.relative_to(repo).as_posix(),'lines':lines})
return {'files_checked':len(paths),'encoded_transfer_candidates':findings}
def release_audit(repo):
rows=[]
for root in (repo/'out/releases',repo/'release'):
if not root.is_dir():continue
for entry in sorted(root.rglob('OpenWrt-Installer.py')):
files=[entry,entry.parent/'desktop/installer.py']
findings=[path.relative_to(entry.parent).as_posix() for path in files if path.is_file() and matches(path.name,path.read_bytes())]
rows.append({'path':entry.parent.relative_to(repo).as_posix(),'kind':'directory','encoded_cli_files':findings})
for archive in sorted(root.rglob('*.zip')):
with zipfile.ZipFile(archive) as bundle:
names=set(bundle.namelist())
entries=[name for name in names if name=='OpenWrt-Installer.py' or name.endswith('/OpenWrt-Installer.py')]
if not entries:continue
candidates=set(entries)
for name in entries:
prefix=name.removesuffix('OpenWrt-Installer.py')
if prefix+'desktop/installer.py' in names:candidates.add(prefix+'desktop/installer.py')
findings=[name for name in sorted(candidates) if matches(name,bundle.read(name))]
rows.append({'path':archive.relative_to(repo).as_posix(),'kind':'archive','encoded_cli_files':findings})
return rows
def main():
parser=argparse.ArgumentParser(description=__doc__)
parser.add_argument('repository',type=Path)
parser.add_argument('--releases',action='store_true')
parser.add_argument('--report',type=Path)
args=parser.parse_args();repo=args.repository.resolve()
result={'repository':repo.name,'scope':list(ROOTS)+['root entrypoints'],'sources':source_audit(repo),'hardware_access':False}
if args.releases:result['releases']=release_audit(repo)
result['source_audit_passed']=not result['sources']['encoded_transfer_candidates']
if args.report:args.report.write_text(json.dumps(result,indent=2)+'\n',encoding='utf-8')
print(json.dumps(result,indent=2))
if not result['source_audit_passed']:raise SystemExit(1)
if __name__=='__main__':main()
+1
View File
@@ -61,6 +61,7 @@ def main():
page.evaluate("window.__emitFixture({stage:'openwrt_boot',status:'waiting_user',revision:13,details:{host:'192.168.9.1',reboot_manually:true}})")
settle(page);layout(page)
assert page.locator('h1').inner_text()=='请现在手动重启设备'
assert '用户名 root,默认密码 root' in page.locator('.login-hint').inner_text()
guidance=page.locator('.boot-guidance')
assert '已开始重启或已进入 OpenWrt' in guidance.inner_text()
box=guidance.bounding_box()
+112
View File
@@ -0,0 +1,112 @@
"""Exercise shipped binary readers and cached legacy backups without hardware."""
import json
from pathlib import Path
import subprocess
import sys
def child(package, legacy_package=False):
import hashlib
import tempfile
from backend.adapter import Adapter, load
from backend.binary_io import pull_binary
from backend.package import inspect_package
from backend.state import Context, Store, sha
from backend.transport import Adb
assert getattr(sys, 'frozen', False)
data = bytes(range(256))*4096+b'\x00\r\n\xfftail'
checksum = hashlib.sha256(data).hexdigest()
calls = []
scripts = []
corrupt = False
def shell(script, **kwargs):
scripts.append(script)
if script.startswith('df '): return '1048576'
if script.startswith('umask 077; mkdir '): return ''
if script.startswith('set -e; set -o pipefail;'):
return str(len(data))+'\r\n'+checksum+' data.bin\r\n'+checksum+' -\r\n'
if script.startswith('rm -f '): return ''
raise AssertionError('Unexpected device command: '+script)
def call(*args, **kwargs):
assert args[0]=='pull' and args[1].startswith('/data/local/tmp/openwrt-read-')
calls.append(args)
Path(args[2]).write_bytes(b'X'+data[1:] if corrupt else data)
return b'1 file pulled'
with tempfile.TemporaryDirectory() as temp:
root = Path(temp)
local = root/'binary.bin'
pull_binary(call, shell, 'cat /sys/firmware/fdt', local)
assert local.read_bytes()==data
corrupt = True
try: pull_binary(call, shell, 'cat fixture', local)
except ValueError: pass
else: raise AssertionError('Corrupted download accepted')
assert local.read_bytes()==data and not local.with_name('binary.bin.partial').exists()
corrupt = False
adb = Adb.__new__(Adb)
adb.exe='fixture-adb'; adb.serial='selected'; adb.su='su'; adb.context=None
adb.call=call; adb.shell=shell
assert adb.read('cat /sys/firmware/fdt')==data
meta = inspect_package(package)
mu = meta['adapter']=='mu300'
if mu and not legacy_package:
cli = load(package/'OpenWrt-Installer.py', 'binary_cli_fixture')
cli.package_root=lambda:package
android = cli.Android.__new__(cli.Android)
android.call=call; android.shell=shell
assert android.read('cat /sys/firmware/fdt')==data
assert (package/'desktop/binary_io.py').is_file()
if mu:
if legacy_package:
assert '| base64' in (package/'OpenWrt-Installer.py').read_text(encoding='utf-8')
storage={'CID':'a'*32,'NODE':'mmcblk0p30','START':2048,'SIZE':40000000,'DISK_SIZE':60000000}
device={'serial':'selected','cid':'a'*32,'slot':'_a','storage':storage}
store=Store(root/'transactions')
record=store.create(meta,device,{}, {})
record['completed']=['backup']
ctx=Context(store,record,lambda *_:None)
adapter=Adapter(meta,ctx)
adapter.adb=adb
legacy=adapter.legacy.Android.__new__(adapter.legacy.Android)
legacy.serial='selected';legacy.slot='a'
assert legacy.read('cat /sys/firmware/fdt')==data
cache=ctx.directory/'backup';cache.mkdir()
names=['misc.bin','gpt-first.bin','gpt-last.bin']+[f'{name}_{slot}.bin' for name in ('boot','uboot','sml','teecfg','trustos','vbmeta') for slot in ('a','b')]
for name in names:(cache/name).write_bytes((name+'\n').encode()*20)
(cache/'checksums.json').write_text(json.dumps({name:sha(cache/name) for name in names}))
target=ctx.directory/'legacy-backups/fixture'
before=len(calls)
legacy.backup(target,storage)
assert len(calls)==before
assert (target/'boot_a.img').read_bytes()==(cache/'boot_a.bin').read_bytes()
assert (target/'SHA256SUMS').is_file()
assert all('base64' not in script and 'exec-out' not in script for script in scripts)
print(json.dumps({'package':package.name,'frozen_backend':True,'raw_bytes_verified':True,
'corrupt_download_rejected':True,'shared_read':True,'mu300_cli_read':mu and not legacy_package,
'mu300_gui_read_override':mu,'legacy_package':legacy_package,
'mu300_cached_backup_reused':mu,'simulated_transport':True,'hardware_access':False}))
if __name__=='__main__':
if len(sys.argv)>1 and sys.argv[1]=='--child': child(Path(sys.argv[2]).resolve(), '--legacy-package' in sys.argv[3:])
else:
import argparse
parser=argparse.ArgumentParser(description=__doc__)
parser.add_argument('packages',nargs='+',type=Path)
parser.add_argument('--report',type=Path)
parser.add_argument('--backend',type=Path)
parser.add_argument('--legacy-package',action='store_true',help='Test only the GUI overrides against a deliberately old CLI')
args=parser.parse_args();rows=[]
for package in args.packages:
backend=args.backend.resolve() if args.backend else package.resolve()/'tools/backend/openwrt-backend.exe'
command=[str(backend),'--run-tool',str(Path(__file__).resolve()),'--child',str(package.resolve())]
if args.legacy_package:command.append('--legacy-package')
result=subprocess.run(command,capture_output=True,timeout=45)
if result.returncode:raise RuntimeError(result.stderr.decode('utf-8','replace'))
rows.append(json.loads(result.stdout.decode('utf-8')))
print(package.name+': frozen binary transfer and backup checks passed',flush=True)
if args.report:args.report.write_text(json.dumps(rows,indent=2)+'\n',encoding='utf-8')
+157
View File
@@ -0,0 +1,157 @@
"""Run real packaged switch entrypoints against simulated installed boot metadata."""
import json
from pathlib import Path
import subprocess
import sys
def child(package,gui_only=False):
import hashlib
from types import SimpleNamespace
from backend.adapter import Adapter,load
from backend.package import inspect_package
assert getattr(sys,'frozen',False)
meta=inspect_package(package)
if meta['adapter']=='mu300':
return child_mu300(package,meta,gui_only)
image=package/'files/boot.img';size=image.stat().st_size
with image.open('rb') as stream:
original=stream.read(4096);stream.seek(size-512);tail=stream.read(512)
header=bytearray(original)
command=bytes(header[44:1580]).split(b'\0',1)[0]+b' e5.fixture_release=previous'
header[44:1580]=command.ljust(1536,b'\0')
assert hashlib.sha256(header).digest()!=hashlib.sha256(original).digest()
checks=[]
for mode in (('gui',) if gui_only else ('gui','cli')):
adapter=Adapter(meta) if mode=='gui' else None
legacy=adapter.legacy if adapter else load(package/'OpenWrt-Installer.py','switch_cli_fixture')
if not adapter:
legacy.B=str(package);legacy.F=str(package/'files');legacy.SCRIPTS=str(package/'scripts')
events=[];reads=[];invalid=False;chain_error=False
def read(script):
assert 'if=/dev/block/by-name/boot_b' in script and 'of=' not in script
reads.append(script)
return bytes(4096) if invalid else bytes(header) if 'count=8' in script else tail
def forbidden(*args,**kwargs):raise AssertionError('Unexpected package hash or root access')
def chain(mode):
assert mode=='check'
if chain_error:raise ValueError('fixture chain mismatch')
events.append('chain-check')
def adb(*args,**kwargs):
assert args==('reboot',);events.append('reboot')
legacy.steps=lambda *_:None;legacy.say=lambda *_:None
legacy.find_adb=lambda:None;legacy.android_checks=lambda:None
legacy.device_size=lambda target:size if target=='/dev/block/by-name/boot_b' else forbidden()
legacy.boot_json=forbidden;legacy.bootchain=chain
legacy.arm_slot_b=lambda:events.append('misc-trial')
legacy.adb=adb;legacy.su_checked=forbidden
if adapter:adapter.adb=SimpleNamespace(read=read)
else:legacy.su=lambda command:read(command).hex()
legacy.boot_openwrt(None)
assert events==['chain-check','misc-trial','reboot'] and len(reads)==2
events.clear();invalid=True
try:legacy.boot_openwrt(None)
except ValueError:pass
else:raise AssertionError('Invalid boot accepted')
assert not events
invalid=False;chain_error=True
try:legacy.boot_openwrt(None)
except ValueError:pass
else:raise AssertionError('Failed chain accepted')
assert not events
checks.append(mode)
print(json.dumps({'package':package.name,'frozen_backend':True,'entrypoints':checks,
'different_installed_release_accepted':True,'small_boot_reads_only':True,
'unknown_boot_rejected':True,'chain_failure_blocks_misc':True,'hardware_access':False}))
def child_mu300(package,meta,gui_only):
import contextlib
import hashlib
import io
import struct
import tempfile
import zlib
from types import SimpleNamespace
from backend.adapter import Adapter,load
from backend.state import Store,Context
manifest=json.loads((package/'desktop/manifest.json').read_text())
image=package/manifest['magisk_layout'].get('boot-linux.img','boot-linux.img')
size=image.stat().st_size
with image.open('rb') as stream:
original=stream.read(4096);stream.seek(size-512);tail=stream.read(512)
header=bytearray(original);header[44:1580]=b'console=tty0 loglevel=5 mu300.fixture_release=previous'.ljust(1536,b'\0')
assert hashlib.sha256(header).digest()!=hashlib.sha256(original).digest()
rows=[]
with tempfile.TemporaryDirectory() as temp:
for mode in (('gui',) if gui_only else ('gui','cli')):
for model in ('MU300','F50','V50','U30Air'):
for slot in ('a','b'):
events=[];reads=[];bodies=[]
before=bytearray(32);before[:4]=('_'+slot).encode()+b'\0\0';before[4:8]=b'BCAB';before[8]=1;before[9]=2
before[12],before[14]=(0x9f,0x1e) if slot=='a' else (0x1e,0x9f)
struct.pack_into('<I',before,28,zlib.crc32(before[:28]))
class Android:
def read(self,script):
reads.append(script)
if 'if=/dev/block/by-name/boot_'+self.slot+' ' in script:
current=bytearray(original);current[44:1580]=b'androidboot.fixture=stock'.ljust(1536,b'\0');return bytes(current)
assert 'if=/dev/block/by-name/boot_'+self.linux in script and 'of=' not in script
return bytes(header) if 'count=8' in script else tail
def shell(self,script):return str(size) if script.startswith('blockdev --getsize64 ') else ''
def live(self):return bytes(before)
def push(self,path,name):assert name in ('busybox','android-bootchain.sh')
def put(self,data,name):
assert name=='misc-trial.bin' and len(data)==32
assert data[:4]==(b'_b\0\0' if slot=='a' else b'_a\0\0')
assert zlib.crc32(data[:28])==struct.unpack_from('<I',data,28)[0]
def run(self,body):
if body.endswith('android-bootchain.sh" check'):events.append('chain-check')
else:
bodies.append(body);events.append('misc-trial')
assert 'count=32 conv=notrunc,fsync' in body
assert 'dd if="$backup" of=/dev/block/by-name/misc' in body
assert not any(word in body for word in ('mount ','of=/dev/block/by-name/boot','userdata','default-boot'))
def reboot(self):events.append('reboot')
android=Android();android.slot=slot;android.linux='b' if slot=='a' else 'a';android.model=model;android.bb='/fixture/busybox'
if mode=='gui':
store=Store(Path(temp)/(model+slot));record=store.create(meta,{'serial':'fixture','cid':'a'*32},{'method':'boot'},{'method':'boot','two_stage':False})
adapter=Adapter(meta,Context(store,record,lambda *_:None));legacy=adapter.legacy
else:
legacy=load(package/'OpenWrt-Installer.py','mu300_switch_fixture');legacy.package_root=lambda:package
names='V50\nMU3351' if model=='V50' else model
assert legacy.android_profile(names,'ums9620') in ('f50','v50','u30air')
legacy.Android=lambda *_:android
if mode=='gui':result=adapter.boot_mu300(SimpleNamespace())
else:
with contextlib.redirect_stdout(io.StringIO()):
result=legacy.install(SimpleNamespace(boot_openwrt=True),package,manifest)
assert result.state=='success' and events==['chain-check','misc-trial','reboot'] and len(reads)==3
if mode=='gui':
assert record['effects']['misc-trial']['state']=='done'
from backend.adapter import installation_committed
assert installation_committed(record)
rows.append({'entrypoint':mode,'model':model,'android_slot':slot})
print(json.dumps({'package':package.name,'frozen_backend':True,'matrix':rows,'different_installed_release_accepted':True,
'small_boot_reads_only':True,'misc_trial_recorded':True,'hardware_access':False}))
if __name__=='__main__':
if len(sys.argv)>1 and sys.argv[1]=='--child':child(Path(sys.argv[2]).resolve(),'--gui-only' in sys.argv[3:])
else:
import argparse
parser=argparse.ArgumentParser(description=__doc__)
parser.add_argument('packages',nargs='+',type=Path)
parser.add_argument('--report',type=Path)
parser.add_argument('--backend',type=Path)
parser.add_argument('--gui-only',action='store_true')
args=parser.parse_args();rows=[]
for package in args.packages:
backend=args.backend.resolve() if args.backend else package.resolve()/'tools/backend/openwrt-backend.exe'
command=[str(backend),'--run-tool',str(Path(__file__).resolve()),'--child',str(package.resolve())]
if args.gui_only:command.append('--gui-only')
result=subprocess.run(command,capture_output=True,timeout=45)
if result.returncode:raise RuntimeError(result.stderr.decode('utf-8','replace'))
rows.append(json.loads(result.stdout.decode('utf-8')))
print(package.name+': frozen GUI/CLI cross-release boot switch passed',flush=True)
if args.report:args.report.write_text(json.dumps(rows,indent=2)+'\n',encoding='utf-8')
+97
View File
@@ -0,0 +1,97 @@
"""Run the shipped MU300 update backend against old packages and fake SSH only."""
import json
from pathlib import Path
import subprocess
import sys
def child(package):
from contextlib import nullcontext, redirect_stdout
import hashlib
import io
import struct
import tempfile
from types import SimpleNamespace
import zlib
import paramiko
from backend.adapter import Adapter
from backend.mu300_update import LEGACY_LAYOUT_PROBE
from backend.package import inspect_package
from backend.state import Context, Store, sha
assert getattr(sys,'frozen',False)
meta=inspect_package(package)
assert meta['adapter']=='mu300'
capacity=34779168768
end=400000000;offset=(end//4096+1)*4096*512;sectors=capacity//512
fields=['MU300-LEGACY-LAYOUT-V1','/dev/loop0','/dev/mmcblk0',offset,sectors,(256<<30)//512,sectors*512,end]
raw=bytearray(1024);raw[56:58]=b'\x53\xef';raw[120:129]=b'mu300root'
struct.pack_into('<I',raw,24,2);struct.pack_into('<I',raw,4,capacity//4096)
live=bytearray(32);live[:4]=b'_a\0\0';live[4:8]=b'BCAB';live[8]=1;live[9]=2;live[12]=0x9f;live[14]=0x1e
struct.pack_into('<I',live,28,zlib.crc32(live[:28]))
key=hashlib.sha256(b'frozen-only-test-key').hexdigest()
original_client=paramiko.SSHClient
results=[]
try:
for mode in ('legacy','sd','part','data-image'):
with tempfile.TemporaryDirectory() as temp:
root=Path(temp);archive=root/'tiny-rootfs.tar.gz';archive.write_bytes(b'fake staged archive')
store=Store(root/'state')
record=store.create(meta,{'serial':'ssh:'+key,'cid':'a'*32,'ssh_key':key},
{'method':'update','host':'192.168.78.1'}, {'method':'update','openwrt_bytes':capacity})
adapter=Adapter(meta,Context(store,record,lambda *_:None));adapter.password='fixture-only'
events=[];uploads={};probes=[]
channel=SimpleNamespace(recv_exit_status=lambda:0)
public_key=SimpleNamespace(asbytes=lambda:b'frozen-only-test-key')
transport=SimpleNamespace(get_remote_server_key=lambda:public_key)
client=SimpleNamespace(set_missing_host_key_policy=lambda *_:None,
connect=lambda *args,**kwargs:events.append('connect'),get_transport=lambda:transport,
exec_command=lambda *args,**kwargs:(None,SimpleNamespace(channel=channel,read=lambda:b'11111111-1111-4111-8111-111111111111'),None),
close=lambda:events.append('close'))
paramiko.SSHClient=lambda:client
def execute(c,command):
if 'cat /run/mu300/device' in command:return 'u30air\nb\n/dev/mmcblk0p3\n'+mode
if command==LEGACY_LAYOUT_PROBE:probes.append(command);return '\n'.join(map(str,fields))+'\n'
if command=='uname -r':return meta['kernel']+'.99-fixture'
if command.startswith('mkdir '):events.append('stage');return ''
if command.startswith('sha256sum '):return uploads[command.split(' ',1)[1]]+' staged'
if command.startswith('chmod '):events.append('commit');return ''
raise AssertionError(command)
adapter.legacy.ssh_exec=execute
adapter.legacy.ssh_read_exact=lambda c,command,count:bytes(raw) if count==1024 else bytes(live)
adapter.legacy.ssh_upload=lambda c,local,remote:uploads.__setitem__(remote,sha(local))
adapter.legacy.payload_rootfs=lambda _:nullcontext(archive)
def obsolete(*args,**kwargs):raise AssertionError('Old package update gate executed')
adapter.legacy.update=obsolete
# The real package boot repacker executes; only transport and
# the uploaded rootfs fixture are replaced. No device opens.
with redirect_stdout(io.StringIO()):adapter.execute()
assert events==['connect','stage','commit','close'],events
assert record['effects']['update-commit']['state']=='done'
assert record['status']=='waiting_device' and len(uploads)==8
if mode=='legacy':
assert len(probes)==2 and record['update_layout']['capacity']==capacity
assert record['update_layout']['offset']==offset
else:assert not probes
results.append(mode)
finally:paramiko.SSHClient=original_client
print(json.dumps({'package':package.name,'kernel':meta['kernel'],'frozen_backend':True,
'modes':results,'real_package_boot_repacker':True,'old_gate_bypassed':True,
'original_capacity':capacity,'hardware_access':False}))
if __name__=='__main__':
if len(sys.argv)>1 and sys.argv[1]=='--child':child(Path(sys.argv[2]).resolve())
else:
import argparse
parser=argparse.ArgumentParser(description=__doc__)
parser.add_argument('packages',nargs='+',type=Path)
parser.add_argument('--backend',required=True,type=Path)
parser.add_argument('--report',type=Path)
args=parser.parse_args();rows=[]
for package in args.packages:
result=subprocess.run([str(args.backend.resolve()),'--run-tool',str(Path(__file__).resolve()),'--child',str(package.resolve())],
capture_output=True,timeout=90)
if result.returncode:raise RuntimeError(result.stderr.decode('utf-8','replace'))
rows.append(json.loads(result.stdout.decode('utf-8')))
print(package.name+': actual frozen update modes passed',flush=True)
if args.report:args.report.write_text(json.dumps(rows,indent=2)+'\n',encoding='utf-8')
+83
View File
@@ -0,0 +1,83 @@
"""Verify the shipped connection coordinator with an isolated fake ADB process."""
import json
from pathlib import Path
import subprocess
import sys
def child(package):
import io
import tempfile
from types import SimpleNamespace
from backend.service import Service
from backend.state import DeviceLock, Store
from backend import transport
assert getattr(sys, 'frozen', False)
devices = {'usb-fixture':'device'}
commands = []
original = transport.subprocess.run
def run(argv, **kwargs):
assert not kwargs.get('shell')
assert Path(argv[0]).name.lower() in ('adb.exe','adb')
args = argv[1:]; commands.append(args)
if args == ['devices','-l']:
output = 'List of devices attached\n'+''.join(s+' '+state+' model:Fixture\n' for s,state in devices.items())
elif len(args)==2 and args[0]=='connect':
devices[args[1]] = 'unauthorized'; output = 'ignored localized terminal text'
elif len(args)==2 and args[0]=='disconnect':
assert args[1] in devices and args[1]!='usb-fixture'
del devices[args[1]]; output = 'ignored terminal text'
else:
raise AssertionError('Unexpected ADB operation: '+repr(args))
return SimpleNamespace(returncode=0,stdout=output.encode(),stderr=b'')
transport.subprocess.run = run
try:
with tempfile.TemporaryDirectory() as temp:
service = Service(package, Store(temp), io.StringIO())
def dispatch(command, **params):
return service.dispatch({'protocol':1,'command':command,'params':params})
result = dispatch('adb_connect', address='192.168.0.1')
assert result['state']=='unauthorized' and len(result['devices'])==2
assert result['endpoint']=='192.168.0.1:5555'
count = len(commands)
try: dispatch('adb_connect', address='--help')
except ValueError: pass
else: raise AssertionError('Option injection accepted')
assert len(commands)==count
try: dispatch('adb_disconnect', serial='usb-fixture')
except ValueError: pass
else: raise AssertionError('USB disconnect accepted')
service.active = SimpleNamespace(record={'stage':'android_setup','status':'waiting_user','unsafe':False,'device':{'serial':'192.168.0.1:5555'}})
service.worker = SimpleNamespace(is_alive=lambda:True)
dispatch('adb_connect', address='192.168.0.1')
assert service.active.record['device']['serial']=='192.168.0.1:5555'
try: dispatch('adb_disconnect', serial='192.168.0.1:5555')
except ValueError: pass
else: raise AssertionError('Active transaction disconnected')
service.worker = None
count = len(commands)
with DeviceLock(service.store.base,'192.168.0.1:5555'):
try: dispatch('adb_disconnect', serial='192.168.0.1:5555')
except ValueError as error: assert 'Another installer' in str(error)
else: raise AssertionError('Device mutex bypassed')
assert len(commands)==count
result = dispatch('adb_disconnect', serial='192.168.0.1:5555')
assert [d['serial'] for d in result['devices']]==['usb-fixture']
assert ['disconnect','192.168.0.1:5555'] in commands
assert not any(c==['disconnect'] or c[0] in ('shell','kill-server','tcpip') for c in commands)
finally:
transport.subprocess.run = original
print(json.dumps({'frozen_backend':True,'wireless_connection':True,'authorization_state':True,
'exact_disconnect':True,'transaction_binding':True,'active_disconnect_blocked':True,'device_mutex':True,
'unsafe_arguments_rejected':True,'simulated_adb_only':True,'hardware_access':False}))
if __name__=='__main__':
if len(sys.argv)>1 and sys.argv[1]=='--child': child(Path(sys.argv[2]).resolve())
else:
package=Path(sys.argv[1]).resolve()
result=subprocess.run([str(package/'tools/backend/openwrt-backend.exe'),'--run-tool',str(Path(__file__).resolve()),'--child',str(package)],capture_output=True,timeout=30)
if result.returncode: raise RuntimeError(result.stderr.decode('utf-8','replace'))
print(result.stdout.decode('utf-8').strip())
+55
View File
@@ -0,0 +1,55 @@
"""Apply the real hotfix with its frozen interpreter to disposable old-package copies."""
import argparse
import json
from pathlib import Path
import shutil
import subprocess
import sys
import zipfile
sys.path.insert(0,str(Path(__file__).resolve().parents[1]))
from backend.package import inspect_package
def main():
parser=argparse.ArgumentParser(description=__doc__)
parser.add_argument('patch',type=Path)
parser.add_argument('workspace',type=Path)
parser.add_argument('packages',nargs='+',type=Path)
parser.add_argument('--report',type=Path)
args=parser.parse_args()
if args.workspace.exists():raise ValueError('Use a new verification workspace')
args.workspace.mkdir(parents=True)
rows=[]
for source in args.packages:
before=inspect_package(source)
target=args.workspace/source.name
shutil.copytree(source,target,ignore=shutil.ignore_patterns('__pycache__'))
with zipfile.ZipFile(args.patch) as archive:
assert archive.testzip() is None
assert all((target/name).resolve().is_relative_to(target.resolve()) for name in archive.namelist())
archive.extractall(target)
backend=target/'tools/backend/openwrt-backend.exe'
command=[str(backend.resolve()),'--run-tool',str((target/'tools/installer-hotfix/apply.py').resolve()),str(target.resolve())]
for _ in range(2):
result=subprocess.run(command,capture_output=True,timeout=60)
if result.returncode:raise RuntimeError(result.stderr.decode('utf-8','replace'))
after=inspect_package(target)
assert before['payloads']==after['payloads']
result=subprocess.run([str(backend.resolve()),'--cli','--package-root',str(target.resolve()),'--check','--no-pause'],
capture_output=True,timeout=60)
if result.returncode:raise RuntimeError(result.stderr.decode('utf-8','replace'))
request=json.dumps({'protocol':1,'id':1,'command':'package','params':{'path':str(target.resolve())}})+'\n'
result=subprocess.run([str(backend.resolve()),'--package-root',str(target.resolve()),'--data-dir',str((target/'test-state').resolve())],
input=request.encode(),capture_output=True,timeout=60)
replies=[json.loads(line) for line in result.stdout.decode('utf-8').splitlines()]
response=next(row for row in replies if row.get('type')=='response')
assert result.returncode==0 and response['data']['ok'],response
rows.append({'package':source.name,'kernel':before['kernel'],'real_frozen_patcher':True,
'repeat_apply':True,'cli_package_check':True,'ndjson_package_check':True,
'firmware_payloads_unchanged':True,'hardware_access':False})
print(source.name+': patched package/CLI/protocol verified; firmware preserved',flush=True)
if args.report:args.report.write_text(json.dumps(rows,indent=2)+'\n',encoding='utf-8')
if __name__=='__main__':main()
+2
View File
@@ -17,6 +17,7 @@ def main():
page.goto('http://127.0.0.1:1420')
page.get_by_role('button',name='安装 OpenWrt',exact=False).click();settle(page)
refresh=page.get_by_role('button',name='刷新设备',exact=True)
assert page.locator('.wireless-adb summary').inner_text()=='无线 ADB 连接'
assert refresh.is_enabled()
assert page.get_by_role('button',name='检查设备',exact=True).is_disabled()
assert page.get_by_role('button',name='查看安装计划',exact=True).is_disabled()
@@ -69,6 +70,7 @@ def main():
page.get_by_role('button',name='返回',exact=True).click();settle(page)
page.get_by_label('语言').select_option('en')
page.get_by_role('button',name='Advanced options',exact=False).click();settle(page)
assert page.locator('.wireless-adb summary').inner_text()=='Wireless ADB connection'
page.locator('.page-scroll').evaluate('(el)=>el.scrollTop=el.scrollHeight')
page.get_by_role('button',name='Userdata image',exact=True).click()
selection(page,'input[type=number]','text')
+1 -1
View File
@@ -9,7 +9,7 @@ import time
from urllib.request import urlopen
ROOT=Path(__file__).resolve().parents[1]
CHECKS=('ui_smoke','help_smoke','refresh_smoke','method_smoke','ordering_smoke','diagnostics_smoke','update_smoke','support_smoke')
CHECKS=('ui_smoke','help_smoke','refresh_smoke','method_smoke','ordering_smoke','diagnostics_smoke','update_smoke','support_smoke','wireless_smoke')
def main():
+2 -7
View File
@@ -104,13 +104,8 @@ class Backup(unittest.TestCase):
with self.assertRaisesRegex(ValueError,'staging space'):self.adb.backup_partition('boot_a',self.target,self.ctx)
self.assertFalse(any('dd if=' in command for command in self.commands))
def test_metadata_read_is_binary_and_serial_bound(self):
result=type('Result',(),{'returncode':0,'stdout':self.data,'stderr':b''})()
with patch('backend.transport.subprocess.run',return_value=result) as run:
self.assertEqual(self.adb.read('bounded read'),self.data)
args=run.call_args.args[0]
self.assertEqual(args[:4],['adb','-s','selected','exec-out'])
self.assertNotIn('base64',args[-1])
# Metadata byte/serial integrity is covered by test_binary_io using the
# actual staging/pull helper, including corrupt and interrupted downloads.
if __name__=='__main__':unittest.main()
+119
View File
@@ -0,0 +1,119 @@
"""Binary staging, hash checks and legacy GUI delegation without real ADB."""
import hashlib
import json
from pathlib import Path
import subprocess
import sys
import tempfile
from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
sys.path.insert(0,str(Path(__file__).resolve().parents[1]))
from backend.binary_io import pull_binary
from backend.adapter import Adapter
from backend.state import Context, Store, sha
from backend.transport import Adb
class BinaryIO(unittest.TestCase):
def setUp(self):
self.temp=tempfile.TemporaryDirectory();self.addCleanup(self.temp.cleanup)
self.root=Path(self.temp.name);self.local=self.root/'binary.bin'
self.data=bytes(range(256))*4096+b'\x00\r\n\xfftail'
self.corrupt=False;self.short=False;self.source_changed=False;self.free=1024*1024
self.scripts=[];self.calls=[];self.failed=False
def shell(self,script,**kwargs):
self.scripts.append((script,kwargs))
if script.startswith('df '):return str(self.free)
if script.startswith('umask 077; mkdir '):return ''
if script.startswith('set -e; set -o pipefail;'):
if self.failed:raise ConnectionError('fixture staging failed')
h=hashlib.sha256(self.data).hexdigest()
return str(len(self.data))+'\r\n'+h+' data.bin\r\n'+('0'*64 if self.source_changed else h)+' -\r\n'
if script.startswith('rm -f '):return ''
self.fail(script)
def pull(self,*args,**kwargs):
self.calls.append(args)
self.assertEqual(args[0],'pull')
self.assertTrue(args[1].startswith('/data/local/tmp/openwrt-read-'))
data=self.data[:-1] if self.short else b'X'+self.data[1:] if self.corrupt else self.data
Path(args[2]).write_bytes(data)
return b'1 file pulled'
def test_raw_bytes_survive_crlf_and_all_byte_values(self):
self.assertEqual(pull_binary(self.pull,self.shell,'cat /sys/firmware/fdt',self.local),len(self.data))
self.assertEqual(self.local.read_bytes(),self.data)
self.assertTrue(self.scripts[-1][0].startswith('rm -f '))
self.assertTrue(self.scripts[1][1]['root'] is False)
self.assertFalse(any('exec-out' in c for c in self.calls))
def test_corrupt_short_or_changed_source_never_replace_verified_file(self):
for flag in ('corrupt','short','source_changed','failed'):
with self.subTest(flag=flag):
self.local.write_bytes(b'previous verified data')
setattr(self,flag,True)
with self.assertRaises((ValueError,ConnectionError)):pull_binary(self.pull,self.shell,'dd if=fixture bs=4096 count=1',self.local)
self.assertEqual(self.local.read_bytes(),b'previous verified data')
self.assertFalse(self.local.with_name('binary.bin.partial').exists())
self.assertTrue(self.scripts[-1][0].startswith('rm -f '))
setattr(self,flag,False)
def test_space_size_and_metadata_limits_stop_before_download(self):
self.free=1
with self.assertRaises(ValueError):pull_binary(self.pull,self.shell,'cat fixture',self.local)
self.assertEqual(len(self.scripts),1)
self.free=1024*1024
with self.assertRaises(ValueError):pull_binary(self.pull,self.shell,'cat fixture',self.local,expected_size=len(self.data)+1)
with self.assertRaises(ValueError):pull_binary(self.pull,self.shell,'cat fixture',self.local,limit=10)
self.assertFalse(self.calls)
def test_shared_read_uses_actual_serial_bound_pull(self):
adb=Adb.__new__(Adb);adb.exe='fixture-adb';adb.serial='chosen';adb.su='su';adb.context=None
def run(argv,**kwargs):
self.assertEqual(argv[:4],['fixture-adb','-s','chosen','pull'])
self.pull(*argv[3:])
return subprocess.CompletedProcess(argv,0,b'1 file pulled',b'')
with patch.object(adb,'shell',side_effect=self.shell),patch('backend.transport.subprocess.run',side_effect=run):
self.assertEqual(adb.read('cat /sys/firmware/fdt'),self.data)
class LegacyGUI(unittest.TestCase):
def setUp(self):
self.temp=tempfile.TemporaryDirectory();self.addCleanup(self.temp.cleanup)
self.root=Path(self.temp.name)
(self.root/'OpenWrt-Installer.py').write_text('class Android:\n def call(self,*a,**k): raise AssertionError("legacy call")\n def read(self,*a): raise AssertionError("old binary transport")\n def backup(self,*a): raise AssertionError("duplicate device backup")\n')
self.storage={'CID':'a'*32,'NODE':'mmcblk0p30','START':2048,'SIZE':40000000,'DISK_SIZE':60000000}
device={'serial':'selected','cid':'a'*32,'slot':'_a','storage':self.storage}
self.store=Store(self.root/'data');self.record=self.store.create({'path':str(self.root),'adapter':'mu300'},device,{}, {})
self.record['completed']=['backup'];self.ctx=Context(self.store,self.record,lambda *_:None)
self.adapter=Adapter(self.record['package'],self.ctx)
self.adapter.adb=SimpleNamespace(serial='selected',read=Mock(return_value=b'raw fixture'))
self.android=self.adapter.legacy.Android();self.android.serial='selected';self.android.slot='a'
backup=self.ctx.directory/'backup';backup.mkdir()
names=['misc.bin','gpt-first.bin','gpt-last.bin']+[f'{n}_{s}.bin' for n in ('boot','uboot','sml','teecfg','trustos','vbmeta') for s in ('a','b')]
for name in names:(backup/name).write_bytes((name+'\n').encode()*20)
(backup/'checksums.json').write_text(json.dumps({n:sha(backup/n) for n in names}))
def test_old_package_read_and_backup_are_replaced_by_shared_backend(self):
self.assertEqual(self.android.read('bounded read'),b'raw fixture')
target=self.ctx.directory/'legacy-backups/fixture'
self.android.backup(target,self.storage)
self.assertEqual((target/'boot_a.img').read_bytes(),(self.ctx.directory/'backup/boot_a.bin').read_bytes())
self.assertTrue((target/'SHA256SUMS').is_file())
self.adapter.adb.read.assert_called_once_with('bounded read')
def test_wrong_device_layout_or_corrupted_cache_stops(self):
target=self.ctx.directory/'legacy-backups/fixture'
with self.assertRaises(ValueError):self.android.backup(target,{**self.storage,'START':4096})
self.assertFalse(target.exists())
(self.ctx.directory/'backup/boot_a.bin').write_bytes(b'corrupt')
with self.assertRaises(ValueError):self.android.backup(target,self.storage)
self.assertFalse(target.exists())
self.android.serial='other'
with self.assertRaises(ValueError):self.android.read('bounded read')
if __name__=='__main__':unittest.main()
+69
View File
@@ -0,0 +1,69 @@
"""Installed-image recognition and trial switching with no physical device."""
from pathlib import Path
import struct
import sys
import unittest
from unittest.mock import Mock
sys.path.insert(0,str(Path(__file__).resolve().parents[1]))
from backend.boot_image import inspect_e5_boot,boot_installed_e5
def fixture(command='loglevel=7 e5.part_v=2', kernel=1048576):
header=bytearray(4096);header[:8]=b'ANDROID!'
struct.pack_into('<II',header,8,kernel,524288)
struct.pack_into('<I',header,20,1584);struct.pack_into('<I',header,40,4)
header[44:1580]=command.encode().ljust(1536,b'\0')
tail=bytearray(512);tail[-64:-60]=b'AVBf'
end=4096+((kernel+4095)//4096)*4096+524288
struct.pack_into('>QQQ',tail,512-64+12,end,end,4096)
return bytes(header),bytes(tail),64<<20
class InstalledBoot(unittest.TestCase):
def test_valid_different_releases_and_partition_override_use_only_small_reads(self):
for command,kernel in [('loglevel=7 e5.part_v=2',1048576),('loglevel=5 e5.part_v=2 e5.root=part',2097152)]:
header,tail,size=fixture(command,kernel)
read=Mock(side_effect=[header,tail])
result=inspect_e5_boot(read,size)
self.assertEqual(result['kernel_bytes'],kernel)
self.assertEqual(read.call_count,2)
for call in read.call_args_list:
self.assertIn('if=/dev/block/by-name/boot_b',call.args[0])
self.assertNotIn('of=',call.args[0])
self.assertNotIn('sha256sum',call.args[0])
def test_unknown_stock_truncated_pending_or_invalid_bounds_are_rejected(self):
header,tail,size=fixture()
cases=[(header[:-1],tail,size),(b'x'+header[1:],tail,size),
(fixture('console=tty0')[0],tail,size),
(fixture('e5.part_v=2 e5.part_prepare=deadbeef')[0],tail,size),
(fixture(kernel=60<<20)[0],fixture(kernel=60<<20)[1],size),
(header,tail[:-1],size),(header,bytes(512),size),(header,tail,1)]
bad=bytearray(header);struct.pack_into('<I',bad,40,3);cases.append((bytes(bad),tail,size))
bad=bytearray(tail);struct.pack_into('>Q',bad,512-64+20,1);cases.append((header,bytes(bad),size))
for h,t,n in cases:
with self.subTest(size=n,header=h[:8]),self.assertRaises(ValueError):
inspect_e5_boot(Mock(side_effect=[h,t]),n)
def test_only_misc_trial_and_reboot_follow_successful_checks(self):
header,tail,size=fixture('e5.part_v=2 e5.root=part')
order=[]
api={name:Mock(side_effect=lambda *a,key=name:order.append(key)) for name in ('steps','find_adb','android_checks','bootchain','arm_slot_b','say','adb')}
api['device_size']=Mock(return_value=size)
boot_installed_e5(api,Mock(side_effect=[header,tail]))
self.assertEqual(order,['steps','find_adb','android_checks','bootchain','arm_slot_b','say','adb'])
api['bootchain'].assert_called_once_with('check')
api['adb'].assert_called_once_with('reboot')
def test_failed_image_or_chain_never_arms_misc_or_reboots(self):
header,tail,size=fixture()
for bad_header,bad_chain in [(True,False),(False,True)]:
api={name:Mock() for name in ('steps','find_adb','android_checks','bootchain','arm_slot_b','say','adb')}
api['device_size']=Mock(return_value=size)
if bad_chain:api['bootchain'].side_effect=ValueError('chain mismatch')
with self.assertRaises(ValueError):boot_installed_e5(api,Mock(side_effect=[bytes(4096) if bad_header else header,tail]))
api['arm_slot_b'].assert_not_called();api['adb'].assert_not_called()
if __name__=='__main__':unittest.main()
+1 -1
View File
@@ -84,7 +84,7 @@ class FlowBoundaries(unittest.TestCase):
def test_restart_between_final_write_and_wait_checkpoint(self):
for kind, method, final in [('e5','tf','misc-trial'), ('e5','part','misc-trial'),
('e5','image','misc-trial'), ('e5','boot','misc-trial'),
('mu300','tf','root-tf-write'), ('mu300','part','boot-and-misc-1234'),
('mu300','boot','misc-trial'), ('mu300','tf','root-tf-write'), ('mu300','part','boot-and-misc-1234'),
('mu300','reinstall','boot-and-misc-5678'), ('mu300','image','boot-and-misc-90ab')]:
with self.subTest(adapter=kind,method=method):
self.record.update(package={**PACKAGE,'adapter':kind}, choices={'method':method},
+1 -1
View File
@@ -39,7 +39,7 @@ class Helpers(unittest.TestCase):
self.script.write_text('raise RuntimeError("converter-specific failure")\n')
with self.assertRaisesRegex(ValueError,'converter-specific failure'):
run_helper(self.ctx,self.root,self.script,[])
self.assertIn('Traceback',(self.ctx.directory/'debug.ndjson').read_text())
self.assertIn('Traceback',(self.ctx.directory/'debug.ndjson').read_text(encoding='utf-8'))
def test_converter_timeout_is_bounded(self):
self.script.write_text('import time\ntime.sleep(30)\n')
+70
View File
@@ -0,0 +1,70 @@
"""Host overlay checks operate on temporary files and never connect to devices."""
from contextlib import redirect_stdout
import io
import json
from pathlib import Path
import sys
import tempfile
import unittest
sys.path.insert(0,str(Path(__file__).resolve().parents[1]))
from apply_hotfix import apply, digest
class Hotfix(unittest.TestCase):
def setUp(self):
self.temp=tempfile.TemporaryDirectory();self.addCleanup(self.temp.cleanup)
self.root=Path(self.temp.name)
for name in ('tools/installer-hotfix','desktop','payload','tools/backend'):(self.root/name).mkdir(parents=True,exist_ok=True)
for name in ('payload/mu300-openwrt.tar.gz','payload/boot-linux.img','desktop/boot_image.py','tools/backend/obsolete.dll'):
(self.root/name).write_bytes(('original '+name).encode())
self.manifest={'format':2,'kernel':'7.2','magisk':{n:digest(self.root/n) for n in ('payload/mu300-openwrt.tar.gz','payload/boot-linux.img')},
'desktop':{n:digest(self.root/n) for n in ('desktop/boot_image.py','tools/backend/obsolete.dll')}}
self.path=self.root/'desktop/manifest.json'
self.path.write_text(json.dumps(self.manifest))
files={}
for name in ('OpenWrt-Installer.exe','OpenWrt-Installer.py','desktop/installer.py','desktop/update_control.py','tools/backend/openwrt-backend.exe'):
(self.root/name).write_bytes(('new '+name).encode());files[name]=digest(self.root/name)
self.metadata=self.root/'tools/installer-hotfix/patch.json'
self.patch={'format':1,'id':'20261016-220000-mu300-windows','files':files}
self.metadata.write_text(json.dumps(self.patch))
def run_patch(self):
with redirect_stdout(io.StringIO()):return apply(self.root)
def test_apply_and_retry_preserve_firmware_and_update_only_host_hashes(self):
before=(self.root/'payload/mu300-openwrt.tar.gz').read_bytes()
self.run_patch();self.run_patch()
updated=json.loads(self.path.read_text())
self.assertEqual(updated['magisk'],self.manifest['magisk'])
self.assertEqual((self.root/'payload/mu300-openwrt.tar.gz').read_bytes(),before)
self.assertEqual(updated['source']['installer.py'],digest(self.root/'desktop/installer.py'))
self.assertFalse((self.root/'tools/backend/obsolete.dll').exists())
for name,wanted in {**updated['magisk'],**updated['desktop']}.items():self.assertEqual(digest(self.root/name),wanted)
def test_corrupt_patch_payload_and_original_host_file_do_not_change_manifest(self):
for name in ('OpenWrt-Installer.exe','payload/boot-linux.img','desktop/boot_image.py'):
with self.subTest(name=name):
path=self.root/name;original=path.read_bytes();before=self.path.read_bytes()
path.write_bytes(b'changed')
with self.assertRaises(ValueError):self.run_patch()
self.assertEqual(self.path.read_bytes(),before)
path.write_bytes(original)
def test_firmware_entries_and_escaping_paths_are_refused(self):
for name in ('payload/boot-linux.img','tools/backend/../../../outside'):
with self.subTest(name=name):
self.patch['files'][name]='0'*64
self.metadata.write_text(json.dumps(self.patch))
before=self.path.read_bytes()
with self.assertRaises(ValueError):self.run_patch()
self.assertEqual(self.path.read_bytes(),before)
self.patch['files'].pop(name)
def test_retry_after_old_runtime_file_was_already_removed(self):
(self.root/'tools/backend/obsolete.dll').unlink()
self.run_patch()
self.assertNotIn('tools/backend/obsolete.dll',json.loads(self.path.read_text())['desktop'])
if __name__=='__main__':unittest.main()
+10 -3
View File
@@ -109,13 +109,20 @@ class MethodRouting(unittest.TestCase):
root=Path(directory);(root/'desktop').mkdir();(root/'desktop/manifest.json').write_text('{}')
record=Store(root/'app').create({'path':directory,'adapter':kind},{'serial':SERIAL},{'method':method},{'method':method,'openwrt_bytes':4<<30})
a=self.adapter(kind);a.root=root;a.ctx=Context(Store(root/'app'),record,lambda *_:None)
a.probe=Mock();a.backup=Mock();a.stage=Mock();a.update_e5=Mock()
a.probe=Mock();a.backup=Mock();a.stage=Mock();a.update_e5=Mock();a.boot_mu300=Mock()
a.legacy=SimpleNamespace(**{n:Mock() for n in ('install_sd','install','part_two_stage','boot_openwrt','install_part','update')})
flags=args_for(record,root)
self.assertEqual(sum(bool(getattr(flags,n)) for n in ('tf','part','reinstall_part','data','boot_openwrt')),0 if method=='update' else 1)
a.execute()
with patch('backend.adapter.update_mu300') as shared_update:
a.execute()
if method=='update':
(a.update_e5 if kind=='e5' else a.legacy.update).assert_called_once()
if kind=='e5':a.update_e5.assert_called_once();shared_update.assert_not_called()
else:
shared_update.assert_called_once()
self.assertIs(shared_update.call_args.args[0],vars(a.legacy))
a.legacy.update.assert_not_called()
elif kind=='mu300' and method=='boot':
a.boot_mu300.assert_called_once();a.legacy.install.assert_not_called()
elif kind=='mu300':a.legacy.install.assert_called_once()
else:
target={'tf':'install_sd','part':'install_part','reinstall':'part_two_stage','image':'install','boot':'boot_openwrt'}[method]
+53
View File
@@ -0,0 +1,53 @@
"""Execute the generated misc transaction against ordinary Linux test files."""
import os
from pathlib import Path
import shlex
import shutil
import subprocess
import sys
import tempfile
import unittest
sys.path.insert(0,str(Path(__file__).resolve().parents[1]))
from backend.boot_image import boot_installed_mu300
import test_mu300_boot_switch as fixture
@unittest.skipUnless(sys.platform=='linux' and shutil.which('bash'),'run the file-only shell fixture in Linux/WSL')
class MiscScript(unittest.TestCase):
def test_success_corruption_short_write_and_changed_source(self):
for slot in ('a','b'):
for failure in ('none','corrupt','short','changed'):
with self.subTest(slot=slot,failure=failure),tempfile.TemporaryDirectory(prefix='misc-script-') as temp:
root=Path(temp);android=fixture.AndroidFixture(slot)
boot_installed_mu300(fixture.MU300Switch().api(),android,root)
before=bytes(range(256))*8+android.before+bytes(range(256))*8
initial=before if failure!='changed' else before[:2048]+bytes(32)+before[2080:]
misc=root/'misc';misc.write_bytes(initial)
(root/'misc-trial.bin').write_bytes(android.wanted)
(root/'untouched-root').write_bytes(b'root must remain untouched')
shim=root/'bin';shim.mkdir()
dd=shutil.which('dd')
(shim/'dd').write_text('#!/bin/sh\nif [ "$1" = "if=$P/misc-trial.bin" ] && [ "$FAILURE" != none ]; then\n'+
' '+shlex.quote(dd)+' if=/dev/zero of="$FIXTURE_MISC" bs=1 seek=2048 count=8 conv=notrunc,fsync 2>/dev/null\n'+
' [ "$FAILURE" != short ]; exit $?\nfi\nexec '+shlex.quote(dd)+' "$@"\n')
(shim/'dd').chmod(0o755)
body=android.body.replace('/dev/block/by-name/misc',shlex.quote(str(misc))).replace('/data/adb/openwrt-boot-control',shlex.quote(str(root/'backups')))
script='set -eu\ngetprop() { printf "%s\\n" "_'+slot+'"; }\n'+body
env=dict(os.environ,P=str(root),FAILURE=failure,FIXTURE_MISC=str(misc),PATH=str(shim)+':'+os.environ['PATH'])
result=subprocess.run(['bash','-c',script],capture_output=True,text=True,env=env,timeout=10)
after=misc.read_bytes()
if failure=='none':
self.assertEqual(result.returncode,0,result.stderr)
self.assertEqual(after[2048:2080],android.wanted)
self.assertIn('MISC-TRIAL-VERIFIED',result.stdout)
else:
self.assertNotEqual(result.returncode,0)
self.assertEqual(after,initial)
self.assertNotIn('MISC-TRIAL-VERIFIED',result.stdout)
self.assertEqual(after[:2048],initial[:2048]);self.assertEqual(after[2080:],initial[2080:])
self.assertEqual((root/'untouched-root').read_bytes(),b'root must remain untouched')
backups=list((root/'backups').glob('before.*'))
self.assertEqual(len(backups),1);self.assertEqual(backups[0].read_bytes(),initial[2048:2080])
if __name__=='__main__':unittest.main()
+110
View File
@@ -0,0 +1,110 @@
"""Both MU300 Android slots and all profiles share one misc-only switch."""
from pathlib import Path
import struct
import sys
import unittest
from types import SimpleNamespace
import zlib
sys.path.insert(0,str(Path(__file__).resolve().parents[1]))
from backend.boot_image import boot_installed_mu300,trial_control
from backend.adapter import installation_committed
from test_boot_switch import fixture
def control(slot):
raw=bytearray(32);raw[:4]=('_'+slot).encode()+b'\0\0';raw[4:8]=b'BCAB';raw[8]=1;raw[9]=2
raw[12],raw[14]=(0x9f,0x1e) if slot=='a' else (0x1e,0x9f)
struct.pack_into('<I',raw,28,zlib.crc32(raw[:28]));return bytes(raw)
class AndroidFixture:
def __init__(self,slot,model='MU300'):
self.slot=slot;self.linux='b' if slot=='a' else 'a';self.model=model;self.bb='/fixture/busybox'
self.header,self.tail,self.size=fixture('console=tty0 loglevel=5 androidboot.fixture=previous')
self.android_header=fixture('androidboot.fixture=stock')[0]
self.before=control(slot);self.calls=[];self.body='';self.chain_failed=False;self.write_failed=False
def read(self,script):
self.calls.append(('read',script))
if 'if=/dev/block/by-name/boot_'+self.slot+' ' in script:return self.android_header
assert 'if=/dev/block/by-name/boot_'+self.linux in script
return self.header if 'count=8' in script else self.tail
def shell(self,script):
self.calls.append(('shell',script))
return str(self.size) if script.startswith('blockdev --getsize64 ') else ''
def live(self):return self.before
def push(self,path,name):self.calls.append(('push',name))
def put(self,data,name):self.calls.append(('put',name));self.wanted=data
def run(self,script):
if script.endswith('android-bootchain.sh" check'):
if self.chain_failed:raise ValueError('chain mismatch')
self.calls.append(('chain','check'))
else:
self.body=script;self.calls.append(('misc','write'))
if self.write_failed:raise ValueError('write/readback failed')
def reboot(self):self.calls.append(('reboot',))
class MU300Switch(unittest.TestCase):
def api(self,observer=None):
return {'GUI':observer,'payload_file':lambda root,name:root/'payload'/name,'Outcome':lambda *args:SimpleNamespace(state=args[0],message=args[1],next_step=args[2])}
def test_profiles_slots_and_extra_boot_arguments_share_verified_trial(self):
for model in ('MU300','F50','V50','U30Air'):
for slot in ('a','b'):
with self.subTest(model=model,slot=slot):
android=AndroidFixture(slot,model);effects=[]
def action(name,fn):effects.append(name);return fn()
result=boot_installed_mu300(self.api(SimpleNamespace(action=action)),android,Path('/fixture'))
self.assertEqual(result.state,'success');self.assertEqual(effects,['misc-trial'])
self.assertEqual(android.calls[-1],('reboot',))
wanted=trial_control(android.before,slot)
self.assertEqual(android.wanted,wanted)
self.assertEqual(wanted[:4],b'_b\0\0' if slot=='a' else b'_a\0\0')
current=12 if slot=='a' else 14
self.assertTrue(wanted[current]&0x80)
self.assertEqual(wanted[14 if slot=='a' else 12],0x2f)
self.assertEqual(zlib.crc32(wanted[:28]),struct.unpack_from('<I',wanted,28)[0])
for forbidden in ('mount ','of=/dev/block/by-name/boot','userdata','default-boot',' sync "$T/bootchain'):
self.assertNotIn(forbidden,android.body)
self.assertIn('count=32 conv=notrunc,fsync',android.body)
self.assertIn('dd if="$backup" of=/dev/block/by-name/misc',android.body)
def test_chain_or_write_failure_never_reboots(self):
for flag in ('chain_failed','write_failed'):
android=AndroidFixture('a');setattr(android,flag,True)
with self.assertRaises(ValueError):boot_installed_mu300(self.api(),android,Path('/fixture'))
self.assertNotIn(('reboot',),android.calls)
if flag=='chain_failed':self.assertFalse(android.body)
def test_invalid_misc_crc_health_and_pending_priority_stop_before_writes(self):
for change in ('crc','health','verity','priority'):
android=AndroidFixture('b');raw=bytearray(android.before)
if change=='crc':raw[28]^=1
else:
if change=='health':raw[14]=0x1f
if change=='verity':raw[13]=1
if change=='priority':raw[14]=0x9e;raw[12]=0x1f
struct.pack_into('<I',raw,28,zlib.crc32(raw[:28]))
android.before=bytes(raw)
with self.subTest(change=change),self.assertRaises(ValueError):boot_installed_mu300(self.api(),android,Path('/fixture'))
self.assertFalse(any(call[0] in ('push','put','misc','reboot') for call in android.calls))
def test_wrong_family_unknown_slot_and_invalid_header_stop_before_writes(self):
for variant in ('e5','stock','truncated','slot','identical'):
android=AndroidFixture('a')
if variant=='e5':android.header=fixture('loglevel=5 e5.part_v=2')[0]
elif variant=='stock':android.header=fixture('androidboot.hardware=stock')[0]
elif variant=='truncated':android.header=bytes(40)
elif variant=='identical':android.android_header=android.header
else:android.linux=android.slot
with self.subTest(variant=variant),self.assertRaises(ValueError):boot_installed_mu300(self.api(),android,Path('/fixture'))
self.assertFalse(any(call[0] in ('push','put','misc','reboot') for call in android.calls))
def test_completed_trial_resumes_wait_without_replaying_misc(self):
record={'package':{'adapter':'mu300'},'choices':{'method':'boot'},'plan':{'method':'boot'},'effects':{'misc-trial':{'state':'done'}}}
self.assertTrue(installation_committed(record))
record['effects']['misc-trial']['state']='started'
self.assertFalse(installation_committed(record))
if __name__=='__main__':unittest.main()
+239
View File
@@ -0,0 +1,239 @@
"""Hidden-area updates use proven loop geometry; all transports are simulated."""
from contextlib import nullcontext, redirect_stdout
import hashlib
import importlib.util
import io
import json
import os
from pathlib import Path
import shlex
import struct
import subprocess
import sys
import tempfile
from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
from backend.adapter import Adapter
from backend.mu300_update import LEGACY_LAYOUT_PROBE, legacy_layout
from backend.state import Context, Store
CAPACITY = 34779168768 # Capacity from the supplied U30Air report.
PARTITION_END = 400000000
OFFSET = (PARTITION_END//4096+1)*4096*512
SECTORS = CAPACITY//512
DISK_SECTORS = (256 << 30)//512
def geometry(**changes):
fields = dict(device='/dev/loop0', backing='/dev/mmcblk0', offset=OFFSET,
sectors=SECTORS, disk_sectors=DISK_SECTORS, limit=SECTORS*512,
partition_end=PARTITION_END)
fields.update(changes)
return 'MU300-LEGACY-LAYOUT-V1\n'+'\n'.join(map(str, fields.values()))+'\n'
def superblock(capacity=CAPACITY):
data = bytearray(1024)
data[56:58] = b'\x53\xef'
data[120:129] = b'mu300root'
struct.pack_into('<I', data, 24, 2)
struct.pack_into('<I', data, 4, capacity//4096)
return bytes(data)
class LegacyUpdate(unittest.TestCase):
def setUp(self):
self.temp = tempfile.TemporaryDirectory()
self.addCleanup(self.temp.cleanup)
self.root = Path(self.temp.name)
boot = self.root/'desktop/files/boot'
boot.mkdir(parents=True)
(boot/'original-init').write_text('ROOT_OFFSET=27762098176\n')
(self.root/'desktop/manifest.json').write_text(json.dumps({'kernel':'7.2'}))
def probe(self, text=None, raw=None):
execute = Mock(return_value=geometry() if text is None else text)
read = Mock(return_value=superblock() if raw is None else raw)
result = legacy_layout('client', self.root, execute, read)
read.assert_called_once_with('client', 'dd if=/dev/loop0 bs=1024 skip=1 count=1 2>/dev/null', 1024)
return result
def test_reported_capacity_in_256_gib_hidden_area_needs_only_one_kib(self):
layout = self.probe()
self.assertEqual(layout['capacity'], CAPACITY)
self.assertEqual(layout['offset'], OFFSET)
self.assertEqual(layout['mode'], 'legacy')
def test_gpt_overlap_overflow_wrong_backing_and_unbootable_offsets_stop(self):
invalid = [dict(device='/dev/mmcblk0p40'), dict(device='/dev/loop0;reboot'),
dict(backing='/data/mu300linux/openwrt.ext4'), dict(offset=OFFSET+1),
dict(offset=4096), dict(sectors=DISK_SECTORS), dict(limit=17),
dict(partition_end=0), dict(offset=OFFSET+4096)]
for change in invalid:
with self.subTest(change=change), self.assertRaises(ValueError):self.probe(geometry(**change))
for text in ('', geometry().replace('MU300-LEGACY-LAYOUT-V1','unknown'), geometry()+'extra\n'):
with self.assertRaises(ValueError):self.probe(text)
def test_ext4_identity_and_capacity_are_required(self):
for pos in (56, 120):
bad = bytearray(superblock());bad[pos] ^= 1
with self.assertRaises(ValueError):self.probe(raw=bytes(bad))
with self.assertRaises(ValueError):self.probe(raw=superblock(CAPACITY+(1 << 30)))
with self.assertRaises(ValueError):self.probe(raw=superblock()[:-1])
with self.assertRaises(ValueError):self.probe(raw=superblock(0))
def test_saved_legacy_boot_offset_is_supported_without_repartition(self):
offset = OFFSET+4096
(self.root/'desktop/files/boot/original-init').write_text('ROOT_OFFSET='+str(offset)+'\n')
self.assertEqual(self.probe(geometry(offset=offset))['offset'], offset)
@unittest.skipIf(os.name == 'nt', 'POSIX shell fixture, run in Linux/WSL')
def test_real_readonly_probe_checks_mounted_container_and_loop_source(self):
fake = self.root/'runtime'
files = {'run/mu300/disk-dev':'/dev/loop0', 'sys/class/block/loop0/dev':'7:0',
'sys/class/block/loop0/loop/backing_file':'/dev/mmcblk0',
'sys/class/block/loop0/loop/offset':str(OFFSET), 'sys/class/block/loop0/size':str(SECTORS),
'sys/class/block/loop0/loop/sizelimit':str(SECTORS*512),
'sys/class/block/mmcblk0/size':str(DISK_SECTORS),
'sys/class/block/mmcblk0p1/start':'2048',
'sys/class/block/mmcblk0p1/size':str(PARTITION_END-2048),
'proc/self/mountinfo':'17 11 7:0 / /mnt/mu300-disk rw - ext4 /dev/loop0 rw'}
for name, value in files.items():
path = fake/name
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(value+'\n')
root = fake/'root'
root.mkdir()
container = fake/'container'
container.symlink_to(root, target_is_directory=True)
script = LEGACY_LAYOUT_PROBE.replace('[ / -ef /mnt/mu300-disk/openwrt ]',
'[ '+shlex.quote(str(root))+' -ef '+shlex.quote(str(container))+' ]')
# Only the block-device predicate is replaced; every sysfs/mount read,
# case guard, arithmetic operation and protocol printf runs unchanged.
script = script.replace('[ -b "$d" ]', '[ "$d" = /dev/loop0 ]')
for prefix in ('/sys/class/block', '/run/mu300', '/proc/self/mountinfo'):
script = script.replace(prefix, str(fake)+prefix)
def run():return subprocess.run(['/bin/sh','-c',script], capture_output=True, text=True, timeout=5)
result = run()
self.assertEqual(result.returncode, 0, result.stderr)
self.assertEqual(result.stdout, geometry())
(fake/'proc/self/mountinfo').write_text(files['proc/self/mountinfo'].replace('7:0','7:1'))
self.assertNotEqual(run().returncode, 0)
(fake/'proc/self/mountinfo').write_text(files['proc/self/mountinfo'])
(fake/'sys/class/block/loop0/loop/backing_file').write_text('/data/mu300linux/openwrt.ext4')
self.assertNotEqual(run().returncode, 0)
def execute_update(self, mode='legacy', fail=None, changed=False, capacity=CAPACITY, family='7.2.8', entry='gui'):
package = dict(path=str(self.root), adapter='mu300', profile='mu300-family', kernel='7.2', layout='mu300root-container')
store = Store(self.root/'state')
choices = dict(method='update', host='192.168.78.1', grow=True)
record = store.create(package, {'serial':'ssh:fixture', 'cid':'a'*32}, choices,
{'method':'update', 'openwrt_bytes':capacity, 'preserves_settings':True})
adapter = Adapter.__new__(Adapter)
adapter.root, adapter.kind = self.root, 'mu300'
adapter.ctx = Context(store, record, lambda *_:None)
adapter.validate_ssh = Mock()
adapter.password = 'fixture-only'
captured, commands, probes = {}, [], []
for name in ('rootfs.tar.gz', 'local-update.sh', 'mu300-update-library.sh', 'busybox', 'rootfs-critical.sha256', 'rootfs.requirements'):
(self.root/name).write_bytes(('fixture '+name).encode())
if name.endswith('.sh'):(self.root/name).replace(self.root/'desktop'/name)
def upload(client, local, remote):captured[remote] = Path(local).read_bytes()
def execute(client, command):
commands.append(command)
if 'cat /run/mu300/device' in command:return 'u30air\nb\n/dev/mmcblk0p3\n'+mode+'\n'
if command == LEGACY_LAYOUT_PROBE:
probes.append(command)
return geometry(device='/dev/loop1') if changed and len(probes)>1 else geometry()
if command == 'uname -r':return family
if command.startswith('sha256sum '):
return 'wrong hash' if fail else hashlib.sha256(captured[command.split(' ',1)[1]]).hexdigest()+' staged'
if command.startswith(('mkdir ', 'chmod ')):return ''
raise AssertionError(command)
read = Mock(side_effect=lambda client, command, count:superblock() if count == 1024 else bytes(32))
repacker = SimpleNamespace(boot_control=Mock(return_value=bytes(32)))
boot = Mock(return_value=b'fixture-new-boot')
old_update = Mock(side_effect=AssertionError('Obsolete package gate executed'))
adapter.legacy = SimpleNamespace(GUI=adapter, ssh_exec=execute, ssh_read_exact=read,
module=lambda root:repacker, boot=boot, confirm=Mock(), ssh_upload=upload,
digest=lambda p:hashlib.sha256(Path(p).read_bytes()).hexdigest(),
payload_rootfs=lambda root:nullcontext(self.root/'rootfs.tar.gz'),
payload_file=lambda root,name:self.root/name, Outcome=lambda *args:SimpleNamespace(state=args[0]), update=old_update)
client = Mock()
error = None
with patch('paramiko.SSHClient', return_value=client), patch.dict(os.environ, {'MU300_SSH_PASSWORD':'fixture-only'}), redirect_stdout(io.StringIO()):
try:
if entry == 'cli':
spec = importlib.util.spec_from_file_location('hidden_area_cli_fixture', Path(__file__).resolve().parents[2]/'desktop/installer.py')
cli = importlib.util.module_from_spec(spec);spec.loader.exec_module(cli)
for key, value in vars(adapter.legacy).items():
if key != 'update':setattr(cli, key, value)
cli.GUI = None
cli.update(SimpleNamespace(host='192.168.78.1'), self.root)
else:adapter.execute()
except ValueError as caught:error = caught
client.close.assert_called_once()
old_update.assert_not_called()
return record, commands, captured, boot, error
def test_actual_adapter_bypasses_old_gate_and_commits_preserved_legacy_mode(self):
record, commands, captured, boot, error = self.execute_update()
self.assertIsNone(error)
self.assertEqual(boot.call_args.args[2], 'legacy')
self.assertEqual(record['update_layout']['capacity'], CAPACITY)
self.assertEqual(record['update_layout']['offset'], OFFSET)
self.assertEqual(record['effects']['update-commit']['state'], 'done')
self.assertEqual(record['status'], 'waiting_device')
self.assertEqual(sum(c == LEGACY_LAYOUT_PROBE for c in commands), 2)
self.assertEqual(sum(c.startswith('chmod ') for c in commands), 1)
self.assertEqual(len(captured), 8)
self.assertTrue(all(p.startswith('/mnt/mu300-disk/.mu300-desktop-') for p in captured))
def test_actual_compatible_cli_uses_same_hidden_area_update(self):
if not (Path(__file__).resolve().parents[2]/'desktop/installer.py').is_file():
self.skipTest('MU300 CLI source is tested in its repository')
_, commands, captured, boot, error = self.execute_update(entry='cli')
self.assertIsNone(error)
self.assertEqual(boot.call_args.args[2], 'legacy')
self.assertEqual(sum(c == LEGACY_LAYOUT_PROBE for c in commands), 2)
self.assertEqual(sum(c.startswith('chmod ') for c in commands), 1)
self.assertEqual(len(captured), 8)
def test_transfer_failure_never_commits(self):
record, commands, _, _, error = self.execute_update(fail=True)
self.assertIn('checksum', str(error))
self.assertFalse(any(c.startswith('chmod ') for c in commands))
self.assertNotIn('update-commit', record['effects'])
def test_changed_loop_binding_before_commit_stops(self):
record, commands, _, _, error = self.execute_update(changed=True)
self.assertIn('layout changed', str(error))
self.assertFalse(any(c.startswith('chmod ') for c in commands))
self.assertNotIn('update-commit', record['effects'])
def test_stale_capacity_and_kernel_family_stop_before_upload(self):
for change, message in [({'capacity':4 << 30}, 'capacity changed'), ({'family':'6.18.54'}, 'Kernel family')]:
with self.subTest(change=change):
_, commands, captured, _, error = self.execute_update(**change)
self.assertIn(message, str(error))
self.assertFalse(captured)
self.assertFalse(any(c.startswith('mkdir ') for c in commands))
def test_existing_modes_keep_their_boot_target(self):
for mode in ('sd', 'part', 'data-image'):
with self.subTest(mode=mode):
record, commands, _, boot, error = self.execute_update(mode=mode)
self.assertIsNone(error)
self.assertEqual(boot.call_args.args[2], mode)
self.assertNotIn('update_layout', record)
self.assertNotIn(LEGACY_LAYOUT_PROBE, commands)
self.assertEqual(record['effects']['update-commit']['state'], 'done')
if __name__ == '__main__':unittest.main()
+136
View File
@@ -0,0 +1,136 @@
"""Host-only ADB connection management; no physical device or network access."""
import copy
import io
from pathlib import Path
import subprocess
import sys
import tempfile
from types import SimpleNamespace
import unittest
from unittest.mock import Mock, patch
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
from backend.service import Service
from backend.state import DeviceLock, Store
from backend.transport import Adb, adb_endpoint, wireless_serial
class WirelessAdbTest(unittest.TestCase):
def adb(self):
adb = Adb.__new__(Adb)
adb.exe, adb.serial, adb.context = 'fixture-adb', 'usb-existing', None
return adb
def result(self, output, code=0):
return subprocess.CompletedProcess([], code, output.encode(), b'')
def test_endpoints_are_normalized_without_command_text(self):
for value, expected in [('192.168.0.1','192.168.0.1:5555'),
(' PHONE.local:12345 ','phone.local:12345'),
('[2001:db8::1]:5556','[2001:db8::1]:5556'),
('::1','[::1]:5555')]:
with self.subTest(value=value): self.assertEqual(adb_endpoint(value), expected)
for value in [None, 123, '', '-a', '--help', 'x;reboot', 'x&reboot', 'x$(reboot)',
'x\nreboot', 'x y', 'http://x', 'x/abc', 'x:', 'x:0', 'x:65536',
'x:-1', 'x:abc', '999.168.0.1', '[bad::ip]:5555', 'a..b', '-a.local']:
with self.subTest(value=value), self.assertRaises(ValueError): adb_endpoint(value)
def test_connect_uses_fixed_argv_and_actual_enumeration_even_if_cli_claims_failure(self):
replies = [self.result('cannot connect (fixture terminal text)'),
self.result('List of devices attached\n192.168.0.1:5555 unauthorized\nusb-1234 device model:M8\n')]
with patch('backend.transport.subprocess.run', side_effect=replies) as run:
result = self.adb().connect('192.168.0.1')
self.assertEqual(result['state'], 'unauthorized')
self.assertEqual(len(result['devices']), 2)
self.assertTrue(result['devices'][0]['wireless'])
self.assertFalse(result['devices'][1]['wireless'])
self.assertEqual(run.call_args_list[0].args[0], ['fixture-adb','connect','192.168.0.1:5555'])
self.assertEqual(run.call_args_list[1].args[0], ['fixture-adb','devices','-l'])
self.assertNotIn('shell', run.call_args_list[0].kwargs)
def test_success_text_without_device_is_failure_and_can_retry(self):
replies = [self.result('connected to 192.168.0.1:5555'), self.result('List of devices attached\n'),
self.result('anything'), self.result('List of devices attached\n192.168.0.1:5555 device model:M8\n')]
with patch('backend.transport.subprocess.run', side_effect=replies):
adb = self.adb()
with self.assertRaises(ConnectionError): adb.connect('192.168.0.1')
self.assertEqual(adb.connect('192.168.0.1')['state'], 'device')
def test_offline_device_is_reported_as_offline(self):
with patch('backend.transport.subprocess.run', side_effect=[self.result(''), self.result('List of devices attached\n192.168.0.1:5555 offline\n')]):
self.assertEqual(self.adb().connect('192.168.0.1')['state'], 'offline')
def test_timeout_and_invalid_address_cannot_report_success(self):
with patch('backend.transport.subprocess.run') as run:
with self.assertRaises(ValueError): self.adb().connect('x;reboot')
run.assert_not_called()
with patch('backend.transport.subprocess.run', side_effect=subprocess.TimeoutExpired('adb',15)):
with self.assertRaisesRegex(ConnectionError, 'timed out'): self.adb().connect('192.168.0.1')
def test_disconnect_is_exactly_one_observed_wireless_device(self):
before = 'List of devices attached\n192.168.0.1:5555 device\n192.168.0.2:5555 device\nusb-1234 device\n'
after = 'List of devices attached\n192.168.0.2:5555 device\nusb-1234 device\n'
with patch('backend.transport.subprocess.run', side_effect=[self.result(before),self.result('done'),self.result(after)]) as run:
result = self.adb().disconnect('192.168.0.1:5555')
self.assertEqual(run.call_args_list[1].args[0], ['fixture-adb','disconnect','192.168.0.1:5555'])
self.assertEqual([d['serial'] for d in result['devices']], ['192.168.0.2:5555','usb-1234'])
for serial in [None, '', 'usb-1234', '--all', '192.168.0.3:5555']:
with self.subTest(serial=serial), patch('backend.transport.subprocess.run', return_value=self.result(before)) as run:
with self.assertRaises(ValueError): self.adb().disconnect(serial)
self.assertFalse(any('disconnect' in c.args[0] for c in run.call_args_list))
def test_disconnect_checks_result_and_supports_mdns_network_serials(self):
serial = 'adb-DEVICE-ABC._adb-tls-connect._tcp'
self.assertTrue(wireless_serial(serial))
self.assertFalse(wireless_serial('usb-1234'))
listing = self.result('List of devices attached\n'+serial+' device\n')
with patch('backend.transport.subprocess.run', side_effect=[listing,self.result('disconnected'),listing]):
with self.assertRaises(ConnectionError): self.adb().disconnect(serial)
def test_protocol_needs_no_package_and_keeps_the_transaction_bound(self):
with tempfile.TemporaryDirectory() as temp, patch('backend.service.Adb') as adb:
service = Service(temp, Store(temp), io.StringIO())
service.worker = Mock(is_alive=lambda:True)
record = {'stage':'android_setup','status':'waiting_user','unsafe':False,
'device':{'serial':'192.168.0.1:5555','cid':'original'}}
service.active = SimpleNamespace(record=record)
original = copy.deepcopy(record)
adb.return_value.connect.return_value = {'endpoint':'192.168.0.1:5555','state':'device','devices':[]}
service.dispatch({'protocol':1,'command':'adb_connect','params':{'address':'192.168.0.1'}})
self.assertEqual(record, original)
self.assertIsNone(service.package)
with self.assertRaises(ValueError): service.dispatch({'protocol':1,'command':'adb_disconnect','params':{'serial':'192.168.0.1:5555'}})
for stage,status,unsafe in [('transfer_install','running',False),('prepare','running',True),('openwrt_boot','waiting_device',False)]:
record.update(stage=stage,status=status,unsafe=unsafe)
with self.assertRaises(ValueError): service.dispatch({'protocol':1,'command':'adb_connect','params':{'address':'192.168.0.1'}})
with self.assertRaises(ValueError): service.dispatch({'protocol':1,'command':'adb_disconnect','params':{'serial':'192.168.0.1:5555'}})
self.assertEqual(adb.return_value.connect.call_count, 1)
adb.return_value.disconnect.assert_not_called()
service.worker = None
service.dispatch({'protocol':1,'command':'adb_disconnect','params':{'serial':'192.168.0.1:5555'}})
adb.return_value.disconnect.assert_called_once_with('192.168.0.1:5555')
def test_another_installer_process_cannot_disconnect_the_locked_transport(self):
code = """
import io,sys
from unittest.mock import patch
sys.path.insert(0,sys.argv[1])
from backend.service import Service
from backend.state import Store
with patch('backend.service.Adb') as adb:
try:
Service(sys.argv[2],Store(sys.argv[2]),io.StringIO()).dispatch({'protocol':1,'command':'adb_disconnect','params':{'serial':'192.0.2.1:5555'}})
except ValueError as error:
assert 'Another installer' in str(error)
adb.assert_not_called()
print('blocked by device lock')
else:
raise AssertionError('Disconnect bypassed the active device lock')
"""
with tempfile.TemporaryDirectory() as temp, DeviceLock(temp,'192.0.2.1:5555'):
result=subprocess.run([sys.executable,'-c',code,str(Path(__file__).resolve().parents[1]),temp],capture_output=True,timeout=20)
self.assertEqual(result.returncode,0,result.stderr.decode('utf-8','replace'))
self.assertIn(b'blocked by device lock',result.stdout)
if __name__ == '__main__': unittest.main()
+1
View File
@@ -122,6 +122,7 @@ def main():
page.screenshot(path=str(out/'wait-root-dark-en.png'),full_page=True)
page.evaluate("window.__emitFixture({stage:'complete',status:'completed',result:{filesystem_bytes:10737418240,url:'http://192.168.9.1',backup_directory:'fixture'}})")
page.get_by_role('heading',name='OpenWrt installed and verified').wait_for()
assert 'username root, default password root' in page.locator('.success-panel .login-hint').inner_text()
settle(page);layout(page)
page.screenshot(path=str(out/'complete-dark-en.png'),full_page=True)
# Smallest supported native window: large list and long log scroll independently.
+2
View File
@@ -54,6 +54,8 @@ def main():
page.get_by_label('语言').select_option('en');page.get_by_label('Theme').select_option('dark')
settle(page);layout(page)
assert page.locator('h1').inner_text()=='OpenWrt updated and verified'
assert 'Updates keep the existing password' in page.locator('.success-panel .login-hint').inner_text()
assert 'Fresh installation' not in page.locator('.success-panel .login-hint').inner_text()
assert 'device restarted' in page.locator('.success-panel').inner_text()
assert page.locator('.elapsed').inner_text()=='Stage elapsed 8s'
page.screenshot(path=str(ROOT/'screenshots/update-complete-clock-en.png'))
+100
View File
@@ -0,0 +1,100 @@
"""Exercise real wireless controls through a test-only structured bridge."""
from playwright.sync_api import sync_playwright
from ui_smoke import BRIDGE, ROOT, fixture_context, layout, settle
WIRELESS = r"""
localStorage.setItem('onboarding-v1','seen');
window.__fixture.devices=[];
const originalInvoke=window.__TAURI_INTERNALS__.invoke;
window.__TAURI_INTERNALS__.invoke=async(cmd,args={})=>{
const f=window.__fixture;
if(cmd!=='backend_request'||!['adb_connect','adb_disconnect'].includes(args.command)) return originalInvoke(cmd,args);
f.requests.push(args.command);f.calls.push({command:args.command,params:args.params});
if(f.fail===args.command) throw new Error('Fixture: wireless connection rejected');
if(args.command==='adb_connect'){
const endpoint=args.params.address.includes(':')?args.params.address:args.params.address+':5555';
const state=f.wirelessState||'device';
f.devices=[...f.devices.filter(d=>d.serial!==endpoint),{serial:endpoint,label:'M8',state,wireless:true}];
return {endpoint,state,devices:f.devices};
}
f.devices=f.devices.filter(d=>d.serial!==args.params.serial);
return {endpoint:args.params.serial,devices:f.devices};
};
"""
def main():
with sync_playwright() as p:
browser=p.chromium.launch()
context=fixture_context(browser,viewport={'width':800,'height':650})
context.add_init_script(BRIDGE+WIRELESS)
page=context.new_page();errors=[]
page.on('pageerror',lambda e:errors.append(str(e)))
page.goto('http://127.0.0.1:1420')
page.get_by_role('button',name='安装 OpenWrt',exact=False).click();settle(page)
page.locator('.wireless-adb summary').click()
field=page.get_by_label('设备地址 / 地址:端口',exact=True)
connect=page.get_by_role('button',name='连接',exact=True)
disconnect=page.get_by_role('button',name='断开所选无线设备',exact=True)
assert field.input_value()=='192.168.0.1' and disconnect.is_disabled()
assert 'package' not in page.evaluate('window.__fixture.requests')
page.evaluate("window.__fixture.fail='adb_connect'")
connect.click();settle(page)
assert connect.is_enabled()
assert page.locator('[data-sonner-toast][data-type=error]').count()==1
page.evaluate('window.__fixture.fail=null')
field.press('Enter');settle(page)
assert page.get_by_label('请选择设备').input_value()=='192.168.0.1:5555'
assert disconnect.is_enabled()
assert page.get_by_role('button',name='检查设备',exact=True).is_disabled()
assert page.evaluate("window.__fixture.calls.filter(c=>c.command==='adb_connect').at(-1).params")=={'address':'192.168.0.1'}
# A second router must not silently become the selected installation target.
field.fill('192.168.0.2:5556');connect.click();settle(page)
assert page.get_by_label('请选择设备').input_value()=='192.168.0.1:5555'
options=page.get_by_label('请选择设备').inner_text()
assert '192.168.0.1:5555' in options and '192.168.0.2:5556' in options
page.get_by_label('请选择设备').select_option('192.168.0.2:5556')
assert '192.168.0.2:5556' in page.locator('.wireless-target').inner_text()
page.locator('.wireless-adb').scroll_into_view_if_needed();settle(page);layout(page)
page.screenshot(path=str(ROOT/'screenshots/wireless-adb-zh.png'))
disconnect.click();settle(page)
assert page.evaluate("window.__fixture.calls.filter(c=>c.command==='adb_disconnect').at(-1).params")=={'serial':'192.168.0.2:5556'}
assert page.get_by_label('请选择设备').input_value()==''
assert page.get_by_label('请选择设备').locator('option').count()==2
assert disconnect.is_disabled()
page.evaluate("window.__fixture.devices.push({serial:'usb-device',label:'USB',state:'device',wireless:false})")
page.get_by_role('button',name='刷新设备',exact=True).click();settle(page)
page.get_by_label('请选择设备').select_option('usb-device')
assert disconnect.is_disabled()
# Authorization/offline are connection states, not false successful readiness.
field.fill('192.168.0.3');page.evaluate("window.__fixture.wirelessState='unauthorized'")
connect.click();settle(page)
assert page.get_by_text('已连接,请在设备上允许调试',exact=True).count()==1
page.evaluate("window.__fixture.wirelessState='offline'")
connect.click();settle(page)
assert page.get_by_text('设备已添加但仍离线,请检查调试状态后刷新',exact=True).count()==1
page.locator('.page-scroll').evaluate('(e)=>e.scrollTop=e.scrollHeight');layout(page)
# The same action stays available while the original Android transaction waits.
page.evaluate("window.__fixture.saved=[window.__fixture.tx]")
page.get_by_role('button',name='返回',exact=True).click();settle(page)
page.get_by_role('button',name='继续未完成的安装',exact=False).click();settle(page)
page.get_by_role('button',name='确认安装计划',exact=True).click();settle(page)
page.get_by_role('checkbox').check();page.get_by_role('button',name='确认并开始',exact=True).click();settle(page)
assert page.locator('.wireless-adb').get_attribute('open') is not None
assert page.get_by_role('button',name='断开所选无线设备',exact=True).count()==0
bound=page.evaluate('window.__fixture.tx.device.serial')
page.get_by_label('设备地址 / 地址:端口',exact=True).fill('192.168.0.1')
page.get_by_role('button',name='连接',exact=True).click();settle(page)
assert page.evaluate('window.__fixture.tx.device.serial')==bound
page.evaluate("window.__emitFixture({stage:'transfer_install',status:'running',unsafe:true,revision:15})");settle(page)
assert page.locator('.wireless-adb').count()==0
page.evaluate("window.__emitFixture({stage:'root_permission',status:'waiting_user',unsafe:false,revision:16})");settle(page)
page.get_by_label('语言').select_option('en');page.get_by_label('Theme').select_option('dark');settle(page);layout(page)
assert page.get_by_label('Device address / address:port',exact=True).is_visible()
page.screenshot(path=str(ROOT/'screenshots/wireless-adb-wait-en.png'))
assert not errors,errors
browser.close()
print('Wireless ADB smoke passed: retry, Enter connect without package, explicit multi-device target, exact disconnect, USB protection, authorization/offline, bound Android resume and unsafe-stage exclusion, bilingual 800x650 layout; no real device access')
if __name__=='__main__':main()
+1 -1
View File
@@ -6,7 +6,7 @@ use std::{collections::HashMap, io::{BufRead, BufReader, Write}, path::PathBuf,
use tauri::{Emitter, Manager, State};
use tokio::sync::oneshot;
const COMMANDS: &[&str] = &["hello","snapshot","list","package","devices","probe","probe_update","plan","start","resume","retry","cancel","can_close","export","import","diagnostics","verify_openwrt"];
const COMMANDS: &[&str] = &["hello","snapshot","list","package","devices","adb_connect","adb_disconnect","probe","probe_update","plan","start","resume","retry","cancel","can_close","export","import","diagnostics","verify_openwrt"];
struct Bridge {
input: Mutex<Option<ChildStdin>>,
pending: Mutex<HashMap<u64, oneshot::Sender<Result<Value, String>>>>,
+2 -2
View File
@@ -6,7 +6,7 @@ export const helpStrings = {
replay:'重新查看新手引导', skip:'暂时跳过', next:'下一步', back:'上一步', finish:'开始使用', step:'第', of:'步,共 3 步',
introTitles:['准备设备和安装包','选择适合你的安装方式','等待、续装与保留备份'],
introBodies:[
['完整解压安装包,从根目录 OpenWrt-Installer.exe 启动,无需另装 Python、Node 或 Rust。','先备份需要保留的数据,使用可靠的数据线并保持设备供电。','在 Android 开启 USB 调试、允许电脑调试并准备好 root;连接多台设备时,必须明确选择目标设备。'],
['完整解压安装包,从根目录 OpenWrt-Installer.exe 启动,无需另装 Python、Node 或 Rust。','先备份需要保留的数据,保持设备供电。使用数据线连接;只有无线 ADB 时,在设备选择区展开“无线 ADB 连接”,填写地址并连接。','在 Android 开启 USB 调试、允许电脑调试并准备好 root;连接多台设备时,必须明确选择目标设备。'],
['首次安装从“安装 OpenWrt”开始。TF 卡只格式化选定目标,不重新划卡;内置分区会先检查未分配空间。','核对最终计划里的机型、写入目标、Android 保留空间和数据影响。需要重置时,Android 用户数据会被清空。','已装好 OpenWrt 时可选择更新或临时启动;重装和有 F2FS 损坏风险的实验性镜像放在高级选项。'],
['首次离线分区准备可能需要数分钟,之后会自动重启。预期断线、Android 初始化和授权都是等待状态。','重置后完成 Android 初始化、开启 USB 调试并允许授权。已有 root 会直接使用;只有 root 不可用时才需要恢复 Magisk。','安装记录自动保存在电脑。关闭或重启后从“继续未完成的安装”恢复;换电脑前导出完整事务与备份。电脑记录和备份都丢失时,目前无法仅凭设备自动重建续装记录。'],
],
@@ -19,7 +19,7 @@ export const helpStrings = {
replay:'Replay getting started', skip:'Skip for now', next:'Next', back:'Previous', finish:'Start using the installer', step:'Step', of:'of 3',
introTitles:['Prepare your device and package','Choose an installation path','Wait, resume and keep backups'],
introBodies:[
['Extract the complete package and run OpenWrt-Installer.exe at its root. No separate Python, Node or Rust is required.','Back up the files you want to keep, use a reliable data cable and keep the device powered.','Enable USB debugging on Android, authorize this computer and have root ready. When several devices are connected, select the intended device explicitly.'],
['Extract the complete package and run OpenWrt-Installer.exe at its root. No separate Python, Node or Rust is required.','Back up important files and keep the device powered. Connect by data cable, or use Wireless ADB connection in the device section and enter its address.','Enable USB debugging on Android, authorize this computer and have root ready. When several devices are connected, select the intended device explicitly.'],
['Use Install OpenWrt for a first installation. TF installation formats only the selected target without repartitioning the card. Internal installation checks unallocated space first.','Review the model, write target, retained Android space and data impact in the final plan. A required Android reset erases its user data.','For installed OpenWrt, choose update or a one-time boot. Reinstallation and the experimental image option, which can damage F2FS, live under Advanced options.'],
['The first offline preparation may take several minutes and then reboot automatically. Expected USB disconnects, Android setup and authorization are waiting states.','After a reset, complete Android setup, enable USB debugging and grant authorization. Working root is accepted immediately; restore Magisk only if root is unavailable.','Installation records are saved automatically on the computer. After closing or restarting, choose Continue an unfinished installation. Export the full transaction and backups before moving computers. If both records and backups are lost, this version cannot reconstruct a record from the device alone.'],
],
+10
View File
@@ -2,6 +2,11 @@ export const strings = {
zh: {
author:'作者', qqGroup:'Q群', copyGroup:'复制群号', groupCopied:'群号已复制', repositoryOpened:'已打开项目仓库', support:'赞赏支持作者', closeSupport:'关闭赞赏提示',
installerAuthor:'安装器作者',
defaultLogin:'全新安装的管理页面和 SSH:用户名 root,默认密码 root。登录后请修改密码。',
existingLogin:'用户名 root;请使用当前密码,未修改过时默认密码为 root。更新会保留原密码。',
wirelessTitle:'无线 ADB 连接', wirelessAddress:'设备地址 / 地址:端口', connectWireless:'连接', disconnectWireless:'断开所选无线设备', wirelessTarget:'所选无线设备',
wirelessHelp:'设备需已开启无线 ADB,并与电脑网络互通。不填端口时使用 5555;如需配对,请先按 Android 的提示完成配对。',
wirelessConnected:'无线 ADB 已连接', wirelessDisconnected:'所选无线 ADB 已断开', wirelessAuthorize:'已连接,请在设备上允许调试', wirelessOffline:'设备已添加但仍离线,请检查调试状态后刷新',
starTitle:'喜欢这个项目?点个 Star 吧', starDescription:'你的 Star,是持续维护与更新的动力。', starAction:'去 GitHub 给项目点 Star',
supportDescription:'本安装器可以被打赏。如果它帮到了你,欢迎自愿赞赏,支持 Minikano 的开发与维护。', supportOptional:'自愿赞赏,可直接关闭继续使用。', continueUsing:'继续使用', supportImageAlt:'Minikano 赞赏码', supportImageLoading:'正在加载赞赏码…', supportImageUnavailable:'赞赏码暂时无法显示,可以稍后从侧栏重新打开。',
copyDiagnostics:'复制诊断信息给开发者', phase:'阶段', stageProgress:'当前阶段进度', noPercentage:'正在处理,请保持设备供电。',
@@ -43,6 +48,11 @@ export const strings = {
en: {
author:'Author', qqGroup:'QQ group ', copyGroup:'Copy group number', groupCopied:'Group number copied', repositoryOpened:'Project repository opened', support:'Support the author', closeSupport:'Close support notice',
installerAuthor:'Installer author',
defaultLogin:'Fresh installation, management page and SSH: username root, default password root. Change it after signing in.',
existingLogin:'Username root. Use the current password; the unchanged default is root. Updates keep the existing password.',
wirelessTitle:'Wireless ADB connection', wirelessAddress:'Device address / address:port', connectWireless:'Connect', disconnectWireless:'Disconnect selected wireless device', wirelessTarget:'Selected wireless device',
wirelessHelp:'Enable wireless ADB on the device and connect the computer to its network. The default port is 5555. If Android requires pairing, complete it first.',
wirelessConnected:'Wireless ADB connected', wirelessDisconnected:'Selected wireless ADB disconnected', wirelessAuthorize:'Connected. Allow debugging on the device.', wirelessOffline:'Device added but still offline. Check debugging and refresh.',
starTitle:'Enjoying the project? Give it a Star', starDescription:'Your Star encourages continued maintenance and updates.', starAction:'Star the project on GitHub',
supportDescription:'This installer accepts donations. If it helped you, you are welcome to support Minikano’s development and maintenance.', supportOptional:'Donations are optional. Close to continue.', continueUsing:'Continue', supportImageAlt:'Minikano donation code', supportImageLoading:'Loading donation code…', supportImageUnavailable:'The donation code is unavailable. You can reopen it from the sidebar later.',
copyDiagnostics:'Copy diagnostics for the developer', phase:'Phase', stageProgress:'Current phase progress', noPercentage:'Processing. Keep the device powered.',
+40 -6
View File
@@ -4,12 +4,12 @@ import {invoke} from '@tauri-apps/api/core';
import {AnimatePresence, domAnimation, LazyMotion, m, MotionConfig, useReducedMotion} from 'motion/react';
import {toast} from 'sonner';
import {Toaster} from './components/ui/sonner';
import {ArrowRight, BookOpen, Check, CheckCircle2, ChevronDown, CircleAlert, CircleHelp, Copy, Download, FolderOpen, HardDrive, LoaderCircle, Monitor, Moon, Pause, RefreshCw, RotateCcw, Settings2, ShieldCheck, Smartphone, Sun, Upload, Usb} from 'lucide-react';
import {ArrowRight, BookOpen, Check, CheckCircle2, ChevronDown, CircleAlert, CircleHelp, Copy, Download, FolderOpen, HardDrive, LoaderCircle, Monitor, Moon, Pause, RefreshCw, RotateCcw, Settings2, ShieldCheck, Smartphone, Sun, Upload, Usb, Wifi, WifiOff} from 'lucide-react';
import {Button} from './components/ui/button';
import {SupportDialog, SupportInfo, type RepositoryId} from './components/support';
import {helpStrings} from './help-i18n';
import {strings, type Language} from './i18n';
import {gib, native, request, stateGroup, subscribe, type Device, type Package, type Transaction, type Transfer} from './protocol';
import {gib, native, request, stateGroup, subscribe, type AdbConnection, type Device, type Package, type Transaction, type Transfer} from './protocol';
import './style.css';
const HelpCenter = lazy(() => import('./components/help-center').then(module => ({default:module.HelpCenter})));
@@ -35,6 +35,8 @@ function App() {
const [devices, setDevices] = useState<Device[]>([]);
const [devicesLoaded, setDevicesLoaded] = useState(false);
const [serial, setSerial] = useState('');
const [wirelessAddress, setWirelessAddress] = useState('192.168.0.1');
const [wirelessBusy, setWirelessBusy] = useState<'connect' | 'disconnect' | null>(null);
const [device, setDevice] = useState<Device>();
const [records, setRecords] = useState<Transaction[]>([]);
const [tx, setTx] = useState<Transaction>();
@@ -116,6 +118,7 @@ function App() {
}, [theme]);
useEffect(() => {localStorage.setItem('language', lang); document.documentElement.lang = lang === 'zh' ? 'zh-CN' : 'en';}, [lang]);
useEffect(() => {pageRef.current?.querySelector<HTMLElement>('h1')?.focus({preventScroll: true});}, [view]);
useEffect(() => {if (tx?.device.serial.includes(':')) setWirelessAddress(tx.device.serial);}, [tx?.id]);
const timingActive = tx && ['running','waiting_user','waiting_device'].includes(tx.status);
const elapsed = tx ? Math.max(0,Math.floor(((tx.stage_finished_at ? tx.stage_finished_at*1000 : timingActive ? clock : tx.updated*1000) - (tx.stage_started_at ? tx.stage_started_at*1000 : since))/1000)) : 0;
useEffect(() => {
@@ -168,6 +171,27 @@ function App() {
else toast.success(t.refreshed, {id:'device-selection'});
} else {setDevices([]); setSerial('');}
};
const connectWireless = async () => {
setWirelessBusy('connect'); setDevice(undefined);
try {
const result = await task(() => request<AdbConnection>('adb_connect', {address:wirelessAddress}));
if (!result) return;
setDevices(result.devices); setDevicesLoaded(true); setWirelessAddress(result.endpoint);
setSerial(old => result.devices.length === 1 ? result.devices[0].serial : result.devices.some(d => d.serial === old) ? old : '');
if (result.state === 'unauthorized') toast.info(t.wirelessAuthorize, {id:'wireless-adb'});
else if (result.state === 'offline') toast.info(t.wirelessOffline, {id:'wireless-adb'});
else toast.success(t.wirelessConnected, {id:'wireless-adb'});
if (result.devices.length > 1) toast.info(t.multipleDevices, {id:'device-selection'});
} finally {setWirelessBusy(null);}
};
const disconnectWireless = async () => {
const selected = serial;
setWirelessBusy('disconnect'); setDevice(undefined);
try {
const result = await task(() => request<AdbConnection>('adb_disconnect', {serial:selected}), t.wirelessDisconnected);
if (result) {setDevices(result.devices); setDevicesLoaded(true); setSerial(old => old === selected ? '' : old);}
} finally {setWirelessBusy(null);}
};
const inspect = async () => {
setDevice(undefined);
const value = await task(() => request<Device>('probe', {serial, method: view === 'boot' ? 'boot' : method}), t.inspected);
@@ -265,6 +289,15 @@ function App() {
const impact = tx?.plan.wipe ? t.wipe : tx?.choices.method === 'tf' ? t.tfErase : tx?.choices.method === 'reinstall' ? t.reinstallErase : tx?.choices.method === 'image' ? t.imageImpact : tx?.choices.method === 'update' ? t.updateImpact : tx?.choices.method === 'boot' ? t.bootImpact : t.preserve;
const waitingForOpenwrt = tx?.stage === 'openwrt_boot' && tx.status.startsWith('waiting') && !tx.unsafe;
const manualRestart = waitingForOpenwrt && tx?.details?.reboot_manually !== false;
const waitingForAndroid = tx?.status.startsWith('waiting') && !tx.unsafe && ['android_boot','android_setup','usb_debugging','debug_authorization','magisk','root_permission'].includes(tx.stage);
const wirelessControls = (reconnectOnly = false) => <details className="wireless-adb" open={reconnectOnly ? true : undefined}>
<summary><Wifi size={15}/>{t.wirelessTitle}</summary>
<div className="wireless-controls"><label>{t.wirelessAddress}<input disabled={busy} value={wirelessAddress} placeholder="192.168.0.1:5555" onChange={e => setWirelessAddress(e.target.value)} onKeyDown={e => {if (e.key === 'Enter' && !busy && wirelessAddress.trim()) {e.preventDefault();void connectWireless();}}} autoComplete="off" spellCheck={false}/></label>
<Button variant="outline" disabled={busy || !wirelessAddress.trim()} onClick={connectWireless}>{wirelessBusy === 'connect' ? <LoaderCircle size={15} className="spin"/> : <Wifi size={15}/>} {t.connectWireless}</Button>
{!reconnectOnly && <Button variant="ghost" disabled={busy || !!active || !devices.some(d => d.serial === serial && d.wireless)} onClick={disconnectWireless}>{wirelessBusy === 'disconnect' ? <LoaderCircle size={15} className="spin"/> : <WifiOff size={15}/>} {t.disconnectWireless}</Button>}
</div><p className="device-hint">{t.wirelessHelp}</p>
{!reconnectOnly && devices.some(d => d.serial === serial && d.wireless) && <p className="device-hint wireless-target">{t.wirelessTarget}: <code>{serial}</code></p>}
</details>;
return <div className="app-shell">
<header><div className="brand"><div className="brand-icon"><HardDrive size={20}/></div><div><strong>{t.title}</strong><small>{t.subtitle}</small></div></div>
<div className="preferences"><label className="sr-only" htmlFor="language">{t.language}</label><select id="language" value={lang} onChange={e => setLang(e.target.value as Language)}><option value="zh">中文</option><option value="en">English</option></select>
@@ -286,8 +319,8 @@ function App() {
{['install','update','boot','advanced'].includes(view) && <><h1 tabIndex={-1}>{purposes.find(p => p.id === view)?.title}</h1><p className="intro">{purposes.find(p => p.id === view)?.description}</p>
<div className="page-scroll scroll-area"><section><div className="section-title"><h2>{t.package}</h2>{pkg && <span className="badge"><Check size={13}/>{t.verified}</span>}</div>
<div className="package-row"><div className="file-path" title={path}>{pkg?.name || path || t.choosePackage}</div><Button variant="outline" disabled={busy} onClick={choosePackage}><FolderOpen size={16}/>{t.choosePackage}</Button><Button disabled={busy || !path} onClick={() => verify()}>{t.verify}</Button></div></section>
{view === 'update' ? <section><h2>{t.device}</h2><div className="form-grid"><label>{t.host}<input disabled={busy} value={host} onChange={e => setHost(e.target.value)} autoComplete="off"/></label><label>{t.password}<input disabled={busy} type="password" value={password} onChange={e => setPassword(e.target.value)} autoComplete="off"/></label></div><Button variant="outline" disabled={busy || !pkg} onClick={async () => {setDevice(undefined); const d = await task(() => request<Device>('probe_update', {host, password}), t.inspected); if (d) setDevice(d);}}>{t.checkUpdate}</Button></section> : <section><div className="section-title"><h2>{t.device}</h2><Button variant="ghost" disabled={busy} onClick={refresh}><RefreshCw size={15}/>{t.refresh}</Button></div><div className="device-select"><Smartphone size={18}/><select disabled={busy} aria-label={t.select} value={serial} onChange={e => {setSerial(e.target.value); setDevice(undefined);}}><option value="">{devicesLoaded && !devices.length ? t.noDevicesShort : t.select}</option>{devices.map(d => <option key={d.serial} value={d.serial}>{d.label} · ••••{d.serial.slice(-4)} · {t.deviceStates[d.state as keyof typeof t.deviceStates] || d.state}</option>)}</select><Button variant="outline" disabled={!serial || !pkg || busy} onClick={inspect}>{t.inspect}</Button></div>{devicesLoaded && !devices.length && <p className="device-hint" role="status">{t.noDevices}</p>}{!pkg && <p className="device-hint">{t.inspectNeedsPackage}</p>}</section>}
{view === 'boot' && <section><h2>{t.visit}</h2><div className="form-grid"><label>{t.host}<input disabled={busy} value={host} onChange={e => setHost(e.target.value)} autoComplete="off"/></label><label>{t.password}<input disabled={busy} type="password" value={password} onChange={e => setPassword(e.target.value)} autoComplete="off"/></label></div></section>}
{view === 'update' ? <section><h2>{t.device}</h2><div className="form-grid"><label>{t.host}<input disabled={busy} value={host} onChange={e => setHost(e.target.value)} autoComplete="off"/></label><label>{t.password}<input disabled={busy} type="password" value={password} onChange={e => setPassword(e.target.value)} autoComplete="off"/></label></div><p className="device-hint">{t.existingLogin}</p><Button variant="outline" disabled={busy || !pkg} onClick={async () => {setDevice(undefined); const d = await task(() => request<Device>('probe_update', {host, password}), t.inspected); if (d) setDevice(d);}}>{t.checkUpdate}</Button></section> : <section><div className="section-title"><h2>{t.device}</h2><Button variant="ghost" disabled={busy} onClick={refresh}><RefreshCw size={15}/>{t.refresh}</Button></div><div className="device-select"><Smartphone size={18}/><select disabled={busy} aria-label={t.select} value={serial} onChange={e => {setSerial(e.target.value); setDevice(undefined);}}><option value="">{devicesLoaded && !devices.length ? t.noDevicesShort : t.select}</option>{devices.map(d => <option key={d.serial} value={d.serial}>{d.label} · {d.wireless ? d.serial : '••••'+d.serial.slice(-4)} · {t.deviceStates[d.state as keyof typeof t.deviceStates] || d.state}</option>)}</select><Button variant="outline" disabled={!serial || !pkg || busy} onClick={inspect}>{t.inspect}</Button></div>{devicesLoaded && !devices.length && <p className="device-hint" role="status">{t.noDevices}</p>}{!pkg && <p className="device-hint">{t.inspectNeedsPackage}</p>}{wirelessControls()}</section>}
{view === 'boot' && <section><h2>{t.visit}</h2><div className="form-grid"><label>{t.host}<input disabled={busy} value={host} onChange={e => setHost(e.target.value)} autoComplete="off"/></label><label>{t.password}<input disabled={busy} type="password" value={password} onChange={e => setPassword(e.target.value)} autoComplete="off"/></label></div><p className="device-hint">{t.existingLogin}</p></section>}
{device && <div className="device-card"><div><small>{t.model}</small><strong>{device.model || t.unknown}</strong></div><div><small>{t.os}</small><strong>{device.system || t.unknown}</strong></div><div><small>{t.slot}</small><strong>{device.slot || t.unknown}</strong></div><div><small>{t.root}</small><strong className={device.root ? 'good-text' : ''}>{device.root ? t.ready : t.unavailable}</strong></div></div>}
{device?.readiness && device.readiness !== 'ready' && <div className="alert"><CircleAlert size={19}/><div><strong>{stageLabel(device.readiness)}</strong><p>{t.waitingAndroid}</p></div></div>}
{view !== 'update' && view !== 'boot' && <section><h2>{t.install}</h2><div className="method-options" role="group" aria-label={t.install}>{(view === 'advanced' ? ['reinstall','image'] : ['tf','part','reinstall']).map(m => <button disabled={busy} key={m} aria-pressed={method === m} className={method === m ? 'selected' : ''} onClick={() => setMethod(m)}>{m === 'tf' ? <Usb size={17}/> : <HardDrive size={17}/>}{(t as unknown as Record<string,string>)[m]}{(m === 'tf' && device?.tf || m === 'reinstall' && device?.existing) && <span>{t.recommended}</span>}</button>)}</div>
@@ -309,15 +342,16 @@ function App() {
</>}
{view === 'progress' && tx && <><div className="eyebrow">{t.progress} · {tx.device.model}</div><h1 tabIndex={-1}>{tx.status === 'completed' ? tx.choices.method === 'boot' ? t.successBoot : tx.choices.method === 'update' ? t.successUpdate : t.success : manualRestart ? t.rebootNow : waitingForOpenwrt && tx.choices.method === 'update' ? tx.details?.connection_state === 'reconnecting' ? t.updateReconnecting : t.updateReboot : stageLabel(tx.stage)}</h1><div className="status-line"><span className={'status-dot '+tx.status}/><span>{statusLabel(tx.status)}</span><span className="elapsed">{t.elapsed} {elapsed}s</span></div>
{waitingForOpenwrt && <div className="boot-guidance"><Smartphone size={21}/><p>{tx.choices.method === 'update' ? t.updateRebootDesc : tx.details?.boot_confirmed ? t.bootConfirmed : manualRestart ? t.rebootManual : t.rebootAutomatic}</p></div>}
<div className="page-scroll scroll-area">{tx.status === 'completed' ? <section className="success-panel"><m.div className="success-icon" initial={{opacity:0,scale:reduceMotion ? 1 : .9}} animate={{opacity:1,scale:1}} transition={{duration:reduceMotion ? 0 : .24}}><CheckCircle2 size={42} className="good-text"/></m.div><dl className="plan-list"><div><dt>{t.actual}</dt><dd>{gib(tx.result?.filesystem_bytes)}</dd></div><div><dt>{t.visit}</dt><dd>{tx.result?.url}</dd></div></dl><h2>{t.next}</h2><p>{tx.choices.method === 'update' ? t.updateNext : t.nextDesc}</p></section> : <>
<div className="page-scroll scroll-area">{tx.status === 'completed' ? <section className="success-panel"><m.div className="success-icon" initial={{opacity:0,scale:reduceMotion ? 1 : .9}} animate={{opacity:1,scale:1}} transition={{duration:reduceMotion ? 0 : .24}}><CheckCircle2 size={42} className="good-text"/></m.div><dl className="plan-list"><div><dt>{t.actual}</dt><dd>{gib(tx.result?.filesystem_bytes)}</dd></div><div><dt>{t.visit}</dt><dd>{tx.result?.url}</dd></div></dl><h2>{t.next}</h2><p>{tx.choices.method === 'update' ? t.updateNext : t.nextDesc}</p><p className="device-hint login-hint">{['update','boot'].includes(tx.choices.method) ? t.existingLogin : t.defaultLogin}</p></section> : <>
{waitingForOpenwrt ? <div className="network-guidance"><p>{t.waitingOpenwrt}</p><Button variant="ghost" className="context-help" onClick={openHelp}><CircleHelp size={16}/>{help.currentHelp}</Button></div> : <section className="activity"><m.div key={tx.stage+tx.status} className="activity-heading" initial={{opacity:reduceMotion ? 1 : 0,y:reduceMotion ? 0 : 4}} animate={{opacity:1,y:0}} transition={{duration:reduceMotion ? 0 : .18}}>{tx.status === 'failed' ? <CircleAlert size={28}/> : tx.status === 'running' ? <LoaderCircle size={28} className="spin"/> : tx.status.startsWith('waiting') ? <Smartphone size={28}/> : <Pause size={28}/>}<div><h2>{stageLabel(tx.stage)}</h2><p>{tx.package.name}{tx.details?.tool ? " · "+tx.details.tool : ""}</p></div></m.div>
<div className="stage-progress"><small>{t.phase} {Math.min(5,stateGroup(tx.stage)+1)} / 5 · {statusLabel(tx.status)}</small>{(!transfer || tx.status !== 'running') && <><div className={'indeterminate-progress '+(tx.status === 'running' ? 'is-running' : '')} role="progressbar" aria-label={t.stageProgress} aria-valuetext={`${stageLabel(tx.stage)} · ${statusLabel(tx.status)}`}><div/></div><small>{tx.status === 'running' ? t.noPercentage : statusLabel(tx.status)}</small></>}</div>
{transfer && tx.status === 'running' && <div className="transfer"><div><span>{transfer.name}</span><span>{Math.floor(transfer.bytes/transfer.total*100)}%</span></div><progress value={transfer.bytes} max={transfer.total}/><small>{t.bytes}: {transfer.bytes.toLocaleString()} / {transfer.total.toLocaleString()} B · {t.speed}: {(transfer.bytes_per_second/1048576).toFixed(1)} MiB/s</small></div>}
{tx.status.startsWith('waiting') && <><p className="waiting-guidance">{tx.stage === 'openwrt_boot' ? t.waitingOpenwrt : t.waitingAndroid}</p><Button variant="ghost" className="context-help" onClick={openHelp}><CircleHelp size={16}/>{help.currentHelp}</Button></>}
{waitingForAndroid && wirelessControls(true)}
{tx.unsafe && <div className="alert danger"><ShieldCheck size={19}/><p>{t.unsafe}</p></div>}
{tx.error && <div className="alert danger"><CircleAlert size={20}/><div><p className="error-message">{tx.error.message}</p><Button className="copy-diagnostics" variant="outline" disabled={busy} onClick={copyDiagnostics}><Copy size={15}/>{t.copyDiagnostics}</Button></div></div>}
</section>}</>} </div>
{waitingForOpenwrt && <div className="verification-controls"><div className="form-grid"><label>{t.host}<input disabled={busy} value={host} onChange={e => setHost(e.target.value)} autoComplete="off"/></label><label>{t.password}<input disabled={busy} type="password" value={password} onChange={e => setPassword(e.target.value)} autoComplete="off"/></label></div>{tx.details?.verification_error && <p className="verification-error" role="status">{tx.details.verification_error}</p>}</div>}
{waitingForOpenwrt && <div className="verification-controls"><div className="form-grid"><label>{t.host}<input disabled={busy} value={host} onChange={e => setHost(e.target.value)} autoComplete="off"/></label><label>{t.password}<input disabled={busy} type="password" value={password} onChange={e => setPassword(e.target.value)} autoComplete="off"/></label></div><p className="device-hint login-hint">{['update','boot'].includes(tx.choices.method) ? t.existingLogin : t.defaultLogin}</p>{tx.details?.verification_error && <p className="verification-error" role="status">{tx.details.verification_error}</p>}</div>}
{tx.status !== 'completed' && <div className="actions">{waitingForOpenwrt && <Button disabled={busy || !host.trim()} onClick={() => task(async () => (await request<{accepted:boolean}>('verify_openwrt', {transaction:tx.id, host:host.trim(), password})).accepted, t.verificationRequested)}><CheckCircle2 size={16}/>{t.confirmOpenwrt}</Button>}{active ? <Button variant="outline" disabled={busy} onClick={() => task(async () => (await request<{accepted:boolean}>('cancel')).accepted, t.pauseRequested)}><Pause size={16}/>{t.pause}</Button> : <Button disabled={busy || tx.error?.retryable === false} onClick={() => start('retry')}>{t.retry}<RotateCcw size={16}/></Button>}</div>
}
<div className="backup-actions"><Button disabled={busy} variant="outline" onClick={exportBackup}><Download size={16}/>{t.exportBackup}</Button><Button disabled={busy} variant="ghost" onClick={openData}><FolderOpen size={16}/>{t.openData}</Button></div>
+2 -1
View File
@@ -1,6 +1,7 @@
import { invoke } from '@tauri-apps/api/core';
import { listen } from '@tauri-apps/api/event';
export interface Device {serial: string; model?: string; label?: string; state?: string; system?: string; slot?: string; root?: boolean; readiness?: string; encrypted?: boolean; existing?: boolean; tf?: string; profile?: string; free_bytes?: number; userdata_bytes?: number}
export interface Device {serial: string; model?: string; label?: string; state?: string; wireless?: boolean; system?: string; slot?: string; root?: boolean; readiness?: string; encrypted?: boolean; existing?: boolean; tf?: string; profile?: string; free_bytes?: number; userdata_bytes?: number}
export interface AdbConnection {endpoint: string; state?: string; devices: Device[]}
export interface Package {path: string; name: string; adapter: string; profile: string; kernel: string}
export interface Transaction {
id: string; status: string; stage: string; device: Device; package: Package;
+9
View File
@@ -149,6 +149,15 @@ html,body,#root {width:100%;height:100%;overflow:hidden;}
body {-webkit-user-select:none;user-select:none;}
input:not([type=checkbox]),textarea,[contenteditable=true],.file-path,.device-card strong,.plan-list dd,.log-panel pre,.help-markdown,.help-markdown *,.app-toast .toast-description,.error-message {-webkit-user-select:text;user-select:text;}
.device-hint {font-size:12px;color:hsl(var(--muted-foreground));margin-top:12px;line-height:1.7;}
.wireless-adb {margin-top:14px;border-top:1px solid hsl(var(--border));padding-top:12px;}
.wireless-adb summary {display:flex;align-items:center;gap:8px;cursor:pointer;font-size:12px;font-weight:600;list-style:none;}
.wireless-adb summary::after {content:'+';margin-left:auto;}
.wireless-adb[open] summary::after {content:'−';}
.wireless-controls {display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;margin-top:12px;}
.wireless-controls label {flex:1 1 180px;min-width:0;}
.wireless-controls input {width:100%;min-width:0;}
.wireless-controls button {flex-shrink:0;}
.wireless-target code {-webkit-user-select:text;user-select:text;overflow-wrap:anywhere;}
* {box-sizing:border-box;}
.page {display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;overflow:hidden;}
.page>h1,.page>.eyebrow,.page>.status-line,.page>.resume-tools,.page>.form-grid {flex-shrink:0;}
@@ -0,0 +1,41 @@
[
{
"gui_bytes": 3682304,
"backend_and_tools_bytes": 43132513,
"firmware_payload_bytes": 240984371,
"archive_bytes": 211224030,
"package": "e5-openwrt-25.12.5-all-models-boot-windows",
"archive": "e5-openwrt-25.12.5-all-models-boot-windows.zip",
"sha256": "91625755cbc0e4febd565b1783cfc9c2abaab9a75fdce144893476a3b0aec794",
"payloads_unchanged": true,
"legacy_cli_unchanged": false,
"e5_boot_switch_updated": true,
"mu300_cli_binary_reader_updated": false
},
{
"gui_bytes": 3682304,
"backend_and_tools_bytes": 43132513,
"firmware_payload_bytes": 240246255,
"archive_bytes": 210980747,
"package": "m8-openwrt-25.12.5-all-models-boot-windows",
"archive": "m8-openwrt-25.12.5-all-models-boot-windows.zip",
"sha256": "dc5ab8d035040cdce310d4ac1cf303dfedf880157a5687de566df3267510adc7",
"payloads_unchanged": true,
"legacy_cli_unchanged": false,
"e5_boot_switch_updated": true,
"mu300_cli_binary_reader_updated": false
},
{
"gui_bytes": 3682304,
"backend_and_tools_bytes": 43132513,
"firmware_payload_bytes": 240944109,
"archive_bytes": 211275543,
"package": "t551m-openwrt-25.12.5-all-models-boot-windows",
"archive": "t551m-openwrt-25.12.5-all-models-boot-windows.zip",
"sha256": "2a1128a218f09f1d23553a05687fcdb1d4cee88b502db775d6439528afafb863",
"payloads_unchanged": true,
"legacy_cli_unchanged": false,
"e5_boot_switch_updated": true,
"mu300_cli_binary_reader_updated": false
}
]
@@ -0,0 +1,41 @@
[
{
"package": "e5-openwrt-25.12.5-all-models-boot-windows",
"frozen_backend": true,
"simulated_transport": true,
"checks": [
"device dd -> adb pull, full hash and staging cleanup",
"restart during final verification and final commit without replay",
"explicit boot confirmation retargets wrong-CID endpoint and verifies capacity without replay",
"committed update resumes without replay; EOF/refused connections remain normal waits; old boot rejected; new boot capacity verified; phase clock frozen",
"persistent redacted diagnostic sharing"
],
"hardware_access": false
},
{
"package": "m8-openwrt-25.12.5-all-models-boot-windows",
"frozen_backend": true,
"simulated_transport": true,
"checks": [
"device dd -> adb pull, full hash and staging cleanup",
"restart during final verification and final commit without replay",
"explicit boot confirmation retargets wrong-CID endpoint and verifies capacity without replay",
"committed update resumes without replay; EOF/refused connections remain normal waits; old boot rejected; new boot capacity verified; phase clock frozen",
"persistent redacted diagnostic sharing"
],
"hardware_access": false
},
{
"package": "t551m-openwrt-25.12.5-all-models-boot-windows",
"frozen_backend": true,
"simulated_transport": true,
"checks": [
"device dd -> adb pull, full hash and staging cleanup",
"restart during final verification and final commit without replay",
"explicit boot confirmation retargets wrong-CID endpoint and verifies capacity without replay",
"committed update resumes without replay; EOF/refused connections remain normal waits; old boot rejected; new boot capacity verified; phase clock frozen",
"persistent redacted diagnostic sharing"
],
"hardware_access": false
}
]
@@ -0,0 +1,28 @@
[
{
"package": "mu300-openwrt-6.18.54-all-models-boot-windows",
"frozen_backend": true,
"simulated_transport": true,
"checks": [
"device dd -> adb pull, full hash and staging cleanup",
"restart during final verification and final commit without replay",
"explicit boot confirmation retargets wrong-CID endpoint and verifies capacity without replay",
"committed update resumes without replay; EOF/refused connections remain normal waits; old boot rejected; new boot capacity verified; phase clock frozen",
"persistent redacted diagnostic sharing"
],
"hardware_access": false
},
{
"package": "mu300-openwrt-7.2.8-all-models-boot-windows",
"frozen_backend": true,
"simulated_transport": true,
"checks": [
"device dd -> adb pull, full hash and staging cleanup",
"restart during final verification and final commit without replay",
"explicit boot confirmation retargets wrong-CID endpoint and verifies capacity without replay",
"committed update resumes without replay; EOF/refused connections remain normal waits; old boot rejected; new boot capacity verified; phase clock frozen",
"persistent redacted diagnostic sharing"
],
"hardware_access": false
}
]
@@ -0,0 +1,67 @@
[
{
"frozen_backend": true,
"wireless_connection": true,
"authorization_state": true,
"exact_disconnect": true,
"transaction_binding": true,
"active_disconnect_blocked": true,
"device_mutex": true,
"unsafe_arguments_rejected": true,
"simulated_adb_only": true,
"hardware_access": false,
"package": "e5-openwrt-25.12.5-all-models-boot-windows"
},
{
"frozen_backend": true,
"wireless_connection": true,
"authorization_state": true,
"exact_disconnect": true,
"transaction_binding": true,
"active_disconnect_blocked": true,
"device_mutex": true,
"unsafe_arguments_rejected": true,
"simulated_adb_only": true,
"hardware_access": false,
"package": "m8-openwrt-25.12.5-all-models-boot-windows"
},
{
"frozen_backend": true,
"wireless_connection": true,
"authorization_state": true,
"exact_disconnect": true,
"transaction_binding": true,
"active_disconnect_blocked": true,
"device_mutex": true,
"unsafe_arguments_rejected": true,
"simulated_adb_only": true,
"hardware_access": false,
"package": "t551m-openwrt-25.12.5-all-models-boot-windows"
},
{
"frozen_backend": true,
"wireless_connection": true,
"authorization_state": true,
"exact_disconnect": true,
"transaction_binding": true,
"active_disconnect_blocked": true,
"device_mutex": true,
"unsafe_arguments_rejected": true,
"simulated_adb_only": true,
"hardware_access": false,
"package": "mu300-openwrt-6.18.54-all-models-boot-windows"
},
{
"frozen_backend": true,
"wireless_connection": true,
"authorization_state": true,
"exact_disconnect": true,
"transaction_binding": true,
"active_disconnect_blocked": true,
"device_mutex": true,
"unsafe_arguments_rejected": true,
"simulated_adb_only": true,
"hardware_access": false,
"package": "mu300-openwrt-7.2.8-all-models-boot-windows"
}
]
@@ -0,0 +1,41 @@
[
{
"package": "e5-openwrt-25.12.5-all-models-boot-windows",
"frozen_backend": true,
"entrypoints": [
"gui",
"cli"
],
"different_installed_release_accepted": true,
"small_boot_reads_only": true,
"unknown_boot_rejected": true,
"chain_failure_blocks_misc": true,
"hardware_access": false
},
{
"package": "m8-openwrt-25.12.5-all-models-boot-windows",
"frozen_backend": true,
"entrypoints": [
"gui",
"cli"
],
"different_installed_release_accepted": true,
"small_boot_reads_only": true,
"unknown_boot_rejected": true,
"chain_failure_blocks_misc": true,
"hardware_access": false
},
{
"package": "t551m-openwrt-25.12.5-all-models-boot-windows",
"frozen_backend": true,
"entrypoints": [
"gui",
"cli"
],
"different_installed_release_accepted": true,
"small_boot_reads_only": true,
"unknown_boot_rejected": true,
"chain_failure_blocks_misc": true,
"hardware_access": false
}
]
@@ -0,0 +1,182 @@
[
{
"package": "mu300-openwrt-6.18.54-all-models-boot-windows",
"frozen_backend": true,
"matrix": [
{
"entrypoint": "gui",
"model": "MU300",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "MU300",
"android_slot": "b"
},
{
"entrypoint": "gui",
"model": "F50",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "F50",
"android_slot": "b"
},
{
"entrypoint": "gui",
"model": "V50",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "V50",
"android_slot": "b"
},
{
"entrypoint": "gui",
"model": "U30Air",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "U30Air",
"android_slot": "b"
},
{
"entrypoint": "cli",
"model": "MU300",
"android_slot": "a"
},
{
"entrypoint": "cli",
"model": "MU300",
"android_slot": "b"
},
{
"entrypoint": "cli",
"model": "F50",
"android_slot": "a"
},
{
"entrypoint": "cli",
"model": "F50",
"android_slot": "b"
},
{
"entrypoint": "cli",
"model": "V50",
"android_slot": "a"
},
{
"entrypoint": "cli",
"model": "V50",
"android_slot": "b"
},
{
"entrypoint": "cli",
"model": "U30Air",
"android_slot": "a"
},
{
"entrypoint": "cli",
"model": "U30Air",
"android_slot": "b"
}
],
"different_installed_release_accepted": true,
"small_boot_reads_only": true,
"misc_trial_recorded": true,
"hardware_access": false
},
{
"package": "mu300-openwrt-7.2.8-all-models-boot-windows",
"frozen_backend": true,
"matrix": [
{
"entrypoint": "gui",
"model": "MU300",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "MU300",
"android_slot": "b"
},
{
"entrypoint": "gui",
"model": "F50",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "F50",
"android_slot": "b"
},
{
"entrypoint": "gui",
"model": "V50",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "V50",
"android_slot": "b"
},
{
"entrypoint": "gui",
"model": "U30Air",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "U30Air",
"android_slot": "b"
},
{
"entrypoint": "cli",
"model": "MU300",
"android_slot": "a"
},
{
"entrypoint": "cli",
"model": "MU300",
"android_slot": "b"
},
{
"entrypoint": "cli",
"model": "F50",
"android_slot": "a"
},
{
"entrypoint": "cli",
"model": "F50",
"android_slot": "b"
},
{
"entrypoint": "cli",
"model": "V50",
"android_slot": "a"
},
{
"entrypoint": "cli",
"model": "V50",
"android_slot": "b"
},
{
"entrypoint": "cli",
"model": "U30Air",
"android_slot": "a"
},
{
"entrypoint": "cli",
"model": "U30Air",
"android_slot": "b"
}
],
"different_installed_release_accepted": true,
"small_boot_reads_only": true,
"misc_trial_recorded": true,
"hardware_access": false
}
]
@@ -0,0 +1,47 @@
[
{
"package": "e5-openwrt-25.12.5-all-models-boot-windows",
"frozen_backend": true,
"simulated_transport": true,
"non_tf_probes": [
"part",
"reinstall",
"image",
"boot"
],
"reinstall_target": "mmcblk1p20",
"reinstall_bytes": 4294967296,
"tf_missing_card_rejected": true,
"hardware_access": false
},
{
"package": "m8-openwrt-25.12.5-all-models-boot-windows",
"frozen_backend": true,
"simulated_transport": true,
"non_tf_probes": [
"part",
"reinstall",
"image",
"boot"
],
"reinstall_target": "mmcblk1p20",
"reinstall_bytes": 4294967296,
"tf_missing_card_rejected": true,
"hardware_access": false
},
{
"package": "t551m-openwrt-25.12.5-all-models-boot-windows",
"frozen_backend": true,
"simulated_transport": true,
"non_tf_probes": [
"part",
"reinstall",
"image",
"boot"
],
"reinstall_target": "mmcblk1p20",
"reinstall_bytes": 4294967296,
"tf_missing_card_rejected": true,
"hardware_access": false
}
]
@@ -0,0 +1,32 @@
[
{
"package": "mu300-openwrt-6.18.54-all-models-boot-windows",
"frozen_backend": true,
"simulated_transport": true,
"non_tf_probes": [
"part",
"reinstall",
"image",
"boot"
],
"reinstall_target": "mmcblk1p20",
"reinstall_bytes": 4294967296,
"tf_missing_card_rejected": true,
"hardware_access": false
},
{
"package": "mu300-openwrt-7.2.8-all-models-boot-windows",
"frozen_backend": true,
"simulated_transport": true,
"non_tf_probes": [
"part",
"reinstall",
"image",
"boot"
],
"reinstall_target": "mmcblk1p20",
"reinstall_bytes": 4294967296,
"tf_missing_card_rejected": true,
"hardware_access": false
}
]
@@ -0,0 +1,28 @@
[
{
"gui_bytes": 3681792,
"backend_and_tools_bytes": 46072303,
"firmware_payload_bytes": 103528639,
"archive_bytes": 79348975,
"package": "mu300-openwrt-6.18.54-all-models-boot-windows",
"archive": "mu300-openwrt-6.18.54-all-models-boot-windows.zip",
"sha256": "5c2fff9729c8764765f6ec65321a5d80e370f7ee2c545f908e95b7a9ba203ee8",
"payloads_unchanged": true,
"legacy_cli_unchanged": false,
"e5_boot_switch_updated": false,
"mu300_cli_binary_reader_updated": true
},
{
"gui_bytes": 3681792,
"backend_and_tools_bytes": 46072302,
"firmware_payload_bytes": 104024607,
"archive_bytes": 80437505,
"package": "mu300-openwrt-7.2.8-all-models-boot-windows",
"archive": "mu300-openwrt-7.2.8-all-models-boot-windows.zip",
"sha256": "2965883ef3291a0b613313eb1d9701b34ef61af8acb0e9346902f023b60d22ee",
"payloads_unchanged": true,
"legacy_cli_unchanged": false,
"e5_boot_switch_updated": false,
"mu300_cli_binary_reader_updated": true
}
]
@@ -0,0 +1,38 @@
[
{
"package": "e5-openwrt-25.12.5-tf-20261016-000620",
"frozen_backend": true,
"entrypoints": [
"gui"
],
"different_installed_release_accepted": true,
"small_boot_reads_only": true,
"unknown_boot_rejected": true,
"chain_failure_blocks_misc": true,
"hardware_access": false
},
{
"package": "m8-openwrt-25.12.5-tf-20261016-000820",
"frozen_backend": true,
"entrypoints": [
"gui"
],
"different_installed_release_accepted": true,
"small_boot_reads_only": true,
"unknown_boot_rejected": true,
"chain_failure_blocks_misc": true,
"hardware_access": false
},
{
"package": "t551m-openwrt-25.12.5-tf-20261016-000721",
"frozen_backend": true,
"entrypoints": [
"gui"
],
"different_installed_release_accepted": true,
"small_boot_reads_only": true,
"unknown_boot_rejected": true,
"chain_failure_blocks_misc": true,
"hardware_access": false
}
]
@@ -0,0 +1,102 @@
[
{
"package": "mu300-openwrt-6.18.54-boot-switch-windows",
"frozen_backend": true,
"matrix": [
{
"entrypoint": "gui",
"model": "MU300",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "MU300",
"android_slot": "b"
},
{
"entrypoint": "gui",
"model": "F50",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "F50",
"android_slot": "b"
},
{
"entrypoint": "gui",
"model": "V50",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "V50",
"android_slot": "b"
},
{
"entrypoint": "gui",
"model": "U30Air",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "U30Air",
"android_slot": "b"
}
],
"different_installed_release_accepted": true,
"small_boot_reads_only": true,
"misc_trial_recorded": true,
"hardware_access": false
},
{
"package": "mu300-openwrt-7.2.8-boot-switch-windows",
"frozen_backend": true,
"matrix": [
{
"entrypoint": "gui",
"model": "MU300",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "MU300",
"android_slot": "b"
},
{
"entrypoint": "gui",
"model": "F50",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "F50",
"android_slot": "b"
},
{
"entrypoint": "gui",
"model": "V50",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "V50",
"android_slot": "b"
},
{
"entrypoint": "gui",
"model": "U30Air",
"android_slot": "a"
},
{
"entrypoint": "gui",
"model": "U30Air",
"android_slot": "b"
}
],
"different_installed_release_accepted": true,
"small_boot_reads_only": true,
"misc_trial_recorded": true,
"hardware_access": false
}
]
@@ -0,0 +1,41 @@
[
{
"package": "e5-openwrt-25.12.5-all-models-boot-windows",
"commands": {
"--verify-package": {
"exit": 0,
"stdout": "\r\n== 检查刷机包 / checking the package\r\n\r | 校验文件 / verifying the files 0 s \r / 校验文件 / verifying the files 0 s \r OK 校验文件 / verifying the files 0 s \r\n e5-openwrt-25.12.5-tf-20261016-000620 (6.18.54-e5-mobile4-g020b970e351e-dirty)\r\nPackage verified / 安装包校验通过,未连接设备。\r\n\r\n============================================================\r\n[SUCCESS / 成功] 0.8 s\r\n============================================================\r\n",
"stderr": ""
}
},
"protocol_ok": true,
"utf8_error": "ValueError: Select a device / 请选择设备",
"adb_version": "Android Debug Bridge version 1.0.41\r\nVersion 37.0.1-15733141\r\nInstalled as D:\\Git\\e5-linux\\out\\releases\\20261016-all-models-boot-r2\\e5-openwrt-25.12.5-all-models-boot-windows\\tools\\adb.exe\r\nRunning on Windows 10.0.26100\r\n"
},
{
"package": "m8-openwrt-25.12.5-all-models-boot-windows",
"commands": {
"--verify-package": {
"exit": 0,
"stdout": "\r\n== 检查刷机包 / checking the package\r\n\r | 校验文件 / verifying the files 0 s \r / 校验文件 / verifying the files 0 s \r OK 校验文件 / verifying the files 0 s \r\n m8-openwrt-25.12.5-tf-20261016-000820 (6.18.54-m8-probe12-g020b970e351e-dirty)\r\nPackage verified / 安装包校验通过,未连接设备。\r\n\r\n============================================================\r\n[SUCCESS / 成功] 0.7 s\r\n============================================================\r\n",
"stderr": ""
}
},
"protocol_ok": true,
"utf8_error": "ValueError: Select a device / 请选择设备",
"adb_version": "Android Debug Bridge version 1.0.41\r\nVersion 37.0.1-15733141\r\nInstalled as D:\\Git\\e5-linux\\out\\releases\\20261016-all-models-boot-r2\\m8-openwrt-25.12.5-all-models-boot-windows\\tools\\adb.exe\r\nRunning on Windows 10.0.26100\r\n"
},
{
"package": "t551m-openwrt-25.12.5-all-models-boot-windows",
"commands": {
"--verify-package": {
"exit": 0,
"stdout": "\r\n== 检查刷机包 / checking the package\r\n\r | 校验文件 / verifying the files 0 s \r / 校验文件 / verifying the files 0 s \r OK 校验文件 / verifying the files 0 s \r\n t551m-openwrt-25.12.5-tf-20261016-000721 (6.18.54-t551m-otg10-g020b970e351e-dirty)\r\nPackage verified / 安装包校验通过,未连接设备。\r\n\r\n============================================================\r\n[SUCCESS / 成功] 0.7 s\r\n============================================================\r\n",
"stderr": ""
}
},
"protocol_ok": true,
"utf8_error": "ValueError: Select a device / 请选择设备",
"adb_version": "Android Debug Bridge version 1.0.41\r\nVersion 37.0.1-15733141\r\nInstalled as D:\\Git\\e5-linux\\out\\releases\\20261016-all-models-boot-r2\\t551m-openwrt-25.12.5-all-models-boot-windows\\tools\\adb.exe\r\nRunning on Windows 10.0.26100\r\n"
}
]
@@ -0,0 +1,38 @@
[
{
"package": "mu300-openwrt-6.18.54-all-models-boot-windows",
"commands": {
"--check": {
"exit": 0,
"stdout": "MU300 desktop package verified; kernel 6.18\r\n\r\n========================================================\r\n[CHECK PASSED / 校验通过] Package checksums passed / 安装包校验通过。\r\nElapsed / 总耗时: 1 s\r\n",
"stderr": ""
},
"--check-boot": {
"exit": 0,
"stdout": "MU300 desktop package verified; kernel 6.18\r\nDesktop boot build verified: sd Android slot a (no device writes)\r\nDesktop boot build verified: install-part Android slot b (no device writes)\r\n\r\n========================================================\r\n[CHECK PASSED / 校验通过] Desktop boot construction passed / 桌面启动镜像构建检查通过。\r\nElapsed / 总耗时: 4 s\r\n",
"stderr": ""
}
},
"protocol_ok": true,
"utf8_error": "ValueError: Select a device / 请选择设备",
"adb_version": "Android Debug Bridge version 1.0.41\r\nVersion 37.0.1-15733141\r\nInstalled as D:\\Git\\mu300-linux-clean-tf-7.2\\release\\20261016-all-models-boot-r2\\mu300-openwrt-6.18.54-all-models-boot-windows\\tools\\adb.exe\r\nRunning on Windows 10.0.26100\r\n"
},
{
"package": "mu300-openwrt-7.2.8-all-models-boot-windows",
"commands": {
"--check": {
"exit": 0,
"stdout": "MU300 desktop package verified; kernel 7.2\r\n\r\n========================================================\r\n[CHECK PASSED / 校验通过] Package checksums passed / 安装包校验通过。\r\nElapsed / 总耗时: 0 s\r\n",
"stderr": ""
},
"--check-boot": {
"exit": 0,
"stdout": "MU300 desktop package verified; kernel 7.2\r\nDesktop boot build verified: sd Android slot a (no device writes)\r\nDesktop boot build verified: install-part Android slot b (no device writes)\r\n\r\n========================================================\r\n[CHECK PASSED / 校验通过] Desktop boot construction passed / 桌面启动镜像构建检查通过。\r\nElapsed / 总耗时: 3 s\r\n",
"stderr": ""
}
},
"protocol_ok": true,
"utf8_error": "ValueError: Select a device / 请选择设备",
"adb_version": "Android Debug Bridge version 1.0.41\r\nVersion 37.0.1-15733141\r\nInstalled as D:\\Git\\mu300-linux-clean-tf-7.2\\release\\20261016-all-models-boot-r2\\mu300-openwrt-7.2.8-all-models-boot-windows\\tools\\adb.exe\r\nRunning on Windows 10.0.26100\r\n"
}
]
@@ -0,0 +1,41 @@
[
{
"package": "e5-openwrt-25.12.5-all-models-boot-windows",
"frozen_backend": true,
"raw_bytes_verified": true,
"corrupt_download_rejected": true,
"shared_read": true,
"mu300_cli_read": false,
"mu300_gui_read_override": false,
"legacy_package": false,
"mu300_cached_backup_reused": false,
"simulated_transport": true,
"hardware_access": false
},
{
"package": "m8-openwrt-25.12.5-all-models-boot-windows",
"frozen_backend": true,
"raw_bytes_verified": true,
"corrupt_download_rejected": true,
"shared_read": true,
"mu300_cli_read": false,
"mu300_gui_read_override": false,
"legacy_package": false,
"mu300_cached_backup_reused": false,
"simulated_transport": true,
"hardware_access": false
},
{
"package": "t551m-openwrt-25.12.5-all-models-boot-windows",
"frozen_backend": true,
"raw_bytes_verified": true,
"corrupt_download_rejected": true,
"shared_read": true,
"mu300_cli_read": false,
"mu300_gui_read_override": false,
"legacy_package": false,
"mu300_cached_backup_reused": false,
"simulated_transport": true,
"hardware_access": false
}
]
@@ -0,0 +1,28 @@
[
{
"package": "mu300-openwrt-6.18.54-all-models-boot-windows",
"frozen_backend": true,
"raw_bytes_verified": true,
"corrupt_download_rejected": true,
"shared_read": true,
"mu300_cli_read": true,
"mu300_gui_read_override": true,
"legacy_package": false,
"mu300_cached_backup_reused": true,
"simulated_transport": true,
"hardware_access": false
},
{
"package": "mu300-openwrt-7.2.8-all-models-boot-windows",
"frozen_backend": true,
"raw_bytes_verified": true,
"corrupt_download_rejected": true,
"shared_read": true,
"mu300_cli_read": true,
"mu300_gui_read_override": true,
"legacy_package": false,
"mu300_cached_backup_reused": true,
"simulated_transport": true,
"hardware_access": false
}
]
@@ -0,0 +1,54 @@
{
"date": "2026-10-16",
"build": "20261016-all-models-boot-r2",
"models": [
"E5",
"M8",
"T551M",
"MU300",
"F50",
"V50",
"U30Air"
],
"mu300_kernels": [
"6.18.54",
"7.2.8"
],
"mu300_android_slots": [
"a",
"b"
],
"frozen_gui_cli_switch_cases": 38,
"older_package_gui_cases": 19,
"shared_tests": {
"e5": {
"run": 103,
"passed": 102,
"skipped": 1
},
"mu300": {
"run": 103,
"passed": 100,
"skipped": 3
}
},
"mu300_desktop_tests_passed": 34,
"mu300_binary_backup_tests_passed": 2,
"e5_cli_tests_passed": 2,
"wsl_real_file_misc_cases": 8,
"wsl_cases": [
"success",
"corrupt_write_rollback",
"short_write_rollback",
"changed_source_refusal"
],
"recovery_skips_completed_misc": true,
"frozen_method_routing_packages": 5,
"frozen_binary_transfer_packages": 5,
"frozen_recovery_flow_packages": 5,
"frozen_wireless_packages": 5,
"firmware_payloads_unchanged": true,
"magisk_payloads_unchanged": true,
"hardware_access": false,
"physical_switch_validation": "not performed"
}
+141
View File
@@ -0,0 +1,141 @@
{
"repository": "e5-linux",
"scope": [
"installer/backend",
"desktop",
"openwrt/bundle",
"boot",
"tools",
"android-vendor",
"upstream",
"root entrypoints"
],
"sources": {
"files_checked": 95,
"encoded_transfer_candidates": []
},
"hardware_access": false,
"releases": [
{
"path": "out/releases/20261015-233503/e5-openwrt-25.12.5-tf-20261016-000620",
"kind": "directory",
"encoded_cli_files": []
},
{
"path": "out/releases/20261015-233503/m8-openwrt-25.12.5-tf-20261016-000820",
"kind": "directory",
"encoded_cli_files": []
},
{
"path": "out/releases/20261015-233503/t551m-openwrt-25.12.5-tf-20261016-000721",
"kind": "directory",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-binary-transfer/e5-openwrt-25.12.5-binary-transfer-windows",
"kind": "directory",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-binary-transfer/m8-openwrt-25.12.5-binary-transfer-windows",
"kind": "directory",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-binary-transfer/t551m-openwrt-25.12.5-binary-transfer-windows",
"kind": "directory",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-wireless-adb/e5-openwrt-25.12.5-wireless-adb-windows",
"kind": "directory",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-wireless-adb/m8-openwrt-25.12.5-wireless-adb-windows",
"kind": "directory",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-wireless-adb/t551m-openwrt-25.12.5-wireless-adb-windows",
"kind": "directory",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-wireless-adb-r2/e5-openwrt-25.12.5-wireless-adb-windows",
"kind": "directory",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-wireless-adb-r2/m8-openwrt-25.12.5-wireless-adb-windows",
"kind": "directory",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-wireless-adb-r2/t551m-openwrt-25.12.5-wireless-adb-windows",
"kind": "directory",
"encoded_cli_files": []
},
{
"path": "out/releases/20261015-233503/e5-openwrt-25.12.5-tf-20261016-000620.zip",
"kind": "archive",
"encoded_cli_files": []
},
{
"path": "out/releases/20261015-233503/m8-openwrt-25.12.5-tf-20261016-000820.zip",
"kind": "archive",
"encoded_cli_files": []
},
{
"path": "out/releases/20261015-233503/t551m-openwrt-25.12.5-tf-20261016-000721.zip",
"kind": "archive",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-binary-transfer/e5-openwrt-25.12.5-binary-transfer-windows.zip",
"kind": "archive",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-binary-transfer/m8-openwrt-25.12.5-binary-transfer-windows.zip",
"kind": "archive",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-binary-transfer/t551m-openwrt-25.12.5-binary-transfer-windows.zip",
"kind": "archive",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-wireless-adb/e5-openwrt-25.12.5-wireless-adb-windows.zip",
"kind": "archive",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-wireless-adb/m8-openwrt-25.12.5-wireless-adb-windows.zip",
"kind": "archive",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-wireless-adb/t551m-openwrt-25.12.5-wireless-adb-windows.zip",
"kind": "archive",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-wireless-adb-r2/e5-openwrt-25.12.5-wireless-adb-windows.zip",
"kind": "archive",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-wireless-adb-r2/m8-openwrt-25.12.5-wireless-adb-windows.zip",
"kind": "archive",
"encoded_cli_files": []
},
{
"path": "out/releases/20261016-wireless-adb-r2/t551m-openwrt-25.12.5-wireless-adb-windows.zip",
"kind": "archive",
"encoded_cli_files": []
}
],
"source_audit_passed": true
}
@@ -0,0 +1,41 @@
[
{
"package": "e5-openwrt-25.12.5-binary-transfer-windows",
"frozen_backend": true,
"raw_bytes_verified": true,
"corrupt_download_rejected": true,
"shared_read": true,
"mu300_cli_read": false,
"mu300_gui_read_override": false,
"legacy_package": false,
"mu300_cached_backup_reused": false,
"simulated_transport": true,
"hardware_access": false
},
{
"package": "m8-openwrt-25.12.5-binary-transfer-windows",
"frozen_backend": true,
"raw_bytes_verified": true,
"corrupt_download_rejected": true,
"shared_read": true,
"mu300_cli_read": false,
"mu300_gui_read_override": false,
"legacy_package": false,
"mu300_cached_backup_reused": false,
"simulated_transport": true,
"hardware_access": false
},
{
"package": "t551m-openwrt-25.12.5-binary-transfer-windows",
"frozen_backend": true,
"raw_bytes_verified": true,
"corrupt_download_rejected": true,
"shared_read": true,
"mu300_cli_read": false,
"mu300_gui_read_override": false,
"legacy_package": false,
"mu300_cached_backup_reused": false,
"simulated_transport": true,
"hardware_access": false
}
]
@@ -0,0 +1,28 @@
[
{
"package": "mu300-openwrt-6.18.54-binary-transfer-windows",
"frozen_backend": true,
"raw_bytes_verified": true,
"corrupt_download_rejected": true,
"shared_read": true,
"mu300_cli_read": true,
"mu300_gui_read_override": true,
"legacy_package": false,
"mu300_cached_backup_reused": true,
"simulated_transport": true,
"hardware_access": false
},
{
"package": "mu300-openwrt-7.2.8-binary-transfer-windows",
"frozen_backend": true,
"raw_bytes_verified": true,
"corrupt_download_rejected": true,
"shared_read": true,
"mu300_cli_read": true,
"mu300_gui_read_override": true,
"legacy_package": false,
"mu300_cached_backup_reused": true,
"simulated_transport": true,
"hardware_access": false
}
]
@@ -0,0 +1,169 @@
{
"repository": "mu300-linux-clean-tf-7.2",
"scope": [
"installer/backend",
"desktop",
"openwrt/bundle",
"boot",
"tools",
"android-vendor",
"upstream",
"root entrypoints"
],
"sources": {
"files_checked": 428,
"encoded_transfer_candidates": []
},
"hardware_access": false,
"releases": [
{
"path": "release/20261016-binary-transfer/mu300-openwrt-6.18.54-binary-transfer-windows",
"kind": "directory",
"encoded_cli_files": []
},
{
"path": "release/20261016-binary-transfer/mu300-openwrt-7.2.8-binary-transfer-windows",
"kind": "directory",
"encoded_cli_files": []
},
{
"path": "release/20261016-u30air-pd-root-win-macos/mu300-openwrt-6.18.54-20261016-pd-root-win-macos",
"kind": "directory",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-u30air-pd-root-win-macos/mu300-openwrt-7.2.8-20261016-pd-root-win-macos",
"kind": "directory",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-u30air-pd-win-macos/mu300-openwrt-6.18.54-20261016-pd-win-macos",
"kind": "directory",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-u30air-pd-win-macos/mu300-openwrt-7.2.8-20261016-pd-win-macos",
"kind": "directory",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-wireless-adb/mu300-openwrt-6.18-wireless-adb-windows",
"kind": "directory",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-wireless-adb/mu300-openwrt-7.2-wireless-adb-windows",
"kind": "directory",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-wireless-adb-r2/mu300-openwrt-6.18.54-wireless-adb-windows",
"kind": "directory",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-wireless-adb-r2/mu300-openwrt-7.2.8-wireless-adb-windows",
"kind": "directory",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-binary-transfer/mu300-openwrt-6.18.54-binary-transfer-windows.zip",
"kind": "archive",
"encoded_cli_files": []
},
{
"path": "release/20261016-binary-transfer/mu300-openwrt-7.2.8-binary-transfer-windows.zip",
"kind": "archive",
"encoded_cli_files": []
},
{
"path": "release/20261016-u30air-pd-root-win-macos/mu300-openwrt-6.18.54-20261016-pd-root-win-macos.zip",
"kind": "archive",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-u30air-pd-root-win-macos/mu300-openwrt-7.2.8-20261016-pd-root-win-macos.zip",
"kind": "archive",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-u30air-pd-win-macos/mu300-openwrt-6.18.54-20261016-pd-win-macos.zip",
"kind": "archive",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-u30air-pd-win-macos/mu300-openwrt-7.2.8-20261016-pd-win-macos.zip",
"kind": "archive",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-wireless-adb/mu300-openwrt-6.18-wireless-adb-windows.zip",
"kind": "archive",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-wireless-adb/mu300-openwrt-7.2-wireless-adb-windows.zip",
"kind": "archive",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-wireless-adb-r2/mu300-openwrt-6.18.54-wireless-adb-windows.zip",
"kind": "archive",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
},
{
"path": "release/20261016-wireless-adb-r2/mu300-openwrt-7.2.8-wireless-adb-windows.zip",
"kind": "archive",
"encoded_cli_files": [
"OpenWrt-Installer.py",
"desktop/installer.py"
]
}
],
"source_audit_passed": true
}
Loaded 100 of 174 files, more files were not shown because too many files have changed in this diff. Show more