mirror of
https://github.com/dikeckaan/mu300-linux.git
synced 2026-12-05 08:02:40 +00:00
Improve desktop installer guidance and simplify voice switches
This commit is contained in:
1 parent
5f4732e4c6
commit
53ef7b1a1f
15 files changed
+388
-133
No files matched your search
+7
-4
@@ -1,3 +1,5 @@
|
||||
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
|
||||
|
||||
The same ZIP has two entry points. Installing it in Magisk runs the original
|
||||
@@ -10,16 +12,16 @@ the build machine's proprietary firmware and Android runtime. It is removed
|
||||
after upload, including when upload fails. TF deployment uses the original
|
||||
archive directly.
|
||||
|
||||
Only `OpenWrt-Installer.exe`, `OpenWrt-Installer.py`, `module.prop` and the
|
||||
`OpenWrt-Installer.exe`, `OpenWrt-Installer.py`, `START-HERE.md`, `module.prop` and the
|
||||
Magisk `customize.sh` entry are top-level files. Original deployment files live
|
||||
in `payload/`, shortcut scripts in `launchers/`, instructions in `docs/`, and
|
||||
in `payload/`, shortcut scripts in `launchers/`, the user guide at the root, technical notes in `docs/`, and
|
||||
desktop helpers and ADB in `desktop/` and `tools/`.
|
||||
|
||||
| Launcher (.cmd for Windows, .sh for Linux/macOS) | Action |
|
||||
| --- | --- |
|
||||
| start-installer | Choose a method |
|
||||
| install-to-tf-card | Original TF worker; format the first TF partition, or the whole unpartitioned card |
|
||||
| install-to-userdata-image | Plaintext userdata image with configurable GiB size |
|
||||
| install-to-userdata-image | EXPERIMENTAL plaintext userdata image; may damage Android F2FS |
|
||||
| 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 |
|
||||
@@ -94,7 +96,8 @@ Only when no suitable gap fits the selected size is userdata shrink considered.
|
||||
Plaintext F2FS/ext4 uses the preserving workflow: verify a complete image with
|
||||
this device's runtime, stage it, boot a desktop-only initramfs, check and shrink
|
||||
the unmounted filesystem, change GPT, write/read back the root, and expand ext4
|
||||
to the full partition. The initial 2 GiB image is not the installed capacity.
|
||||
to the full partition by default. The initial 2 GiB image is not the installed capacity.
|
||||
The first offline boot may take several minutes or longer, then reboots once into OpenWrt; keep power connected.
|
||||
Offline operations print a two-second stage/elapsed heartbeat; copying also
|
||||
reports bytes. Progress is exposed during that boot at
|
||||
`http://192.168.77.1:8089/progress.txt` (U30Air: `192.168.78.1`).
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
# MU300 / F50 / V50 / U30Air:OpenWrt 使用指南
|
||||
|
||||
**电脑安装和维护从根目录的 `OpenWrt-Installer.exe` 或 `OpenWrt-Installer.py` 开始。**
|
||||
不用寻找或手动运行子目录内的安装脚本。保留整个解压目录,不要只复制 EXE/PY。
|
||||
|
||||
## 1. 打开主安装器
|
||||
|
||||
Windows:双击 **`OpenWrt-Installer.exe`**。不需要另装 Python。
|
||||
|
||||
也可以在解压目录打开 PowerShell:
|
||||
|
||||
```powershell
|
||||
.\OpenWrt-Installer.exe
|
||||
```
|
||||
|
||||
Linux、macOS 或使用源码入口:
|
||||
|
||||
```sh
|
||||
python3 OpenWrt-Installer.py
|
||||
```
|
||||
|
||||
PY 入口需要 Python 3.10+ 和 `paramiko`、`lz4`:
|
||||
|
||||
```sh
|
||||
python3 -m pip install paramiko lz4
|
||||
```
|
||||
|
||||
首次安装、续装、切回 OpenWrt 均从已 root 的 Android 连接 ADB。
|
||||
启用 USB 调试、授权电脑,并允许 Shell 使用 root。安装 Android platform-tools,
|
||||
把 `adb` 加入 PATH;若包内含 `tools/adb.exe`,Windows 安装器也可直接使用。
|
||||
只连接一台待操作设备,或用 `--serial SERIAL` 明确选择。
|
||||
|
||||
### 主菜单怎么选
|
||||
|
||||
| 菜单 | 用途 | 数据变化 |
|
||||
| --- | --- | --- |
|
||||
| 1 — TF card | 首次安装到 TF 卡 | 清空第一分区;没有分区时清空整卡 |
|
||||
| 2 — Userdata image【实验性】 | 在未加密 userdata 内创建镜像文件 | 占用所选容量,旧镜像保留为备份;可能损坏 Android F2FS |
|
||||
| 3 — Independent internal partition | 安装到独立内置分区,通常推荐 | 优先使用未分配空间;不足才考虑缩容,必要时清空 Android |
|
||||
| 4 — Reinstall internal system | 重装已有内置 OpenWrt | 清空原 OpenWrt 分区和配置,不重复缩容 userdata |
|
||||
| 5 — Resume after Android reset | 加密 data 缩容、重置 Android 后续装 | 写入已准备的分区,不重新执行缩容 |
|
||||
| 6 — Update OpenWrt | 保留配置更新正在运行的 OpenWrt | 替换系统和内核,完成后重启 |
|
||||
| 7 — Boot OpenWrt | Android 切回已经安装的 OpenWrt | 不重新安装;选择启动槽后需手动重启 |
|
||||
|
||||
**菜单 2 是实验性功能:userdata 镜像模式可能破坏 Android 的 F2FS 文件系统。**
|
||||
一般选 TF 卡或独立内置分区。它只接受确认未加密、未经过加密映射的 userdata。
|
||||
EXPERIMENTAL: userdata-image installation may damage Android's F2FS filesystem.
|
||||
|
||||
菜单号码以本 MU300 包为准,与 E5 仓库的安装器不同。
|
||||
|
||||
## 2. 安装前准备
|
||||
|
||||
1. 使用对应设备和内核系列的完整包,安装前自行备份重要数据。
|
||||
2. 确认设备已解锁、root 可用,Android A/B 槽会由安装器识别,Linux 写入另一槽。
|
||||
3. 保持稳定供电,不要同时运行多个安装器、Android OTA 或其他分区工具。
|
||||
4. 热点密码在输入时明文显示;名称和密码留空可尝试导入 Android 配置。
|
||||
5. 固件、运行库由安装器按目标设备提取,不要替换成其他机器的文件。
|
||||
6. 电脑的网络、网卡和防火墙不会由安装器擅自调整。
|
||||
|
||||
只验证包文件、不连接机器:
|
||||
|
||||
```powershell
|
||||
.\OpenWrt-Installer.exe --check
|
||||
```
|
||||
|
||||
```sh
|
||||
python3 OpenWrt-Installer.py --check
|
||||
```
|
||||
|
||||
## 3. TF 卡安装:菜单 1
|
||||
|
||||
插好可清空的 TF 卡,启动根目录安装器,选 **1**。按提示设置热点与 APN,
|
||||
核对目标分区并确认。先完成校验、提取本机固件和释放 TF 挂载,再格式化、安装。
|
||||
|
||||
优先使用 `/dev/block/mmcblk1p1`,没有分区才用整卡。不重新划分 TF 分区,
|
||||
使用所选目标的全部容量,不保留额外 OTA 空间。看到成功状态后手动重启。
|
||||
|
||||
## 4. 内置分区安装:菜单 3
|
||||
|
||||
启动根目录安装器,选 **3**,输入需要的 OpenWrt 分区大小,例如 8 GiB。
|
||||
分区大小与文件系统容量会一致:**默认使用所选分区的全部空间**,
|
||||
安装时使用的初始 2 GiB 镜像不是最终容量。
|
||||
|
||||
### 有足够的未分配空间
|
||||
|
||||
安装器检查物理容量和 GPT,优先使用连续、对齐且没有已知旧系统占用的空闲区域。
|
||||
这条路径不缩小或格式化 userdata,包括已加密的 Android data。
|
||||
所选空闲区域的原始内容会被覆盖;完成后按最终提示手动重启。
|
||||
|
||||
### 需要缩容,且保留 Android 数据
|
||||
|
||||
未加密 userdata 才可选择保数据缩容。安装器在 Android 中准备并校验载荷,
|
||||
再重启到 initramfs,离线检查、缩容、建分区并写入 OpenWrt。
|
||||
|
||||
**第一次开机正在执行缩容安装,通常需要数分钟,数据多或闪存慢时会更久。**
|
||||
它不同于平时开机;保持供电,不要因暂时没有桌面或百分比而强制重启。
|
||||
**缩容安装完成后会自动重启一次,再进入 OpenWrt。**
|
||||
|
||||
离线阶段可通过 `http://192.168.77.1:8089/progress.txt` 查看进度;
|
||||
U30Air 为 `http://192.168.78.1:8089/progress.txt`。需电脑 USB 网卡启用且可访问设备。
|
||||
看不到进度页不代表可以中断安装,应以安装器输出和设备实际阶段为准。
|
||||
|
||||
### 加密 userdata,或主动选择格式化
|
||||
|
||||
**会清除 Android 用户数据并恢复出厂。** 第一阶段只携带准备工具和设备绑定计划,
|
||||
重启后离线调整分区,随后重启进入原厂 recovery 清空 data,再回 Android。
|
||||
这一阶段通常也要数分钟;原厂恢复出厂可能另外重启,请保持供电并等待。
|
||||
|
||||
回到 Android 后完成初始设置,重新启用 USB 调试、授权电脑,恢复 root 并允许 Shell。
|
||||
重新打开根目录 EXE/PY,选 **5**,使用原来的 `transaction.json` 续装。
|
||||
不要再次选 3 重做第一次缩容。
|
||||
|
||||
续装记录和备份默认位于电脑的 `~/mu300-backups/日期-标识/`,不是手机 data,
|
||||
请保留整个备份目录及相邻 `package-manifest.json`。可以明确指定记录:
|
||||
|
||||
```powershell
|
||||
.\OpenWrt-Installer.exe --resume --transaction "C:\Users\你的用户名\mu300-backups\日期-标识\transaction.json"
|
||||
```
|
||||
|
||||
```sh
|
||||
python3 OpenWrt-Installer.py --resume --transaction "/path/to/transaction.json"
|
||||
```
|
||||
|
||||
记录丢失时先保留设备现状,从电脑备份恢复原记录;当前续装入口需要该文件,
|
||||
不会凭设备上的分区名自动猜测安装计划。不要手工编造 token 或恢复别台机器的 GPT。
|
||||
续装会核对机器、槽位、容量和关键载荷;换了系统载荷不能直接续装。
|
||||
|
||||
## 5. 更新、重装和切换系统
|
||||
|
||||
- **更新(6)**:设备运行 OpenWrt,通过 USB 网络连接电脑。输入实际 root 密码,
|
||||
电脑经 SSH 上传、验证并更新系统,保留配置和原容量,完成后重启。
|
||||
重要文件仍需事先备份;旧的无分区表原始偏移安装不适用此桌面更新入口。
|
||||
- **重装(4)**:设备运行 Android,仅覆盖已有 `mu300root` 和 Linux 启动镜像。
|
||||
原 OpenWrt 配置会清除,Android userdata 不重新缩容。
|
||||
- **切回 OpenWrt(7)**:设备运行 Android,检查另一槽的 Linux 启动镜像后选择它,
|
||||
成功后按提示手动重启,不会重新安装或格式化存储。
|
||||
- **回 Android**:在网页系统切换入口选择 Android,再按提示重启。
|
||||
|
||||
管理地址通常是 `http://192.168.77.1`,U30Air 为 `http://192.168.78.1`。
|
||||
热点名称/密码以安装输出为准,登录后设置自己的管理密码。更新需填写当前实际密码。
|
||||
包提供容器所需的内核支持,没有预装 Docker,用户可按需安装。
|
||||
|
||||
## 6. 执行结束怎么看
|
||||
|
||||
安装器最后显示 **成功、失败、已取消、校验通过或仍需下一步**,以及耗时和下一步操作。
|
||||
“仍需下一步”表示可能正在离线安装或等待恢复 Android 后续装,不表示已经进入 OpenWrt。
|
||||
交互窗口会等待回车退出;退出前保存输出、热点密码和备份路径。
|
||||
|
||||
安装器报错时不要反复选择首次安装,不要跳过校验直接刷分区。
|
||||
保留完整输出、包版本、电脑备份和续装记录,核对是否连错机器或需要恢复 USB/root 授权。
|
||||
|
||||
## 7. 文件与 Magisk 入口
|
||||
|
||||
```text
|
||||
OpenWrt-Installer.exe Windows 主安装器(若包含)
|
||||
OpenWrt-Installer.py 跨平台主安装器
|
||||
START-HERE.md 本指南
|
||||
module.prop/customize.sh Magisk 模块入口,请勿手动运行
|
||||
payload/ 唯一一份系统镜像、启动镜像和原 Magisk 部署文件
|
||||
desktop/ 安装器内部代码、校验清单和离线工具
|
||||
launchers/ 可选快捷入口;通常直接用根目录主安装器
|
||||
tools/ 可选 ADB
|
||||
docs/ 补充技术说明
|
||||
```
|
||||
|
||||
也可在 Android 的 Magisk 中直接安装完整 ZIP,沿用原有 TF 部署流程,
|
||||
无需运行电脑 EXE/PY。它会清空所选 TF 目标并部署系统;不要为了日常切换系统反复安装此完整 ZIP。
|
||||
文件名保持英文,整个目录需要一起保留。更换 EXE/PY 后不能忽略清单或源码指纹不匹配。
|
||||
+12
-5
@@ -524,7 +524,7 @@ def check_boot(root):
|
||||
print('Desktop boot build verified:',mode,'Android slot',slot,'(no device writes)')
|
||||
|
||||
def install(args,root,manifest):
|
||||
a=Android(args);s=a.storage();m=module(root)
|
||||
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'):
|
||||
@@ -535,6 +535,7 @@ def install(args,root,manifest):
|
||||
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 selected / 已设置启动 OpenWrt。','Reboot the device manually / 请手动重启设备。')
|
||||
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()
|
||||
if not sd:raise ValueError('No TF card found; choose an internal-storage method instead')
|
||||
@@ -607,6 +608,8 @@ def install(args,root,manifest):
|
||||
is_encrypted=encrypted({'state':s['STATE'],'type':s['TYPE']},s['SOURCE'],s['EXT'] if s['EXT']=='53ef' else s['MAGIC'])
|
||||
if args.data and is_encrypted:raise ValueError('Encrypted userdata cannot host a bootable image. Choose independent-partition installation.')
|
||||
if args.data:
|
||||
print("EXPERIMENTAL / 实验性功能:userdata 镜像模式可能破坏 Android 的 F2FS 文件系统。\n"
|
||||
"This mode may damage Android's F2FS filesystem. Prefer TF or an independent internal partition.")
|
||||
maximum=(s['FREE']//1024-1024-256)
|
||||
print(f'Available / 可用: {s["FREE"]/1048576:.2f} GiB; image maximum {maximum/1024:.2f} GiB')
|
||||
size=image_size(args.size or input('Image size GiB / 镜像大小 [4]: ') or '4',maximum)
|
||||
@@ -636,9 +639,10 @@ def install(args,root,manifest):
|
||||
a.flash(boot(root,m,'prepare',live,a.slot,prepare=request),m.boot_control(live,a.slot))
|
||||
print('Saved resume transaction / 续装记录:',backup/'transaction.json')
|
||||
print('Rebooting to offline partition preparation and stock recovery. Complete Android setup, USB debugging and su; then run resume-internal-install / 重置后重新启用 USB 调试和 root,运行续装入口。')
|
||||
print('First boot resizes offline and can take several minutes. Keep power connected; it reboots after resizing. / 首次开机离线缩容通常需数分钟,请勿断电;缩容完成后自动重启,原厂恢复出厂可能另有重启。')
|
||||
a.reboot()
|
||||
return Outcome('pending','Preparation written; offline resize/reset is starting / 准备阶段已写入,设备将离线缩容并重置 Android。',
|
||||
'Finish Android setup, enable USB debugging and root, then choose 5 to resume / 完成 Android 初始化,启用 USB 调试和 root,再选 5 续装。')
|
||||
'Allow several minutes for offline resizing and its automatic reboot. Finish Android setup, enable USB debugging and root, then choose 5 to resume / 等待数分钟离线缩容及自动重启,完成 Android 初始化,启用 USB 调试和 root,再选 5 续装。')
|
||||
# Use a small, fully verified initial image; offline resize fills ALL space.
|
||||
a.prepare_payload(root)
|
||||
a.put(settings(args,2048,'part-stage',manifest['kernel']),'desktop-settings.env')
|
||||
@@ -647,9 +651,10 @@ def install(args,root,manifest):
|
||||
identity=':'.join(map(str,(s['CID'],s['NODE'],s['START'],s['SIZE'],target)))
|
||||
a.flash(boot(root,m,'install-part',live,a.slot,identity=identity),m.boot_control(live,a.slot))
|
||||
print('Offline shrink/install starts after reboot; progress at http://192.168.77.1:8089/progress.txt (U30Air: .78.1). / 重启后开始离线安装。')
|
||||
print('First boot may take several minutes or longer; do not interrupt power. After installation it reboots once into OpenWrt. / 首次开机缩容安装通常需数分钟,数据多或闪存慢时更久;完成后自动重启一次进入 OpenWrt,请勿中断。')
|
||||
a.reboot()
|
||||
return Outcome('pending','Payload verified; offline shrink/install is starting / 载荷校验通过,设备将离线缩容并安装。',
|
||||
'Wait for the device to finish and boot OpenWrt / 等待设备完成安装并启动 OpenWrt。')
|
||||
'Allow several minutes or longer; it automatically reboots once into OpenWrt. Keep power connected / 首次缩容安装通常需数分钟或更久,完成后自动重启一次进入 OpenWrt,请保持供电。')
|
||||
|
||||
def direct_write(a,root,m,manifest,s,sectors,record=None,r=None):
|
||||
node=s['ROOT']
|
||||
@@ -758,7 +763,9 @@ fi''').strip().splitlines()
|
||||
def main(argv=None):
|
||||
p=argparse.ArgumentParser(description=__doc__)
|
||||
actions=p.add_mutually_exclusive_group()
|
||||
for n in ('tf','data','part','reinstall-part','resume','update','boot-openwrt','check','check-boot','check-rootfs','check-resume','probe'):actions.add_argument('--'+n,action='store_true')
|
||||
for n in ('tf','data','part','reinstall-part','resume','update','boot-openwrt','check','check-boot','check-rootfs','check-resume','probe'):
|
||||
help_text = 'EXPERIMENTAL userdata image: may damage Android F2FS; unencrypted data only' if n=='data' else None
|
||||
actions.add_argument('--'+n,action='store_true',help=help_text)
|
||||
pause=p.add_mutually_exclusive_group()
|
||||
pause.add_argument('--pause',action='store_true',help='wait for Enter after the result, including redirected input')
|
||||
pause.add_argument('--no-pause',action='store_true',help='exit immediately after the result (automation)')
|
||||
@@ -799,7 +806,7 @@ def main(argv=None):
|
||||
return Outcome('checked','Read-only device preflight passed / 设备只读预检通过。')
|
||||
if not any(getattr(args,n) for n in ('tf','data','part','reinstall_part','resume','update','boot_openwrt')):
|
||||
choices=('tf','data','part','reinstall_part','resume','update','boot_openwrt')
|
||||
print('1 TF card / TF 卡\n2 Userdata image / userdata 镜像\n3 Independent internal partition / 独立内置分区\n4 Reinstall internal system / 重装独立分区\n5 Resume after Android reset / 重置后续装\n6 Update OpenWrt / 更新\n7 Boot OpenWrt / 启动 OpenWrt')
|
||||
print('1 TF card / TF 卡\n2 Userdata image [EXPERIMENTAL] / userdata 镜像【实验性:可能损坏 Android F2FS】\n3 Independent internal partition / 独立内置分区\n4 Reinstall internal system / 重装独立分区\n5 Resume after Android reset / 重置后续装\n6 Update OpenWrt / 更新\n7 Boot OpenWrt / 启动 OpenWrt')
|
||||
selected=input('Choose / 选择 [1]: ').strip() or '1'
|
||||
if selected not in tuple(map(str,range(1,8))):raise ValueError('Invalid menu choice')
|
||||
setattr(args,choices[int(selected)-1],True)
|
||||
|
||||
@@ -60,6 +60,7 @@ unset MU300_DEPLOY_ROOT
|
||||
(assets/'repair').mkdir(); mod.prepare(Path(repair),assets/'repair')
|
||||
(stage/'docs').mkdir()
|
||||
shutil.copyfile(TOP/'desktop/README.md',stage/'docs/DESKTOP-INSTALL.md')
|
||||
shutil.copyfile(TOP/'desktop/START-HERE.md',stage/'START-HERE.md')
|
||||
shutil.copyfile(TOP/'desktop/installer.py',stage/'OpenWrt-Installer.py')
|
||||
# Python source runs from the archive root, so resolve its support files there.
|
||||
if exe:
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
# IMS、VoLTE、VoNR 开关(2026-10-14)
|
||||
# VoLTE、VoNR 开关(2026-10-14)
|
||||
|
||||
网页“蜂窝 → 网络锁定”新增三个独立开关。行为与 E5 公共仓库对齐,使用 MU300 原有 Shell AT、异步任务与启动流程,没有引入 Python 依赖,也不需要重编内核。
|
||||
网页“蜂窝 → 网络锁定”提供 VoLTE、VoNR 两项独立的单按钮滑动开关。行为与 E5 公共仓库对齐,使用 MU300 原有 Shell AT、异步任务与启动流程,没有引入 Python 依赖,也不需要重编内核。
|
||||
|
||||
- 控制“查看/控制卡槽”选择的 SIM,不切换上网卡,设置分别保存。
|
||||
- 保留二次确认、切换卡槽后取消旧确认、互斥和错误提示。
|
||||
- 配置跟随“开机自动应用”;正常平台路径在 AT 握手完成、射频开启和首次拨号之前回放。未配置时保持基带默认,不新增语音设置启动命令。
|
||||
- 单独切换 IMS、VoLTE、VoNR,以及只有语音偏好的开机回放,均不执行 SFUN,不主动 ifup 或重拨。
|
||||
- 网络模式、频段、小区的现有回放和晚期恢复流程保持原样;“清除全部蜂窝锁定”不删除或修改这三项语音偏好。
|
||||
- 单独切换 VoLTE、VoNR,以及只有语音偏好的开机回放,均不执行 SFUN,不主动 ifup 或重拨。
|
||||
- 网络模式、频段、小区的现有回放和晚期恢复流程保持原样;“清除全部蜂窝锁定”不删除或修改这两项语音偏好。
|
||||
- 开关按真实回读显示,等待确认/任务完成后更新状态,状态未知或正在执行其他设置时禁用,不猜测为关闭。
|
||||
|
||||
指令与用户提供的 `UniSocCellularUtils.kt` 对齐:VoLTE 使用 `AT+CAVIMS`,VoNR 使用 `AT+SP5GCMDS="set nr param",45,<0|1>`,查询 `"get nr synch_param",42`。IMS 总开关使用原厂 RIL 的 `AT+IMSEN=<0|1>`。
|
||||
指令与用户提供的 `UniSocCellularUtils.kt` 对齐:VoLTE 使用 `AT+CAVIMS`,VoNR 使用 `AT+SP5GCMDS="set nr param",45,<0|1>`,查询 `"get nr synch_param",42`。
|
||||
|
||||
VoLTE、VoNR 回读不一致时不保存。IMS 必须获得明确 OK;部分固件只支持 IMSEN 设置、不支持读取,此时页面明确标识“本次已应用”,不冒充真实回读。记录只对本次启动有效,不用旧开机的缓存推断当前状态。单项查询不支持时,不隐藏其他网络锁定功能。
|
||||
VoLTE、VoNR 回读不一致时不保存。记录只对本次启动有效,不用旧开机的缓存或保存的偏好推断当前状态。单项查询失败时,不隐藏其他网络锁定功能,不用旧写入回执掩盖本次读取失败。
|
||||
|
||||
关闭 IMS 不能保证屏蔽传统网络的全部电话和短信;页面有对应说明。未改动用户的 IMS APN、NV、射频模式或当前 SIM 设置。
|
||||
按用户最终要求移除独立 IMS 总开关:页面、RPC 和后端不再接受 `ims` 设置,不发送 `IMSEN` 查询或设置,启动检测和回放也忽略旧 `ims` 文件。旧文件仅原地保留,不转成 VoLTE 配置,不主动撤销此前已经下发给基带的设置。
|
||||
|
||||
验证包括 dash/bash 下的锁定与异步任务测试、新增语音开关成功/失败、缺失 OK、回读不一致、双卡文件隔离、仅语音配置的启动入口与单次回放、无额外 SFUN、重置保留偏好,以及实际页面处理函数的二次确认和三语言检查。
|
||||
关闭 VoLTE 或 VoNR 不能保证屏蔽传统网络的全部电话和短信;页面有对应说明。未改动用户的 IMS APN、NV、射频模式或当前 SIM 设置。
|
||||
|
||||
没有进行 MU300 实机部署或真实 IMS/VoLTE/VoNR 通话验证。本次先提交公共代码,不重新编译、打包 MU300。
|
||||
验证包括 dash/bash 下的锁定与异步任务测试、语音开关成功/失败、回读不一致、双卡文件隔离、仅语音配置的启动入口与单次回放、忽略旧 IMS 配置及拒绝旧接口、无额外 SFUN、重置保留偏好,以及实际页面开关双向切换、未知状态禁用、二次确认和三语言检查。
|
||||
|
||||
没有进行 MU300 实机部署或真实 VoLTE/VoNR 通话验证。此处记录最新源码行为,此前包含 IMS 开关的安装包不会随源码修改自动更新。
|
||||
@@ -718,12 +718,10 @@ var DASH_I18N = {
|
||||
'已执行': ['Done', 'Tamamlandı'],
|
||||
'失败': ['Failed', 'Başarısız'],
|
||||
'未知错误': ['Unknown error', 'Bilinmeyen hata'],
|
||||
'状态暂不可读,请选择开启或关闭': ['State unavailable; choose on or off', 'Durum okunamıyor; açın veya kapatın'],
|
||||
'本次已应用': ['Applied this boot', 'Bu açılışta uygulandı'],
|
||||
'关闭后只停止下次开机回放,已保存的网络、IMS、VoLTE 和 VoNR 设置不会被删除。': ['Turning this off only disables boot replay; saved network, IMS, VoLTE and VoNR settings are kept.', 'Kapatmak yalnızca açılışta uygulamayı durdurur; ağ, IMS, VoLTE ve VoNR ayarları korunur.'],
|
||||
'IMS 为总开关,VoLTE 用于 4G 通话,VoNR 用于 5G SA 通话。设置按当前查看的 SIM 保存,并跟随“开机自动应用”。': ['IMS is the master switch; VoLTE handles 4G calls and VoNR handles 5G SA calls. Settings are saved per viewed SIM and follow Apply at boot.', 'IMS ana anahtardır; VoLTE 4G, VoNR 5G SA aramaları içindir. Ayarlar görüntülenen SIM için kaydedilir ve açılışta uygulama ayarını izler.'],
|
||||
'关闭 IMS 不等于屏蔽全部来电和短信,传统网络业务仍可能到达。': ['Disabling IMS does not block every call or SMS; traditional network services may still arrive.', 'IMS kapatıldığında tüm aramalar ve SMS engellenmez; geleneksel şebeke hizmetleri ulaşabilir.'],
|
||||
'IMS 设置没有获得明确确认,未保存': ['IMS setting was not acknowledged; not saved', 'IMS ayarı onaylanmadı; kaydedilmedi'],
|
||||
'状态暂不可读,请刷新后重试': ['State unavailable; refresh and retry', 'Durum okunamıyor; yenileyip tekrar deneyin'],
|
||||
'关闭后只停止下次开机回放,已保存的网络、VoLTE 和 VoNR 设置不会被删除。': ['Turning this off only disables boot replay; saved network, VoLTE and VoNR settings are kept.', 'Kapatmak yalnızca açılışta uygulamayı durdurur; ağ, VoLTE ve VoNR ayarları korunur.'],
|
||||
'VoLTE 用于 4G 通话,VoNR 用于 5G SA 通话。设置按当前查看的 SIM 保存,并跟随“开机自动应用”。': ['VoLTE handles 4G calls and VoNR handles 5G SA calls. Settings are saved per viewed SIM and follow Apply at boot.', 'VoLTE 4G, VoNR 5G SA aramaları içindir. Ayarlar görüntülenen SIM için kaydedilir ve açılışta uygulama ayarını izler.'],
|
||||
'关闭 VoLTE 或 VoNR 不等于屏蔽全部来电和短信,传统网络业务仍可能到达。': ['Disabling VoLTE or VoNR does not block every call or SMS; traditional network services may still arrive.', 'VoLTE veya VoNR kapatıldığında tüm aramalar ve SMS engellenmez; geleneksel şebeke hizmetleri ulaşabilir.'],
|
||||
'调用失败': ['Request failed', 'İstek başarısız'],
|
||||
'正在断开数据连接': ['Disconnecting data', 'Veri bağlantısı kesiliyor'],
|
||||
'正在拨号': ['Connecting data', 'Veri bağlantısı kuruluyor'],
|
||||
@@ -1180,6 +1178,16 @@ html.mud-bootstrap-theme{--surface:var(--background-color-high);--surface-sunken
|
||||
.mud-freq .mud-k{flex:0 0 2.4em}
|
||||
.mud-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:7px 12px;border:1px solid var(--hairline,var(--border,#ccc));border-radius:var(--radius-base,.5rem);background:var(--surface,var(--background,#fff));color:var(--text,#222);font-size:.82rem;cursor:pointer;user-select:none}
|
||||
.mud-btn:active{transform:scale(.97)}
|
||||
.mud-voice-row{align-items:center;gap:12px;padding:8px 0}
|
||||
.mud-voice-row .mud-v{flex:1;text-align:right;min-width:0;overflow-wrap:anywhere}
|
||||
.mud-btn.mud-voice-switch{flex:0 0 48px;min-height:36px;padding:6px;border:0;border-radius:18px;background:transparent;color:var(--text,#222)}
|
||||
.mud-voice-switch:focus-visible{outline:2px solid var(--brand,var(--primary,#2f7bf6));outline-offset:2px}
|
||||
.mud-voice-track{position:relative;display:block;width:36px;height:22px;flex:0 0 36px;border-radius:12px;background:var(--muted,#777);transition:background .18s}
|
||||
.mud-voice-track:after{content:"";position:absolute;left:3px;top:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:transform .18s}
|
||||
.mud-voice-switch.on .mud-voice-track{background:var(--brand,var(--primary,#2f7bf6))}
|
||||
.mud-voice-switch.on .mud-voice-track:after{transform:translateX(14px)}
|
||||
@media(prefers-reduced-motion:reduce){.mud-voice-track,.mud-voice-track:after{transition:none}}
|
||||
|
||||
.mud-btn.on{background:var(--brand,var(--primary,#2f7bf6));border-color:var(--brand,var(--primary,#2f7bf6));color:var(--on-brand,#fff)}
|
||||
.mud-btn.warn{border-color:color-mix(in oklab,var(--danger,#E25555) 55%,transparent);color:var(--danger,#E25555)}
|
||||
.mud-btn[disabled]{opacity:.4;pointer-events:none}
|
||||
|
||||
@@ -52,20 +52,20 @@ return view.extend({
|
||||
<div class="mud-ctl" style="margin-top:7px;max-width:340px">
|
||||
<button class="mud-btn" id="mud-lock-auto-apply">开机自动应用</button>
|
||||
</div>
|
||||
<div class="mud-note">关闭后只停止下次开机回放,已保存的网络、IMS、VoLTE 和 VoNR 设置不会被删除。</div>
|
||||
<div class="mud-note">关闭后只停止下次开机回放,已保存的网络、VoLTE 和 VoNR 设置不会被删除。</div>
|
||||
</div>
|
||||
|
||||
<div class="mud-sec">
|
||||
<h3>IMS · VoLTE · VoNR</h3>
|
||||
<div class="mud-note">IMS 为总开关,VoLTE 用于 4G 通话,VoNR 用于 5G SA 通话。设置按当前查看的 SIM 保存,并跟随“开机自动应用”。</div>
|
||||
${['ims','volte','vonr'].map(function(kind) {
|
||||
var name = {ims:'IMS',volte:'VoLTE',vonr:'VoNR'}[kind];
|
||||
return '<div class="mud-r"><span class="mud-k">'+name+'</span><span class="mud-v" id="mud-lock-'+kind+'-state">--</span></div>'+
|
||||
'<div class="mud-ctl" style="max-width:340px;margin:7px 0 12px;grid-template-columns:1fr 1fr">'+
|
||||
'<button class="mud-btn" data-voice="'+kind+'" data-enabled="on">开启</button>'+
|
||||
'<button class="mud-btn" data-voice="'+kind+'" data-enabled="off">关闭</button></div>';
|
||||
<h3>VoLTE · VoNR</h3>
|
||||
<div class="mud-note">VoLTE 用于 4G 通话,VoNR 用于 5G SA 通话。设置按当前查看的 SIM 保存,并跟随“开机自动应用”。</div>
|
||||
${['volte','vonr'].map(function(kind) {
|
||||
var name = {volte:'VoLTE',vonr:'VoNR'}[kind];
|
||||
return '<div class="mud-r mud-voice-row"><span class="mud-k">'+name+'</span>'+
|
||||
'<span class="mud-v" id="mud-lock-'+kind+'-state">--</span>'+
|
||||
'<button type="button" class="mud-btn mud-voice-switch" data-voice="'+kind+'" role="switch" aria-label="'+name+'" aria-checked="false" disabled>'+
|
||||
'<span class="mud-voice-track" aria-hidden="true"></span></button></div>';
|
||||
}).join('')}
|
||||
<div class="mud-note">关闭 IMS 不等于屏蔽全部来电和短信,传统网络业务仍可能到达。</div>
|
||||
<div class="mud-note">关闭 VoLTE 或 VoNR 不等于屏蔽全部来电和短信,传统网络业务仍可能到达。</div>
|
||||
</div>
|
||||
|
||||
<div class="mud-sec">
|
||||
@@ -193,8 +193,10 @@ return view.extend({
|
||||
};
|
||||
root.querySelectorAll('[data-voice]').forEach(function(btn) {
|
||||
btn.onclick = function() {
|
||||
var kind = btn.dataset.voice, val = btn.dataset.enabled;
|
||||
var name = {ims:'IMS',volte:'VoLTE',vonr:'VoNR'}[kind];
|
||||
var kind = btn.dataset.voice, state = (self.lastLock || {})[kind];
|
||||
if (self._applying || btn.disabled || !state || typeof state.enabled !== 'boolean') return;
|
||||
var val = state.enabled ? 'off' : 'on';
|
||||
var name = {volte:'VoLTE',vonr:'VoNR'}[kind];
|
||||
apply(kind, val, M.translate(val === 'on' ? '开启' : '关闭')+' '+name,
|
||||
{btn:btn,noSfun:true});
|
||||
};
|
||||
@@ -463,9 +465,27 @@ return view.extend({
|
||||
});
|
||||
},
|
||||
|
||||
paintVoiceSwitches: function(l) {
|
||||
var self = this;
|
||||
['volte','vonr'].forEach(function(kind) {
|
||||
var state = l[kind] || {}, known = typeof state.enabled === 'boolean';
|
||||
var text = M.translate(known ? (state.enabled ? '已开启' : '已关闭') : '状态暂不可读,请刷新后重试');
|
||||
var status = self.Q('lock-'+kind+'-state');
|
||||
if (status) status.textContent = text;
|
||||
var box = self._root;
|
||||
if (box) box.querySelectorAll('[data-voice="'+kind+'"]').forEach(function(btn) {
|
||||
btn.className = 'mud-btn mud-voice-switch'+(known && state.enabled ? ' on' : '');
|
||||
btn.setAttribute('aria-checked', String(known && state.enabled));
|
||||
btn.setAttribute('aria-label', kind === 'volte' ? 'VoLTE' : 'VoNR');
|
||||
btn.disabled = !!self._applying || !known;
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
paint: function() {
|
||||
var l = this.lastLock || {};
|
||||
var self = this;
|
||||
this.paintVoiceSwitches(l);
|
||||
var setR = function(id, txt) { var e = self.Q(id); if (e) e.textContent = (txt == null || txt === '') ? '--' : txt; };
|
||||
if (l.error) { setR('lock-nrline', l.error); setR('lock-lteline', ''); return; }
|
||||
var MODE_TXT = { auto: '自动(5G/4G)', '4g': '仅 4G', sa: '仅 5G SA', nsa: '仅 5G NSA' };
|
||||
@@ -477,19 +497,6 @@ return view.extend({
|
||||
if (eb) { eb.className = 'mud-btn' + (l.endc === '1' ? ' on' : ''); eb.textContent = l.endc === '1' ? 'EN-DC' : 'EN-DC'; }
|
||||
var ab = this.Q('lock-auto-apply'), autoApply = l.auto_apply !== 0;
|
||||
if (ab) { ab.className = 'mud-btn' + (autoApply ? ' on' : ''); ab.textContent = M.translate(autoApply ? '开机自动应用 ✓' : '开机自动应用'); }
|
||||
['ims','volte','vonr'].forEach(function(kind) {
|
||||
var state = l[kind] || {}, known = typeof state.enabled === 'boolean';
|
||||
var text = M.translate(known ? (state.enabled ? '已开启' : '已关闭') : '状态暂不可读,请选择开启或关闭');
|
||||
if (state.source === 'acknowledged') text += ' · '+M.translate('本次已应用');
|
||||
setR('lock-'+kind+'-state', text);
|
||||
var box = self._root;
|
||||
if (box) box.querySelectorAll('[data-voice="'+kind+'"]').forEach(function(btn) {
|
||||
var selected = known && state.enabled === (btn.dataset.enabled === 'on');
|
||||
btn.className = 'mud-btn'+(selected ? ' on' : '');
|
||||
btn.setAttribute('aria-pressed', String(selected));
|
||||
btn.disabled = !!self._applying || selected;
|
||||
});
|
||||
});
|
||||
|
||||
/* Never expose speculative selectable bands before backend capabilities. */
|
||||
var caps = l.caps || {};
|
||||
|
||||
@@ -238,7 +238,7 @@ m_lock_set() {
|
||||
kind=$(inp '@.kind')
|
||||
val=$(inp '@.val')
|
||||
case "$kind" in
|
||||
mode|endc|lte|nr|cell|auto_apply|reset|ims|volte|vonr) ;;
|
||||
mode|endc|lte|nr|cell|auto_apply|reset|volte|vonr) ;;
|
||||
*) printf '{"ok":0,"error":"unknown lock kind"}\n'; return ;;
|
||||
esac
|
||||
"$DASH/lock" start "$kind" "$val"
|
||||
|
||||
@@ -19,7 +19,7 @@ case $deadline in ''|*[!0-9]*) deadline=90 ;; esac
|
||||
[ "$(cat "$state/auto_apply" 2>/dev/null)" != off ] || exit 0
|
||||
have=0
|
||||
# An empty band/cell file explicitly means unlock, not missing state.
|
||||
for k in endc mode lte nr cell ims volte vonr; do [ -f "$state/$k" ] && have=1; done
|
||||
for k in endc mode lte nr cell volte vonr; do [ -f "$state/$k" ] && have=1; done
|
||||
[ "$have" = 1 ] || exit 0
|
||||
[ -e "$marker" ] && exit 0
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# KIND / VALUE:
|
||||
# mode auto | 4g | sa | nsa network mode lock (SPTESTMODE + SP5GRAN)
|
||||
# endc on | off EN-DC / NSA anchor permission (SPENDC; note OFF is value 2)
|
||||
# ims | volte | vonr on | off per-SIM voice preferences; no SFUN cycle
|
||||
# volte | vonr on | off per-SIM voice preferences; no SFUN cycle
|
||||
# lte "1,3,5" or "" LTE band lock (SPLBAND); empty = automatic
|
||||
# nr "78,41" or "" NR band lock (SPLBAND); empty = automatic
|
||||
# cell auto | off | "nr:627264,393" | "lte:1650,211" serving-cell lock (SPFORCEFRQ)
|
||||
@@ -28,7 +28,7 @@
|
||||
# same sequence the official web UI and mobile-data's sim-reset use - so the new
|
||||
# setting takes effect. Cellular drops for half a minute; the data watchdog or the
|
||||
# configured netifd data interface brings the connection back.
|
||||
# EN-DC and IMS/VoLTE/VoNR changes do not perform this restart.
|
||||
# EN-DC and VoLTE/VoNR changes do not perform this restart.
|
||||
#
|
||||
# The last applied state is saved in the configured state_dir. The package's
|
||||
# own procd service replays it when the selected AT adapter becomes ready; no
|
||||
@@ -235,9 +235,9 @@ do_get() {
|
||||
sort -n | awk 'NR>1{printf ","}{printf "%s", $1}')
|
||||
[ -n "$nrcap" ] || nrcap=1,5,6,8,28,41,78
|
||||
ltecap=1,3,5,8,34,38,39,40,41
|
||||
printf '{"ts":%d,"mode":{"label":"%s","work":"%s","gran":"%s","m1":"%s","prim":"%s"},"endc":"%s","lte":{"locked":"%s","raw":"%s"},"nr":{"locked":"%s","raw":"%s"},"cell":"%s","cells":%s,"write_caps":{"nr":"%s","lte":"1,3,5,8,34,38,39,40,41"},"caps":{"nr":"%s","lte":"%s"},"ims":%s,"volte":%s,"vonr":%s}\n' \
|
||||
printf '{"ts":%d,"mode":{"label":"%s","work":"%s","gran":"%s","m1":"%s","prim":"%s"},"endc":"%s","lte":{"locked":"%s","raw":"%s"},"nr":{"locked":"%s","raw":"%s"},"cell":"%s","cells":%s,"write_caps":{"nr":"%s","lte":"1,3,5,8,34,38,39,40,41"},"caps":{"nr":"%s","lte":"%s"},"volte":%s,"vonr":%s}\n' \
|
||||
"$(date +%s)" "$lbl" "${m0:-}" "${gran:-}" "$m1" "$prim" "${endc:-}" "${lte_b:-}" "${ltem:-}" "${nr_b:-}" "${nrm:-}" "${cell%%,*}" "${cells:-[]}" "$(canonical_bands "$(nr_bands "$(nr_masks "$nrcap")")")" "${nrcap:-}" "${ltecap:-}" \
|
||||
"$(voice_json ims 1)" "$(voice_json volte 1)" "$(voice_json vonr 1)" \
|
||||
"$(voice_json volte 1)" "$(voice_json vonr 1)" \
|
||||
| tee "$LOCKCACHE.part.$$" && mv "$LOCKCACHE.part.$$" "$LOCKCACHE"
|
||||
}
|
||||
|
||||
@@ -405,7 +405,7 @@ verify_replay() {
|
||||
want=$(grep -E '^(lte|nr):[0-9]+,[0-9]+$' "$d/cell" | sort -u)
|
||||
[ "$got" = "$want" ] || return 1
|
||||
fi
|
||||
for kind in volte vonr ims; do
|
||||
for kind in volte vonr; do
|
||||
[ -f "$d/$kind" ] || continue
|
||||
voice_matches "$kind" "$(cat "$d/$kind")" || return 1
|
||||
done
|
||||
@@ -441,11 +441,11 @@ do_replay() {
|
||||
# what the dashboard last applied, then one stack restart at the end
|
||||
d=$STATE_DIR
|
||||
have=0
|
||||
for kind in endc mode lte nr cell ims volte vonr; do [ -f "$d/$kind" ] && have=1; done
|
||||
for kind in endc mode lte nr cell volte vonr; do [ -f "$d/$kind" ] && have=1; done
|
||||
if [ "$have" = 0 ]; then : > "$marker"; return 0; fi
|
||||
# Validate the entire saved request before the first AT write. Reuse the
|
||||
# established MU300 codecs/capabilities, not another platform's rules.
|
||||
for kind in endc mode lte nr ims volte vonr; do
|
||||
for kind in endc mode lte nr volte vonr; do
|
||||
[ -f "$d/$kind" ] || continue
|
||||
validate_apply "$kind" "$(cat "$d/$kind")" || { say "invalid saved $kind; replay aborted ($phase)"; return 1; }
|
||||
done
|
||||
@@ -479,7 +479,7 @@ do_replay() {
|
||||
done < "$d/cell"
|
||||
need_restart=1
|
||||
fi
|
||||
for kind in volte vonr ims; do
|
||||
for kind in volte vonr; do
|
||||
[ -f "$d/$kind" ] || continue
|
||||
val=$(cat "$d/$kind")
|
||||
voice_set "$kind" "$val" 2 || { say "replay voice write failed: $kind ($phase)"; return 1; }
|
||||
|
||||
@@ -4,7 +4,7 @@ fail_apply() { printf '%s\n' "$1" >&2; return 1; }
|
||||
|
||||
validate_apply() {
|
||||
local kind=$1 val=$2 cap encoded pair fr pc
|
||||
case "$kind:$val" in ims:on|ims:off|volte:on|volte:off|vonr:on|vonr:off) return 0 ;; esac
|
||||
case "$kind:$val" in volte:on|volte:off|vonr:on|vonr:off) return 0 ;; esac
|
||||
case "$kind:$val" in
|
||||
mode:auto|mode:4g|mode:sa|mode:nsa|endc:on|endc:off|auto_apply:on|auto_apply:off|reset:auto) return 0 ;;
|
||||
cell:auto|cell:off|cell:off-nr|cell:off-lte) return 0 ;;
|
||||
@@ -65,7 +65,7 @@ voice_receipt() {
|
||||
[ -r "$RUNDIR/voice-$1" ] || return 1
|
||||
read -r bid bit source < "$RUNDIR/voice-$1" 2>/dev/null || return 1
|
||||
[ "$bid" = "$current" ] || return 1
|
||||
case "$bit:$source" in 0:modem|1:modem|0:acknowledged|1:acknowledged) printf '%s %s\n' "$bit" "$source" ;; *) return 1 ;; esac
|
||||
case "$bit:$source" in 0:modem|1:modem) printf '%s %s\n' "$bit" "$source" ;; *) return 1 ;; esac
|
||||
}
|
||||
|
||||
voice_record() {
|
||||
@@ -75,21 +75,14 @@ voice_record() {
|
||||
}
|
||||
|
||||
voice_read() {
|
||||
local kind=$1 timeout=${2:-4} cmd prefix reply raw bid status=0
|
||||
local kind=$1 timeout=${2:-4} cmd prefix reply raw status=0
|
||||
case $kind in
|
||||
ims)
|
||||
bid=$(cat /proc/sys/kernel/random/boot_id) || return 1
|
||||
[ "$(cat "$RUNDIR/voice-ims-unsupported" 2>/dev/null)" != "$bid" ] || return 1
|
||||
cmd='AT+IMSEN?'; prefix=IMSEN ;;
|
||||
volte) cmd='AT+CAVIMS?'; prefix=CAVIMS ;;
|
||||
vonr) cmd='AT+SP5GCMDS="get nr synch_param",42'; prefix=SP5GCMDS ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
reply=$(lock_at "$cmd" "$timeout") || status=$?
|
||||
reply=$(printf '%s\n' "$reply" | tr -d '\r')
|
||||
if [ "$kind" = ims ] && printf '%s\n' "$reply" | grep -Eq '^(ERROR|\+CME ERROR: *4)$'; then
|
||||
printf '%s\n' "$bid" > "$RUNDIR/voice-ims-unsupported"
|
||||
fi
|
||||
[ "$status" = 0 ] && [ "$(printf '%s\n' "$reply" | sed '/^[[:space:]]*$/d' | tail -n1)" = OK ] || return 1
|
||||
raw=$(printf '%s\n' "$reply" | sed -n "s/^+$prefix: *//p" | head -n1 | tr -d ' \t"')
|
||||
if [ "$kind" = vonr ]; then
|
||||
@@ -102,7 +95,6 @@ voice_set() {
|
||||
local kind=$1 val=$2 timeout=${3:-6} bit cmd reply status=0 got source
|
||||
case $val in on) bit=1 ;; off) bit=0 ;; *) return 1 ;; esac
|
||||
case $kind in
|
||||
ims) cmd="AT+IMSEN=$bit" ;;
|
||||
volte) cmd="AT+CAVIMS=$bit" ;;
|
||||
vonr) cmd="AT+SP5GCMDS=\"set nr param\",45,$bit" ;;
|
||||
*) return 1 ;;
|
||||
@@ -112,47 +104,36 @@ voice_set() {
|
||||
if printf '%s\n' "$reply" | grep -Eq '^(ERROR|\+CME ERROR|\+CMS ERROR)(:|$)'; then
|
||||
fail_apply '模组拒绝了设置'; return 1
|
||||
fi
|
||||
if [ "$kind" = ims ]; then
|
||||
# Stock RIL's IMS master switch. Do not substitute CAVIMS or treat
|
||||
# missing OK as success on a CP without an IMSEN read command.
|
||||
[ "$status" = 0 ] && [ "$(printf '%s\n' "$reply" | sed '/^[[:space:]]*$/d' | tail -n1)" = OK ] ||
|
||||
{ fail_apply 'IMS 设置没有获得明确确认,未保存'; return 1; }
|
||||
source=acknowledged
|
||||
else
|
||||
got=$(voice_read "$kind" "$timeout") && [ "$got" = "$bit" ] ||
|
||||
{ fail_apply '模组回读与请求设置不一致,未保存'; return 1; }
|
||||
source=modem
|
||||
fi
|
||||
got=$(voice_read "$kind" "$timeout") && [ "$got" = "$bit" ] ||
|
||||
{ fail_apply '模组回读与请求设置不一致,未保存'; return 1; }
|
||||
source=modem
|
||||
voice_record "$kind" "$bit" "$source"
|
||||
}
|
||||
|
||||
voice_matches() {
|
||||
local kind=$1 val=$2 got
|
||||
case $val in on) val=1 ;; off) val=0 ;; *) return 1 ;; esac
|
||||
if [ "$kind" = ims ]; then
|
||||
got=$(voice_receipt ims) || return 1
|
||||
got=${got%% *}
|
||||
else
|
||||
got=$(voice_read "$kind" 2) || return 1
|
||||
fi
|
||||
got=$(voice_read "$kind" 2) || return 1
|
||||
[ "$got" = "$val" ]
|
||||
}
|
||||
|
||||
voice_json() {
|
||||
local kind=$1 refresh=${2:-0} got source=unknown enabled=null saved native=0
|
||||
local kind=$1 refresh=${2:-0} got source=unknown enabled=null saved
|
||||
# A getter must not overwrite a write receipt mid-operation. The apply
|
||||
# worker's existing refresh reads the receipt it just verified instead.
|
||||
if [ "$refresh" = 1 ] && [ ! -d "$APPLY_DIR" ]; then
|
||||
if got=$(voice_read "$kind"); then
|
||||
source=modem; native=1
|
||||
source=modem
|
||||
[ "$got" = 1 ] && enabled=true || enabled=false
|
||||
fi
|
||||
fi
|
||||
# Observations never overwrite a write receipt; only an accepted setter
|
||||
# can publish one. This also protects early replay from concurrent getters.
|
||||
if [ "$native" = 0 ] && got=$(voice_receipt "$kind"); then
|
||||
source=${got#* }; got=${got%% *}
|
||||
[ "$got" = 1 ] && enabled=true || enabled=false
|
||||
if [ "$refresh" != 1 ] || [ -d "$APPLY_DIR" ]; then
|
||||
if got=$(voice_receipt "$kind"); then
|
||||
source=${got#* }; got=${got%% *}
|
||||
[ "$got" = 1 ] && enabled=true || enabled=false
|
||||
fi
|
||||
fi
|
||||
saved=$(cat "$STATE_DIR/$kind" 2>/dev/null)
|
||||
printf '{"enabled":%s,"source":"%s","saved":%s}' "$enabled" "$source" "$(qs "$saved")"
|
||||
@@ -286,7 +267,7 @@ do_apply() {
|
||||
return $?
|
||||
fi
|
||||
case $kind in
|
||||
ims|volte|vonr)
|
||||
volte|vonr)
|
||||
voice_set "$kind" "$val" || return 1
|
||||
save_state "$kind" "$val" || { fail_apply '设置保存失败'; return 1; }
|
||||
say "applied $kind=$val for SIM ${MU300_SIM_SLOT:-0}"
|
||||
|
||||
@@ -49,10 +49,10 @@ async function main() {
|
||||
Date.now = oldDate;
|
||||
// All newly emitted backend error messages are translated in both locales.
|
||||
let messages = ['已应用并核对模组状态','等待模组能力数据','正在确认设置结果…'];
|
||||
messages.push('状态暂不可读,请选择开启或关闭','本次已应用',
|
||||
'关闭后只停止下次开机回放,已保存的网络、IMS、VoLTE 和 VoNR 设置不会被删除。',
|
||||
'IMS 为总开关,VoLTE 用于 4G 通话,VoNR 用于 5G SA 通话。设置按当前查看的 SIM 保存,并跟随“开机自动应用”。',
|
||||
'关闭 IMS 不等于屏蔽全部来电和短信,传统网络业务仍可能到达。');
|
||||
messages.push('状态暂不可读,请刷新后重试',
|
||||
'关闭后只停止下次开机回放,已保存的网络、VoLTE 和 VoNR 设置不会被删除。',
|
||||
'VoLTE 用于 4G 通话,VoNR 用于 5G SA 通话。设置按当前查看的 SIM 保存,并跟随“开机自动应用”。',
|
||||
'关闭 VoLTE 或 VoNR 不等于屏蔽全部来电和短信,传统网络业务仍可能到达。');
|
||||
for (const file of ['lock-apply.sh','lock-jobs.sh']) {
|
||||
const src=fs.readFileSync(path.join(root,'root/usr/libexec/unisoc-modem',file),'utf8');
|
||||
messages.push(...[...src.matchAll(/'([^'\n]*[\u3400-\u9fff][^'\n]*)'/g)]
|
||||
@@ -69,10 +69,13 @@ async function main() {
|
||||
// modem in a browser test, but do check confirmation, SIM scope and busy.
|
||||
let selected=1, confirm, modal, requests=[], finishJob, failJob, notes=[];
|
||||
const elements=new Map();
|
||||
const voices=['ims','volte','vonr'].flatMap(kind=>['on','off'].map(val=>({
|
||||
dataset:{voice:kind,enabled:val},setAttribute(k,v){this[k]=v;}
|
||||
})));
|
||||
const pageRoot={isConnected:true, querySelectorAll:selector=>selector==='[data-voice]' ? voices : [], querySelector:selector=>{
|
||||
const voices=['volte','vonr'].map(kind=>({
|
||||
dataset:{voice:kind},setAttribute(k,v){this[k]=v;}
|
||||
}));
|
||||
assert(!locks.includes('data-enabled='));
|
||||
assert(!locks.includes("['ims','volte','vonr']"));
|
||||
assert(locks.includes('role="switch"'));
|
||||
const pageRoot={isConnected:true, querySelectorAll:selector=>selector==='[data-voice]' ? voices : voices.filter(b=>selector==='[data-voice="'+b.dataset.voice+'"]'), querySelector:selector=>{
|
||||
if(!elements.has(selector)) elements.set(selector, {
|
||||
classList:{toggle:()=>{}}, addEventListener:()=>{}, querySelectorAll:()=>[], children:[]
|
||||
});
|
||||
@@ -89,8 +92,13 @@ async function main() {
|
||||
page.refresh=()=>Promise.resolve();
|
||||
page.note=(text,type)=>notes.push({text,type});
|
||||
page.wire(pageRoot);
|
||||
for(const kind of ['ims','volte','vonr']) {
|
||||
const btn=voices.find(b=>b.dataset.voice===kind&&b.dataset.enabled==='off');
|
||||
page.lastLock={volte:{enabled:true},vonr:{enabled:true}};
|
||||
page._root=pageRoot;
|
||||
page.paintVoiceSwitches(page.lastLock);
|
||||
for(const kind of ['volte','vonr']) {
|
||||
const btn=voices.find(b=>b.dataset.voice===kind);
|
||||
assert.equal(btn['aria-checked'],'true');
|
||||
assert.equal(btn.disabled,false);
|
||||
btn.onclick();assert.equal(modal.options.danger,false);
|
||||
confirm(false);await flush();assert.equal(requests.length,0);
|
||||
btn.onclick();confirm(true);await flush();
|
||||
@@ -100,6 +108,25 @@ async function main() {
|
||||
assert.equal(btn.busy,false);assert.equal(page._applying,false);
|
||||
requests.length=0;notes.length=0;
|
||||
}
|
||||
// The same button toggles in both directions, follows live readback,
|
||||
// and cannot guess an unreadable state or send a request while busy.
|
||||
const toggle=voices[0];
|
||||
page.lastLock.volte.enabled=false;
|
||||
page.paintVoiceSwitches(page.lastLock);
|
||||
assert.equal(toggle['aria-checked'],'false');
|
||||
toggle.onclick();confirm(true);await flush();
|
||||
assert.deepEqual(requests,[{kind:'volte',val:'on',slot:1}]);
|
||||
finishJob({...start,kind:'volte'});await flush();
|
||||
requests.length=0;
|
||||
page.lastLock.volte.enabled=null;
|
||||
page.paintVoiceSwitches(page.lastLock);
|
||||
assert.equal(toggle.disabled,true);
|
||||
toggle.onclick();await flush();assert.equal(requests.length,0);
|
||||
page.lastLock.volte.enabled=true;page._applying=true;
|
||||
page.paintVoiceSwitches(page.lastLock);
|
||||
assert.equal(toggle.disabled,true);
|
||||
page._applying=false;
|
||||
page.paintVoiceSwitches(page.lastLock);
|
||||
const reset=elements.get('#mud-lock-reset');
|
||||
lang='en'; reset.onclick();
|
||||
assert.equal(modal.title,'Clear all locks for SIM 2?');
|
||||
|
||||
@@ -390,7 +390,12 @@ desktop_free_loop
|
||||
manifest=package.assemble(stage,tools,'7.2')
|
||||
self.assertEqual({n:package.sha(stage/manifest['magisk_layout'][n]) for n in original},original)
|
||||
self.assertEqual([p.relative_to(stage).as_posix() for p in stage.rglob('*.tar.gz')],['payload/mu300-openwrt.tar.gz'])
|
||||
self.assertEqual({p.name for p in stage.iterdir() if p.is_file()}, {'OpenWrt-Installer.py','customize.sh','module.prop'})
|
||||
self.assertEqual({p.name for p in stage.iterdir() if p.is_file()}, {'OpenWrt-Installer.py','START-HERE.md','customize.sh','module.prop'})
|
||||
guide=(stage/'START-HERE.md').read_text(encoding='utf-8')
|
||||
self.assertIn('START-HERE.md',manifest['desktop'])
|
||||
self.assertIn('OpenWrt-Installer.exe',guide)
|
||||
self.assertIn('OpenWrt-Installer.py',guide)
|
||||
self.assertIn('EXPERIMENTAL',guide)
|
||||
self.assertTrue((stage/'launchers/start-installer.cmd').is_file())
|
||||
self.assertTrue((stage/'docs/DESKTOP-INSTALL.md').is_file())
|
||||
self.assertEqual(installer.payload_file(stage,'boot-linux.img'),stage/'payload/boot-linux.img')
|
||||
@@ -407,4 +412,26 @@ desktop_free_loop
|
||||
(stage/'desktop/configure.sh').write_text('tampered')
|
||||
with self.assertRaises(ValueError):installer.verify(stage)
|
||||
|
||||
def test_switch_boot_does_not_require_userdata_or_root_image_detection(self):
|
||||
android=Mock(model='V50',slot='a',linux='b',bb='/tmp/busybox')
|
||||
android.storage.side_effect=AssertionError('Switching must not depend on userdata geometry/encryption')
|
||||
android.read.return_value=b'loglevel=5\0'
|
||||
with patch.object(installer,'Android',return_value=android), patch.object(installer,'module'):
|
||||
result=installer.install(Mock(boot_openwrt=True),Path('/test/package'),{})
|
||||
self.assertEqual(result.state,'success')
|
||||
android.storage.assert_not_called()
|
||||
self.assertIn('switch.sh',android.run.call_args.args[0])
|
||||
android.flash.assert_not_called()
|
||||
|
||||
def test_menu_warns_about_userdata_image_f2fs_risk(self):
|
||||
with patch.object(installer,'package_root',return_value=Path('/test/package')), \
|
||||
patch.object(installer,'verify',return_value={'kernel':'7.2'}), \
|
||||
patch('builtins.input',return_value='2'), \
|
||||
patch.object(installer,'install',return_value=installer.Outcome('checked','test')) as install, \
|
||||
patch.object(installer.sys,'stdout',io.StringIO()) as output:
|
||||
installer.main([])
|
||||
self.assertTrue(install.call_args.args[0].data)
|
||||
self.assertIn('EXPERIMENTAL',output.getvalue())
|
||||
self.assertIn('Android F2FS',output.getvalue())
|
||||
|
||||
if __name__=='__main__':unittest.main()
|
||||
+49
-28
@@ -38,11 +38,11 @@ p=Path(os.environ['STUBLOG']); f=p/'modem.json'; s=json.loads(f.read_text())
|
||||
cmd=sys.argv[-1]
|
||||
with (p/'commands').open('a') as log: log.write(cmd+'\\n')
|
||||
reads={'AT+SPTESTMODE?':('SPTESTMODE','tm'), 'AT+SP5GRAN?':('SP5GRAN','gran'),
|
||||
'AT+IMSEN?':('IMSEN','ims'), 'AT+CAVIMS?':('CAVIMS','volte'),
|
||||
'AT+CAVIMS?':('CAVIMS','volte'),
|
||||
'AT+SPENDC?':('ENDC','endc'), 'AT+SPLBAND=0':('SPLBAND','lte'),
|
||||
'AT+SPLBAND=3':('SPLBAND','nr'), 'AT+CFUN?':('CFUN','cfun')}
|
||||
if cmd in reads:
|
||||
if cmd=='AT+IMSEN?' and s.get('no_ims_query'): print('ERROR'); sys.exit(1)
|
||||
if cmd=='AT+CAVIMS?' and s.get('no_voice_query'): print('ERROR'); sys.exit(1)
|
||||
if s.get('silent'): sys.exit(1)
|
||||
label,key=reads[cmd]; value=s.get('read_override',{}).get(key,s[key])
|
||||
if key=='endc' and value=='2': value=s.get('endc_off_reply','0')
|
||||
@@ -57,7 +57,7 @@ if cmd in ('AT+SPFORCEFRQ=12,3','AT+SPFORCEFRQ=16,3'):
|
||||
if s.get('reject'): print('+CME ERROR: 3'); sys.exit(0)
|
||||
if s.get('reject_restart') and cmd.startswith('AT+SFUN='): print('ERROR'); sys.exit(0)
|
||||
for prefix,key in [('AT+SPTESTMODE=','tm'),('AT+SP5GRAN=','gran'),('AT+SPENDC=','endc'),
|
||||
('AT+IMSEN=','ims'),('AT+CAVIMS=','volte'),('AT+SP5GCMDS="set nr param",45,','vonr'),
|
||||
('AT+CAVIMS=','volte'),('AT+SP5GCMDS="set nr param",45,','vonr'),
|
||||
('AT+SPLBAND=1,','lte'),('AT+SPLBAND=2,','nr')]:
|
||||
if cmd.startswith(prefix) and not s.get('ignore'): s[key]=cmd[len(prefix):]
|
||||
if cmd.startswith('AT+SPTESTMODE=') and s.get('corrupt_mode_fields'): s['tm']=s['tm'].split(',')[0]+',134,0'
|
||||
@@ -79,7 +79,7 @@ print('OK')
|
||||
def reset(self, **extra):
|
||||
state = dict(tm='134,128,1,0,0,0', gran='1', endc='1',
|
||||
lte='0,0,0,0,0', nr='0,0,0,0', cfun='1', cells12=['1650,10'], cells16=[],
|
||||
ims='1',volte='1',vonr='0')
|
||||
volte='1',vonr='0')
|
||||
state.update(extra)
|
||||
self.modem.write_text(json.dumps(state))
|
||||
(self.tmp / 'commands').write_text('')
|
||||
@@ -96,26 +96,27 @@ print('OK')
|
||||
(directory / key).write_text(value)
|
||||
return saved
|
||||
|
||||
def test_voice_switches_keep_separate_state_and_do_not_cycle_radio(self):
|
||||
def test_voice_switches_save_verified_state_and_do_not_cycle_radio(self):
|
||||
for shell in self.each_shell():
|
||||
self.reset()
|
||||
for kind, value in [('ims','off'), ('volte','off'), ('vonr','on')]:
|
||||
for kind, value in [('volte','off'), ('vonr','on')]:
|
||||
result=self.apply(shell,kind,value)
|
||||
self.assertEqual(result.returncode,0,result.stderr)
|
||||
self.assertEqual((self.state/kind).read_text(),value)
|
||||
current=json.loads((self.run/'lock.json').read_text())
|
||||
self.assertEqual(current['ims']['source'],'acknowledged')
|
||||
self.assertIs(current['ims']['enabled'],False)
|
||||
self.assertNotIn('ims',current)
|
||||
self.assertIs(current['volte']['enabled'],False)
|
||||
self.assertEqual(current['volte']['source'],'modem')
|
||||
self.assertIs(current['vonr']['enabled'],True)
|
||||
trace=(self.tmp/'commands').read_text()
|
||||
self.assertNotIn('SFUN',trace)
|
||||
self.assertNotIn('ifup',trace)
|
||||
self.assertNotIn('AT+IMSEN',trace)
|
||||
self.assertNotIn('AT+CASIMS=',trace)
|
||||
|
||||
def test_voice_failures_never_save_and_ims_requires_ok(self):
|
||||
def test_voice_rejection_or_readback_mismatch_never_save(self):
|
||||
for shell in self.each_shell():
|
||||
for kind, value, fault in [('ims','off','reject'),('ims','off','omit_ok'),
|
||||
for kind, value, fault in [('volte','off','reject'),
|
||||
('volte','off','ignore'),('vonr','on','ignore')]:
|
||||
self.reset(**{fault:True})
|
||||
(self.state/kind).unlink(missing_ok=True)
|
||||
@@ -133,39 +134,59 @@ print('OK')
|
||||
self.assertEqual(result.returncode,0,result.stderr)
|
||||
self.assertTrue((self.tmp/'marker').exists())
|
||||
trace=(self.tmp/'commands').read_text()
|
||||
self.assertLess(trace.index('AT+CAVIMS=0'),trace.index('AT+IMSEN=0'))
|
||||
self.assertEqual(trace.count('AT+CAVIMS=0'),1)
|
||||
self.assertNotIn('SFUN',trace)
|
||||
self.assertNotIn('AT+IMSEN?',trace)
|
||||
self.assertNotIn('AT+IMSEN',trace)
|
||||
self.assertEqual(self.script(shell,self.lock,'replay','late',**self.extra).returncode,0)
|
||||
self.assertEqual((self.tmp/'commands').read_text(),trace)
|
||||
|
||||
def test_unsupported_ims_read_does_not_hide_other_locks_or_write_receipt(self):
|
||||
def test_failed_fresh_voice_query_never_falls_back_to_write_receipt(self):
|
||||
for shell in self.each_shell():
|
||||
self.reset(no_ims_query=True)
|
||||
result=self.apply(shell,'ims','off')
|
||||
self.reset()
|
||||
result=self.apply(shell,'volte','off')
|
||||
self.assertEqual(result.returncode,0,result.stderr)
|
||||
self.reset(no_voice_query=True)
|
||||
result=self.script(shell,self.lock,'get','fresh',**self.extra)
|
||||
current=json.loads(result.stdout)
|
||||
self.assertIn('mode',current)
|
||||
self.assertIs(current['ims']['enabled'],False)
|
||||
self.assertEqual(current['ims']['source'],'acknowledged')
|
||||
before=(self.tmp/'commands').read_text().count('AT+IMSEN?')
|
||||
self.script(shell,self.lock,'get','fresh',**self.extra)
|
||||
self.assertEqual((self.tmp/'commands').read_text().count('AT+IMSEN?'),before)
|
||||
self.assertNotIn('ims',current)
|
||||
self.assertIsNone(current['volte']['enabled'])
|
||||
self.assertEqual(current['volte']['source'],'unknown')
|
||||
self.assertIs(current['vonr']['enabled'],False)
|
||||
|
||||
def test_removed_ims_is_rejected_and_old_preference_is_ignored(self):
|
||||
for shell in self.each_shell():
|
||||
self.reset()
|
||||
(self.state/'ims').write_text('off')
|
||||
result=self.apply(shell,'ims','off')
|
||||
self.assertNotEqual(result.returncode,0)
|
||||
result=self.replay(shell,'early')
|
||||
self.assertEqual(result.returncode,0,result.stderr)
|
||||
self.assertEqual((self.tmp/'commands').read_text(),'')
|
||||
|
||||
def test_native_cavims_read_does_not_assume_saved_preference_is_live(self):
|
||||
for shell in self.each_shell():
|
||||
self.reset()
|
||||
(self.state/'volte').write_text('off')
|
||||
result=self.script(shell,self.lock,'get','fresh',**self.extra)
|
||||
current=json.loads(result.stdout)
|
||||
self.assertIs(current['volte']['enabled'],True)
|
||||
self.assertEqual(current['volte']['saved'],'off')
|
||||
self.assertEqual((self.tmp/'commands').read_text().count('AT+CAVIMS?'),1)
|
||||
|
||||
def test_secondary_voice_settings_do_not_write_primary_preferences(self):
|
||||
for shell in self.each_shell():
|
||||
self.reset()
|
||||
second=self.state/'sim1';second.mkdir(exist_ok=True)
|
||||
scoped=self.run/'sim1';scoped.mkdir(exist_ok=True)
|
||||
(self.state/'ims').write_text('on')
|
||||
result=self.script(shell,self.lock,'apply','ims','off',**dict(self.extra,
|
||||
(self.state/'volte').write_text('on')
|
||||
result=self.script(shell,self.lock,'apply','volte','off',**dict(self.extra,
|
||||
MU300_SIM_SLOT='1',MU300_STATE_DIR=second,MU300_DASH_DIR=scoped))
|
||||
self.assertEqual(result.returncode,0,result.stderr)
|
||||
self.assertEqual((second/'ims').read_text(),'off')
|
||||
self.assertEqual((self.state/'ims').read_text(),'on')
|
||||
self.assertTrue((scoped/'voice-ims').exists())
|
||||
self.assertFalse((self.run/'voice-ims').exists())
|
||||
self.assertEqual((second/'volte').read_text(),'off')
|
||||
self.assertEqual((self.state/'volte').read_text(),'on')
|
||||
self.assertTrue((scoped/'voice-volte').exists())
|
||||
self.assertFalse((self.run/'voice-volte').exists())
|
||||
|
||||
def test_reset_keeps_voice_preferences(self):
|
||||
for shell in self.each_shell():
|
||||
@@ -180,9 +201,9 @@ print('OK')
|
||||
self.assertNotIn('AT+IMSEN=',trace)
|
||||
self.assertNotIn('AT+CAVIMS=',trace)
|
||||
|
||||
def test_voice_only_boot_worker_detects_all_three_settings(self):
|
||||
def test_voice_only_boot_worker_detects_retained_settings(self):
|
||||
for shell in self.each_shell():
|
||||
for kind in ('ims','volte','vonr'):
|
||||
for kind in ('volte','vonr'):
|
||||
with self.subTest(kind=kind):
|
||||
self.reset()
|
||||
path=self.state/kind;path.write_text('off')
|
||||
|
||||
@@ -27,9 +27,11 @@ def verify(path):
|
||||
if shared not in manifest['magisk'] or 'desktop/files/rootfs.tar.gz' in manifest['desktop']:
|
||||
raise ValueError('expected one shared rootfs archive')
|
||||
if manifest.get('format')==2:
|
||||
allowed={'OpenWrt-Installer.exe','OpenWrt-Installer.py','module.prop','customize.sh'}
|
||||
allowed={'OpenWrt-Installer.exe','OpenWrt-Installer.py','START-HERE.md','module.prop','customize.sh'}
|
||||
if {p.name for p in stage.iterdir() if p.is_file()}-allowed:
|
||||
raise ValueError('unexpected top-level file')
|
||||
if not (stage/'START-HERE.md').is_file():
|
||||
raise ValueError('missing root user guide START-HERE.md')
|
||||
subprocess.run([sys.executable,str(stage/'OpenWrt-Installer.py'),'--check-boot'],check=True)
|
||||
subprocess.run([sys.executable,str(stage/'OpenWrt-Installer.py'),'--check-rootfs'],check=True)
|
||||
if sys.platform=='win32' and (stage/'OpenWrt-Installer.exe').exists():
|
||||
|
||||
Reference in new issue
Block a user