Windows 上的安卓应用运行器:双击 APK 即装,应用以独立窗口与桌面图标运行,自持 QEMU 运行时
feat(runtime): 开箱即用打包 + arm64(红果)兼容镜像 + NSIS 单文件安装
RoutineMikue54665704318
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex c35e4e4..8d9f236 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -40,28 +40,8 @@ jobs:Compress-Archive -Path dist/ApkStart-win64-portable/* -DestinationPath "ApkStart-$tag-win64-portable.zip" -CompressionLevel OptimalGet-Item "ApkStart-$tag-win64-portable.zip" | Select-Object Name, Length- - name: 组装完整版(内置运行时 + ARM 兼容镜像)- shell: pwsh- run: |- node build/fetch-runtime.js "$PWD/_runtime"- if ($LASTEXITCODE -ne 0) { exit 1 }- # 完整版目录结构:ApkStart-win64-portable/ApkStart.exe + runtime/(启动时自动接管)- New-Item -ItemType Directory -Force -Path full | Out-Null- Copy-Item -Recurse dist/ApkStart-win64-portable full/ApkStart-win64-portable- Move-Item _runtime full/ApkStart-win64-portable/runtime- Get-ChildItem full/ApkStart-win64-portable/runtime | Select-Object Name-- - name: 压缩完整版(分卷,单卷 < 2GB)- shell: pwsh- run: |- $tag = "${{ github.ref_name }}"- if (-not $tag.StartsWith('v')) { $tag = "v$tag" }- Push-Location full- 7z a -t7z -mx=7 -v1900m "..\ApkStart-$tag-win64-full.7z" ApkStart-win64-portable- if ($LASTEXITCODE -ne 0) { exit 1 }- Pop-Location- Get-ChildItem "ApkStart-$tag-win64-full.7z.*" | Select-Object Name, Length-+ # 只有一个版本:壳层极小,运行时组件由软件首次启动时自动按需下载。+ # 不再产出内置 GB 级镜像的「完整版」,避免多版本分叉和超大安装包。- name: 创建 Releaseenv:GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}@@ -70,22 +50,12 @@ jobs:$tag = "${{ github.ref_name }}"if (-not $tag.StartsWith('v')) { $tag = "v$tag" }$zip = "ApkStart-$tag-win64-portable.zip"- $vols = @(Get-ChildItem "ApkStart-$tag-win64-full.7z.*" | ForEach-Object { $_.FullName })- if (-not $vols.Count) { Write-Error "未找到完整版分卷"; exit 1 }- foreach ($v in $vols) {- $gb = (Get-Item $v).Length / 1GB- Write-Host "asset: $v = $([Math]::Round($gb,2)) GB"- if ($gb -ge 2) { Write-Error "分卷超过 GitHub 2GiB 上限: $v"; exit 1 }- }gh release create $tag --title "ApkStart $tag" --generate-notesif ($LASTEXITCODE -ne 0) { exit 1 }- $assets = @($zip) + $vols- foreach ($a in $assets) {- $ok = $false- for ($i = 1; $i -le 3 -and -not $ok; $i++) {- gh release upload $tag $a --clobber- if ($LASTEXITCODE -eq 0) { $ok = $true } else { Start-Sleep -Seconds 15 }- }- if (-not $ok) { Write-Error "上传失败: $a"; exit 1 }+ $ok = $false+ for ($i = 1; $i -le 3 -and -not $ok; $i++) {+ gh release upload $tag $zip --clobber+ if ($LASTEXITCODE -eq 0) { $ok = $true } else { Start-Sleep -Seconds 15 }}+ if (-not $ok) { Write-Error "上传失败: $zip"; exit 1 }gh release view $tag --json assets --jq '.assets[].name'diff --git a/.gitignore b/.gitignoreindex 2d14749..1a7605f 100644--- a/.gitignore+++ b/.gitignore@@ -1,7 +1,10 @@node_modules/dist/+build/runtime/+.workbuddy/test/out/test/fixtures/+test/*.pngtest/shot*.png*.log*.zipdiff --git a/README.md b/README.mdindex eb87d03..eb7c9e9 100644--- a/README.md+++ b/README.md@@ -11,7 +11,8 @@- 🖱️ **双击 .apk 即安装**:注册 .apk 文件关联后,在资源管理器里双击 APK,自动解析 → 安装 → 生成桌面图标,全程无需打开任何模拟器界面。- 🧩 **每个应用一个桌面图标**:图标从 APK 内部离线提取并转为多尺寸 ICO,双击桌面图标 = 直接启动该应用,与打开一个原生 Windows 软件的体验一致。-- 🪟 **独立窗口(freeform)**:通过 `--windowingMode 5` 以自由窗口模式启动,每个安卓应用都有自己的窗口,可拖动、缩放、固定在任务栏。+- 🪟 **应用就是一个窗口**:运行时以**带窗口**模式启动(无头模式下 Android 不出 VSYNC,应用进程活着但屏幕上是空的),ApkStart 把这块窗口改标题、换真实应用图标、按竖屏比例摆好位置,就是一个独立应用窗口;**全屏**铺满屏幕高度并居中,**窗口模式**可自由拖动缩放且按应用记忆尺寸。+- 🔍 **能被 Windows 搜到**:安装后同时创建桌面 + 开始菜单(`程序\ApkStart\`)快捷方式,按应用名在开始菜单搜索即可直达,任务栏按应用分组。- 📁 **数据互通**:`%USERPROFILE%\ApkStartShared` ↔ 安卓内 `/sdcard/ApkStartShared` 持续双向同步,安卓应用存下的文件直接出现在本机。- 🪶 **极致轻量**:壳层本身零第三方依赖(连 ZIP / PNG / ICO / AXML 解析都是手写的),运行时按需拉起,空闲自动回收;也可以完全复用你机器上已有的安卓运行时,额外占用为零。@@ -23,25 +24,29 @@│ │ 双击 ││ ▼ ││ ApkStart.exe --launch <包名> │-│ │ 运行时未启动?→ 自动拉起(QEMU / 复用已有模拟器) │+│ │ 运行时未启动?→ 自动拉起(Android Emulator + API34)││ ▼ │-│ adb am start --windowingMode 5 -n <包名>/<Activity> │-│ │ │+│ 按系统解析出的 LAUNCHER 入口启动(不是 APK 里的主 Activity)│+│ │ 存活观察 18 秒,闪退自动重试 / 重置数据 / 补权限 ││ ▼ │-│ 独立 freeform 窗口,像原生应用一样使用 │+│ 模拟器窗口 = 应用窗口(改标题、换图标、竖屏比例、全屏居中) │└────────────────────────────────────────────────────────────┘```## 下载即用(不想编译)-到 [Releases](https://github.com/RoutineMiku/apkstart/releases) 下载,两个版本任选:+到 [Releases](https://github.com/RoutineMiku/apkstart/releases) 下载安装包:-| 版本 | 文件 | 适合 |-|---|---|---|-| **轻量版** | `ApkStart-v*-win64-portable.zip`(约 100 MB) | 首次启动进入「运行时」页点**一键部署**,自动装好 adb / 引擎 / 系统镜像(官方源 2 分钟内),之后长期免装 |-| **完整版** | `ApkStart-v*-win64-full.7z.001` + `.002`(全部分卷下载后解压 `.001`) | **开箱即用**:已内置运行时引擎、AEHD 驱动与 Android 14 ARM 兼容镜像(翻译层),解压双击 `ApkStart.exe` 直接进主界面,零下载零设置 |+- **`ApkStart-v*-Setup.exe`**(约 1.0~1.1 GB):**一个 EXE 包含全部运行时**(adb / Android Emulator / 系统镜像),装完首次启动自动把镜像展开到用户目录,**之后不再联网下载任何东西**。装到当前用户目录、不要求管理员权限。+- 另有轻量版 `ApkStart-v*-win64-portable.zip`(约 100 MB):首次启动才在后台下载运行时。-> 完整版用 7-Zip / WinRAR / Bandizip 等解压分卷;两个版本都默认开启 ARM 兼容模式(完整版内置的就是兼容镜像)。+**开箱即有的默认行为**(不用去设置里找):++- 开机自动启动,常驻托盘;双击桌面图标直接进应用。+- 安装 APK 后自动创建**桌面 + 开始菜单**两份快捷方式,Windows 搜索能直接搜到应用名;老版本漏建的会在启动时自动补齐。+- 应用窗口是原生渲染(非投屏):**全屏**铺满屏幕高度并居中、保持手机比例不变形;**窗口模式**保持竖屏,可自由拖动缩放,每个应用的尺寸单独记忆。随时按 `F11` 或右键托盘切换。+- 安装后自动授予应用申请的运行时权限,不会卡在系统授权框;应用闪退会自动重试、必要时重置应用数据后再拉起。+- **网络直接用主机的网络**:安卓侧走 QEMU 用户态 NAT,出口复用主机的物理网卡,**不会在 Windows 上创建任何虚拟网卡 / 虚拟交换机**(不需要装驱动、也不多一个网络适配器)。不需要联网下载、不需要改任何网络设置。## 从源码构建@@ -49,7 +54,7 @@# 1. 安装依赖(含 Electron 运行时)npm install-# 2. 启动并完成运行时部署(一键下载 adb / QEMU / 系统镜像)+# 2. 启动并完成运行时部署(一次性下载 adb / Android Emulator / 系统镜像)npm start# 3.(可选)注册 .apk 双击安装@@ -60,6 +65,28 @@ npm run pack# 产出 dist/ApkStart-win64-portable/ApkStart.exe```+### 单文件 EXE(内置完整运行时,装完不再联网)++如果希望「一个 EXE 发出去,对方双击就能跑,不用等下载」,用这条:++```powershell+# 先把 engine/ 整理成可分发运行时(system.img 压成 .gz,3.1GB → 约 580MB;+# 同时裁掉 emulator 里用不到的部分:arm64 的 QEMU、Vulkan 后端、多语言包,约 -190MB)+npm run runtime++# 再打成安装版 EXE(electron-builder nsis 目标,装到当前用户目录)+npm run build:exe+# 产出 dist/release/ApkStart-<版本>-Setup.exe+```++体积构成(实测):Electron 约 180MB、emulator 瘦身后约 340MB、系统镜像压缩后约 580MB,+最终安装包约 1.0~1.1GB。能再压的硬下限就在 system.img 那条(它就是安卓系统本身,无法再裁)。+网络默认走主机 NAT,不创建虚拟网卡,所以也不依赖任何额外驱动。++首次启动会把 `.gz` 镜像展开到 `%APPDATA%\apkstart\system-images`(约 1 分钟,只做一次),+之后每次直接复用。AVD 与已装应用固定存放在 `%APPDATA%\apkstart\avd`,+即使便携版每次解压到临时目录也不会丢。+## 运行时说明:完全独立,不依赖任何第三方模拟器ApkStart 是一个**自持**的项目,运行时组件全部由自己下载、校验和管理(位于 `%APPDATA%\apkstart\runtime`):@@ -68,20 +95,31 @@ ApkStart 是一个**自持**的项目,运行时组件全部由自己下载、|---|---|---|---|| adb(platform-tools) | dl.google.com 官方源 | ~8 MB | 安装/启动安卓应用 || Android Emulator | dl.google.com 官方源(8 线程并行下载) | ~440 MB | 运行时引擎(自带设备模型与 GPU 转译) |-| AOSP Android 11 系统镜像 | dl.google.com 官方源 | ~645 MB | 安卓系统(镜像即系统,无需安装) |+| Android 14 通用系统镜像(Google Play x86_64) | dl.google.com 官方源 | ~1.5 GB | 唯一的基础层:x86 应用、仅含 ARM 库的应用、GMS 都能跑,镜像即系统,无需安装 || AEHD 驱动(可选) | dl.google.com 官方源 | ~0.2 MB | 硬件加速(或用 Windows「虚拟机平台」WHPX) |首次使用时,「运行时」页会引导完成以上部署(**一键部署**):-1. adb 与运行时引擎、系统镜像自动下载(官方源实测 10+ MB/s,一般 2 分钟内完成);-2. 点「启用」安装硬件加速驱动(弹一次管理员确认),或在「Windows 功能」勾选「虚拟机平台」后重启;-3. 点「启动运行时」开机,之后每次双击桌面图标自动拉起,全程无感。+1. adb 与运行时引擎、系统镜像自动下载(官方源实测 10+ MB/s);+2. 部署完成后**自动开机**,之后双击桌面图标自动拉起,全程无感。-- **硬件加速是必需的**:Windows 上 Android x86_64 虚拟化没有加速无法开机(AEHD 驱动装完即用无需重启;WHPX 需要重启一次)。+**设备兼容性(自动处理,无需干预)**++- 没有硬件加速时自动回退软件模拟;启动失败按「渲染后端 → 加速方式 → 内存/冷启动」最多 4 组参数自动重试。+- `-gpu` 按引擎版本自动选择(37.x 用 `software`,老版本用 `swiftshader_indirect`),不再使用已弃用的模式。+- 内存/核心数按物理内存自动推导(2–4 GB / 2–4 核),数据分区从 16 GB 降到 4 GB;端口动态挑空闲的,中文路径自动转短路径,AVD 锁文件自动清理。+- 失败原因会翻译成中文并附上修复建议;设置里可「导出诊断报告」。- 大文件下载默认 **8 线程分块 + 断点续传**,不支持 Range 的源自动回退单流。- 高级用户也可以在设置里切换为「连接已有运行时」(复用 WSA 等的 adb 端口),但这只是可选项,不是依赖。-- 高级路径:自备 Android-x86 ISO 的用户仍可用 QEMU 引擎引导(设置中启用),ApkStart 会做 ISO9660 完整性校验。+- 高级路径:也可以在设置里「连接已有运行时」,复用你机器上其它模拟器(WSA / MuMu 等)已经跑起来的 adb 端口。++**容器式低成本运行**++- **只读基础层**:`system-images/` 全机一份,所有应用共享,不再同时存 AOSP + 兼容两套镜像。+- **薄可写层**:单个 AVD 用差量用户数据 + 命名 quickboot 快照;只有「冷启动确实慢 / 没有硬件加速」的机器才会在正常退出时保存快照(实测加载约 3.5 秒),快机器不额外占 2–4 GB 磁盘。+- **按需下载**:遇到仅含 ARM 原生库的应用才会补齐通用镜像;`.apks` / `.xapk` 拆分包自动用 `install-multiple` 安装。+- **可回收**:构建时裁掉非 x86_64 的 QEMU 目标(约 400 MB);设置页可清理旧镜像、旧快照、锁文件和遗留 AVD。## 目录结构@@ -100,11 +138,11 @@ apkstart/│ ├─ shortcut.js 多尺寸 ICO 生成 + .lnk 快捷方式│ ├─ assoc.js .apk 文件关联(HKCU,免管理员)│ ├─ adb.js adb 客户端(安装/启动/同步/截图/…)-│ ├─ engine.js 运行时管理:探测/QEMU 托管/空闲回收+│ ├─ engine.js 运行时管理:探测/模拟器托管/空闲回收│ ├─ sharer.js 本机 ↔ 安卓共享目录双向同步│ ├─ installer.js 安装流水线编排│ └─ store.js 应用清单与设置持久化-├─ engine/ QEMU 引擎放置处(见 engine/README.md)+├─ engine/ 运行时组件下载缓存(emulator / system-images / platform-tools)├─ tools/platform-tools/ 便携 adb 放置处├─ test/ 单元测试 + Electron 集成测试 + 冒烟截图├─ build/pack.js 便携版打包@@ -160,4 +198,4 @@ ApkStart 由 **RoutineMiku** 开发维护。## 许可证-[MIT](LICENSE)。轻量版不分发安卓系统镜像、QEMU 二进制或 Google 组件,这些均由用户本机按需下载并遵循各自的许可协议;完整版为便利性将官方公开下载的运行时组件一并打包,相关组件遵循其各自许可协议。+[MIT](LICENSE)。发行包只含 ApkStart 自身代码与 Electron 运行时,不分发安卓系统镜像、QEMU 二进制或 Google 组件;这些由用户本机首次启动时从官方源按需下载,遵循各自的许可协议。diff --git a/build/fetch-runtime.js b/build/fetch-runtime.jsindex 212dd7c..6425e82 100644--- a/build/fetch-runtime.js+++ b/build/fetch-runtime.js@@ -38,6 +38,15 @@ const log = (p) => console.log(`[${p.stage}] ${p.message} ${p.percent != null ?fs.existsSync(path.join(outRoot, 'platform-tools', 'adb.exe')) &&fs.existsSync(path.join(outRoot, 'system-images', 'android-34', 'google_apis_playstore', 'x86_64', 'system.img'));if (!ok) throw new Error('运行时组装后校验失败');++ // 容器式精简:只保留 x86_64 的 QEMU 与无头运行必需的组件。+ // 非 x86_64 的 qemu-system-*.exe(约 400MB)、QtWebEngine、netsim 等对 -no-window 无用。+ const layers = require('../src/core/layers');+ const pruned = layers.prune(outRoot, { apply: true, aggressive: true });+ const before = layers.analyze(outRoot).total + pruned.saved;+ console.log(`slim: ${(pruned.saved / 1048576).toFixed(0)} MB removed, `+ + `${(before / 1073741824).toFixed(2)} GB -> ${(pruned.after / 1073741824).toFixed(2)} GB`);+fs.rmSync(path.join(outRoot, '_appdata'), { recursive: true, force: true });fs.rmSync(path.join(outRoot, '_tmp'), { recursive: true, force: true });console.log('runtime-ready:', outRoot);diff --git a/build/pack.js b/build/pack.jsindex a70af13..7cc77ab 100644--- a/build/pack.js+++ b/build/pack.js@@ -9,21 +9,30 @@ const path = require('path');const ROOT = path.join(__dirname, '..');// 允许指定输出目录(用于目标目录被正在运行的实例占用时,先构建到别处再替换)-const OUT = process.env.APKSTART_PACK_OUT+let OUT = process.env.APKSTART_PACK_OUT? path.resolve(process.env.APKSTART_PACK_OUT): path.join(ROOT, 'dist', 'ApkStart-win64-portable');const ELECTRON_DIST = path.join(ROOT, 'node_modules', 'electron', 'dist');-function rmrf(p) {- if (fs.existsSync(p)) fs.rmSync(p, { recursive: true, force: true });-}-function copy(src, dest) {fs.cpSync(src, dest, { recursive: true });}console.log('打包便携版 →', OUT);-rmrf(OUT);+// 目标已存在时不做整树删除:部分环境会拦截批量删除,且打包中途失败会丢掉+// 上一个可用版本。改为先把旧目录改名保留,再全新构建;占用中则自动换目录。+if (fs.existsSync(OUT)) {+ try {+ const backup = `${OUT}.prev-${new Date().toISOString().replace(/[:.]/g, '-')}`;+ fs.renameSync(OUT, backup);+ console.log('旧版本已保留 →', backup);+ } catch (_) {+ // 某些环境(杀软 / 搜索索引 / 资源管理器)会长时间持有目录句柄,+ // 整目录改名必然 EBUSY;这时退到带版本号的目录,产物一样可用且不再重名。+ OUT = path.join(ROOT, 'dist', `ApkStart-v${require(path.join(ROOT, 'package.json')).version}-win64-portable`);+ console.log('旧目录被占用,改输出到 →', OUT);+ }+}fs.mkdirSync(path.join(OUT, 'resources', 'app'), { recursive: true });// 1. Electron 运行时@@ -61,4 +70,4 @@ fs.renameSync(path.join(OUT, 'electron.exe'), path.join(OUT, 'ApkStart.exe'));const pkg = require(path.join(ROOT, 'package.json'));fs.writeFileSync(path.join(OUT, 'VERSION.txt'), `ApkStart ${pkg.version}\n构建时间:${new Date().toLocaleString('zh-CN')}\n`);-console.log('完成。运行 dist/ApkStart-win64-portable/ApkStart.exe 即可使用。');+console.log(`完成。运行 ${path.join(OUT, 'ApkStart.exe')} 即可使用。`);diff --git a/build/prepare-runtime.js b/build/prepare-runtime.jsnew file mode 100644index 0000000..6b85553--- /dev/null+++ b/build/prepare-runtime.js@@ -0,0 +1,103 @@+'use strict';+/**+ * 把 engine/ 整理成「可随包分发」的运行时:build/runtime/+ *+ * 关键一步是 system.img 的压缩。AOSP 的 system.img 是 3.1GB 的稀疏镜像,+ * 其中绝大部分是零,gzip 之后只有 ~580MB。单文件发行版的体积几乎全在这里。+ * 再加上 emulator(瘦身后约 340MB)+ Electron + platform-tools,整包约 1.0~1.1GB。+ * 不压缩的话发行版要做到 1.4GB 以上。+ * 代价是首次启动花 1~2 分钟把它展开到用户目录(只做一次),+ * 展开逻辑在 src/core/provision.js 的 materializeImages()。+ */+const fs = require('fs');+const path = require('path');+const zlib = require('zlib');+const { pipeline } = require('stream/promises');++const ROOT = path.join(__dirname, '..');+const SRC = path.join(ROOT, 'engine');+const OUT = path.join(ROOT, 'build', 'runtime');+const MARK = path.join(OUT, '.prepared');++function sizeOf(p) {+ try { return fs.statSync(p).size; } catch (_) { return 0; }+}++async function gzipFile(src, dest) {+ await pipeline(+ fs.createReadStream(src),+ zlib.createGzip({ level: 6 }),+ fs.createWriteStream(dest),+ );+}++async function main() {+ const force = process.argv.includes('--force');+ if (fs.existsSync(MARK) && !force) {+ console.log('build/runtime 已是最新(加 --force 重建)');+ return;+ }+ if (!fs.existsSync(SRC)) {+ console.error('缺少 engine/ 目录,无法准备运行时');+ process.exit(1);+ }+ fs.mkdirSync(OUT, { recursive: true });++ // 1. 直接复制 emulator / platform-tools(不含历史产物)+ for (const dir of ['emulator', 'platform-tools']) {+ const s = path.join(SRC, dir);+ if (!fs.existsSync(s)) continue;+ console.log(`复制 ${dir}…`);+ fs.cpSync(s, path.join(OUT, dir), { recursive: true });+ }++ // 1.5 瘦身:删掉固定启动参数下永远不会被加载的文件(约 -400MB)+ if (!process.argv.includes('--no-slim')) {+ console.log('瘦身运行时…');+ const { slim } = require('./slim-runtime');+ slim(OUT, { aggressive: !process.argv.includes('--safe-slim') });+ }++ // 2. 系统镜像:system.img 压成 .gz,其余原样带+ const imgRoot = path.join(SRC, 'system-images');+ let compressed = 0;+ if (fs.existsSync(imgRoot)) {+ for (const api of fs.readdirSync(imgRoot)) {+ for (const tag of fs.readdirSync(path.join(imgRoot, api))) {+ for (const abi of fs.readdirSync(path.join(imgRoot, api, tag))) {+ const from = path.join(imgRoot, api, tag, abi);+ const to = path.join(OUT, 'system-images', api, tag, abi);+ fs.mkdirSync(to, { recursive: true });+ for (const f of fs.readdirSync(from)) {+ const src = path.join(from, f);+ if (!fs.statSync(src).isFile()) continue;+ if (/^(system|vendor|cache)\.img$/i.test(f) && sizeOf(src) > 32 * 1024 * 1024) {+ // 大镜像压一份,原图不进包+ const gz = path.join(to, `${f}.gz`);+ console.log(`压缩 ${f}(${(sizeOf(src) / 1073741824).toFixed(2)} GB)…`);+ // eslint-disable-next-line no-await-in-loop+ await gzipFile(src, gz);+ compressed += 1;+ } else {+ fs.copyFileSync(src, path.join(to, f));+ }+ }+ }+ }+ }+ }++ fs.writeFileSync(MARK, new Date().toISOString());+ const gzCount = compressed;+ let total = 0;+ const walk = (d) => {+ for (const e of fs.readdirSync(d, { withFileTypes: true })) {+ const p = path.join(d, e.name);+ if (e.isDirectory()) walk(p); else total += sizeOf(p);+ }+ };+ walk(OUT);+ console.log(`完成:build/runtime(${(total / 1073741824).toFixed(2)} GB,压缩了 ${gzCount} 个大镜像)`);+}++main().catch((e) => { console.error(e); process.exit(1); });diff --git a/build/slim-runtime.js b/build/slim-runtime.jsnew file mode 100644index 0000000..cdb04a1--- /dev/null+++ b/build/slim-runtime.js@@ -0,0 +1,80 @@+'use strict';+/**+ * 运行时瘦身:删掉模拟器里「我们的启动方式永远不会加载」的文件。+ *+ * 判断依据是 emulator.js 的固定启动参数:+ * - 只带 x86_64 镜像(API30 AOSP) → qemu-system-aarch64.exe 用不上+ * - -gpu software(swiftshader 软渲染) → vulkan / gles_angle 后端用不上+ * - 界面只保留 38px 标题栏 → 模拟器自带界面的多语言、WebEngine 面板用不上+ *+ * 网络相关的 netsimd / netsim / nimble_bridge 一定保留:+ * 它们负责 wifi / 蓝牙的数据通路,删了应用就上不了网,属于「能跑」的底线。+ *+ * 用法:+ * node build/slim-runtime.js build/runtime # 安全档(默认)+ * node build/slim-runtime.js build/runtime --aggressive # 再删 QtWebEngine(-169MB)+ * node build/slim-runtime.js build/runtime --dry-run+ */+const fs = require('fs');+const path = require('path');++/**+ * 安全档:删掉确实不会被加载的东西(约 -190MB)。+ * 实测单点回滚确认的边界(重要,别乱加):+ * - Qt6WebEngineCoreAndroidEmu.dll 是 emulator.exe 的硬依赖(静态导入),删了直接起不来 → 保留+ * - lib64/gles_angle 提供 vk_swiftshader,swiftshader 软渲染依赖它 → 保留+ * - lib64/vulkan 删掉只是退回软渲染(已实测能正常引导 + 渲染),但留着也不大 → 删掉省 103MB+ */+const SAFE = [+ ['emulator/qemu/windows-x86_64/qemu-system-aarch64.exe', 'arm64 的 QEMU 二进制(只发 x86_64 镜像)'],+ ['emulator/lib64/vulkan', 'Vulkan 后端(固定 -gpu software,删掉退回 swiftshader)'],+ ['emulator/lib64/qt/translations', '模拟器界面的多语言包(只剩 38px 标题栏)'],+];++/** 激进档目前为空:WebEngine 是硬依赖、gles_angle 是软渲染依赖,都不敢删 */+const AGGRESSIVE = [];++function sizeOf(p) {+ let s = 0;+ try {+ const st = fs.statSync(p);+ if (!st.isDirectory()) return st.size;+ for (const e of fs.readdirSync(p, { withFileTypes: true })) s += sizeOf(path.join(p, e.name));+ } catch (_) { /* 忽略 */ }+ return s;+}++function slim(root, { aggressive = false, dryRun = false, log = console.log } = {}) {+ if (!fs.existsSync(path.join(root, 'emulator', 'emulator.exe'))) {+ throw new Error(`${root} 不是一个运行时目录(缺 emulator/emulator.exe)`);+ }+ const list = aggressive ? SAFE.concat(AGGRESSIVE) : SAFE;+ let freed = 0;+ for (const [rel, why] of list) {+ const p = path.join(root, rel);+ if (!fs.existsSync(p)) continue;+ const n = sizeOf(p);+ if (!dryRun) {+ try {+ fs.rmSync(p, { recursive: true, force: true });+ } catch (e) {+ log(` 跳过 ${rel}:${e.message}`);+ continue;+ }+ }+ freed += n;+ log(` 删除 ${rel}(${(n / 1048576).toFixed(0)} MB)— ${why}`);+ }+ log(`${dryRun ? '可释放' : '已释放'} ${(freed / 1048576).toFixed(0)} MB`);+ return freed;+}++module.exports = { slim };++if (require.main === module) {+ const root = path.resolve(process.argv[2] || path.join(__dirname, 'runtime'));+ const aggressive = process.argv.includes('--aggressive');+ const dryRun = process.argv.includes('--dry-run');+ console.log(`瘦身目标:${root}(${aggressive ? '激进' : '安全'}档)`);+ slim(root, { aggressive, dryRun });+}diff --git a/electron-builder.yml b/electron-builder.ymlnew file mode 100644index 0000000..85aa6e4--- /dev/null+++ b/electron-builder.yml@@ -0,0 +1,45 @@+appId: com.apkstart.win+productName: ApkStart+copyright: Copyright © 2026 ApkStart++directories:+ output: dist/release+ buildResources: build++# 只带运行需要的文件,源码目录整块进包(无 asar:窗口代理要用真实的 .ps1 路径)+asar: false+files:+ - src/**/*+ - package.json+ - LICENSE+ - "!**/*.map"+ - "!**/node_modules/**"++# 完整运行时(emulator + platform-tools + 系统镜像),由 build/prepare-runtime.js 生成。+# 打进包里之后首次启动不再需要任何下载。+extraResources:+ - from: build/runtime+ to: runtime+ filter:+ - "**/*"+ - "!.prepared"++win:+ target:+ - target: nsis+ arch:+ - x64+ icon: src/ui/assets/appicon.ico+ # 安装到当前用户目录,不写系统盘、不要求管理员权限+ requestedExecutionLevel: asInvoker++nsis:+ oneClick: true+ perMachine: false+ createDesktopShortcut: true+ artifactName: ApkStart-${version}-Setup.exe+ # 安装包本身已含完整运行时(emulator + 系统镜像 .gz),装完首次启动+ # 自动把镜像展开到用户目录,之后不再联网下载任何东西。++# LZMA 最高压缩:镜像已经是 .gz,这里主要压 Electron 的 dll+compression: maximumdiff --git a/package-lock.json b/package-lock.jsonindex 981f76c..168726d 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,15 +1,125 @@{"name": "apkstart",- "version": "0.1.0",+ "version": "0.2.4","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "apkstart",- "version": "0.1.0",+ "version": "0.2.4","license": "MIT",+ "os": [+ "win32"+ ],"devDependencies": {- "electron": "^33.4.11"+ "electron": "^33.4.11",+ "electron-builder": "^26.18.0"+ },+ "engines": {+ "node": ">=20"+ }+ },+ "node_modules/@electron/asar": {+ "version": "3.4.1",+ "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.4.1.tgz",+ "integrity": "sha512-i4/rNPRS84t0vSRa2HorerGRXWyF4vThfHesw0dmcWHp+cspK743UanA0suA5Q5y8kzY2y6YKrvbIUn69BCAiA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "commander": "^5.0.0",+ "glob": "^7.1.6",+ "minimatch": "^3.0.4"+ },+ "bin": {+ "asar": "bin/asar.js"+ },+ "engines": {+ "node": ">=10.12.0"+ }+ },+ "node_modules/@electron/asar/node_modules/balanced-match": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@electron/asar/node_modules/brace-expansion": {+ "version": "1.1.22",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.22.tgz",+ "integrity": "sha512-CKLDTuSsN0+r1ThM0WkzzBI7dnPI6xEGfa/JnVYIK9JNBA1N1NyPwXVHor//NKD/y3sDxp764sZdLhFK7pH8XQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^1.0.0",+ "concat-map": "0.0.1"+ }+ },+ "node_modules/@electron/asar/node_modules/minimatch": {+ "version": "3.1.5",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",+ "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "brace-expansion": "^1.1.7"+ },+ "engines": {+ "node": "*"+ }+ },+ "node_modules/@electron/fuses": {+ "version": "1.8.0",+ "resolved": "https://registry.npmjs.org/@electron/fuses/-/fuses-1.8.0.tgz",+ "integrity": "sha512-zx0EIq78WlY/lBb1uXlziZmDZI4ubcCXIMJ4uGjXzZW0nS19TjSPeXPAjzzTmKQlJUZm0SbmZhPKP7tuQ1SsEw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "chalk": "^4.1.1",+ "fs-extra": "^9.0.1",+ "minimist": "^1.2.5"+ },+ "bin": {+ "electron-fuses": "dist/bin.js"+ }+ },+ "node_modules/@electron/fuses/node_modules/fs-extra": {+ "version": "9.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",+ "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "at-least-node": "^1.0.0",+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/@electron/fuses/node_modules/jsonfile": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/@electron/fuses/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 10.0.0"}},"node_modules/@electron/get": {@@ -34,333 +144,3332 @@"global-agent": "^3.0.0"}},- "node_modules/@sindresorhus/is": {- "version": "4.6.0",- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",- "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",+ "node_modules/@electron/notarize": {+ "version": "2.5.0",+ "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.5.0.tgz",+ "integrity": "sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A==","dev": true,"license": "MIT",- "engines": {- "node": ">=10"+ "dependencies": {+ "debug": "^4.1.1",+ "fs-extra": "^9.0.1",+ "promise-retry": "^2.0.1"},- "funding": {- "url": "https://github.com/sindresorhus/is?sponsor=1"+ "engines": {+ "node": ">= 10.0.0"}},- "node_modules/@szmarczak/http-timer": {- "version": "4.0.6",- "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz",- "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==",+ "node_modules/@electron/notarize/node_modules/fs-extra": {+ "version": "9.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",+ "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==","dev": true,"license": "MIT","dependencies": {- "defer-to-connect": "^2.0.0"+ "at-least-node": "^1.0.0",+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"},"engines": {"node": ">=10"}},- "node_modules/@types/cacheable-request": {- "version": "6.0.3",- "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz",- "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==",+ "node_modules/@electron/notarize/node_modules/jsonfile": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==","dev": true,"license": "MIT","dependencies": {- "@types/http-cache-semantics": "*",- "@types/keyv": "^3.1.4",- "@types/node": "*",- "@types/responselike": "^1.0.0"+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"}},- "node_modules/@types/http-cache-semantics": {- "version": "4.2.0",- "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz",- "integrity": "sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q==",- "dev": true,- "license": "MIT"- },- "node_modules/@types/keyv": {- "version": "3.1.4",- "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz",- "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==",+ "node_modules/@electron/notarize/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==","dev": true,"license": "MIT",- "dependencies": {- "@types/node": "*"+ "engines": {+ "node": ">= 10.0.0"}},- "node_modules/@types/node": {- "version": "20.19.43",- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.43.tgz",- "integrity": "sha512-6oYBAi5ikg4Pl+kGsoYtawUMBT2zZMCvPNF7pVLnHZfd1zf38DRiWn/gT01RYCdUqkv7Fhr+C9ot4/tb+2sVvA==",+ "node_modules/@electron/osx-sign": {+ "version": "1.3.3",+ "resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.3.3.tgz",+ "integrity": "sha512-KZ8mhXvWv2rIEgMbWZ4y33bDHyUKMXnx4M0sTyPNK/vcB81ImdeY9Ggdqy0SWbMDgmbqyQ+phgejh6V3R2QuSg==","dev": true,- "license": "MIT",+ "license": "BSD-2-Clause","dependencies": {- "undici-types": "~6.21.0"+ "compare-version": "^0.1.2",+ "debug": "^4.3.4",+ "fs-extra": "^10.0.0",+ "isbinaryfile": "^4.0.8",+ "minimist": "^1.2.6",+ "plist": "^3.0.5"+ },+ "bin": {+ "electron-osx-flat": "bin/electron-osx-flat.js",+ "electron-osx-sign": "bin/electron-osx-sign.js"+ },+ "engines": {+ "node": ">=12.0.0"}},- "node_modules/@types/responselike": {- "version": "1.0.3",- "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz",- "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==",+ "node_modules/@electron/osx-sign/node_modules/fs-extra": {+ "version": "10.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==","dev": true,"license": "MIT","dependencies": {- "@types/node": "*"+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },+ "engines": {+ "node": ">=12"}},- "node_modules/@types/yauzl": {- "version": "2.10.3",- "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz",- "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==",+ "node_modules/@electron/osx-sign/node_modules/isbinaryfile": {+ "version": "4.0.10",+ "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz",+ "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==","dev": true,"license": "MIT",- "optional": true,- "dependencies": {- "@types/node": "*"+ "engines": {+ "node": ">= 8.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/gjtorikian/"}},- "node_modules/boolean": {- "version": "3.2.0",- "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz",- "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==",- "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",+ "node_modules/@electron/osx-sign/node_modules/jsonfile": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==","dev": true,"license": "MIT",- "optional": true+ "dependencies": {+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }},- "node_modules/buffer-crc32": {- "version": "0.2.13",- "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",- "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",+ "node_modules/@electron/osx-sign/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==","dev": true,"license": "MIT","engines": {- "node": "*"+ "node": ">= 10.0.0"}},- "node_modules/cacheable-lookup": {- "version": "5.0.4",- "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",- "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==",+ "node_modules/@electron/rebuild": {+ "version": "4.2.1",+ "resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-4.2.1.tgz",+ "integrity": "sha512-IS4pG3BysRrCLJ8xTAfvg+IQDbiUoAzdJy2SfjcYKnLDy5DpCdjnPdhS5Zf5UMfrkB24xu0KC+TqcOxg+eG+6w==","dev": true,"license": "MIT",+ "dependencies": {+ "@malept/cross-spawn-promise": "^2.0.0",+ "debug": "^4.1.1",+ "node-abi": "^4.2.0",+ "node-api-version": "^0.2.1",+ "node-gyp": "^12.2.0",+ "read-binary-file-arch": "^1.0.6"+ },+ "bin": {+ "electron-rebuild": "lib/cli.js"+ },"engines": {- "node": ">=10.6.0"+ "node": ">=22.12.0"}},- "node_modules/cacheable-request": {- "version": "7.0.4",- "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz",- "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==",+ "node_modules/@electron/universal": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/@electron/universal/-/universal-2.0.3.tgz",+ "integrity": "sha512-Wn9sPYIVFRFl5HmwMJkARCCf7rqK/EurkfQ/rJZ14mHP3iYTjZSIOSVonEAnhWeAXwtw7zOekGRlc6yTtZ0t+g==","dev": true,"license": "MIT","dependencies": {- "clone-response": "^1.0.2",- "get-stream": "^5.1.0",- "http-cache-semantics": "^4.0.0",- "keyv": "^4.0.0",- "lowercase-keys": "^2.0.0",- "normalize-url": "^6.0.1",- "responselike": "^2.0.0"+ "@electron/asar": "^3.3.1",+ "@malept/cross-spawn-promise": "^2.0.0",+ "debug": "^4.3.1",+ "dir-compare": "^4.2.0",+ "fs-extra": "^11.1.1",+ "minimatch": "^9.0.3",+ "plist": "^3.1.0"},"engines": {- "node": ">=8"+ "node": ">=16.4"}},- "node_modules/clone-response": {- "version": "1.0.3",- "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz",- "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==",+ "node_modules/@electron/universal/node_modules/balanced-match": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@electron/universal/node_modules/brace-expansion": {+ "version": "2.1.8",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.8.tgz",+ "integrity": "sha512-BnlDzDYQoplTsZSvPi86CNzmbcb07X8ufR8fk1zivaiEJlXJkiq1MQyDCVmlWcsWbj6aWXqHnrwwevbrm/Saig==","dev": true,"license": "MIT","dependencies": {- "mimic-response": "^1.0.0"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "balanced-match": "^1.0.0"}},- "node_modules/debug": {- "version": "4.4.3",- "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",- "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",+ "node_modules/@electron/universal/node_modules/fs-extra": {+ "version": "11.4.1",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.4.1.tgz",+ "integrity": "sha512-KYAb4c9BJQI6QqGKthV68OHe0badztdXJWKo0WtBA9IuCFPTKvE5ZdUBglP833aMjhaSPNO4A5j/EkzZtGlKjA==","dev": true,"license": "MIT","dependencies": {- "ms": "^2.1.3"+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"},"engines": {- "node": ">=6.0"- },- "peerDependenciesMeta": {- "supports-color": {- "optional": true- }+ "node": ">=14.14"}},- "node_modules/decompress-response": {- "version": "6.0.0",- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",- "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",+ "node_modules/@electron/universal/node_modules/jsonfile": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==","dev": true,"license": "MIT","dependencies": {- "mimic-response": "^3.1.0"- },- "engines": {- "node": ">=10"+ "universalify": "^2.0.0"},- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"}},- "node_modules/decompress-response/node_modules/mimic-response": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",- "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",+ "node_modules/@electron/universal/node_modules/minimatch": {+ "version": "9.0.9",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz",+ "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==","dev": true,- "license": "MIT",+ "license": "ISC",+ "dependencies": {+ "brace-expansion": "^2.0.2"+ },"engines": {- "node": ">=10"+ "node": ">=16 || 14 >=14.17"},"funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "url": "https://github.com/sponsors/isaacs"}},- "node_modules/defer-to-connect": {+ "node_modules/@electron/universal/node_modules/universalify": {"version": "2.0.1",- "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",- "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==","dev": true,"license": "MIT","engines": {- "node": ">=10"+ "node": ">= 10.0.0"}},- "node_modules/define-data-property": {- "version": "1.1.4",- "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",- "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",+ "node_modules/@electron/windows-sign": {+ "version": "1.2.2",+ "resolved": "https://registry.npmjs.org/@electron/windows-sign/-/windows-sign-1.2.2.tgz",+ "integrity": "sha512-dfZeox66AvdPtb2lD8OsIIQh12Tp0GNCRUDfBHIKGpbmopZto2/A8nSpYYLoedPIHpqkeblZ/k8OV0Gy7PYuyQ==","dev": true,- "license": "MIT",+ "license": "BSD-2-Clause","optional": true,+ "peer": true,"dependencies": {- "es-define-property": "^1.0.0",- "es-errors": "^1.3.0",- "gopd": "^1.0.1"+ "cross-dirname": "^0.1.0",+ "debug": "^4.3.4",+ "fs-extra": "^11.1.1",+ "minimist": "^1.2.8",+ "postject": "^1.0.0-alpha.6"},- "engines": {- "node": ">= 0.4"+ "bin": {+ "electron-windows-sign": "bin/electron-windows-sign.js"},- "funding": {- "url": "https://github.com/sponsors/ljharb"+ "engines": {+ "node": ">=14.14"}},- "node_modules/define-properties": {- "version": "1.2.1",- "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",- "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",+ "node_modules/@electron/windows-sign/node_modules/fs-extra": {+ "version": "11.4.1",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.4.1.tgz",+ "integrity": "sha512-KYAb4c9BJQI6QqGKthV68OHe0badztdXJWKo0WtBA9IuCFPTKvE5ZdUBglP833aMjhaSPNO4A5j/EkzZtGlKjA==","dev": true,"license": "MIT","optional": true,+ "peer": true,"dependencies": {- "define-data-property": "^1.0.1",- "has-property-descriptors": "^1.0.0",- "object-keys": "^1.1.1"+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"},"engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"+ "node": ">=14.14"}},- "node_modules/detect-node": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",- "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==",+ "node_modules/@electron/windows-sign/node_modules/jsonfile": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==","dev": true,"license": "MIT",- "optional": true- },- "node_modules/electron": {+ "optional": true,+ "peer": true,+ "dependencies": {+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/@electron/windows-sign/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "engines": {+ "node": ">= 10.0.0"+ }+ },+ "node_modules/@isaacs/fs-minipass": {+ "version": "4.0.1",+ "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz",+ "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "minipass": "^7.0.4"+ },+ "engines": {+ "node": ">=18.0.0"+ }+ },+ "node_modules/@malept/cross-spawn-promise": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-2.0.0.tgz",+ "integrity": "sha512-1DpKU0Z5ThltBwjNySMC14g0CkbyhCaz9FkhxqNsZI6uAPJXFS8cMXlBKo26FJ8ZuW6S9GCMcR9IO5k2X5/9Fg==",+ "dev": true,+ "funding": [+ {+ "type": "individual",+ "url": "https://github.com/sponsors/malept"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/subscription/pkg/npm-.malept-cross-spawn-promise?utm_medium=referral&utm_source=npm_fund"+ }+ ],+ "license": "Apache-2.0",+ "dependencies": {+ "cross-spawn": "^7.0.1"+ },+ "engines": {+ "node": ">= 12.13.0"+ }+ },+ "node_modules/@malept/flatpak-bundler": {+ "version": "0.4.0",+ "resolved": "https://registry.npmjs.org/@malept/flatpak-bundler/-/flatpak-bundler-0.4.0.tgz",+ "integrity": "sha512-9QOtNffcOF/c1seMCDnjckb3R9WHcG34tky+FHpNKKCW0wc/scYLwMtO+ptyGUfMW0/b/n4qRiALlaFHc9Oj7Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "debug": "^4.1.1",+ "fs-extra": "^9.0.0",+ "lodash": "^4.17.15",+ "tmp-promise": "^3.0.2"+ },+ "engines": {+ "node": ">= 10.0.0"+ }+ },+ "node_modules/@malept/flatpak-bundler/node_modules/fs-extra": {+ "version": "9.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",+ "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "at-least-node": "^1.0.0",+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/@malept/flatpak-bundler/node_modules/jsonfile": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/@malept/flatpak-bundler/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 10.0.0"+ }+ },+ "node_modules/@noble/hashes": {+ "version": "1.8.0",+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",+ "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "^14.21.3 || >=16"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/@peculiar/asn1-schema": {+ "version": "2.11.1",+ "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.11.1.tgz",+ "integrity": "sha512-jaU9OaCcbZUdyXx9hMETZB9xoNmxTGjOGFqd3cOwKFkpKnyKd9WxF3uqj4PvX4cyOMP9bSdHg5YyML2qtx/d/g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@peculiar/utils": "^2.0.2",+ "asn1js": "^3.0.10",+ "tslib": "^2.8.1"+ },+ "engines": {+ "node": ">=14"+ }+ },+ "node_modules/@peculiar/json-schema": {+ "version": "1.1.12",+ "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz",+ "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "tslib": "^2.0.0"+ },+ "engines": {+ "node": ">=8.0.0"+ }+ },+ "node_modules/@peculiar/utils": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/@peculiar/utils/-/utils-2.0.3.tgz",+ "integrity": "sha512-+oL3HPFRIZ1St2K50lWCXiioIgSoxzz7R1J3uF6neO2yl1sgmpgY6XXJH4BdpoDkMWznQTeYF6oWNDZLCdQ4eQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "tslib": "^2.8.1"+ }+ },+ "node_modules/@peculiar/webcrypto": {+ "version": "1.7.2",+ "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.7.2.tgz",+ "integrity": "sha512-ktTSACRJ5WdpfjHjFT2EWJQQPacGv1cPCDfEbdmpAHOxdFiYqPe4lfnXGA3D8Dg9/0kHPYSvyRlgujIOVlTdvQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@peculiar/asn1-schema": "^2.7.0",+ "@peculiar/json-schema": "^1.1.12",+ "@peculiar/utils": "^2.0.2",+ "tslib": "^2.8.1",+ "webcrypto-core": "^1.9.2"+ },+ "engines": {+ "node": ">=14.18.0"+ }+ },+ "node_modules/@sindresorhus/is": {+ "version": "4.6.0",+ "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",+ "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sindresorhus/is?sponsor=1"+ }+ },+ "node_modules/@szmarczak/http-timer": {+ "version": "4.0.6",+ "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz",+ "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "defer-to-connect": "^2.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/@types/cacheable-request": {+ "version": "6.0.3",+ "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz",+ "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/http-cache-semantics": "*",+ "@types/keyv": "^3.1.4",+ "@types/node": "*",+ "@types/responselike": "^1.0.0"+ }+ },+ "node_modules/@types/debug": {+ "version": "4.1.13",+ "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz",+ "integrity": "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/ms": "*"+ }+ },+ "node_modules/@types/fs-extra": {+ "version": "9.0.13",+ "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz",+ "integrity": "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/node": "*"+ }+ },+ "node_modules/@types/http-cache-semantics": {+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz",+ "integrity": "sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@types/keyv": {+ "version": "3.1.4",+ "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz",+ "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/node": "*"+ }+ },+ "node_modules/@types/ms": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz",+ "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@types/node": {+ "version": "20.19.43",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.43.tgz",+ "integrity": "sha512-6oYBAi5ikg4Pl+kGsoYtawUMBT2zZMCvPNF7pVLnHZfd1zf38DRiWn/gT01RYCdUqkv7Fhr+C9ot4/tb+2sVvA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "undici-types": "~6.21.0"+ }+ },+ "node_modules/@types/responselike": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz",+ "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/node": "*"+ }+ },+ "node_modules/@types/yauzl": {+ "version": "2.10.3",+ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz",+ "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "@types/node": "*"+ }+ },+ "node_modules/@xmldom/xmldom": {+ "version": "0.8.15",+ "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.15.tgz",+ "integrity": "sha512-/5NV/vDALVFDXgLmfsy9TRCBlKwO2LNBFzpzvb9iIj+jR+eSc6DLYYvVOdivT/jm7MtU6TebYuRmzEOI7w40UA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10.0.0"+ }+ },+ "node_modules/abbrev": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-4.0.0.tgz",+ "integrity": "sha512-a1wflyaL0tHtJSmLSOVybYhy22vRih4eduhhrkcjgrWGnRfrZtovJ2FRjxuTtkkj47O/baf0R86QU5OuYpz8fA==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": "^20.17.0 || >=22.9.0"+ }+ },+ "node_modules/agent-base": {+ "version": "7.1.4",+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",+ "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 14"+ }+ },+ "node_modules/ajv": {+ "version": "8.20.0",+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz",+ "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "fast-deep-equal": "^3.1.3",+ "fast-uri": "^3.0.1",+ "json-schema-traverse": "^1.0.0",+ "require-from-string": "^2.0.2"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/epoberezkin"+ }+ },+ "node_modules/ansi-regex": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/ansi-styles": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "color-convert": "^2.0.1"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"+ }+ },+ "node_modules/app-builder-lib": {+ "version": "26.18.0",+ "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-26.18.0.tgz",+ "integrity": "sha512-lx+KkuCSZHcbECf4R3IAcC9VOFk0+cMUwljO63s5y8yqS1Lw0sRGmjPaWsPwP3zv3ohZYbMhUvjXeiQXXZhJXA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@electron/asar": "3.4.1",+ "@electron/fuses": "^1.8.0",+ "@electron/get": "^3.0.0",+ "@electron/notarize": "2.5.0",+ "@electron/osx-sign": "1.3.3",+ "@electron/rebuild": "^4.2.1",+ "@electron/universal": "2.0.3",+ "@malept/flatpak-bundler": "^0.4.0",+ "@noble/hashes": "^1.8.0",+ "@peculiar/webcrypto": "^1.7.1",+ "@types/fs-extra": "9.0.13",+ "ajv": "^8.18.0",+ "asn1js": "^3.0.10",+ "async-exit-hook": "^2.0.1",+ "builder-util": "26.16.0",+ "builder-util-runtime": "9.7.0",+ "chromium-pickle-js": "^0.2.0",+ "ci-info": "4.3.1",+ "debug": "^4.3.4",+ "dotenv": "^16.4.5",+ "dotenv-expand": "^11.0.6",+ "ejs": "^3.1.8",+ "electron-publish": "26.18.0",+ "fs-extra": "^10.1.0",+ "hosted-git-info": "^4.1.0",+ "isbinaryfile": "^5.0.0",+ "jiti": "^2.4.2",+ "js-yaml": "^4.1.0",+ "json5": "^2.2.3",+ "lazy-val": "^1.0.5",+ "minimatch": "^10.2.5",+ "pkijs": "^3.4.0",+ "plist": "3.1.0",+ "proper-lockfile": "^4.1.2",+ "resedit": "^1.7.0",+ "semver": "~7.7.3",+ "tar": "^7.5.7",+ "temp-file": "^3.4.0",+ "tiny-async-pool": "1.3.0",+ "unzipper": "^0.12.3",+ "which": "^5.0.0"+ },+ "engines": {+ "node": ">=14.0.0"+ },+ "peerDependencies": {+ "dmg-builder": "26.18.0",+ "electron-builder-squirrel-windows": "26.18.0"+ }+ },+ "node_modules/app-builder-lib/node_modules/@electron/get": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/@electron/get/-/get-3.1.0.tgz",+ "integrity": "sha512-F+nKc0xW+kVbBRhFzaMgPy3KwmuNTYX1fx6+FxxoSnNgwYX6LD7AKBTWkU0MQ6IBoe7dz069CNkR673sPAgkCQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "debug": "^4.1.1",+ "env-paths": "^2.2.0",+ "fs-extra": "^8.1.0",+ "got": "^11.8.5",+ "progress": "^2.0.3",+ "semver": "^6.2.0",+ "sumchecker": "^3.0.1"+ },+ "engines": {+ "node": ">=14"+ },+ "optionalDependencies": {+ "global-agent": "^3.0.0"+ }+ },+ "node_modules/app-builder-lib/node_modules/@electron/get/node_modules/fs-extra": {+ "version": "8.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",+ "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^4.0.0",+ "universalify": "^0.1.0"+ },+ "engines": {+ "node": ">=6 <7 || >=8"+ }+ },+ "node_modules/app-builder-lib/node_modules/@electron/get/node_modules/semver": {+ "version": "6.3.2",+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.2.tgz",+ "integrity": "sha512-GYrCADwpu6yV5OAvchkQ27Z5wwMxWAEMg5NNWjyHh/5DboFFqbdbvYNIvZouQpxXyeMPoTOh0vdPYKlf0ZswdQ==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ }+ },+ "node_modules/app-builder-lib/node_modules/ci-info": {+ "version": "4.3.1",+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz",+ "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/sibiraj-s"+ }+ ],+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/app-builder-lib/node_modules/fs-extra": {+ "version": "10.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/app-builder-lib/node_modules/fs-extra/node_modules/jsonfile": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/app-builder-lib/node_modules/fs-extra/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 10.0.0"+ }+ },+ "node_modules/app-builder-lib/node_modules/semver": {+ "version": "7.7.4",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",+ "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/argparse": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",+ "dev": true,+ "license": "Python-2.0"+ },+ "node_modules/asn1js": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.1.0.tgz",+ "integrity": "sha512-HWYi1THkOqguCiO+vwj09ZkQFD2kKEsejYHAYCtX0D80WVdoDnvRc9IukXX/jeb0T9NRWJnRtqwdbHltnFjwXA==",+ "dev": true,+ "license": "BSD-3-Clause",+ "dependencies": {+ "pvtsutils": "^1.3.6",+ "pvutils": "^1.2.0",+ "tslib": "^2.8.1"+ },+ "engines": {+ "node": ">=12.0.0"+ }+ },+ "node_modules/async": {+ "version": "3.2.6",+ "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz",+ "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/async-exit-hook": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/async-exit-hook/-/async-exit-hook-2.0.1.tgz",+ "integrity": "sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.12.0"+ }+ },+ "node_modules/asynckit": {+ "version": "0.4.0",+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/at-least-node": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",+ "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": ">= 4.0.0"+ }+ },+ "node_modules/aws4": {+ "version": "1.13.2",+ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz",+ "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/balanced-match": {+ "version": "4.0.4",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "18 || 20 || >=22"+ }+ },+ "node_modules/base64-js": {+ "version": "1.5.1",+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT"+ },+ "node_modules/bluebird": {+ "version": "3.7.2",+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",+ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/boolean": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz",+ "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==",+ "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",+ "dev": true,+ "license": "MIT",+ "optional": true+ },+ "node_modules/brace-expansion": {+ "version": "5.0.13",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.13.tgz",+ "integrity": "sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^4.0.2"+ },+ "engines": {+ "node": "20 || >=22"+ }+ },+ "node_modules/buffer-crc32": {+ "version": "0.2.13",+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",+ "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "*"+ }+ },+ "node_modules/buffer-from": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/builder-util": {+ "version": "26.16.0",+ "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-26.16.0.tgz",+ "integrity": "sha512-RLyJhB7Si3YkzKR9ubQslWuXW3Vhs3CGe1i+SeixBZ0qTd1mk3XBmssvY22TlB6CS5blyko8Gu1JzpYk8UkYAg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/debug": "^4.1.6",+ "builder-util-runtime": "9.7.0",+ "chalk": "^4.1.2",+ "cross-spawn": "^7.0.6",+ "debug": "^4.3.4",+ "fs-extra": "^10.1.0",+ "http-proxy-agent": "^7.0.0",+ "https-proxy-agent": "^7.0.0",+ "js-yaml": "^4.1.0",+ "sanitize-filename": "^1.6.3",+ "source-map-support": "^0.5.19",+ "stat-mode": "^1.0.0",+ "temp-file": "^3.4.0",+ "tiny-async-pool": "1.3.0"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/builder-util-runtime": {+ "version": "9.7.0",+ "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-9.7.0.tgz",+ "integrity": "sha512-g/kR520giAFYkSXTzcmF3kqQq7wi8F6N6SzeDgZrqTBN+VHdmgWOyTdD1yD7AATDId/yXLvuP34CxW46/BwCdw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "debug": "^4.3.4",+ "sax": "^1.2.4"+ },+ "engines": {+ "node": ">=12.0.0"+ }+ },+ "node_modules/builder-util/node_modules/fs-extra": {+ "version": "10.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/builder-util/node_modules/jsonfile": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/builder-util/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 10.0.0"+ }+ },+ "node_modules/bytestreamjs": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/bytestreamjs/-/bytestreamjs-2.0.1.tgz",+ "integrity": "sha512-U1Z/ob71V/bXfVABvNr/Kumf5VyeQRBEm6Txb0PQ6S7V5GpBM3w4Cbqz/xPDicR5tN0uvDifng8C+5qECeGwyQ==",+ "dev": true,+ "license": "BSD-3-Clause",+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/cacheable-lookup": {+ "version": "5.0.4",+ "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",+ "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10.6.0"+ }+ },+ "node_modules/cacheable-request": {+ "version": "7.0.4",+ "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz",+ "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "clone-response": "^1.0.2",+ "get-stream": "^5.1.0",+ "http-cache-semantics": "^4.0.0",+ "keyv": "^4.0.0",+ "lowercase-keys": "^2.0.0",+ "normalize-url": "^6.0.1",+ "responselike": "^2.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/call-bind-apply-helpers": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "es-errors": "^1.3.0",+ "function-bind": "^1.1.2"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/chalk": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ansi-styles": "^4.1.0",+ "supports-color": "^7.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/chalk/chalk?sponsor=1"+ }+ },+ "node_modules/chownr": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz",+ "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/chromium-pickle-js": {+ "version": "0.2.0",+ "resolved": "https://registry.npmjs.org/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz",+ "integrity": "sha512-1R5Fho+jBq0DDydt+/vHWj5KJNJCKdARKOCwZUen84I5BreWoLqRLANH1U87eJy1tiASPtMnGqJJq0ZsLoRPOw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/ci-info": {+ "version": "4.5.0",+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.5.0.tgz",+ "integrity": "sha512-d1uM8k5UZEyPza1n/MG3ko8nKupKN0KJpFsipgPcgaCCvV+IqIfJ+NzTjetlLM+UcXZx3+cLrNr76+eAO7G1Mw==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/sibiraj-s"+ }+ ],+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/cliui": {+ "version": "8.0.1",+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "string-width": "^4.2.0",+ "strip-ansi": "^6.0.1",+ "wrap-ansi": "^7.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/clone-response": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz",+ "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "mimic-response": "^1.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/color-convert": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "color-name": "~1.1.4"+ },+ "engines": {+ "node": ">=7.0.0"+ }+ },+ "node_modules/color-name": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/combined-stream": {+ "version": "1.0.8",+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "delayed-stream": "~1.0.0"+ },+ "engines": {+ "node": ">= 0.8"+ }+ },+ "node_modules/commander": {+ "version": "5.1.0",+ "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz",+ "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/compare-version": {+ "version": "0.1.2",+ "resolved": "https://registry.npmjs.org/compare-version/-/compare-version-0.1.2.tgz",+ "integrity": "sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/concat-map": {+ "version": "0.0.1",+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/core-util-is": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/cross-dirname": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/cross-dirname/-/cross-dirname-0.1.0.tgz",+ "integrity": "sha512-+R08/oI0nl3vfPcqftZRpytksBXDzOUveBq/NBVx0sUp1axwzPQrKinNx5yd5sxPu8j1wIy8AfnVQ+5eFdha6Q==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true+ },+ "node_modules/cross-spawn": {+ "version": "7.0.6",+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "path-key": "^3.1.0",+ "shebang-command": "^2.0.0",+ "which": "^2.0.1"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/cross-spawn/node_modules/isexe": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/cross-spawn/node_modules/which": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "isexe": "^2.0.0"+ },+ "bin": {+ "node-which": "bin/node-which"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/debug": {+ "version": "4.4.3",+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ms": "^2.1.3"+ },+ "engines": {+ "node": ">=6.0"+ },+ "peerDependenciesMeta": {+ "supports-color": {+ "optional": true+ }+ }+ },+ "node_modules/decompress-response": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",+ "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "mimic-response": "^3.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/decompress-response/node_modules/mimic-response": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",+ "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/defer-to-connect": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",+ "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/define-data-property": {+ "version": "1.1.4",+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",+ "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "es-define-property": "^1.0.0",+ "es-errors": "^1.3.0",+ "gopd": "^1.0.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/define-properties": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",+ "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "define-data-property": "^1.0.1",+ "has-property-descriptors": "^1.0.0",+ "object-keys": "^1.1.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/delayed-stream": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.4.0"+ }+ },+ "node_modules/detect-node": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",+ "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==",+ "dev": true,+ "license": "MIT",+ "optional": true+ },+ "node_modules/dir-compare": {+ "version": "4.2.0",+ "resolved": "https://registry.npmjs.org/dir-compare/-/dir-compare-4.2.0.tgz",+ "integrity": "sha512-2xMCmOoMrdQIPHdsTawECdNPwlVFB9zGcz3kuhmBO6U3oU+UQjsue0i8ayLKpgBcm+hcXPMVSGUN9d+pvJ6+VQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "minimatch": "^3.0.5",+ "p-limit": "^3.1.0 "+ }+ },+ "node_modules/dir-compare/node_modules/balanced-match": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/dir-compare/node_modules/brace-expansion": {+ "version": "1.1.22",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.22.tgz",+ "integrity": "sha512-CKLDTuSsN0+r1ThM0WkzzBI7dnPI6xEGfa/JnVYIK9JNBA1N1NyPwXVHor//NKD/y3sDxp764sZdLhFK7pH8XQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^1.0.0",+ "concat-map": "0.0.1"+ }+ },+ "node_modules/dir-compare/node_modules/minimatch": {+ "version": "3.1.5",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",+ "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "brace-expansion": "^1.1.7"+ },+ "engines": {+ "node": "*"+ }+ },+ "node_modules/dmg-builder": {+ "version": "26.18.0",+ "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-26.18.0.tgz",+ "integrity": "sha512-ozCGC54wi2C1RkS2v69y9lQxvoQ1Coh+iT8CmWiyY8y1ZuOKVvuNson2Hd+HEOs9+EZNNsOBbzKgQZ4SNqWd0w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "app-builder-lib": "26.18.0",+ "builder-util": "26.16.0",+ "fs-extra": "^10.1.0",+ "js-yaml": "^4.1.0"+ }+ },+ "node_modules/dmg-builder/node_modules/fs-extra": {+ "version": "10.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/dmg-builder/node_modules/jsonfile": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/dmg-builder/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 10.0.0"+ }+ },+ "node_modules/dotenv": {+ "version": "16.6.1",+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz",+ "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==",+ "dev": true,+ "license": "BSD-2-Clause",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://dotenvx.com"+ }+ },+ "node_modules/dotenv-expand": {+ "version": "11.0.7",+ "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.7.tgz",+ "integrity": "sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==",+ "dev": true,+ "license": "BSD-2-Clause",+ "dependencies": {+ "dotenv": "^16.4.5"+ },+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://dotenvx.com"+ }+ },+ "node_modules/dunder-proto": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind-apply-helpers": "^1.0.1",+ "es-errors": "^1.3.0",+ "gopd": "^1.2.0"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/duplexer2": {+ "version": "0.1.4",+ "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",+ "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==",+ "dev": true,+ "license": "BSD-3-Clause",+ "dependencies": {+ "readable-stream": "^2.0.2"+ }+ },+ "node_modules/ejs": {+ "version": "3.1.10",+ "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz",+ "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "jake": "^10.8.5"+ },+ "bin": {+ "ejs": "bin/cli.js"+ },+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/electron": {"version": "33.4.11","resolved": "https://registry.npmjs.org/electron/-/electron-33.4.11.tgz","integrity": "sha512-xmdAs5QWRkInC7TpXGNvzo/7exojubk+72jn1oJL7keNeIlw7xNglf8TGtJtkR4rWC5FJq0oXiIXPS9BcK2Irg==","dev": true,- "hasInstallScript": true,+ "hasInstallScript": true,+ "license": "MIT",+ "dependencies": {+ "@electron/get": "^2.0.0",+ "@types/node": "^20.9.0",+ "extract-zip": "^2.0.1"+ },+ "bin": {+ "electron": "cli.js"+ },+ "engines": {+ "node": ">= 12.20.55"+ }+ },+ "node_modules/electron-builder": {+ "version": "26.18.0",+ "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-26.18.0.tgz",+ "integrity": "sha512-ASgIuQnOq4RuD8jMhS9hI0LS3EMRT1I/M5R6utqifB/BHN80IcCjBdt+DED+NmNPvmBgEtrlExXZitNdA7kXOg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "app-builder-lib": "26.18.0",+ "builder-util": "26.16.0",+ "builder-util-runtime": "9.7.0",+ "chalk": "^4.1.2",+ "ci-info": "^4.2.0",+ "dmg-builder": "26.18.0",+ "fs-extra": "^10.1.0",+ "lazy-val": "^1.0.5",+ "simple-update-notifier": "2.0.0",+ "yargs": "^17.6.2"+ },+ "bin": {+ "electron-builder": "cli.js",+ "install-app-deps": "install-app-deps.js"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/electron-builder-squirrel-windows": {+ "version": "26.18.0",+ "resolved": "https://registry.npmjs.org/electron-builder-squirrel-windows/-/electron-builder-squirrel-windows-26.18.0.tgz",+ "integrity": "sha512-a2elgTipboXNIsxqS1HOmHMGp4Pd3LJgIZOdIFTOskBSawvxKyZWYWQ1d7KKA4CtINSchYCYEKzhxRqiKZev9Q==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "app-builder-lib": "26.18.0",+ "builder-util": "26.16.0",+ "electron-winstaller": "5.4.0"+ }+ },+ "node_modules/electron-builder/node_modules/fs-extra": {+ "version": "10.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/electron-builder/node_modules/jsonfile": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/electron-builder/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 10.0.0"+ }+ },+ "node_modules/electron-publish": {+ "version": "26.18.0",+ "resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-26.18.0.tgz",+ "integrity": "sha512-MagnqaZSALSWjcdKu5HEVhYUZD/2BDL3q7XzrqWwub6gf/UfD3ItMgmthVDv9w5y9E0gH1C3JWqKaXwf6f4ROg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/fs-extra": "^9.0.11",+ "aws4": "^1.13.2",+ "builder-util": "26.16.0",+ "builder-util-runtime": "9.7.0",+ "chalk": "^4.1.2",+ "form-data": "^4.0.5",+ "fs-extra": "^10.1.0",+ "lazy-val": "^1.0.5",+ "mime": "^2.5.2"+ }+ },+ "node_modules/electron-publish/node_modules/fs-extra": {+ "version": "10.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/electron-publish/node_modules/jsonfile": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/electron-publish/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 10.0.0"+ }+ },+ "node_modules/electron-winstaller": {+ "version": "5.4.0",+ "resolved": "https://registry.npmjs.org/electron-winstaller/-/electron-winstaller-5.4.0.tgz",+ "integrity": "sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "@electron/asar": "^3.2.1",+ "debug": "^4.1.1",+ "fs-extra": "^7.0.1",+ "lodash": "^4.17.21",+ "temp": "^0.9.0"+ },+ "engines": {+ "node": ">=8.0.0"+ },+ "optionalDependencies": {+ "@electron/windows-sign": "^1.1.2"+ }+ },+ "node_modules/electron-winstaller/node_modules/fs-extra": {+ "version": "7.0.1",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",+ "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "graceful-fs": "^4.1.2",+ "jsonfile": "^4.0.0",+ "universalify": "^0.1.0"+ },+ "engines": {+ "node": ">=6 <7 || >=8"+ }+ },+ "node_modules/emoji-regex": {+ "version": "8.0.0",+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/end-of-stream": {+ "version": "1.4.5",+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",+ "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "once": "^1.4.0"+ }+ },+ "node_modules/env-paths": {+ "version": "2.2.1",+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",+ "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/err-code": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz",+ "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/es-define-property": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/es-errors": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/es-object-atoms": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz",+ "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "es-errors": "^1.3.0"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/es-set-tostringtag": {+ "version": "2.1.0",+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",+ "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "es-errors": "^1.3.0",+ "get-intrinsic": "^1.2.6",+ "has-tostringtag": "^1.0.2",+ "hasown": "^2.0.2"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/es6-error": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",+ "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",+ "dev": true,+ "license": "MIT",+ "optional": true+ },+ "node_modules/escalade": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/escape-string-regexp": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/exponential-backoff": {+ "version": "3.1.3",+ "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.3.tgz",+ "integrity": "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==",+ "dev": true,+ "license": "Apache-2.0"+ },+ "node_modules/extract-zip": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",+ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",+ "dev": true,+ "license": "BSD-2-Clause",+ "dependencies": {+ "debug": "^4.1.1",+ "get-stream": "^5.1.0",+ "yauzl": "^2.10.0"+ },+ "bin": {+ "extract-zip": "cli.js"+ },+ "engines": {+ "node": ">= 10.17.0"+ },+ "optionalDependencies": {+ "@types/yauzl": "^2.9.1"+ }+ },+ "node_modules/fast-deep-equal": {+ "version": "3.1.3",+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/fast-uri": {+ "version": "3.1.9",+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz",+ "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/fastify"+ },+ {+ "type": "opencollective",+ "url": "https://opencollective.com/fastify"+ }+ ],+ "license": "BSD-3-Clause"+ },+ "node_modules/fd-slicer": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",+ "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "pend": "~1.2.0"+ }+ },+ "node_modules/fdir": {+ "version": "6.5.0",+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12.0.0"+ },+ "peerDependencies": {+ "picomatch": "^3 || ^4"+ },+ "peerDependenciesMeta": {+ "picomatch": {+ "optional": true+ }+ }+ },+ "node_modules/filelist": {+ "version": "1.0.6",+ "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.6.tgz",+ "integrity": "sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "minimatch": "^5.0.1"+ }+ },+ "node_modules/filelist/node_modules/balanced-match": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/filelist/node_modules/brace-expansion": {+ "version": "2.1.8",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.8.tgz",+ "integrity": "sha512-BnlDzDYQoplTsZSvPi86CNzmbcb07X8ufR8fk1zivaiEJlXJkiq1MQyDCVmlWcsWbj6aWXqHnrwwevbrm/Saig==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^1.0.0"+ }+ },+ "node_modules/filelist/node_modules/minimatch": {+ "version": "5.1.9",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz",+ "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "brace-expansion": "^2.0.1"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/form-data": {+ "version": "4.0.6",+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz",+ "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "asynckit": "^0.4.0",+ "combined-stream": "^1.0.8",+ "es-set-tostringtag": "^2.1.0",+ "hasown": "^2.0.4",+ "mime-types": "^2.1.35"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/fs-extra": {+ "version": "8.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",+ "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^4.0.0",+ "universalify": "^0.1.0"+ },+ "engines": {+ "node": ">=6 <7 || >=8"+ }+ },+ "node_modules/fs.realpath": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/function-bind": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",+ "dev": true,+ "license": "MIT",+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/get-caller-file": {+ "version": "2.0.5",+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": "6.* || 8.* || >= 10.*"+ }+ },+ "node_modules/get-intrinsic": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "call-bind-apply-helpers": "^1.0.2",+ "es-define-property": "^1.0.1",+ "es-errors": "^1.3.0",+ "es-object-atoms": "^1.1.1",+ "function-bind": "^1.1.2",+ "get-proto": "^1.0.1",+ "gopd": "^1.2.0",+ "has-symbols": "^1.1.0",+ "hasown": "^2.0.2",+ "math-intrinsics": "^1.1.0"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/get-proto": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "dunder-proto": "^1.0.1",+ "es-object-atoms": "^1.0.0"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/get-stream": {+ "version": "5.2.0",+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "pump": "^3.0.0"+ },+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/glob": {+ "version": "7.2.3",+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",+ "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "fs.realpath": "^1.0.0",+ "inflight": "^1.0.4",+ "inherits": "2",+ "minimatch": "^3.1.1",+ "once": "^1.3.0",+ "path-is-absolute": "^1.0.0"+ },+ "engines": {+ "node": "*"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/glob/node_modules/balanced-match": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/glob/node_modules/brace-expansion": {+ "version": "1.1.22",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.22.tgz",+ "integrity": "sha512-CKLDTuSsN0+r1ThM0WkzzBI7dnPI6xEGfa/JnVYIK9JNBA1N1NyPwXVHor//NKD/y3sDxp764sZdLhFK7pH8XQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "balanced-match": "^1.0.0",+ "concat-map": "0.0.1"+ }+ },+ "node_modules/glob/node_modules/minimatch": {+ "version": "3.1.5",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz",+ "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "brace-expansion": "^1.1.7"+ },+ "engines": {+ "node": "*"+ }+ },+ "node_modules/global-agent": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz",+ "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==",+ "dev": true,+ "license": "BSD-3-Clause",+ "optional": true,+ "dependencies": {+ "boolean": "^3.0.1",+ "es6-error": "^4.1.1",+ "matcher": "^3.0.0",+ "roarr": "^2.15.3",+ "semver": "^7.3.2",+ "serialize-error": "^7.0.1"+ },+ "engines": {+ "node": ">=10.0"+ }+ },+ "node_modules/global-agent/node_modules/semver": {+ "version": "7.8.5",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",+ "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",+ "dev": true,+ "license": "ISC",+ "optional": true,+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/globalthis": {+ "version": "1.0.4",+ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",+ "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "define-properties": "^1.2.1",+ "gopd": "^1.0.1"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/gopd": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/got": {+ "version": "11.8.6",+ "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz",+ "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@sindresorhus/is": "^4.0.0",+ "@szmarczak/http-timer": "^4.0.5",+ "@types/cacheable-request": "^6.0.1",+ "@types/responselike": "^1.0.0",+ "cacheable-lookup": "^5.0.3",+ "cacheable-request": "^7.0.2",+ "decompress-response": "^6.0.0",+ "http2-wrapper": "^1.0.0-beta.5.2",+ "lowercase-keys": "^2.0.0",+ "p-cancelable": "^2.0.0",+ "responselike": "^2.0.0"+ },+ "engines": {+ "node": ">=10.19.0"+ },+ "funding": {+ "url": "https://github.com/sindresorhus/got?sponsor=1"+ }+ },+ "node_modules/graceful-fs": {+ "version": "4.2.11",+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/has-flag": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/has-property-descriptors": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",+ "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "es-define-property": "^1.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/has-symbols": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/has-tostringtag": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "has-symbols": "^1.0.3"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/hasown": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",+ "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "function-bind": "^1.1.2"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/hosted-git-info": {+ "version": "4.1.0",+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz",+ "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "lru-cache": "^6.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/http-cache-semantics": {+ "version": "4.3.0",+ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.3.0.tgz",+ "integrity": "sha512-M5t5LlJpS1UHMjvwRQVdFHvPISGeLAxNcrWuJkeGh0KxsqCHZ1O3NXZU/8x7cD0BDcGW8kapxMKTvwlqrNkHkA==",+ "dev": true,+ "license": "BSD-2-Clause"+ },+ "node_modules/http-proxy-agent": {+ "version": "7.0.2",+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",+ "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "agent-base": "^7.1.0",+ "debug": "^4.3.4"+ },+ "engines": {+ "node": ">= 14"+ }+ },+ "node_modules/http2-wrapper": {+ "version": "1.0.3",+ "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz",+ "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "quick-lru": "^5.1.1",+ "resolve-alpn": "^1.0.0"+ },+ "engines": {+ "node": ">=10.19.0"+ }+ },+ "node_modules/https-proxy-agent": {+ "version": "7.0.6",+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",+ "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "agent-base": "^7.1.2",+ "debug": "4"+ },+ "engines": {+ "node": ">= 14"+ }+ },+ "node_modules/inflight": {+ "version": "1.0.6",+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",+ "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "once": "^1.3.0",+ "wrappy": "1"+ }+ },+ "node_modules/inherits": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/is-fullwidth-code-point": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/isarray": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/isbinaryfile": {+ "version": "5.0.7",+ "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-5.0.7.tgz",+ "integrity": "sha512-gnWD14Jh3FzS3CPhF0AxNOJ8CxqeblPTADzI38r0wt8ZyQl5edpy75myt08EG2oKvpyiqSqsx+Wkz9vtkbTqYQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 18.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/gjtorikian/"+ }+ },+ "node_modules/isexe": {+ "version": "3.1.5",+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.5.tgz",+ "integrity": "sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/jake": {+ "version": "10.9.4",+ "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz",+ "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "async": "^3.2.6",+ "filelist": "^1.0.4",+ "picocolors": "^1.1.1"+ },+ "bin": {+ "jake": "bin/cli.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/jiti": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz",+ "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "jiti": "lib/jiti-cli.mjs"+ }+ },+ "node_modules/js-yaml": {+ "version": "4.3.2",+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz",+ "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/puzrin"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/nodeca"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "argparse": "^2.0.1"+ },+ "bin": {+ "js-yaml": "bin/js-yaml.js"+ }+ },+ "node_modules/json-buffer": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/json-schema-traverse": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/json-stringify-safe": {+ "version": "5.0.1",+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",+ "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",+ "dev": true,+ "license": "ISC",+ "optional": true+ },+ "node_modules/json5": {+ "version": "2.2.3",+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "json5": "lib/cli.js"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/jsonfile": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",+ "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",+ "dev": true,+ "license": "MIT",+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"+ }+ },+ "node_modules/keyv": {+ "version": "4.5.4",+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "json-buffer": "3.0.1"+ }+ },+ "node_modules/lazy-val": {+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/lazy-val/-/lazy-val-1.0.5.tgz",+ "integrity": "sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/lodash": {+ "version": "4.18.1",+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz",+ "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/lowercase-keys": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",+ "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/lru-cache": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "yallist": "^4.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/matcher": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",+ "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "escape-string-regexp": "^4.0.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/math-intrinsics": {+ "version": "1.1.0",+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/mime": {+ "version": "2.6.0",+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz",+ "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "mime": "cli.js"+ },+ "engines": {+ "node": ">=4.0.0"+ }+ },+ "node_modules/mime-db": {+ "version": "1.52.0",+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.6"+ }+ },+ "node_modules/mime-types": {+ "version": "2.1.35",+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "mime-db": "1.52.0"+ },+ "engines": {+ "node": ">= 0.6"+ }+ },+ "node_modules/mimic-response": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",+ "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/minimatch": {+ "version": "10.2.6",+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz",+ "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "brace-expansion": "^5.0.8"+ },+ "engines": {+ "node": "18 || 20 || >=22"+ },+ "funding": {+ "url": "https://github.com/sponsors/isaacs"+ }+ },+ "node_modules/minimist": {+ "version": "1.2.8",+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",+ "dev": true,+ "license": "MIT",+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/minipass": {+ "version": "7.1.3",+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",+ "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": ">=16 || 14 >=14.17"+ }+ },+ "node_modules/minizlib": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz",+ "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "minipass": "^7.1.2"+ },+ "engines": {+ "node": ">= 18"+ }+ },+ "node_modules/mkdirp": {+ "version": "0.5.6",+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",+ "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "minimist": "^1.2.6"+ },+ "bin": {+ "mkdirp": "bin/cmd.js"+ }+ },+ "node_modules/ms": {+ "version": "2.1.3",+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/node-abi": {+ "version": "4.40.0",+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-4.40.0.tgz",+ "integrity": "sha512-GuvqvtrOk+AC27RidBxBsMzVNkwNl7PjHgc4NXbmdvSVLgIUjpaqcG1FjNRYnt2Yn9Ytq+Ln37XsBaglUcte/w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "semver": "^7.6.3"+ },+ "engines": {+ "node": ">=22.12.0"+ }+ },+ "node_modules/node-abi/node_modules/semver": {+ "version": "7.8.6",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz",+ "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/node-api-version": {+ "version": "0.2.1",+ "resolved": "https://registry.npmjs.org/node-api-version/-/node-api-version-0.2.1.tgz",+ "integrity": "sha512-2xP/IGGMmmSQpI1+O/k72jF/ykvZ89JeuKX3TLJAYPDVLUalrshrLHkeVcCCZqG/eEa635cr8IBYzgnDvM2O8Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "semver": "^7.3.5"+ }+ },+ "node_modules/node-api-version/node_modules/semver": {+ "version": "7.8.6",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz",+ "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/node-gyp": {+ "version": "12.4.0",+ "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-12.4.0.tgz",+ "integrity": "sha512-OMcPNvqTCFUnNaBlmdgq+lfNqY7gTiSmNRDjY3uAXRyudeKZEZxu3CLtjMQrx4zZxCX2b/mpNqTtwuCJgXhHkw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "env-paths": "^2.2.0",+ "exponential-backoff": "^3.1.1",+ "graceful-fs": "^4.2.6",+ "nopt": "^9.0.0",+ "proc-log": "^6.0.0",+ "semver": "^7.3.5",+ "tar": "^7.5.4",+ "tinyglobby": "^0.2.12",+ "undici": "^6.25.0",+ "which": "^6.0.0"+ },+ "bin": {+ "node-gyp": "bin/node-gyp.js"+ },+ "engines": {+ "node": "^20.17.0 || >=22.9.0"+ }+ },+ "node_modules/node-gyp/node_modules/isexe": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-4.0.0.tgz",+ "integrity": "sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": ">=20"+ }+ },+ "node_modules/node-gyp/node_modules/semver": {+ "version": "7.8.6",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz",+ "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/node-gyp/node_modules/which": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/which/-/which-6.0.1.tgz",+ "integrity": "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "isexe": "^4.0.0"+ },+ "bin": {+ "node-which": "bin/which.js"+ },+ "engines": {+ "node": "^20.17.0 || >=22.9.0"+ }+ },+ "node_modules/node-int64": {+ "version": "0.4.0",+ "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",+ "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/nopt": {+ "version": "9.0.0",+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-9.0.0.tgz",+ "integrity": "sha512-Zhq3a+yFKrYwSBluL4H9XP3m3y5uvQkB/09CwDruCiRmR/UJYnn9W4R48ry0uGC70aeTPKLynBtscP9efFFcPw==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "abbrev": "^4.0.0"+ },+ "bin": {+ "nopt": "bin/nopt.js"+ },+ "engines": {+ "node": "^20.17.0 || >=22.9.0"+ }+ },+ "node_modules/normalize-url": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",+ "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/object-keys": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",+ "dev": true,"license": "MIT",+ "optional": true,+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/once": {+ "version": "1.4.0",+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",+ "dev": true,+ "license": "ISC","dependencies": {- "@electron/get": "^2.0.0",- "@types/node": "^20.9.0",- "extract-zip": "^2.0.1"+ "wrappy": "1"+ }+ },+ "node_modules/p-cancelable": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz",+ "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/p-limit": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "yocto-queue": "^0.1.0"+ },+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/path-is-absolute": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/path-key": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/pe-library": {+ "version": "0.4.1",+ "resolved": "https://registry.npmjs.org/pe-library/-/pe-library-0.4.1.tgz",+ "integrity": "sha512-eRWB5LBz7PpDu4PUlwT0PhnQfTQJlDDdPa35urV4Osrm0t0AqQFGn+UIkU3klZvwJ8KPO3VbBFsXquA6p6kqZw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12",+ "npm": ">=6"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/jet2jet"+ }+ },+ "node_modules/pend": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",+ "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/picocolors": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/picomatch": {+ "version": "4.0.7",+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",+ "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/jonschlinkert"+ }+ },+ "node_modules/pkijs": {+ "version": "3.4.3",+ "resolved": "https://registry.npmjs.org/pkijs/-/pkijs-3.4.3.tgz",+ "integrity": "sha512-V9kOzaItwDgqlryhXysQsAXUEKi5O7kqWUaP3dXI7MLvkPqWWMb4wVb1QAtmEDCKI+XIAINsZoNKMFF7sZb1eg==",+ "dev": true,+ "license": "BSD-3-Clause",+ "workspaces": [+ "website"+ ],+ "dependencies": {+ "@noble/hashes": "1.8.0",+ "asn1js": "^3.0.6",+ "bytestreamjs": "^2.0.1",+ "pvtsutils": "^1.3.6",+ "pvutils": "^1.1.3",+ "tslib": "^2.8.1"+ },+ "engines": {+ "node": ">=16.0.0"+ }+ },+ "node_modules/plist": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz",+ "integrity": "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@xmldom/xmldom": "^0.8.8",+ "base64-js": "^1.5.1",+ "xmlbuilder": "^15.1.1"+ },+ "engines": {+ "node": ">=10.4.0"+ }+ },+ "node_modules/postject": {+ "version": "1.0.0-alpha.6",+ "resolved": "https://registry.npmjs.org/postject/-/postject-1.0.0-alpha.6.tgz",+ "integrity": "sha512-b9Eb8h2eVqNE8edvKdwqkrY6O7kAwmI8kcnBv1NScolYJbo59XUF0noFq+lxbC1yN20bmC0WBEbDC5H/7ASb0A==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "commander": "^9.4.0"},"bin": {- "electron": "cli.js"+ "postject": "dist/cli.js"},"engines": {- "node": ">= 12.20.55"+ "node": ">=14.0.0"}},- "node_modules/end-of-stream": {- "version": "1.4.5",- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",- "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",+ "node_modules/postject/node_modules/commander": {+ "version": "9.5.0",+ "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",+ "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",+ "dev": true,+ "license": "MIT",+ "optional": true,+ "peer": true,+ "engines": {+ "node": "^12.20.0 || >=14"+ }+ },+ "node_modules/proc-log": {+ "version": "6.1.0",+ "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-6.1.0.tgz",+ "integrity": "sha512-iG+GYldRf2BQ0UDUAd6JQ/RwzaQy6mXmsk/IzlYyal4A4SNFw54MeH4/tLkF4I5WoWG9SQwuqWzS99jaFQHBuQ==",+ "dev": true,+ "license": "ISC",+ "engines": {+ "node": "^20.17.0 || >=22.9.0"+ }+ },+ "node_modules/process-nextick-args": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/progress": {+ "version": "2.0.3",+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.4.0"+ }+ },+ "node_modules/promise-retry": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz",+ "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==","dev": true,"license": "MIT","dependencies": {- "once": "^1.4.0"+ "err-code": "^2.0.2",+ "retry": "^0.12.0"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/proper-lockfile": {+ "version": "4.1.2",+ "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz",+ "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.4",+ "retry": "^0.12.0",+ "signal-exit": "^3.0.2"+ }+ },+ "node_modules/pump": {+ "version": "3.0.4",+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz",+ "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "end-of-stream": "^1.1.0",+ "once": "^1.3.1"+ }+ },+ "node_modules/pvtsutils": {+ "version": "1.3.6",+ "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz",+ "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "tslib": "^2.8.1"+ }+ },+ "node_modules/pvutils": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.2.0.tgz",+ "integrity": "sha512-BbubeCEyTuQjVMakvJQ/Sxbc93F2pwmbsxONT/ZRrwU7Ua38d8unYTwXpTVLAKJ4BDuH9IGztCjQcd/N/39Dvg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=16.0.0"+ }+ },+ "node_modules/quick-lru": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",+ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/read-binary-file-arch": {+ "version": "1.0.6",+ "resolved": "https://registry.npmjs.org/read-binary-file-arch/-/read-binary-file-arch-1.0.6.tgz",+ "integrity": "sha512-BNg9EN3DD3GsDXX7Aa8O4p92sryjkmzYYgmgTAc6CA4uGLEDzFfxOxugu21akOxpcXHiEgsYkC6nPsQvLLLmEg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "debug": "^4.3.4"+ },+ "bin": {+ "read-binary-file-arch": "cli.js"+ }+ },+ "node_modules/readable-stream": {+ "version": "2.3.8",+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",+ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "core-util-is": "~1.0.0",+ "inherits": "~2.0.3",+ "isarray": "~1.0.0",+ "process-nextick-args": "~2.0.0",+ "safe-buffer": "~5.1.1",+ "string_decoder": "~1.1.1",+ "util-deprecate": "~1.0.1"+ }+ },+ "node_modules/require-directory": {+ "version": "2.1.1",+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/require-from-string": {+ "version": "2.0.2",+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/resedit": {+ "version": "1.7.2",+ "resolved": "https://registry.npmjs.org/resedit/-/resedit-1.7.2.tgz",+ "integrity": "sha512-vHjcY2MlAITJhC0eRD/Vv8Vlgmu9Sd3LX9zZvtGzU5ZImdTN3+d6e/4mnTyV8vEbyf1sgNIrWxhWlrys52OkEA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "pe-library": "^0.4.1"+ },+ "engines": {+ "node": ">=12",+ "npm": ">=6"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/jet2jet"+ }+ },+ "node_modules/resolve-alpn": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",+ "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/responselike": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz",+ "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "lowercase-keys": "^2.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/retry": {+ "version": "0.12.0",+ "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",+ "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 4"+ }+ },+ "node_modules/rimraf": {+ "version": "2.6.3",+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",+ "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",+ "deprecated": "Rimraf versions prior to v4 are no longer supported",+ "dev": true,+ "license": "ISC",+ "peer": true,+ "dependencies": {+ "glob": "^7.1.3"+ },+ "bin": {+ "rimraf": "bin.js"+ }+ },+ "node_modules/roarr": {+ "version": "2.15.4",+ "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz",+ "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==",+ "dev": true,+ "license": "BSD-3-Clause",+ "optional": true,+ "dependencies": {+ "boolean": "^3.0.1",+ "detect-node": "^2.0.4",+ "globalthis": "^1.0.1",+ "json-stringify-safe": "^5.0.1",+ "semver-compare": "^1.0.0",+ "sprintf-js": "^1.1.2"+ },+ "engines": {+ "node": ">=8.0"}},- "node_modules/env-paths": {- "version": "2.2.1",- "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",- "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",+ "node_modules/safe-buffer": {+ "version": "5.1.2",+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==","dev": true,- "license": "MIT",- "engines": {- "node": ">=6"+ "license": "MIT"+ },+ "node_modules/sanitize-filename": {+ "version": "1.6.5",+ "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.5.tgz",+ "integrity": "sha512-+dVApt46/oAFWRP0KBSnYNLRw1peY7o/b12tmpllPNFpjfwkPuZut1+DiKaD9zYx5r2SHwc+XMLSBaDiyUJw3g==",+ "dev": true,+ "license": "WTFPL OR ISC",+ "dependencies": {+ "truncate-utf8-bytes": "^1.0.0"}},- "node_modules/es-define-property": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",- "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",+ "node_modules/sax": {+ "version": "1.6.1",+ "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.1.tgz",+ "integrity": "sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q==","dev": true,- "license": "MIT",- "optional": true,+ "license": "BlueOak-1.0.0","engines": {- "node": ">= 0.4"+ "node": ">=11.0.0"}},- "node_modules/es-errors": {- "version": "1.3.0",- "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",- "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",+ "node_modules/semver": {+ "version": "6.3.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==","dev": true,- "license": "MIT",- "optional": true,- "engines": {- "node": ">= 0.4"+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"}},- "node_modules/es6-error": {- "version": "4.1.1",- "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",- "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",+ "node_modules/semver-compare": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",+ "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==","dev": true,"license": "MIT","optional": true},- "node_modules/escape-string-regexp": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",+ "node_modules/serialize-error": {+ "version": "7.0.1",+ "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz",+ "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==","dev": true,"license": "MIT","optional": true,+ "dependencies": {+ "type-fest": "^0.13.1"+ },"engines": {"node": ">=10"},@@ -368,283 +3477,337 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/extract-zip": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",- "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",+ "node_modules/shebang-command": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==","dev": true,- "license": "BSD-2-Clause",+ "license": "MIT","dependencies": {- "debug": "^4.1.1",- "get-stream": "^5.1.0",- "yauzl": "^2.10.0"- },- "bin": {- "extract-zip": "cli.js"+ "shebang-regex": "^3.0.0"},"engines": {- "node": ">= 10.17.0"- },- "optionalDependencies": {- "@types/yauzl": "^2.9.1"+ "node": ">=8"}},- "node_modules/fd-slicer": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",- "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",+ "node_modules/shebang-regex": {+ "version": "3.0.0",+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==","dev": true,"license": "MIT",- "dependencies": {- "pend": "~1.2.0"+ "engines": {+ "node": ">=8"}},- "node_modules/fs-extra": {- "version": "8.1.0",- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",- "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",+ "node_modules/signal-exit": {+ "version": "3.0.7",+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/simple-update-notifier": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",+ "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==","dev": true,"license": "MIT","dependencies": {- "graceful-fs": "^4.2.0",- "jsonfile": "^4.0.0",- "universalify": "^0.1.0"+ "semver": "^7.5.3"},"engines": {- "node": ">=6 <7 || >=8"+ "node": ">=10"}},- "node_modules/get-stream": {- "version": "5.2.0",- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",- "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",+ "node_modules/simple-update-notifier/node_modules/semver": {+ "version": "7.8.6",+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz",+ "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==","dev": true,- "license": "MIT",- "dependencies": {- "pump": "^3.0.0"+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"},"engines": {- "node": ">=8"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "node": ">=10"}},- "node_modules/global-agent": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz",- "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==",+ "node_modules/source-map": {+ "version": "0.6.1",+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==","dev": true,"license": "BSD-3-Clause",- "optional": true,- "dependencies": {- "boolean": "^3.0.1",- "es6-error": "^4.1.1",- "matcher": "^3.0.0",- "roarr": "^2.15.3",- "semver": "^7.3.2",- "serialize-error": "^7.0.1"- },"engines": {- "node": ">=10.0"+ "node": ">=0.10.0"}},- "node_modules/global-agent/node_modules/semver": {- "version": "7.8.5",- "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",- "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",+ "node_modules/source-map-support": {+ "version": "0.5.21",+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",+ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==","dev": true,- "license": "ISC",- "optional": true,- "bin": {- "semver": "bin/semver.js"- },+ "license": "MIT",+ "dependencies": {+ "buffer-from": "^1.0.0",+ "source-map": "^0.6.0"+ }+ },+ "node_modules/sprintf-js": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",+ "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==",+ "dev": true,+ "license": "BSD-3-Clause",+ "optional": true+ },+ "node_modules/stat-mode": {+ "version": "1.0.0",+ "resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-1.0.0.tgz",+ "integrity": "sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg==",+ "dev": true,+ "license": "MIT","engines": {- "node": ">=10"+ "node": ">= 6"}},- "node_modules/globalthis": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",- "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",+ "node_modules/string_decoder": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==","dev": true,"license": "MIT",- "optional": true,"dependencies": {- "define-properties": "^1.2.1",- "gopd": "^1.0.1"- },- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"+ "safe-buffer": "~5.1.0"}},- "node_modules/gopd": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",- "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",+ "node_modules/string-width": {+ "version": "4.2.3",+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==","dev": true,"license": "MIT",- "optional": true,- "engines": {- "node": ">= 0.4"+ "dependencies": {+ "emoji-regex": "^8.0.0",+ "is-fullwidth-code-point": "^3.0.0",+ "strip-ansi": "^6.0.1"},- "funding": {- "url": "https://github.com/sponsors/ljharb"+ "engines": {+ "node": ">=8"}},- "node_modules/got": {- "version": "11.8.6",- "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz",- "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==",+ "node_modules/strip-ansi": {+ "version": "6.0.1",+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==","dev": true,"license": "MIT","dependencies": {- "@sindresorhus/is": "^4.0.0",- "@szmarczak/http-timer": "^4.0.5",- "@types/cacheable-request": "^6.0.1",- "@types/responselike": "^1.0.0",- "cacheable-lookup": "^5.0.3",- "cacheable-request": "^7.0.2",- "decompress-response": "^6.0.0",- "http2-wrapper": "^1.0.0-beta.5.2",- "lowercase-keys": "^2.0.0",- "p-cancelable": "^2.0.0",- "responselike": "^2.0.0"+ "ansi-regex": "^5.0.1"},"engines": {- "node": ">=10.19.0"- },- "funding": {- "url": "https://github.com/sindresorhus/got?sponsor=1"+ "node": ">=8"}},- "node_modules/graceful-fs": {- "version": "4.2.11",- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",- "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",+ "node_modules/sumchecker": {+ "version": "3.0.1",+ "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",+ "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==","dev": true,- "license": "ISC"+ "license": "Apache-2.0",+ "dependencies": {+ "debug": "^4.1.0"+ },+ "engines": {+ "node": ">= 8.0"+ }},- "node_modules/has-property-descriptors": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",- "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",+ "node_modules/supports-color": {+ "version": "7.2.0",+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==","dev": true,"license": "MIT",- "optional": true,"dependencies": {- "es-define-property": "^1.0.0"+ "has-flag": "^4.0.0"},- "funding": {- "url": "https://github.com/sponsors/ljharb"+ "engines": {+ "node": ">=8"}},- "node_modules/http-cache-semantics": {- "version": "4.3.0",- "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.3.0.tgz",- "integrity": "sha512-M5t5LlJpS1UHMjvwRQVdFHvPISGeLAxNcrWuJkeGh0KxsqCHZ1O3NXZU/8x7cD0BDcGW8kapxMKTvwlqrNkHkA==",+ "node_modules/tar": {+ "version": "7.5.23",+ "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.23.tgz",+ "integrity": "sha512-lkukzdoGngZHJZXxW4S/E4Fp9ghTDlyZXrQGRNoJ/LXvDKcXUTq2sg5yQe74po7Voea6n/IN09+wE/QvJMiifA==","dev": true,- "license": "BSD-2-Clause"+ "license": "BlueOak-1.0.0",+ "dependencies": {+ "@isaacs/fs-minipass": "^4.0.0",+ "chownr": "^3.0.0",+ "minipass": "^7.1.2",+ "minizlib": "^3.1.0",+ "yallist": "^5.0.0"+ },+ "engines": {+ "node": ">=18"+ }},- "node_modules/http2-wrapper": {- "version": "1.0.3",- "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz",- "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==",+ "node_modules/tar/node_modules/yallist": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",+ "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==",+ "dev": true,+ "license": "BlueOak-1.0.0",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/temp": {+ "version": "0.9.4",+ "resolved": "https://registry.npmjs.org/temp/-/temp-0.9.4.tgz",+ "integrity": "sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==","dev": true,"license": "MIT",+ "peer": true,"dependencies": {- "quick-lru": "^5.1.1",- "resolve-alpn": "^1.0.0"+ "mkdirp": "^0.5.1",+ "rimraf": "~2.6.2"},"engines": {- "node": ">=10.19.0"+ "node": ">=6.0.0"}},- "node_modules/json-buffer": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",- "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",+ "node_modules/temp-file": {+ "version": "3.4.0",+ "resolved": "https://registry.npmjs.org/temp-file/-/temp-file-3.4.0.tgz",+ "integrity": "sha512-C5tjlC/HCtVUOi3KWVokd4vHVViOmGjtLwIh4MuzPo/nMYTV/p1urt3RnMz2IWXDdKEGJH3k5+KPxtqRsUYGtg==","dev": true,- "license": "MIT"+ "license": "MIT",+ "dependencies": {+ "async-exit-hook": "^2.0.1",+ "fs-extra": "^10.0.0"+ }},- "node_modules/json-stringify-safe": {- "version": "5.0.1",- "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",- "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",+ "node_modules/temp-file/node_modules/fs-extra": {+ "version": "10.1.0",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==","dev": true,- "license": "ISC",- "optional": true+ "license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },+ "engines": {+ "node": ">=12"+ }},- "node_modules/jsonfile": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",- "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",+ "node_modules/temp-file/node_modules/jsonfile": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==","dev": true,"license": "MIT",+ "dependencies": {+ "universalify": "^2.0.0"+ },"optionalDependencies": {"graceful-fs": "^4.1.6"}},- "node_modules/keyv": {- "version": "4.5.4",- "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",- "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",+ "node_modules/temp-file/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==","dev": true,"license": "MIT",- "dependencies": {- "json-buffer": "3.0.1"+ "engines": {+ "node": ">= 10.0.0"}},- "node_modules/lowercase-keys": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",- "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==",+ "node_modules/tiny-async-pool": {+ "version": "1.3.0",+ "resolved": "https://registry.npmjs.org/tiny-async-pool/-/tiny-async-pool-1.3.0.tgz",+ "integrity": "sha512-01EAw5EDrcVrdgyCLgoSPvqznC0sVxDSVeiOz09FUpjh71G79VCqneOr+xvt7T1r76CF6ZZfPjHorN2+d+3mqA==","dev": true,"license": "MIT",- "engines": {- "node": ">=8"+ "dependencies": {+ "semver": "^5.5.0"}},- "node_modules/matcher": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",- "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==",+ "node_modules/tiny-async-pool/node_modules/semver": {+ "version": "5.7.3",+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.3.tgz",+ "integrity": "sha512-kM18BPOqTi0+TB68703/GJRpAML5Me+IDQsR1J26YB3EFKKNEyHIVZuWDX7+WKQB3tHwDwgk24BfhdpWUbytvQ==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver"+ }+ },+ "node_modules/tinyglobby": {+ "version": "0.2.17",+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",+ "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==","dev": true,"license": "MIT",- "optional": true,"dependencies": {- "escape-string-regexp": "^4.0.0"+ "fdir": "^6.5.0",+ "picomatch": "^4.0.4"},"engines": {- "node": ">=10"+ "node": ">=12.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/SuperchupuDev"}},- "node_modules/mimic-response": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",- "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==",+ "node_modules/tmp": {+ "version": "0.2.7",+ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.7.tgz",+ "integrity": "sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw==","dev": true,"license": "MIT","engines": {- "node": ">=4"+ "node": ">=14.14"}},- "node_modules/ms": {- "version": "2.1.3",- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",+ "node_modules/tmp-promise": {+ "version": "3.0.3",+ "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.3.tgz",+ "integrity": "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==","dev": true,- "license": "MIT"+ "license": "MIT",+ "dependencies": {+ "tmp": "^0.2.0"+ }},- "node_modules/normalize-url": {- "version": "6.1.0",- "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",- "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",+ "node_modules/truncate-utf8-bytes": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",+ "integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==","dev": true,- "license": "MIT",+ "license": "WTFPL",+ "dependencies": {+ "utf8-byte-length": "^1.0.1"+ }+ },+ "node_modules/tslib": {+ "version": "2.9.1",+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz",+ "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==",+ "dev": true,+ "license": "0BSD"+ },+ "node_modules/type-fest": {+ "version": "0.13.1",+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",+ "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",+ "dev": true,+ "license": "(MIT OR CC0-1.0)",+ "optional": true,"engines": {"node": ">=10"},@@ -652,210 +3815,209 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/object-keys": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",- "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",+ "node_modules/undici": {+ "version": "6.29.1",+ "resolved": "https://registry.npmjs.org/undici/-/undici-6.29.1.tgz",+ "integrity": "sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==","dev": true,"license": "MIT",- "optional": true,"engines": {- "node": ">= 0.4"+ "node": ">=18.17"}},- "node_modules/once": {- "version": "1.4.0",- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",+ "node_modules/undici-types": {+ "version": "6.21.0",+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==","dev": true,- "license": "ISC",- "dependencies": {- "wrappy": "1"- }+ "license": "MIT"},- "node_modules/p-cancelable": {- "version": "2.1.1",- "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz",- "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==",+ "node_modules/universalify": {+ "version": "0.1.2",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",+ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==","dev": true,"license": "MIT","engines": {- "node": ">=8"+ "node": ">= 4.0.0"}},- "node_modules/pend": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",- "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",+ "node_modules/unzipper": {+ "version": "0.12.5",+ "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.12.5.tgz",+ "integrity": "sha512-tXYOi9R57Uj/2Z25SOs5RRSzq886MBQj2gY8dPL+xl/kv6s6SvByoKfAtvfVeEuhntWDgjd2o9p2lb4TVPAz0A==","dev": true,- "license": "MIT"+ "license": "MIT",+ "dependencies": {+ "bluebird": "~3.7.2",+ "duplexer2": "~0.1.4",+ "fs-extra": "11.3.1",+ "graceful-fs": "^4.2.2",+ "node-int64": "^0.4.0"+ }},- "node_modules/progress": {- "version": "2.0.3",- "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",- "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",+ "node_modules/unzipper/node_modules/fs-extra": {+ "version": "11.3.1",+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.1.tgz",+ "integrity": "sha512-eXvGGwZ5CL17ZSwHWd3bbgk7UUpF6IFHtP57NYYakPvHOs8GDgDe5KJI36jIJzDkJ6eJjuzRA8eBQb6SkKue0g==","dev": true,"license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.0",+ "jsonfile": "^6.0.1",+ "universalify": "^2.0.0"+ },"engines": {- "node": ">=0.4.0"+ "node": ">=14.14"}},- "node_modules/pump": {- "version": "3.0.4",- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz",- "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==",+ "node_modules/unzipper/node_modules/jsonfile": {+ "version": "6.2.1",+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==","dev": true,"license": "MIT","dependencies": {- "end-of-stream": "^1.1.0",- "once": "^1.3.1"+ "universalify": "^2.0.0"+ },+ "optionalDependencies": {+ "graceful-fs": "^4.1.6"}},- "node_modules/quick-lru": {- "version": "5.1.1",- "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",- "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",+ "node_modules/unzipper/node_modules/universalify": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==","dev": true,"license": "MIT","engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "node": ">= 10.0.0"}},- "node_modules/resolve-alpn": {- "version": "1.2.1",- "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",- "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",+ "node_modules/utf8-byte-length": {+ "version": "1.0.5",+ "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz",+ "integrity": "sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==",+ "dev": true,+ "license": "(WTFPL OR MIT)"+ },+ "node_modules/util-deprecate": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==","dev": true,"license": "MIT"},- "node_modules/responselike": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz",- "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==",+ "node_modules/webcrypto-core": {+ "version": "1.9.2",+ "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.9.2.tgz",+ "integrity": "sha512-gsXecm82UQNlTBURJGuqOWy1Ww08S3kZUcr3aOJS02Pk0xLtkfeUAVC0u0xhgdonFme80edSJUIJyuvL/7250Q==","dev": true,"license": "MIT","dependencies": {- "lowercase-keys": "^2.0.0"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "@peculiar/asn1-schema": "^2.7.0",+ "@peculiar/json-schema": "^1.1.12",+ "@peculiar/utils": "^2.0.2",+ "asn1js": "^3.0.10",+ "tslib": "^2.8.1"}},- "node_modules/roarr": {- "version": "2.15.4",- "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz",- "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==",+ "node_modules/which": {+ "version": "5.0.0",+ "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz",+ "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==","dev": true,- "license": "BSD-3-Clause",- "optional": true,+ "license": "ISC","dependencies": {- "boolean": "^3.0.1",- "detect-node": "^2.0.4",- "globalthis": "^1.0.1",- "json-stringify-safe": "^5.0.1",- "semver-compare": "^1.0.0",- "sprintf-js": "^1.1.2"+ "isexe": "^3.1.1"},- "engines": {- "node": ">=8.0"- }- },- "node_modules/semver": {- "version": "6.3.1",- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",- "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",- "dev": true,- "license": "ISC","bin": {- "semver": "bin/semver.js"+ "node-which": "bin/which.js"+ },+ "engines": {+ "node": "^18.17.0 || >=20.5.0"}},- "node_modules/semver-compare": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",- "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==",- "dev": true,- "license": "MIT",- "optional": true- },- "node_modules/serialize-error": {- "version": "7.0.1",- "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz",- "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==",+ "node_modules/wrap-ansi": {+ "version": "7.0.0",+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==","dev": true,"license": "MIT",- "optional": true,"dependencies": {- "type-fest": "^0.13.1"+ "ansi-styles": "^4.0.0",+ "string-width": "^4.1.0",+ "strip-ansi": "^6.0.0"},"engines": {"node": ">=10"},"funding": {- "url": "https://github.com/sponsors/sindresorhus"+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"}},- "node_modules/sprintf-js": {- "version": "1.1.3",- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",- "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==",+ "node_modules/wrappy": {+ "version": "1.0.2",+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==","dev": true,- "license": "BSD-3-Clause",- "optional": true+ "license": "ISC"},- "node_modules/sumchecker": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz",- "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==",+ "node_modules/xmlbuilder": {+ "version": "15.1.1",+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",+ "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==","dev": true,- "license": "Apache-2.0",- "dependencies": {- "debug": "^4.1.0"- },+ "license": "MIT","engines": {- "node": ">= 8.0"+ "node": ">=8.0"}},- "node_modules/type-fest": {- "version": "0.13.1",- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",- "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",+ "node_modules/y18n": {+ "version": "5.0.8",+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==","dev": true,- "license": "(MIT OR CC0-1.0)",- "optional": true,+ "license": "ISC","engines": {"node": ">=10"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/undici-types": {- "version": "6.21.0",- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",- "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",+ "node_modules/yallist": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==","dev": true,- "license": "MIT"+ "license": "ISC"},- "node_modules/universalify": {- "version": "0.1.2",- "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",- "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",+ "node_modules/yargs": {+ "version": "17.7.3",+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz",+ "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==","dev": true,"license": "MIT",+ "dependencies": {+ "cliui": "^8.0.1",+ "escalade": "^3.1.1",+ "get-caller-file": "^2.0.5",+ "require-directory": "^2.1.1",+ "string-width": "^4.2.3",+ "y18n": "^5.0.5",+ "yargs-parser": "^21.1.1"+ },"engines": {- "node": ">= 4.0.0"+ "node": ">=12"}},- "node_modules/wrappy": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",+ "node_modules/yargs-parser": {+ "version": "21.1.1",+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==","dev": true,- "license": "ISC"+ "license": "ISC",+ "engines": {+ "node": ">=12"+ }},"node_modules/yauzl": {"version": "2.10.0",@@ -867,6 +4029,19 @@"buffer-crc32": "~0.2.3","fd-slicer": "~1.1.0"}+ },+ "node_modules/yocto-queue": {+ "version": "0.1.0",+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }}}}diff --git a/package.json b/package.jsonindex ea60dc3..b9b93d0 100644--- a/package.json+++ b/package.json@@ -1,7 +1,7 @@{"name": "apkstart","productName": "ApkStart",- "version": "0.2.2",+ "version": "0.2.4","description": "极致轻量的 Windows 安卓应用运行器:双击 APK 即装,应用以独立窗口与桌面图标运行","main": "src/main.js","author": "RoutineMiku",@@ -34,14 +34,17 @@"scripts": {"start": "electron .","dev": "electron . --dev",- "test": "node test/run-tests.js && node test/engine-test.js",+ "test": "node test/run-tests.js && node test/engine-test.js && node test/auto-test.js","pack": "node build/pack.js",+ "runtime": "node build/prepare-runtime.js",+ "build:exe": "node build/prepare-runtime.js && electron-builder --win nsis","selftest": "node scripts/selftest.js","assoc:on": "node scripts/assoc.js on","assoc:off": "node scripts/assoc.js off","test:boot": "node test/boot-test.js"},"devDependencies": {- "electron": "^33.4.11"+ "electron": "^33.4.11",+ "electron-builder": "^26.18.0"}}diff --git a/scripts/selftest.js b/scripts/selftest.jsindex f004f56..df89d92 100644--- a/scripts/selftest.js+++ b/scripts/selftest.js@@ -23,7 +23,8 @@ const argOf = (name) => {return i >= 0 ? argv[i + 1] : '';};const APK = argOf('--apk');-const SERIAL = argOf('--serial') || store.getSettings().device || '127.0.0.1:5555';+// 留空 = 走产品路径自动拉起内置运行时并用动态 serial;指定时才连接外部设备+const SERIAL = argOf('--serial') || '';const results = [];function record(name, ok, detail = '') {@@ -60,23 +61,29 @@ async function step(name, fn) {if (!env.adb.ok) throw new Error('未安装 adb,请先运行「一键部署」');return `v${env.adb.version}`;});- await step('QEMU 可用', async () => {- if (!env || !env.qemu.ok) throw new Error('未安装 QEMU');- return `v${env.qemu.version}`;+ await step('Android Emulator 就绪', async () => {+ if (!env.emulator.ok) throw new Error('未安装运行时引擎,请先运行「一键部署」');+ return `v${env.emulator.version}`;});await step('系统镜像完整', async () => {- if (!env.iso.ok) throw new Error(env.iso.reason || '镜像缺失');- return `${(env.iso.size / 1073741824).toFixed(2)}GB${env.iso.iso9660 ? ' · ISO9660' : ''}`;+ if (!env.sysimg.ok) throw new Error(env.sysimg.note || '镜像缺失');+ return `Android ${env.sysimg.api} · ${(env.sysimg.size / 1073741824).toFixed(2)}GB`;});- record('硬件加速', env.hypervisor.whpx ? true : null,- env.hypervisor.whpx ? 'WHPX 已启用' : '纯软件模拟(能跑,但明显慢)');+ record('硬件加速', env.accel.ok ? true : null,+ env.accel.ok ? env.accel.note : '自动回退软件模拟(能跑,但明显慢)');console.log('\n[设备]');- const client = runtime.client(SERIAL);- const online = await step('adb 已连接', async () => {- await client.connect().catch(() => false);- if (!await client.isOnline()) throw new Error('设备不在线:先启动运行时');- return SERIAL;+ let client = runtime.client(SERIAL || undefined);+ const online = await step('运行时已就绪', async () => {+ if (SERIAL) {+ await client.connect().catch(() => false);+ if (!await client.isOnline()) throw new Error(`外部设备不在线:${SERIAL}`);+ return SERIAL;+ }+ const r = await runtime.ensure({ onLog: () => {} });+ if (!r.ok) throw new Error(r.error || '运行时不可用');+ client = r.client;+ return client.serial;});if (!online) {@@ -164,6 +171,12 @@ async function step(name, fn) {}}+ // 自检自己拉起的运行时要主动停掉:否则 emulator 子进程的 stdio 管道+ // 会让 Node 事件循环一直不退出,命令看起来「卡住」+ if (!SERIAL && runtime.emulator.running()) {+ await runtime.stop({}).catch(() => {});+ }+const failed = results.filter((r) => r.ok === false);console.log('\n' + '─'.repeat(64));console.log(`结果:${results.filter((r) => r.ok === true).length} 通过,${failed.length} 失败,`@@ -174,6 +187,7 @@ async function step(name, fn) {process.exit(1);}console.log('全部检查通过 ✅\n');+ process.exit(0);})().catch((e) => {console.error('\n自检异常终止:', e.message);process.exit(1);diff --git a/src/core/adb.js b/src/core/adb.jsindex c2cdab6..1c4b990 100644--- a/src/core/adb.js+++ b/src/core/adb.js@@ -5,7 +5,9 @@*/const { execFile } = require('child_process');const fs = require('fs');+const os = require('os');const path = require('path');+const crypto = require('crypto');const COMMON_ADB_PATHS = [path.join(process.env.LOCALAPPDATA || '', 'Android', 'Sdk', 'platform-tools', 'adb.exe'),@@ -26,8 +28,7 @@ function friendlyInstallError(raw) {const table = {INSTALL_FAILED_NO_MATCHING_ABIS:'安装失败:这个应用只提供 ARM 原生库(多数国产应用如此),'- + '而当前运行时是 x86_64 架构且未启用 ARM 转译,系统拒绝安装。'- + '可在「运行时」设置里切换到内置 ARM 翻译的 Google Play 兼容镜像后重试。',+ + '当前系统镜像没有 ARM 转译层。ApkStart 会自动切换到内置新版翻译层的兼容镜像并重试。',INSTALL_FAILED_OLDER_SDK:'安装失败:应用要求的 Android 版本高于当前运行时(需更高系统镜像)。',INSTALL_PARSE_FAILED_NO_CERTIFICATES:@@ -43,11 +44,61 @@ function friendlyInstallError(raw) {INSTALL_FAILED_INVALID_URI: '安装失败:APK 路径含特殊字符,请把文件移到纯英文路径后重试。',INSTALL_FAILED_ALREADY_EXISTS: '安装失败:已存在同名应用且签名不同,请先卸载。',INSTALL_FAILED_UPDATE_INCOMPATIBLE: '安装失败:与已安装版本签名不一致,请先卸载旧版。',+ INSTALL_FAILED_DEPRECATED_SDK_VERSION:+ '安装失败:这是面向很老 Android 版本的应用(targetSdk 过低),Android 14 默认禁止安装。'+ + 'ApkStart 会自动用官方绕过参数重试。',+ INSTALL_FAILED_TEST_ONLY: '安装失败:这是仅供测试的应用包,已自动加上测试包参数重试。',+ INSTALL_FAILED_MISSING_SHARED_LIBRARY: '安装失败:应用依赖的设备特性(如特定厂商库)在当前运行时不存在。',+ INSTALL_FAILED_USER_RESTRICTION: '安装失败:系统限制了安装,请重启运行时后重试。',+ INSTALL_FAILED_CONFLICTING_PROVIDER: '安装失败:与已有应用的 ContentProvider 冲突,请卸载冲突应用。',+ INSTALL_FAILED_INTERNAL_ERROR: '安装失败:系统内部错误(常见于存储空间不足或开机未完成),请重启运行时后重试。',};const msg = table[tag];return msg ? `${msg}(${tag})` : `安装失败:${raw}`;}+/** 把启动后的崩溃日志翻译成能看懂的原因 */+function friendlyLaunchError(raw, pkg) {+ const t = String(raw || '');+ if (/DoBadTrampoline|libndk_translation|houdini|SIGABRT.*arm/i.test(t)) {+ return `${pkg || '应用'} 启动后崩溃:ARM 翻译层与该应用的信号处理不兼容。`+ + 'ApkStart 会自动切换到 Android 14 兼容镜像后重试。';+ }+ if (/UnsatisfiedLinkError|dlopen failed|couldn't find "lib|\.so.*not found/i.test(t)) {+ return `${pkg || '应用'} 启动后崩溃:缺少设备原生库(应用可能只提供 ARM 版本)。`+ + '会自动切换到带 ARM 翻译层的兼容镜像后重试。';+ }+ if (/ClassNotFoundException|NoClassDefFoundError|AndroidRuntime/i.test(t)) {+ return `${pkg || '应用'} 启动即崩溃(应用内部异常,可能与模拟器环境或缺少 Google 服务有关)。`;+ }+ if (/java\.lang\.SecurityException|Permission Denial/i.test(t)) {+ return `${pkg || '应用'} 启动失败:系统拒绝了启动请求(权限或签名问题)。`;+ }+ return `${pkg || '应用'} 未能启动${t ? `:${t.slice(0, 240)}` : '(进程未存活)'}`;+}++const sleep = (ms) => new Promise((r) => setTimeout(r, ms));++/**+ * Windows 版 adb 对非 ASCII 路径处理不稳定(中文用户名/中文下载目录很常见)。+ * 安装前把 APK 复制到纯 ASCII 的临时目录,装完即删。+ */+function stageApk(apkPath) {+ const p = String(apkPath || '');+ if (/^[\x20-\x7e]*$/.test(p) && p.length < 200) return { path: p, staged: false };+ const dir = path.join(os.tmpdir(), 'apkstart-install');+ fs.mkdirSync(dir, { recursive: true });+ const name = `${crypto.createHash('sha1').update(p).digest('hex').slice(0, 12)}.apk`;+ const target = path.join(dir, name);+ fs.copyFileSync(p, target);+ return { path: target, staged: true };+}++function unstage(staged) {+ if (!staged) return;+ try { fs.rmSync(staged, { force: true }); } catch (_) { /* ignore */ }+}+class AdbError extends Error {constructor(message, stderr, code) {super(message);@@ -113,10 +164,13 @@ class AdbClient {env: { ...process.env, ANDROID_ADB_SERVER_PORT: process.env.ANDROID_ADB_SERVER_PORT || '5044' },}, (err, stdout, stderr) => {if (err) {- return reject(new AdbError(- `adb ${finalArgs.join(' ')} 失败: ${String(stderr || err.message).trim()}`,- stderr, err.code,- ));+ // adb install 的失败原因写在 stdout 且退出码非 0;+ // 旧版只看 stderr,导致用户永远只看到一句空泛的「失败」。+ const text = [stdout, stderr, err.message].filter(Boolean).join('\n').trim();+ const e = new AdbError(`adb ${finalArgs.join(' ')} 失败: ${text}`, stderr, err.code);+ e.stdout = stdout;+ e.raw = text;+ return reject(e);}resolve({ stdout, stderr });});@@ -169,13 +223,99 @@ class AdbClient {.filter((d) => d.state === 'device');}+ /**+ * 安装单个 APK,带自动降级:+ * - 默认去掉 -g(自动授予全部权限在部分镜像上会让 PermissionController 崩掉);+ * - 带 --bypass-low-target-sdk-block,解决 Android 14 拒绝安装老 targetSdk 应用;+ * - adb 版本不认该参数 / 中文路径 / 传输错误时自动换写法重试;+ * - NO_MATCHING_ABIS 抛带 code 的错误,交给上层自动切换兼容镜像。+ */async install(apkPath) {if (!fs.existsSync(apkPath)) throw new Error(`APK 不存在: ${apkPath}`);- const { stdout } = await this.exec(['install', '-r', '-g', '-t', apkPath], { timeout: 180000 });- if (/Failure|Error/i.test(stdout) && !/Success/i.test(stdout)) {- throw new Error(friendlyInstallError(stdout.trim()));+ const staged = stageApk(apkPath);+ const file = staged.path;+ const variants = [+ // -g 自动授予运行时权限,省掉应用里的授权弹窗;部分镜像不支持则自动降级去掉+ ['install', '-r', '-t', '-g', '--bypass-low-target-sdk-block', file],+ ['install', '-r', '-t', '--bypass-low-target-sdk-block', file],+ ['install', '-r', '-t', file],+ ['install', '-r', file],+ ];+ let last = '';+ try {+ for (const args of variants) {+ try {+ // eslint-disable-next-line no-await-in-loop+ const { stdout } = await this.exec(args, { timeout: 240000 });+ if (/Failure|Error/i.test(stdout) && !/Success/i.test(stdout)) {+ throw new Error(String(stdout).trim());+ }+ return stdout.trim();+ } catch (e) {+ const raw = String(e.raw || e.stdout || e.message || '');+ last = raw;+ const tag = (/INSTALL_[A-Z_]+/.exec(raw) || [])[0] || '';++ if (tag === 'INSTALL_FAILED_NO_MATCHING_ABIS') {+ const err = new Error(friendlyInstallError(raw));+ err.code = 'NO_MATCHING_ABIS';+ err.raw = raw;+ throw err;+ }+ // 老 adb 不认新参数 / 测试包标记 → 换一种写法+ if (/Unknown option|unrecognized option|Unknown command/i.test(raw)) continue;+ if (tag === 'INSTALL_FAILED_TEST_ONLY' || tag === 'INSTALL_FAILED_DEPRECATED_SDK_VERSION') continue;+ // 传输类错误(设备掉线、adb server 重启)重试一次+ if (/device (not found|offline)|closed|protocol fault|no devices/i.test(raw)) {+ // eslint-disable-next-line no-await-in-loop+ await sleep(1500);+ continue;+ }+ if (tag) {+ const err = new Error(friendlyInstallError(raw));+ err.code = tag;+ err.raw = raw;+ throw err;+ }+ // 没拿到明确错误码:最后一种写法再试+ }+ }+ const err = new Error(friendlyInstallError(last || '安装失败,未获得明确原因'));+ err.code = (/INSTALL_[A-Z_]+/.exec(last) || [])[0] || 'INSTALL_UNKNOWN';+ err.raw = last;+ throw err;+ } finally {+ unstage(staged.staged ? file : null);+ }+ }++ /** 拆分 APK(.apks / .xapk 解出来的多个分片)走 install-multiple */+ async installMultiple(apkPaths) {+ if (!apkPaths || !apkPaths.length) throw new Error('没有可安装的分片 APK');+ const staged = apkPaths.map((p) => stageApk(p));+ const files = staged.map((s) => s.path);+ try {+ for (const extra of [['-r', '-t', '--bypass-low-target-sdk-block'], ['-r', '-t']]) {+ try {+ // eslint-disable-next-line no-await-in-loop+ const { stdout } = await this.exec(['install-multiple', ...extra, ...files], { timeout: 300000 });+ if (/Failure|Error/i.test(stdout) && !/Success/i.test(stdout)) throw new Error(stdout);+ return stdout.trim();+ } catch (e) {+ const raw = String(e.raw || e.stdout || e.message || '');+ if (/Unknown option|unrecognized option/i.test(raw)) continue;+ if (/INSTALL_FAILED_NO_MATCHING_ABIS/.test(raw)) {+ const err = new Error(friendlyInstallError(raw));+ err.code = 'NO_MATCHING_ABIS';+ throw err;+ }+ throw new Error(friendlyInstallError(raw));+ }+ }+ throw new Error('拆分 APK 安装失败');+ } finally {+ staged.forEach((s) => unstage(s.staged ? s.path : null));}- return stdout.trim();}async uninstall(pkg) {@@ -197,21 +337,105 @@ class AdbClient {return out.split('\n').map((l) => l.replace('package:', '').trim()).filter(Boolean);}- /** 启动应用;freeform=true 时以独立窗口模式启动 */+ /** 从系统解析真正的启动 Activity(清单里解析不出来时的兜底) */+ async resolveLauncher(pkg) {+ try {+ const out = await this.shell(+ `cmd package resolve-activity --brief ${pkg}`, { timeout: 10000 },+ );+ const m = /([\w.]+\/[.\w$]+)/.exec(String(out).split('\n').pop() || out);+ if (m && m[1].startsWith(`${pkg}/`)) return m[1];+ } catch (_) { /* 落到 monkey */ }+ return null;+ }++ /** 应用是否真的活着:am start 返回成功 ≠ 进程没崩 */+ async waitAppAlive(pkg, timeoutMs = 12000) {+ const start = Date.now();+ while (Date.now() - start < timeoutMs) {+ // eslint-disable-next-line no-await-in-loop+ const pid = await this.shell(`pidof ${pkg}`, { timeout: 6000 }).catch(() => '');+ if (String(pid).trim()) return { ok: true };+ // eslint-disable-next-line no-await-in-loop+ await sleep(1000);+ }+ let crash = '';+ try {+ crash = await this.shell(+ `logcat -d -t 250 -v brief AndroidRuntime:E DEBUG:E libc:E 2>/dev/null | `+ + `grep -i -E '${pkg}|FATAL|ndk_translation|SIGABRT|SIGSEGV|UnsatisfiedLink' | tail -n 30`,+ { timeout: 12000 },+ );+ } catch (_) { /* ignore */ }+ const text = String(crash || '').trim();+ // 没有崩溃日志时不能断言失败:部分大型应用首次启动要 20-40 秒+ return { ok: false, crash: text, uncertain: !text };+ }++ /**+ * 启动应用,带三级降级:+ * freeform 独立窗口 → 普通全屏 → monkey 兜底;+ * 每次都验证进程是否存活,崩溃时抓 logcat 并抛带 code 的错误供上层自动切镜像。+ */async startApp(pkg, activity, { freeform = true, bounds = null, forceStop = false } = {}) {if (forceStop) await this.forceStop(pkg);- const parts = ['am', 'start'];- if (freeform) parts.push('--windowingMode', '5');- parts.push('--activity-clear-top');- if (activity) parts.push('-n', `${pkg}/${activity}`);- else parts.push('-a', 'android.intent.action.MAIN', '-c', 'android.intent.category.LAUNCHER', '-p', pkg);- const out = await this.shell(parts.join(' '));- if (/Error|Exception/i.test(out)) throw new Error(out);- if (bounds) {- // 尽力而为:把新任务挪到上次的位置- this.resizeTaskOfPackage(pkg, bounds).catch(() => {});+ // 必须用系统解析出来的 LAUNCHER 入口,不能只用 APK 里解析到的主 Activity:+ // 很多应用(红果短剧等)的启动页才做真正的初始化,直接进主 Activity 会+ // 抛 "had you called RpcService.init",表现为点开闪一下就没了。+ const resolved = (await this.resolveLauncher(pkg).catch(() => '')) || activity;+ const intent = resolved+ ? ['-n', `${pkg}/${resolved}`]+ : ['-a', 'android.intent.action.MAIN', '-c', 'android.intent.category.LAUNCHER', '-p', pkg];+ const modes = freeform+ ? [['--windowingMode', '5'], []]+ : [[]];+ let lastError = '';++ for (const mode of modes) {+ const parts = ['am', 'start', ...mode, '--activity-clear-top', ...intent];+ let out = '';+ try {+ // eslint-disable-next-line no-await-in-loop+ out = await this.shell(parts.join(' '), { timeout: 20000 });+ } catch (e) {+ lastError = String(e.message || e);+ continue;+ }+ if (/Error|Exception/i.test(out)) { lastError = out; continue; }++ if (bounds) this.resizeTaskOfPackage(pkg, bounds).catch(() => {});+ // eslint-disable-next-line no-await-in-loop+ const alive = await this.waitAppAlive(pkg, 6000);+ if (alive.ok) return out;+ if (alive.uncertain) return `${out}\n(应用仍在加载中)`;+ lastError = alive.crash || lastError;+ // 崩溃日志明确指向 ARM 翻译层时不再重试,直接交给上层切换兼容镜像+ if (/DoBadTrampoline|libndk_translation|UnsatisfiedLinkError|dlopen failed/i.test(alive.crash || '')) {+ const err = new Error(friendlyLaunchError(alive.crash, pkg));+ err.code = 'APP_CRASHED';+ err.crash = alive.crash;+ throw err;+ }}- return out;++ // monkey 兜底:部分镜像的 am start -a/-c/-p 解析不到 launcher+ try {+ const out = await this.shell(+ `monkey -p ${pkg} -c android.intent.category.LAUNCHER 1`, { timeout: 20000 },+ );+ const alive = await this.waitAppAlive(pkg, 12000);+ if (alive.ok || alive.uncertain) return out;+ lastError = alive.crash || lastError;+ } catch (e) {+ // 有明确崩溃信息时优先用它,否则保留原始启动错误+ if (!lastError) lastError = String(e.message || e);+ }++ if (!lastError) return 'started';+ const err = new Error(friendlyLaunchError(lastError, pkg));+ err.code = 'APP_CRASHED';+ err.crash = lastError;+ throw err;}async forceStop(pkg) {@@ -296,9 +520,22 @@ class AdbClient {async listRemote(remote) {const out = await this.shell(`ls -l "${remote}" 2>/dev/null`);- return out.split('\n').map((l) => {- const m = /^([\-dl])\S+\s+\d+\s+\S+\s+\S+\s+(\d+)\s+(\S+\s+\d+\s+[\d:]+)\s+(.+)$/.exec(l.trim());- return m ? { isDir: m[1] === 'd', size: Number(m[2]), name: m[4] } : null;+ return String(out).split('\n').map((line) => {+ const l = line.trim();+ if (!l || l.startsWith('total ')) return null;+ // Android 的 ls -l 有「含 group」和「不含 group」两种格式,日期可能是+ // "2026-11-12 18:52" 或 "Nov 12 18:52",用固定正则会全解析不出来。+ // 权限位之后的第 2 个数字即文件大小,最后一段即文件名。+ const parts = l.split(/\s+/);+ if (parts.length < 6 || !/^[\-dl]/.test(parts[0])) return null;+ const sizeIdx = parts.findIndex((p, i) => i >= 2 && /^\d+$/.test(p)+ && /(\d{4}-\d{2}-\d{2}|^[A-Za-z]{3}$)/.test(parts[i + 1] || ''));+ if (sizeIdx < 0) return null;+ const size = Number(parts[sizeIdx]);+ // 文件名在「时:分」token 之后(日期段 2-3 个 token,不固定)+ const timeIdx = parts.findIndex((p, i) => i > sizeIdx && /^\d{1,2}:\d{2}(:\d{2})?$/.test(p));+ const name = parts.slice((timeIdx >= 0 ? timeIdx : sizeIdx + 2) + 1).join(' ');+ return name ? { isDir: parts[0][0] === 'd', size, name } : null;}).filter(Boolean);}@@ -337,6 +574,139 @@ class AdbClient {async batteryOptimizeOff(pkg) {try { await this.shell(`dumpsys deviceidle whitelist +${pkg}`); } catch (_) { /* ignore */ }}++ /**+ * 把应用申请的运行时权限一次性授掉。+ * 不授会有两个后果:① 首次启动弹系统授权框,用户看到的是「应用没打开」;+ * ② 清过数据(pm clear)之后权限会掉,应用起来就卡在授权页。+ */+ async grantRuntimePermissions(pkg) {+ let dump = '';+ try {+ dump = await this.shell(`dumpsys package ${pkg}`, { timeout: 20000 });+ } catch (_) {+ return [];+ }+ const lines = String(dump).split(/\r?\n/);+ let inRuntime = false;+ const denied = [];+ for (const line of lines) {+ if (/^\s*runtime permissions:/.test(line)) { inRuntime = true; continue; }+ if (!inRuntime) continue;+ if (/^\s{0,6}\S/.test(line)) break; // 离开 runtime permissions 段+ const m = /^\s+([A-Za-z0-9_.]+):\s*granted=(\w+)/.exec(line);+ if (m && m[2] === 'false') denied.push(m[1]);+ }+ const granted = [];+ for (const p of denied) {+ // eslint-disable-next-line no-await-in-loop+ const r = await this.shell(`pm grant ${pkg} ${p}`, { timeout: 8000 }).catch(() => null);+ if (r !== null) granted.push(p);+ }+ // 特殊权限走 appops,否则仍然会弹窗+ const ops = ['MANAGE_EXTERNAL_STORAGE', 'SYSTEM_ALERT_WINDOW', 'REQUEST_INSTALL_PACKAGES', 'WRITE_SETTINGS'];+ for (const op of ops) {+ // eslint-disable-next-line no-await-in-loop+ await this.shell(`cmd appops set ${pkg} ${op} allow`, { timeout: 8000 }).catch(() => {});+ }+ return granted;+ }++ /**+ * 进入「就是这个应用」的状态:+ * - 收起锁屏,避免开机后停在锁屏挡住应用;+ * - 隐藏状态栏(保留底部导航键,鼠标不在手边时还能点返回/主页);+ * - 关掉系统动画,低配机器上体感差别非常大。+ * 全部是 settings 级命令,一次几百毫秒,重复调用无害。+ */+ async prepareForeground() {+ const cmds = [+ 'wm dismiss-keyguard',+ 'settings put global policy_control immersive.status=*',+ 'settings put secure immersive_mode_confirmations confirmed',+ 'settings put global window_animation_scale 0',+ 'settings put global transition_animation_scale 0',+ 'settings put global animator_duration_scale 0',+ 'settings put system screen_off_timeout 2147483647',+ ];+ for (const c of cmds) {+ // eslint-disable-next-line no-await-in-loop+ await this.shell(c, { timeout: 8000 }).catch(() => {});+ }+ return true;+ }++ /** 鼠标侧键 / 快捷键映射 */+ async keyBack() {+ await this.shell('input keyevent 4', { timeout: 6000 }).catch(() => {});+ }++ async keyForward() {+ await this.shell('input keyevent 125', { timeout: 6000 }).catch(() => {});+ }++ /**+ * 横竖屏切换。+ * 不用 Ctrl+←(那是模拟器窗口的 Qt 快捷键,需要键盘焦点落在模拟器上,+ * 而用户点的是 ApkStart 标题栏上的旋转按钮,焦点在网页层,按键根本传不过去),+ * 直接走模拟器控制台命令,模拟器会自己把 LCD 转过来并调整窗口比例。+ */+ /**+ * 横竖屏切换。+ * 这里不用模拟器的 Ctrl+←:那条路只把**画面**转 90°,Android 里还是竖屏,+ * 用户看到的就是整屏横躺的文字(试过 emu rotate、user_rotation、聚焦后发按键,+ * 都是这个结果)。真正可行的是把 Android 的逻辑分辨率换成目标方向,+ * 系统会按新方向重新排版,界面始终是正的;模拟器随后跟着换成同样的比例。+ */+ async setOrientation(landscape) {+ try {+ if (!landscape) {+ await this.shell('wm size reset; wm density reset', { timeout: 15000 });+ return true;+ }+ const sizeOut = await this.shell('wm size', { timeout: 10000 });+ const m = /Physical size:\s*(\d+)x(\d+)/.exec(sizeOut);+ const w = m ? Math.max(Number(m[1]), Number(m[2])) : 1280;+ const h = m ? Math.min(Number(m[1]), Number(m[2])) : 720;+ const denOut = await this.shell('wm density', { timeout: 10000 });+ const dm = /Physical density:\s*(\d+)/.exec(denOut);+ const dpi = dm ? Number(dm[1]) : 0;+ const cmds = [`wm size ${w}x${h}`];+ if (dpi) cmds.push(`wm density ${dpi}`);+ await this.shell(cmds.join('; '), { timeout: 15000 });+ return true;+ } catch (_) {+ return false;+ }+ }++ /** 授权框还挂在最前面时(用户不在电脑前也能自愈),按返回键收掉 */+ async dismissPermissionDialog() { try {+ const top = await this.shell('dumpsys activity activities', { timeout: 12000 });+ if (/GrantPermissionsActivity|permissioncontroller/i.test(String(top))) {+ await this.shell('input keyevent 4', { timeout: 6000 }).catch(() => {});+ return true;+ }+ } catch (_) { /* ignore */ }+ return false;+ }++ /**+ * 显示适配:全屏时把 Android 分辨率改成显示器尺寸(内容自动铺满),+ * 窗口模式时恢复竖屏预设。wm 命令是运行时生效的,不需要重启 Android。+ */+ async setDisplaySize(width, height, density) {+ const w = Math.max(320, Math.round(Number(width) || 0));+ const h = Math.max(480, Math.round(Number(height) || 0));+ await this.shell(`wm size ${w}x${h}`);+ if (density) await this.shell(`wm density ${Math.max(120, Math.min(640, Math.round(density)))}`);+ return { w, h };+ }++ async resetDisplaySize() {+ await this.shell('wm size reset').catch(() => {});+ await this.shell('wm density reset').catch(() => {});+ }}-module.exports = { AdbClient, AdbError, parseStatList, friendlyInstallError };+module.exports = { AdbClient, AdbError, parseStatList, friendlyInstallError, friendlyLaunchError };diff --git a/src/core/agent.js b/src/core/agent.jsnew file mode 100644index 0000000..b5ae1ee--- /dev/null+++ b/src/core/agent.js@@ -0,0 +1,166 @@+'use strict';+/**+ * Windows 窗口代理:与 src/core/win/agent.ps1 里的常驻进程通信。+ *+ * 为什么不是每次 spawn 一个 PowerShell:窗口跟随鼠标拖动时会频繁改尺寸,+ * 每次起一个 powershell.exe 要 150~300ms,拖动就会一顿一顿的。+ * 这里只启动一次,之后走本机回环 TCP(一行一个 JSON),单次往返 <2ms。+ *+ * 代理还负责 WH_MOUSE_LL 鼠标钩子:鼠标侧键 → 安卓返回 / 前进。+ */+const { spawn } = require('child_process');+const net = require('net');+const path = require('path');+const fs = require('fs');+const { EventEmitter } = require('events');++const SCRIPT = path.join(__dirname, 'win', 'agent.ps1');+const CALL_TIMEOUT = 6000;++class WinAgent extends EventEmitter {+ constructor() {+ super();+ this.proc = null;+ this.sock = null;+ this.port = 0;+ this.ready = null;+ this.buf = '';+ this.pending = [];+ this.dead = false;+ }++ get available() { return process.platform === 'win32' && fs.existsSync(SCRIPT); }++ /** 启动代理并等到 TCP 连上(幂等) */+ ensure() {+ if (this.ready) return this.ready;+ this.ready = new Promise((resolve, reject) => {+ if (!this.available) { reject(new Error('窗口代理不可用')); return; }+ let out = '';+ let settled = false;+ const proc = spawn('powershell.exe', [+ '-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-File', SCRIPT, '-Port', '0',+ ], { windowsHide: true, stdio: ['ignore', 'pipe', 'pipe'] });++ this.proc = proc;+ const fail = (e) => {+ if (settled) return;+ settled = true;+ this.ready = null;+ reject(e instanceof Error ? e : new Error(String(e)));+ };++ const onData = (chunk) => {+ out += chunk.toString('utf8');+ const m = /PORT=(\d+)/.exec(out);+ if (!m || settled) return;+ settled = true;+ this.port = Number(m[1]);+ this._connect().then(resolve).catch(fail);+ };+ proc.stdout.on('data', onData);+ proc.stderr.on('data', (d) => { out += d.toString('utf8'); });+ proc.on('error', fail);+ proc.on('exit', () => {+ const wasReady = !!this.sock;+ this.proc = null;+ this.sock = null;+ this.ready = null;+ this._failAll('窗口代理已退出');+ if (wasReady) this.emit('exit');+ fail(new Error('窗口代理启动失败'));+ });+ setTimeout(() => { if (!settled) fail(new Error('窗口代理启动超时')); }, 15000);+ });+ return this.ready;+ }++ _connect() {+ return new Promise((resolve, reject) => {+ const sock = net.connect({ host: '127.0.0.1', port: this.port }, () => resolve(this));+ sock.setEncoding('utf8');+ sock.setNoDelay(true);+ sock.on('data', (d) => this._onData(d));+ sock.on('error', (e) => { reject(e); });+ sock.on('close', () => {+ this.sock = null;+ this.ready = null;+ this._failAll('窗口代理连接断开');+ });+ this.sock = sock;+ this.buf = '';+ });+ }++ _onData(chunk) {+ this.buf += chunk;+ let i;+ while ((i = this.buf.indexOf('\n')) >= 0) {+ const line = this.buf.slice(0, i).trim();+ this.buf = this.buf.slice(i + 1);+ if (!line) continue;+ let msg = null;+ try { msg = JSON.parse(line); } catch (_) { continue; }+ if (msg.ev) { this.emit(msg.ev); continue; }+ const p = this.pending.shift();+ if (p) { clearTimeout(p.timer); p.resolve(msg); }+ }+ }++ _failAll(reason) {+ const list = this.pending;+ this.pending = [];+ for (const p of list) {+ clearTimeout(p.timer);+ p.reject(new Error(reason));+ }+ }++ /** 发送一条命令并等待回包 */+ async call(obj, timeout = CALL_TIMEOUT) {+ await this.ensure();+ if (!this.sock) throw new Error('窗口代理未连接');+ return new Promise((resolve, reject) => {+ const timer = setTimeout(() => reject(new Error(`窗口代理超时: ${obj.cmd}`)), timeout);+ this.pending.push({ resolve, reject, timer });+ this.sock.write(`${JSON.stringify(obj)}\n`);+ });+ }++ // ---------------- 便捷方法 ----------------++ /** 把模拟器窗口嵌进宿主窗口,并摆到 x,y,w,h(宿主客户区坐标) */+ async embed(hostHwnd, rect) {+ return this.call({+ cmd: 'embed', host: String(hostHwnd),+ x: Math.round(rect.x), y: Math.round(rect.y),+ w: Math.round(rect.w), h: Math.round(rect.h),+ });+ }++ async fit(rect) {+ return this.call({+ cmd: 'fit',+ x: Math.round(rect.x), y: Math.round(rect.y),+ w: Math.round(rect.w), h: Math.round(rect.h),+ }, 3000);+ }++ async rotate(dir = 'left') { return this.call({ cmd: 'rotate', dir }, 8000); }+ async hide() { return this.call({ cmd: 'hide' }, 3000); }+ async show() { return this.call({ cmd: 'show' }, 3000); }+ async detach() { return this.call({ cmd: 'detach' }, 5000); }+ async hook(on) { return this.call({ cmd: 'hook', on: on ? 1 : 0 }); }+ async probe() { return this.call({ cmd: 'probe' }, 4000); }++ dispose() {+ try { this.sock?.end(); } catch (_) { /* ignore */ }+ try { this.sock?.destroy(); } catch (_) { /* ignore */ }+ try { this.proc?.kill(); } catch (_) { /* ignore */ }+ this.sock = null;+ this.proc = null;+ this.ready = null;+ }+}++module.exports = { WinAgent, AGENT_SCRIPT: SCRIPT };diff --git a/src/core/android.js b/src/core/android.jsnew file mode 100644index 0000000..8b2ccf9--- /dev/null+++ b/src/core/android.js@@ -0,0 +1,159 @@+'use strict';+/**+ * 安卓系统设置:不需要进安卓桌面,也不用装第三方工具,+ * 直接通过 adb 把常用的系统开关做成 ApkStart 设置页里的按钮。+ * 所有命令都是官方 shell 接口,不依赖 root。+ */+const ACTIONS = {+ settings: 'android.settings.SETTINGS',+ wifi: 'android.settings.WIFI_SETTINGS',+ display: 'android.settings.DISPLAY_SETTINGS',+ sound: 'android.settings.SOUND_SETTINGS',+ locale: 'android.settings.LOCALE_SETTINGS',+ date: 'android.settings.DATE_SETTINGS',+ apps: 'android.settings.APPLICATION_SETTINGS',+ storage: 'android.settings.INTERNAL_STORAGE_SETTINGS',+ battery: 'android.settings.BATTERY_SAVER_SETTINGS',+ cast: 'android.settings.CAST_SETTINGS',+ dev: 'android.settings.APPLICATION_DEVELOPMENT_SETTINGS',+};++class AndroidSettings {+ constructor(runtime) { this.runtime = runtime; }++ async client() {+ const rt = await this.runtime.ensure();+ if (!rt.ok) throw new Error(rt.error || '运行时未就绪');+ return rt.client;+ }++ async _sh(commands) {+ const c = await this.client();+ const script = commands.map((x) => `${x}; `).join('');+ return c.shell(script, { timeout: 20000 });+ }++ /** 读一批当前状态,供设置页显示 */+ async status() {+ const out = await this._sh([+ 'echo "wifi=$(settings get global wifi_on)"',+ 'echo "air=$(settings get global airplane_mode_on)"',+ 'echo "font=$(settings get system font_scale)"',+ 'echo "density=$(wm density | tail -n1 | tr -dc \'0-9\')"',+ 'echo "animw=$(settings get global window_animation_scale)"',+ 'echo "sdk=$(getprop ro.build.version.sdk)"',+ 'echo "vol=$(dumpsys audio | grep -m1 -A3 STREAM_MUSIC | grep -o \'streamVolume:[0-9]*\' | head -1 | cut -d: -f2)"',+ ]);+ const get = (k) => {+ const m = new RegExp(`${k}=([^\\r\\n]*)`).exec(String(out));+ return m ? m[1].trim() : '';+ };+ const anim = get('animw');+ return {+ wifi: get('wifi') === '1',+ airplane: get('air') === '1',+ fontScale: Number(get('font')) || 1,+ density: Number(get('density')) || 0,+ volume: Number(get('vol')) || 0,+ animationsOff: anim === '0.0' || anim === '0',+ sdk: Number(get('sdk')) || 0,+ };+ }++ async setWifi(on) {+ await this._sh([`svc wifi ${on ? 'enable' : 'disable'}`]);+ return { ok: true };+ }++ async setAirplane(on) {+ const v = on ? 1 : 0;+ await this._sh([+ `settings put global airplane_mode_on ${v}`,+ `am broadcast -a android.intent.action.AIRPLANE_MODE --ez state ${on ? 'true' : 'false'}`,+ `svc wifi ${on ? 'disable' : 'enable'}`,+ `svc data ${on ? 'disable' : 'enable'}`,+ ]);+ return { ok: true };+ }++ async setVolume(percent) {+ const v = Math.max(0, Math.min(100, Math.round(Number(percent) || 0)));+ await this._sh([`media volume --stream 3 --set ${v}`]);+ return { ok: true, volume: v };+ }++ /** 关闭系统动画 = 明显的「变快」体感,且几乎不损失功能 */+ async setAnimations(on) {+ const v = on ? '1' : '0';+ await this._sh([+ `settings put global window_animation_scale ${v}`,+ `settings put global transition_animation_scale ${v}`,+ `settings put global animator_duration_scale ${v}`,+ ]);+ return { ok: true, animationsOff: !on };+ }++ async setFontScale(scale) {+ const v = Math.max(0.85, Math.min(1.3, Number(scale) || 1)).toFixed(2);+ await this._sh([`settings put system font_scale ${v}`]);+ return { ok: true, fontScale: Number(v) };+ }++ /** 显示大小:改 dpi,越大内容越大(相当于系统「显示大小」档位) */+ async setDensity(dpi) {+ const v = Math.max(120, Math.min(640, Math.round(Number(dpi) || 0)));+ if (!v) return { ok: false };+ await this._sh([`wm density ${v}`]);+ return { ok: true, density: v };+ }++ /** 一键整理:关动画 + 关遥测类服务 + 电池白名单,让应用更跟手 */+ async tune({ pkg } = {}) {+ const cmds = [+ 'settings put global window_animation_scale 0',+ 'settings put global transition_animation_scale 0',+ 'settings put global animator_duration_scale 0',+ 'settings put global activity_manager_constants max_cached_processes=32',+ ];+ if (pkg) cmds.push(`dumpsys deviceidle whitelist +${pkg}`);+ await this._sh(cmds);+ return { ok: true };+ }++ async open(action) {+ const a = ACTIONS[action] || ACTIONS.settings;+ const c = await this.client();+ await c.shell(`am start -a ${a}`, { timeout: 15000 });+ return { ok: true };+ }++ /** 应用运行时权限一览 + 授权 */+ async permissions(pkg) {+ const c = await this.client();+ const dump = await c.shell(`dumpsys package ${pkg}`, { timeout: 20000 });+ const lines = String(dump).split(/\r?\n/);+ let inRuntime = false;+ const rows = [];+ for (const line of lines) {+ if (/^\s*runtime permissions:/.test(line)) { inRuntime = true; continue; }+ if (!inRuntime) continue;+ if (/^\s{0,6}\S/.test(line)) break;+ const m = /^\s+([A-Za-z0-9_.]+):\s*granted=(\w+)/.exec(line);+ if (m) rows.push({ name: m[1], granted: m[2] === 'true' });+ }+ return rows;+ }++ async grantAll(pkg) {+ const c = await this.client();+ const rows = await this.permissions(pkg);+ const denied = rows.filter((r) => !r.granted).map((r) => r.name);+ for (const p of denied) {+ // eslint-disable-next-line no-await-in-loop+ await c.shell(`pm grant ${pkg} ${p}`, { timeout: 8000 }).catch(() => {});+ }+ return { ok: true, granted: denied.length };+ }+}++module.exports = { AndroidSettings, ACTIONS };diff --git a/src/core/appwin.js b/src/core/appwin.jsnew file mode 100644index 0000000..0457835--- /dev/null+++ b/src/core/appwin.js@@ -0,0 +1,273 @@+'use strict';+/**+ * 应用窗口:一个正在运行的安卓应用 = 一个干净的 Windows 窗口。+ *+ * 窗口里只有顶部一条 38px 的标题栏(旋转 / 最小化 / 最大化 / 关闭),+ * 下面的整块画面是嵌进来的模拟器窗口(SetParent),所以看不到安卓桌面、+ * 看不到模拟器自带的侧边工具栏,也不会多出第二个任务栏图标。+ */+const { BrowserWindow, screen, nativeImage } = require('electron');+const fs = require('fs');+const path = require('path');++const TITLEBAR_H = 38;+/**+ * 模拟器窗口四周自带 8px 的灰色内边距(Qt 的边框留白),+ * 而真正的 LCD 画面是从 +8px 开始的。把子窗口整体放大 16px 并向左上偏移 8px,+ * 这圈灰边就正好被推到客户区外面,画面干净地贴满四周。+ */+const EMU_PAD = 8;+const sleep = (ms) => new Promise((r) => setTimeout(r, ms));++function iconUrl(p) {+ if (!p || !fs.existsSync(p)) return '';+ return `file:///${p.replace(/\\/g, '/').replace(/ /g, '%20')}?v=${fs.statSync(p).mtimeMs}`;+}++class AppWindow {+ constructor({ agent, setOrientation }) {+ this.agent = agent;+ this.setOrientation = setOrientation || null;+ this.win = null;+ this.pkg = null;+ this.state = { label: '', tip: '', ready: false, landscape: false };+ this._fitTimer = null;+ this._closedCb = null;+ }++ get isOpen() { return !!(this.win && !this.win.isDestroyed()); }++ /** 竖屏 / 横屏下窗口内容的目标尺寸(自动缩放到屏幕内) */+ static sizeFor(area, portrait, landscape) {+ const p = portrait || { w: 540, h: 960 };+ const availH = Math.max(360, (area.h || 1040) - TITLEBAR_H - 48);+ const availW = Math.max(300, (area.w || 1920) - 80);+ if (landscape) {+ const k = Math.min(availW / p.h, availH / p.w);+ return { w: Math.round(p.h * k), h: Math.round(p.w * k) };+ }+ const k = Math.min(availH / p.h, availW / p.w);+ return { w: Math.round(p.w * k), h: Math.round(p.h * k) };+ }++ _area() {+ const d = screen.getDisplayNearestPoint(screen.getCursorScreenPoint());+ const a = d.workArea || d.bounds;+ return { x: a.x, y: a.y, w: a.width, h: a.height };+ }++ _scale() {+ try {+ const b = this.win ? this.win.getBounds() : this._area();+ return screen.getDisplayMatching(b).scaleFactor || 1;+ } catch (_) {+ return 1;+ }+ }++ /**+ * 打开(或复用)应用窗口。+ * @param {object} o { pkg, label, iconPath, portrait, fullscreen, onClosed }+ */+ open(o) {+ const { pkg, label, iconPath, portrait, fullscreen } = o;+ this._closedCb = o.onClosed || null;+ if (this.isOpen && this.pkg === pkg) {+ this.win.show();+ this.win.focus();+ return this.win;+ }+ this.close({ keepApp: true });++ this.pkg = pkg;+ this.portrait = portrait || { w: 540, h: 960 };+ this.state = { label: label || '应用', tip: '正在启动安卓运行时…', ready: false, landscape: false };++ const area = this._area();+ const size = AppWindow.sizeFor(area, this.portrait, false);+ const w = Math.max(320, size.w);+ const h = Math.max(420, size.h + TITLEBAR_H);++ const iconFile = iconPath && fs.existsSync(iconPath) ? nativeImage.createFromPath(iconPath) : undefined;++ this.win = new BrowserWindow({+ width: w,+ height: h,+ minWidth: 320,+ minHeight: 420,+ x: Math.round(area.x + (area.w - w) / 2),+ y: Math.round(area.y + (area.h - h) / 2),+ show: false,+ frame: false,+ thickFrame: true,+ resizable: true,+ maximizable: true,+ backgroundColor: '#0b0c0e',+ title: label || 'ApkStart',+ icon: iconFile,+ webPreferences: {+ preload: path.join(__dirname, '..', 'preload.js'),+ contextIsolation: true,+ nodeIntegration: false,+ sandbox: false,+ spellcheck: false,+ backgroundThrottling: false,+ },+ });++ this.win.loadFile(path.join(__dirname, '..', 'ui', 'shell.html'));+ // 页面标题会把窗口标题改成 shell.html 的 <title>,任务栏就认不出是哪个应用了,+ // 这里挡住,让 OS 标题一直等于应用名(任务栏悬浮提示、Alt+Tab 都靠它)。+ this.win.webContents.on('page-title-updated', (e) => {+ e.preventDefault();+ try { this.win.setTitle(label || 'ApkStart'); } catch (_) { /* 窗口可能已销毁 */ }+ });+ this.win.once('ready-to-show', () => {+ this.win.show();+ this._push();+ });++ const refit = () => this.scheduleFit();+ this.win.on('resize', refit);+ this.win.on('move', refit);+ this.win.on('maximize', refit);+ this.win.on('unmaximize', refit);+ this.win.on('restore', () => {+ this.agent.show().catch(() => {});+ this.scheduleFit();+ });+ this.win.on('minimize', () => { this.agent.hide().catch(() => {}); });+ this.win.on('close', () => { this._closing = true; });+ this.win.on('closed', () => {+ this.win = null;+ const pkg = this.pkg;+ this.pkg = null;+ this._closing = false;+ if (this._closedCb) this._closedCb(pkg);+ });+ this.win.on('focus', () => this.agent.hook(true).catch(() => {}));++ if (fullscreen) this.win.maximize();+ return this.win;+ }++ setState(patch) {+ this.state = { ...this.state, ...patch };+ this._push();+ }++ _push() {+ if (!this.isOpen) return;+ try {+ this.win.webContents.send('shell:state', {+ ...this.state,+ iconUrl: this.iconUrl || '',+ });+ } catch (_) { /* 窗口可能刚关闭 */ }+ }++ setIcon(p) { this.iconUrl = iconUrl(p); this._push(); }++ /** 把模拟器窗口嵌进当前窗口,并铺满标题栏以下的区域 */+ async embed() {+ if (!this.isOpen) return false;+ const hwnd = this._hwnd();+ if (!hwnd) return false;+ const r = await this.agent.embed(hwnd, this._rect()).catch(() => null);+ return !!(r && r.ok);+ }++ async fitNow() {+ if (!this.isOpen) return;+ await this.agent.fit(this._rect()).catch(() => {});+ }++ /** 模拟器子窗口应该占据的矩形(物理像素,已把 8px 内边距推出可视区) */+ _rect() {+ const sf = this._scale();+ const b = this.win.getContentBounds();+ return {+ x: -EMU_PAD,+ y: Math.round(TITLEBAR_H * sf) - EMU_PAD,+ w: Math.round(b.width * sf) + EMU_PAD * 2,+ h: Math.round((b.height - TITLEBAR_H) * sf) + EMU_PAD * 2,+ };+ }++ scheduleFit() {+ if (!this.isOpen) return;+ if (this._fitTimer) return;+ this._fitTimer = setTimeout(() => {+ this._fitTimer = null;+ this.fitNow();+ }, 40);+ }++ _hwnd() {+ try {+ const buf = this.win.getNativeWindowHandle();+ const v = buf.length >= 8 ? buf.readBigUInt64LE(0) : BigInt(buf.readUInt32LE(0));+ return v.toString();+ } catch (_) {+ return null;+ }+ }++ /**+ * 横竖屏切换。+ * 两步:先让 Android 按目标方向重新排版(画面始终是正的),再让模拟器按新比例+ * 重排一次窗口(它自己会算,CtrL+← 只是触发重排,不会改 Android 的方向),+ * 最后把我们的窗口换成同样的比例。+ */+ async rotate() {+ if (!this.isOpen) return this.state.landscape;+ const next = !this.state.landscape;+ if (this.setOrientation) await this.setOrientation(next).catch(() => {});+ await sleep(700);+ await this.agent.rotate(next ? 'left' : 'right').catch(() => {});+ await sleep(800);+ const area = this._area();+ const size = AppWindow.sizeFor(area, this.portrait, next);+ if (!this.win.isMaximized()) {+ this.win.setContentSize(Math.max(320, size.w), Math.max(420, size.h + TITLEBAR_H));+ const b = this.win.getBounds();+ this.win.setPosition(+ Math.round(area.x + (area.w - b.width) / 2),+ Math.round(area.y + (area.h - b.height) / 2),+ );+ }+ this.state.landscape = next;+ this._push();+ await sleep(250);+ await this.fitNow();+ // 模拟器换比例后还会自己再调一次窗口,收尾再贴合一次免得留黑边+ await sleep(600);+ await this.fitNow();+ return next;+ }++ toggleMaximize() {+ if (!this.isOpen) return;+ if (this.win.isMaximized()) this.win.unmaximize();+ else this.win.maximize();+ this.scheduleFit();+ }++ minimize() { if (this.isOpen) this.win.minimize(); }++ /**+ * 关闭窗口。默认同时停掉这个安卓应用(省内存),但保留引擎,下次点开是秒开。+ */+ close({ keepApp = false } = {}) {+ if (!this.isOpen) return;+ const pkg = this.pkg;+ this.agent.hide().catch(() => {});+ try { this.win.destroy(); } catch (_) { /* ignore */ }+ this.win = null;+ if (!keepApp && pkg && this._onCloseApp) this._onCloseApp(pkg);+ }++ onCloseApp(cb) { this._onCloseApp = cb; }+}++module.exports = { AppWindow, TITLEBAR_H };diff --git a/src/core/display.js b/src/core/display.jsnew file mode 100644index 0000000..d4f14d3--- /dev/null+++ b/src/core/display.js@@ -0,0 +1,59 @@+'use strict';+/**+ * 显示适配的纯计算部分(可单测,不依赖 Electron / adb)。+ * - 全屏:Android 分辨率对齐显示器工作区,内容自动铺满;+ * - 窗口:保持竖屏预设,用户拖动窗口时由 Qt 自动缩放,尺寸记在应用元数据里。+ */+function densityFor(w, h, manual) {+ if (manual > 0) return Math.max(120, Math.min(640, Math.round(manual)));+ return Math.max(200, Math.min(480, Math.round(Math.min(w, h) / 2.57)));+}++function portraitSize(str) {+ const m = /^(\d{3,4})x(\d{3,4})$/i.exec(String(str || ''));+ if (!m) return { w: 900, h: 1600 };+ const w = Number(m[1]);+ const h = Number(m[2]);+ return (h > w && w >= 320 && h >= 480) ? { w, h } : { w: 900, h: 1600 };+}++function defaultBounds(area) {+ const h = Math.round((area.h || 1080) * 0.84);+ const w = Math.round(h * 9 / 16);+ return {+ x: Math.round((area.x || 0) + ((area.w || 1920) - w) / 2),+ y: Math.round((area.y || 0) + ((area.h || 1080) - h) / 2),+ w, h,+ };+}++/**+ * 全屏 = 铺满屏幕高度并水平居中。+ * 模拟器窗口的宽高比在开机时被 LCD 锁死(9:16),直接 SW_MAXIMIZE 只会得到+ * 一个贴在左边、宽度不变的窗口;按比例算出高度铺满、再居中,视觉上就是+ * 「应用占满屏幕」,且画面不会变形。+ */+function fullscreenBounds(portrait, area) {+ const p = portraitSize(portrait);+ const ratio = p.w / p.h;+ const h = Math.max(320, Math.round(area.h || 1080));+ const w = Math.max(240, Math.round(h * ratio));+ return {+ x: Math.round((area.x || 0) + ((area.w || 1920) - w) / 2),+ y: Math.round(area.y || 0),+ w, h,+ };+}++/**+ * Android 侧分辨率:两种模式都保持竖屏预设。+ * 原因:模拟器窗口的宽高比在开机时就被 LCD 尺寸锁死了(实测改成 1920x1080 后+ * 窗口仍然只接受 9:16,画面被塞进去会留黑边或变形)。所以「全屏」= 把窗口+ * 最大化铺满屏幕,「窗口」= 竖屏可自由拉伸,两者共用同一份 Android 分辨率,+ * 切换时不需要重启运行时,也不会让应用重新布局。+ */+function sizeFor(mode, portrait, area) {+ return portraitSize(portrait);+}++module.exports = { densityFor, portraitSize, defaultBounds, fullscreenBounds, sizeFor };diff --git a/src/core/doctor.js b/src/core/doctor.jsnew file mode 100644index 0000000..341a9f2--- /dev/null+++ b/src/core/doctor.js@@ -0,0 +1,390 @@+'use strict';+/**+ * 设备自适应 / 自动诊断(零配置底座)+ *+ * 目标:不同机器上都不需要用户调任何参数。+ * - chooseProfile() 根据物理内存、CPU、磁盘、加速状态、emulator 版本推导启动参数;+ * - planVariants() 给出「启动失败后依次降级」的重试方案(GPU → 加速 → 内存 → 冷启动);+ * - diagnose() 把 emulator 的英文 stderr 翻译成可执行的修复建议;+ * - shortPath() 处理中文/空格安装路径(emulator 的 QEMU 对非 ASCII 路径极其敏感)。+ *+ * 本模块是纯函数 + 只读探测,不写设置、不拉起 Android,方便单测。+ */+const os = require('os');+const fs = require('fs');+const path = require('path');+const net = require('net');+const crypto = require('crypto');+const { execFileSync } = require('child_process');++const ASCII = /^[\x20-\x7e]*$/;+const isAsciiPath = (p) => ASCII.test(String(p || ''));++function clamp(v, min, max) { return Math.max(min, Math.min(max, v)); }++/** 本机画像(毫秒级,只读) */+function hostInfo() {+ const totalMB = Math.round(os.totalmem() / 1048576);+ const freeMB = Math.round(os.freemem() / 1048576);+ const cores = Math.max(1, (os.cpus() || []).length || 2);+ const home = os.homedir();+ return {+ platform: process.platform,+ arch: process.arch,+ totalMB,+ freeMB,+ cores,+ home,+ homeAscii: isAsciiPath(home),+ tmp: os.tmpdir(),+ rdp: /RDP/i.test(String(process.env.SESSIONNAME || '')) || !!process.env.CLIENTNAME,+ };+}++/** 目录所在盘可用空间(MB);取不到返回 0 */+function freeDiskMB(dir) {+ try {+ let d = path.resolve(dir || '.');+ for (let i = 0; i < 6 && !fs.existsSync(d); i += 1) d = path.dirname(d);+ const st = fs.statfsSync(d);+ return Math.floor((st.bavail * st.bsize) / 1048576);+ } catch (_) {+ return 0;+ }+}++function versionNumbers(v) {+ const m = /(\d+)\.(\d+)\.(\d+)/.exec(String(v || ''));+ return m ? [Number(m[1]), Number(m[2]), Number(m[3])] : [0, 0, 0];+}++/**+ * emulator 36.4.9 起把 swiftshader_indirect 标记为弃用,新增 -gpu software。+ * 37.x 上传 swiftshader_indirect 会出现 GL 初始化失败/直接退出(设备差异很大)。+ * 因此必须按版本挑候选,且每个候选都有退路。+ */+function gpuCandidates(emulatorVersion) {+ const [major, minor, patch] = versionNumbers(emulatorVersion);+ const modern = major > 36 || (major === 36 && (minor > 4 || (minor === 4 && patch >= 9)));+ return modern+ // host 直接用显卡渲染,最省 CPU 也最跟手;失败会自动降到软件渲染重试+ ? ['host', 'software', 'swangle', 'swiftshader']+ : ['host', 'swiftshader_indirect', 'swiftshader'];+}++/** Windows 8.3 短路径:中文用户名 / 中文安装目录时 emulator 会找不到文件 */+/** 屏幕规格:有硬件加速就上 720x1280(清晰),纯软件模拟降到 540x960(流畅优先) */+function lcdFor({ accelOk = true, crisp = true } = {}) {+ return accelOk && crisp ? { w: 720, h: 1280, dpi: 320 } : { w: 540, h: 960, dpi: 240 };+}++function shortPath(p) {+ if (process.platform !== 'win32' || !p || isAsciiPath(p)) return p;+ try {+ const out = execFileSync('cmd.exe', ['/d', '/s', '/c', `for %I in ("${p}") do @echo %~sI`], {+ encoding: 'utf8', windowsHide: true, timeout: 5000, stdio: ['ignore', 'pipe', 'ignore'],+ });+ const line = String(out).split(/\r?\n/).map((s) => s.trim()).filter(Boolean).pop();+ if (line && isAsciiPath(line) && fs.existsSync(line)) return line;+ } catch (_) { /* 8.3 被关闭时保持原路径 */ }+ return p;+}++/**+ * 推导零配置启动参数。+ * 用户设置里若显式给了 engine.memoryMB / cores / gpuMode,则作为上限/覆盖,+ * 但不会再因为「没设置」而用 4G/4核 硬编码把小内存机器搞崩。+ */+function chooseProfile({+ host = hostInfo(), accel, emulatorVersion = '', diskMB = 0,+ port = 5554, adbPort = 5044, overrides = {},+} = {}) {+ const accelOk = !!(accel && accel.ok);+ // 3GB 足够 Android 14 与主流应用;再高只会放大内存占用和 quickboot 快照体积+ let memoryMB = clamp(Math.floor((host.totalMB * 0.22) / 256) * 256, 2048, 3072);+ // 物理可用内存不够时下调;Android 14 最低 2G,低于此只能靠 TCG 慢速跑+ if (host.freeMB && host.freeMB < memoryMB + 1024) {+ memoryMB = Math.max(2048, Math.floor((host.freeMB * 0.5) / 256) * 256);+ }+ if (overrides.memoryMB) memoryMB = clamp(Number(overrides.memoryMB) || memoryMB, 1536, 8192);++ let cores = clamp(Math.floor(host.cores / 2), 2, 4);+ if (overrides.cores) cores = clamp(Number(overrides.cores) || cores, 1, 8);++ const disk = diskMB || freeDiskMB(host.tmp);+ const dataMB = disk && disk < 8192 ? 2048 : 4096;++ const gpus = gpuCandidates(emulatorVersion);+ const gpu = overrides.gpuMode && gpus.includes(overrides.gpuMode) ? overrides.gpuMode : gpus[0];++ return {+ memoryMB,+ cores,+ heapMB: memoryMB >= 3072 ? 384 : 256,+ dataMB,+ gpu,+ gpuCandidates: gpus,+ accel: accelOk ? 'auto' : 'off',+ accelOk,+ port,+ adbPort,+ snapshot: true,+ // 无加速的纯软件模拟在 Windows 上确实能起来,但 Android 14 冷启动可能 5-10 分钟+ bootTimeoutMs: accelOk ? 240000 : 600000,+ emulatorVersion,+ host,+ };+}++/**+ * 把「高级参数」里的用户设置转成 overrides。+ * 0 / auto / 未设置一律视为「不覆盖」,仍然走自动推导;+ * 只有用户主动关掉自动内存并填了具体数值才生效。+ */+function overridesFromSettings(engine = {}) {+ const e = engine || {};+ const manual = e.autoMemory === false;+ return {+ memoryMB: manual ? Number(e.memoryMB) || 0 : 0,+ cores: manual ? Number(e.cores) || 0 : 0,+ gpuMode: e.gpuMode && e.gpuMode !== 'auto' ? e.gpuMode : '',+ };+}++/**+ * 展示 / 诊断用的统一入口:不启动 Android 也能算出与真实开机一致的参数。+ * 之前设置页直接调 chooseProfile()(不带版本和加速状态),会在 37.x 机器上+ * 错误地显示已弃用的 swiftshader_indirect / 软件模拟,和实跑参数对不上。+ */+function autoProfile({ settings = {}, accel, emulatorVersion = '', diskMB = 0, port = 5554, adbPort = 5044 } = {}) {+ return chooseProfile({+ accel, emulatorVersion, diskMB, port, adbPort,+ overrides: overridesFromSettings(settings && settings.engine),+ });+}++/**+ * 失败重试矩阵:从「最优」到「最保守」,最多 4 次。+ * 依次换 GPU 后端 → 关硬件加速走 TCG → 降内存并强制冷启动清快照。+ */+function planVariants(profile) {+ const out = [];+ const gpus = profile.gpuCandidates || [];+ const firstGpu = profile.gpu || gpus[0] || 'software';+ const safeGpu = gpus.find((g) => /software|swiftshader/.test(g)) || firstGpu;+ const ordered = [firstGpu, ...gpus.filter((g) => g !== firstGpu && /swiftshader|swangle/.test(g))].slice(0, 2);+ for (const gpu of ordered) {+ out.push({ ...profile, gpu, label: `${gpu} / ${profile.accel === 'auto' ? '硬件加速' : '软件模拟'}`, wipe: false, snapshot: true });+ }+ out.push({+ ...profile,+ gpu: safeGpu,+ accel: 'off',+ label: '关闭加速的软件模拟(慢,但兼容性最好)',+ wipe: false,+ snapshot: false,+ });+ out.push({+ ...profile,+ gpu: safeGpu,+ accel: 'off',+ memoryMB: 2048,+ cores: 2,+ dataMB: Math.min(profile.dataMB, 2048),+ label: '保守冷启动(最小内存 + 清快照)',+ wipe: true,+ snapshot: false,+ lastResort: true,+ });+ // 去重(相同 gpu/accel/wipe 组合不重复试)+ const seen = new Set();+ return out.filter((v) => {+ const k = `${v.gpu}|${v.accel}|${!!v.wipe}|${v.memoryMB}`;+ if (seen.has(k)) return false;+ seen.add(k);+ return true;+ });+}++/** 检测一对空闲端口(emulator console + adb 注册端口必须相邻偶数/奇数) */+function isPortFree(port) {+ return new Promise((resolve) => {+ const srv = net.createServer();+ srv.once('error', () => resolve(false));+ srv.once('listening', () => srv.close(() => resolve(true)));+ srv.listen(port, '127.0.0.1');+ });+}++async function freePortPair(start = 5554) {+ for (let p = start; p <= start + 40; p += 2) {+ // eslint-disable-next-line no-await-in-loop+ if (await isPortFree(p) && await isPortFree(p + 1)) return p;+ }+ return start;+}++/**+ * adb server 端口:固定不复用探测。+ * 之前是"从 5044 往上找一个空闲端口",但 adb server 本身是常驻进程,占着这个端口,+ * 于是每启动一次 ApkStart 就会多一个 adb server(实测一次会话跑出 6 个),+ * 而且端口老是变,下次启动想接管上次的模拟器时对不上号。+ * 5044 是 ApkStart 专用端口(用户自己的 adb 在 5037),直接固定用。+ */+async function freeAdbPort(start = 5044) {+ return Number(process.env.APKSTART_ADB_PORT) || start;+}++/**+ * 配置指纹:只有「镜像 / 数据分区 / 引擎版本」变化才作废快照。+ * 故意不包含 GPU、加速方式、内存 —— 那些是自动重试会频繁切换的参数,+ * 若纳入会让每次重试都触发 -wipe-data,把用户已装的应用清空。+ */+function snapshotKey(plan, imageDir) {+ return crypto.createHash('sha1').update([+ imageDir, plan.dataMB || 0, plan.emulatorVersion || '', plan.api || '', plan.tag || '',+ ].join('|')).digest('hex').slice(0, 16);+}++const RULES = [+ {+ code: 'GPU_INIT',+ // 只匹配「失败」语境:正常日志里也会出现 Vulkan/EGL/ANGLE 字样,不能误判为致命错误+ re: /Failed to initialize GL emulation|Could not initialize (OpenGL|emulated framebuffer)|Failed to create .*GLES|EGL_(BAD|NOT_INITIALIZED|CONTEXT_LOST)|Failed to (load|initialize) .*vulkan|vulkan.*(failed|error)|ANGLE.*(fail|error)/i,+ title: '显卡渲染后端初始化失败',+ hint: '已自动切换软件渲染重试。若仍失败,请更新显卡驱动,或关闭远程桌面/虚拟机显卡直通后再试。',+ },+ {+ code: 'GPU_MODE',+ re: /Unknown option|invalid .*-gpu|Unrecognized .*gpu|Unsupported gpu/i,+ title: '当前运行时不接受该 GPU 模式',+ hint: '已自动按运行时版本挑选可用的 GPU 模式重试(老版本用 swiftshader_indirect,新版本用 software)。',+ },+ {+ code: 'ACCEL',+ re: /x86_64 emulation currently requires hardware acceleration|acceleration.*not (installed|available|supported)|WHPX.*(not|failed)|AEHD.*(not|failed)|ERROR_ACCESS_DENIED|加速.*不可用/i,+ title: '硬件加速不可用',+ hint: '已自动回退软件模拟(首次启动会明显变慢)。想要流畅可用,请在「Windows 功能」勾选「虚拟机平台」,或安装 AEHD 驱动后重启。',+ },+ {+ code: 'MEMORY',+ re: /Cannot allocate memory|not enough memory|commit charge|Failed to allocate|out of memory|内存不足/i,+ title: '内存分配失败',+ hint: '已自动下调分配给 Android 的内存与核心数。请关闭占内存的程序后重试。',+ },+ {+ code: 'PORT_BUSY',+ re: /port.*(in use|busy)|Address already in use|bind.*failed|Failed to (setup|bind) .*console/i,+ title: '模拟器端口被占用',+ hint: '已自动换用空闲端口。若反复出现,请退出夜神/MuMu/蓝叠等模拟器,或重启电脑。',+ },+ {+ code: 'AVD_LOCK',+ re: /already running|lock file|\.lock|AVD is in use|emulator is running/i,+ title: '上次运行残留了锁文件',+ hint: '已自动清理 AVD 锁文件并重新拉起。',+ },+ {+ code: 'IMAGE',+ re: /system\.img.*(missing|not found|corrupt)|kernel-ranchu.*(missing|not found)|invalid magic|Failed to open .*\.img|APEX.*(fail|error|loop)|boot loop|verity.*fail/i,+ title: '系统镜像缺失或损坏 / 与旧用户数据不兼容',+ hint: '已自动用干净的用户数据重新开机。若仍失败,请在「运行时」里删除镜像后重新下载。',+ },+ {+ code: 'DLL',+ re: /0xc0000135|STATUS_DLL_NOT_FOUND|missing DLL|Qt6.*not found|MSVCP140|VCRUNTIME|无法启动此程序|The code execution cannot proceed/i,+ title: '运行时组件被杀毒软件删除或缺少 VC++ 运行库',+ hint: '请把 ApkStart 目录加入杀毒软件白名单后重新解压安装包,并安装微软 VC++ 2015-2022 运行库。',+ },+ {+ code: 'DISK_FULL',+ re: /No space left|disk full|not enough space|磁盘空间不足/i,+ title: '磁盘空间不足',+ hint: '已自动缩小数据分区并清理旧快照。请给系统盘留出至少 8GB 可用空间。',+ },+ {+ code: 'NON_ASCII',+ re: /Unicode|non-ASCII|路径.*(无效|找不到)|cannot find the path/i,+ title: '安装路径含中文或特殊字符',+ hint: '已自动改用 Windows 短路径。若仍失败,请把 ApkStart 移到纯英文目录(如 C:\\ApkStart)。',+ },+ {+ // 上次被强制结束后 AVD 目录会留下 hardware-qemu.ini.lock / multiinstance.lock,+ // 模拟器一律拒绝启动,报出来的却是容易被误读成 CPU 问题的话。必须排在 CPU 规则前。+ code: 'AVD_LOCK',+ re: /Running multiple emulators with the same AVD|AVD .*is already running|hardware-qemu\.ini\.lock/i,+ title: '上一次运行没有正常退出,残留了锁文件',+ hint: 'ApkStart 会自动清掉残留锁并重试;若反复出现,请检查是否有别的模拟器正在用同一套运行时。',+ },+ {+ code: 'CPU_FEATURE',+ re: /host doesn't support requested feature|CPUID.*not supported|unsupported CPU|missing.*(AVX|SSE4|xsave)/i,+ title: 'CPU 缺少运行时要求的指令集',+ hint: '这类提示在部分老 CPU 上只是警告、仍能开机;若确实起不来,请把「运行时」里的引擎更新到较旧兼容版本,或换一台支持 VT-x/AVX 的电脑。',+ },++ {+ code: 'SNAPSHOT',+ re: /snapshot|Quick Boot|ram\.img|Saving state/i,+ title: '快速启动快照损坏',+ hint: '已自动丢弃旧快照走冷启动;下一次正常退出会重新生成快照。',+ },+];++/** 把日志翻译成 {code,title,hint},供 UI 展示与自动重试决策 */+function diagnose(lines) {+ const text = (Array.isArray(lines) ? lines.join('\n') : String(lines || '')).slice(-24000);+ for (const r of RULES) {+ if (r.re.test(text)) return { code: r.code, title: r.title, hint: r.hint };+ }+ return {+ code: 'UNKNOWN',+ title: '运行时未能完成开机',+ hint: '已自动按多种参数组合重试。可点「导出诊断报告」把日志发给作者定位。',+ };+}++/** 人类可读的一行摘要,放在设置页让高级用户知道自动选了什么 */+function describeProfile(p) {+ return `自动:${(p.memoryMB / 1024).toFixed(1)}GB 内存 · ${p.cores} 核 · ${p.gpu} 渲染 · `+ + `${p.accelOk ? '硬件加速' : '软件模拟'} · ${p.snapshot ? '按需快照' : '冷启动'} · 端口 ${p.port}`;+}++/** 导出诊断报告(纯文本,便于发邮件/贴 issue) */+function writeReport({ dataDir, profile, logLines = [], extra = {} }) {+ const dir = path.join(dataDir, 'logs');+ fs.mkdirSync(dir, { recursive: true });+ const file = path.join(dir, `diagnostic-${new Date().toISOString().replace(/[:.]/g, '-')}.txt`);+ const d = diagnose(logLines);+ const body = [+ 'ApkStart 诊断报告',+ `生成时间:${new Date().toLocaleString()}`,+ '',+ '== 本机 ==',+ JSON.stringify(hostInfo(), null, 2),+ '',+ '== 自动配置 ==',+ JSON.stringify(profile || {}, null, 2),+ describeProfile(profile || chooseProfile()),+ '',+ '== 诊断 ==',+ `${d.code}:${d.title}`,+ d.hint,+ '',+ '== 附加信息 ==',+ JSON.stringify(extra, null, 2),+ '',+ '== 运行时日志(末尾 300 行)==',+ ...(Array.isArray(logLines) ? logLines.slice(-300) : String(logLines || '').split('\n')),+ ].join('\n');+ fs.writeFileSync(file, body, 'utf8');+ return { file, diagnosis: d };+}++module.exports = {+ hostInfo, freeDiskMB, isAsciiPath, shortPath, lcdFor,+ versionNumbers, gpuCandidates, chooseProfile, planVariants,+ overridesFromSettings, autoProfile,+ freePortPair, freeAdbPort, snapshotKey,+ diagnose, describeProfile, writeReport,+};diff --git a/src/core/emulator.js b/src/core/emulator.jsindex 56d7c22..34a257c 100644--- a/src/core/emulator.js+++ b/src/core/emulator.js@@ -2,21 +2,25 @@/*** Emulator 引擎:驱动 Google 官方 Android Emulator 作为 ApkStart 的运行时。*- * 为什么用官方 emulator 而不是裸 QEMU:- * - 它自带 Android 专用设备模型(ranchu)、GPU 转译(swiftshader/host)与快照机制,- * 冷启动与交互体验远超"QEMU + 通用 ISO";- * - 支持 -no-window 无头运行,便于把画面渲染进 ApkStart 自己的窗口;- * - 官方源(dl.google.com)下载速度远高于 SourceForge 上的社区镜像。+ * 与旧版最大的不同:这里不再假设「一套参数在所有电脑上都能跑」。+ * 1. 用 doctor.chooseProfile() 按内存/CPU/磁盘/加速状态/引擎版本自动推导参数;+ * 2. 启动失败时按 planVariants() 自动降级重试(GPU 后端 → 软件模拟 → 最小内存冷启动);+ * 3. 动态挑空闲端口、清 AVD 锁、中文路径转短路径、镜像变更后自动作废快照;+ * 4. quickboot 快照 + 小数据分区,做到「像容器一样」共享只读基础层、秒级恢复。*- * 本模块只负责"把模拟器正确拉起来/停下去",不关心装了哪些应用。+ * probe 回调由上层(Runtime)提供,用于判断 Android 是否真正就绪。*/-const { spawn } = require('child_process');+const { spawn, execFile } = require('child_process');const fs = require('fs');const path = require('path');const store = require('./store');const { Provisioner } = require('./provision');+const doctor = require('./doctor');const AVD_NAME = 'apkstart';+const SNAPSHOT_NAME = 'apkstart';++const sleep = (ms) => new Promise((r) => setTimeout(r, ms));class EmulatorEngine {constructor(appRoot) {@@ -24,15 +28,25 @@ class EmulatorEngine {this.provisioner = new Provisioner(appRoot);this.proc = null;this._log = [];+ this.port = 5554;+ this.adbPort = Number(process.env.ANDROID_ADB_SERVER_PORT) || 5044;+ this.profile = null;+ this.attempts = [];+ this.lastDiagnosis = null;+ // 快照的 ram.bin ≈ 分配给虚拟机的内存(2-4GB)。+ // 冷启动本来就快的机器不该为它付出几个 GB 的磁盘,只在「真慢」时才保存。+ this.snapshotWorthSaving = null;}log(line) {this._log.push({ t: Date.now(), line });- if (this._log.length > 400) this._log.shift();+ if (this._log.length > 600) this._log.shift();}get settings() { return store.getSettings(); }+ get serial() { return `emulator-${this.port}`; }+/** emulator.exe 与系统镜像目录(优先用户运行时目录,回退到仓库内 engine/) */locate() {const p = this.provisioner.paths();@@ -42,73 +56,140 @@ class EmulatorEngine {return { emulatorExe, sysImgDir: img.dir, sysImgOk: img.ok, root: emulatorExe ? path.dirname(path.dirname(emulatorExe)) : p.root };}+ /** 选镜像:有通用镜像(API 34 Play)就用它,不再让用户切「兼容模式」 */+ imageChoice() {+ const play = this.provisioner.playImageInfo();+ const base = this.provisioner.systemImageInfo();+ if (play.ok) {+ return { compat: true, api: play.api, tag: play.tag, dir: play.dir, abi: 'x86_64' };+ }+ return { compat: false, api: base.api, tag: base.tag, dir: base.dir, abi: base.abi || this.provisioner.paths().sysAbi };+ }++ /**+ * 作废 quickboot 快照。+ * 快照同时保存内存和磁盘镜像,装完新应用/清了数据后如果还加载旧快照,+ * 用户会看到「刚刚装好的应用重启后又不见了」。+ */+ invalidateSnapshot() {+ try {+ const snapDir = path.join(this.provisioner.paths().avdHome, `${AVD_NAME}.avd`, 'snapshots');+ fs.rmSync(snapDir, { recursive: true, force: true });+ return true;+ } catch (_) {+ return false;+ }+ }++ /**+ * 清掉上次异常退出留下的锁。+ * 注意 hardware-qemu.ini.lock 是**目录**不是文件,bsdtar 式的 rmSync(force) 删不掉它,+ * 于是模拟器会一直报 "Running multiple emulators with the same AVD" 起不来+ * (被强杀过一次就会这样),必须递归删。+ */+ clearLocks(avdDir) {+ try {+ for (const f of fs.readdirSync(avdDir)) {+ if (!/\.lock$/i.test(f)) continue;+ try {+ fs.rmSync(path.join(avdDir, f), { recursive: true, force: true });+ } catch (_) { /* 被占用就跳过,下次再清 */ }+ }+ } catch (_) { /* ignore */ }+ }+/**- * 准备 AVD:写 config.ini。放在运行时目录下,不污染用户 ~/.android。- * 每次启动都重写,保证设置项(内存/核数/分辨率)改了立即生效。+ * 准备 AVD:写 config.ini。每次启动按当前自动配置重写,保证降级重试即时生效。*/- ensureAvd({ memoryMB = 4096, cores = 4, width = 1080, height = 1920, density = 420, gpu = 'swiftshader_indirect' } = {}) {+ ensureAvd({+ memoryMB = 2048, cores = 2, gpu = 'software', dataMB = 4096,+ heapMB = 256, accel = 'auto', snapshot = true, wipe = false, lcd = null,+ } = {}) {const p = this.provisioner.ensureDirs();- const s = this.settings;const home = p.avdHome;const avdDir = path.join(home, `${AVD_NAME}.avd`);fs.mkdirSync(avdDir, { recursive: true });+ this.clearLocks(avdDir);++ // 屏幕分辨率:有硬件加速时 720x1280@320 画面清晰、文字不糊;+ // 纯软件模拟时降到 540x960,帧率优先(面积只有 56%,肉眼差距远小于流畅度差距)。+ const screen = lcd || doctor.lcdFor({ accelOk: this.profile ? this.profile.accelOk : accel !== 'off' });- // ARM 兼容模式:使用 Google Play 版镜像(内置 native bridge,可安装仅含 ARM 原生库的应用)- const playInfo = this.provisioner.playImageInfo();- const compat = !!(s.runtime && s.runtime.compatImage) && playInfo.ok;- const tag = compat ? 'google_apis_playstore' : p.sysTag;- const tagDisplay = compat ? 'Google Play (ARM 兼容)' : 'AOSP';- const api = compat ? playInfo.api : p.sysApi;+ const choice = this.imageChoice();+ const tag = choice.tag;+ const api = choice.api;+ const tagDisplay = choice.compat ? 'Google Play (ARM 兼容)' : 'AOSP';fs.writeFileSync(path.join(home, `${AVD_NAME}.ini`),`avd.ini.encoding=UTF-8\npath=${avdDir.replace(/\\/g, '/')}\ntarget=android-${api}\n`,);- // 切换镜像(普通 ↔ ARM 兼容,或镜像 API 版本变化)时旧 userdata 不兼容- // (APEX 模块引导循环),下次启动带上 -wipe-data 让模拟器重建干净的用户数据const cfgPath = path.join(avdDir, 'config.ini');+ const wantImg = choice.dir+ ? `${choice.dir.replace(/\\/g, '/')}/`+ : `system-images/android-${api}/${tag}/${choice.abi}/`;this.wipePending = false;if (fs.existsSync(cfgPath)) {const prev = fs.readFileSync(cfgPath, 'utf8');const prevTag = /tag\.id=(.+)$/m.exec(prev);const prevImg = /image\.sysdir\.1=(.+)$/m.exec(prev);- const wantImg = `system-images/android-${api}/${tag}/${p.sysAbi}/`;- if ((prevTag && prevTag[1].trim() !== tag)- || (prevImg && prevImg[1].trim() !== wantImg)) {+ if ((prevTag && prevTag[1].trim() !== tag) || (prevImg && prevImg[1].trim() !== wantImg)) {+ // 旧 userdata 与新镜像不兼容(APEX 引导循环),必须重建this.wipePending = true;}}- // hw.cpu.arch 必须是 ABI 本身(x86_64 不能截成 x86),- // 否则模拟器会按 32 位启动却加载 64 位内核,报 "requires an x86-64 CPU, but only detected an i686 CPU"。- const cpuArch = p.sysAbi === 'arm64-v8a' ? 'arm64'- : p.sysAbi === 'armeabi-v7a' ? 'arm'- : p.sysAbi;+ // 配置指纹变化 → 旧 quickboot 快照必然加载失败或产生黑屏,主动作废+ const key = `${doctor.snapshotKey({+ dataMB, emulatorVersion: this._emuVersion || '', api, tag,+ }, choice.dir)}|${screen.w}x${screen.h}@${screen.dpi}`;+ const keyFile = path.join(avdDir, 'snapshot.key');+ let prevKey = '';+ try { prevKey = fs.readFileSync(keyFile, 'utf8').trim(); } catch (_) { /* 首次 */ }+ if (prevKey && prevKey !== key) this.wipePending = true;+ if (this.wipePending || wipe) {+ // 删除可能被系统/安全软件拦截(快照目录常有几个 GB)。+ // 失败就改名让 emulator 不再加载它,绝不因为清理失败而中断启动。+ const snapDir = path.join(avdDir, 'snapshots');+ try {+ fs.rmSync(snapDir, { recursive: true, force: true });+ } catch (_) {+ try { fs.renameSync(snapDir, `${snapDir}.stale-${Date.now()}`); } catch (__) { /* ignore */ }+ }+ // 用户数据不删(保留已装应用),只让模拟器按需重建;镜像切换本身由 -wipe-data 处理+ }+ fs.writeFileSync(keyFile, key, 'utf8');++ // hw.cpu.arch 必须是 ABI 本身(x86_64 不能截成 x86)+ const cpuArch = choice.abi === 'arm64-v8a' ? 'arm64'+ : choice.abi === 'armeabi-v7a' ? 'arm' : choice.abi;const cfg = [`AvdId=${AVD_NAME}`,'avd.ini.displayname=ApkStart','avd.ini.encoding=UTF-8',- `abi.type=${p.sysAbi}`,+ `abi.type=${choice.abi}`,`hw.cpu.arch=${cpuArch}`,`hw.cpu.ncore=${cores}`,`hw.ramSize=${memoryMB}`,- 'vm.heapSize=512',- `image.sysdir.1=system-images/android-${api}/${tag}/${p.sysAbi}/`,+ `vm.heapSize=${heapMB}`,+ `image.sysdir.1=${wantImg}`,`tag.id=${tag}`,`tag.display=${tagDisplay}`,- 'disk.dataPartition.size=16G',+ // 旧版写死 16G,会在小硬盘/配额环境下生成巨型文件并拖慢首次开机+ `disk.dataPartition.size=${dataMB}M`,'hw.gpu.enabled=yes',`hw.gpu.mode=${gpu}`,'hw.keyboard=yes',- `hw.lcd.width=${width}`,- `hw.lcd.height=${height}`,- `hw.lcd.density=${density}`,+ 'hw.lcd.width=' + screen.w,+ 'hw.lcd.height=' + screen.h,+ 'hw.lcd.density=' + screen.dpi,'hw.mainKeys=no','ShowDeviceFrame=no',- `PlayStore.enabled=${compat}`,- 'fastboot.forceColdBoot=yes',+ `PlayStore.enabled=${choice.compat}`,+ // 快照完全由命令行 -snapshot apkstart 控制:用独立名字,绝不误加载+ // 旧版遗留的 default_boot(那是 API30 镜像的内存状态,加载必进引导循环)。'hw.sdCard=no','hw.audioInput=none','hw.camera.back=none',@@ -116,87 +197,90 @@ class EmulatorEngine {'hw.gps=no','hw.sensors.orientation=no',].join('\n') + '\n';- fs.writeFileSync(path.join(avdDir, 'config.ini'), cfg);+ fs.writeFileSync(cfgPath, cfg);- return { home, avdDir, ini: path.join(home, `${AVD_NAME}.ini`) };+ return {+ home, avdDir, ini: path.join(home, `${AVD_NAME}.ini`), image: choice,+ wipePending: this.wipePending, screen,+ };}- /** emulator 依赖这三个环境变量定位 SDK / AVD */- env(root) {+ /** emulator 依赖这些环境变量定位 SDK / AVD;中文路径一律转 8.3 短路径 */+ env(root, plan = {}) {+ const safeRoot = doctor.shortPath(root);+ const avdHome = doctor.shortPath(path.join(root, 'avd'));+ const adbPort = String(plan.adbPort || process.env.ANDROID_ADB_SERVER_PORT || '5044');return {...process.env,- ANDROID_SDK_ROOT: root,- ANDROID_HOME: root,- ANDROID_AVD_HOME: path.join(root, 'avd'),- ANDROID_EMULATOR_HOME: path.join(root, 'avd'),- // 专用 adb server 端口:避免与 WSA / 其他模拟器的 adb(5037)互相踢掉注册,- // 否则设备会一直显示 offline(实测问题)- ANDROID_ADB_SERVER_PORT: process.env.ANDROID_ADB_SERVER_PORT || '5044',- // 不弹 metrics 询问、不写用户级配置+ ANDROID_SDK_ROOT: safeRoot,+ ANDROID_HOME: safeRoot,+ ANDROID_AVD_HOME: avdHome,+ ANDROID_EMULATOR_HOME: avdHome,+ ANDROID_ADB_SERVER_PORT: adbPort,ANDROID_EMULATOR_USE_SYSTEM_LIBS: '',+ ...(plan.accel === 'off' ? { ANDROID_I_WANT_MY_TCG: 'yes' } : {}),};}- buildArgs({ headless = true, accel = 'auto', port = 5554, snapshot = false, wipe = false } = {}) {- const s = this.settings;+ buildArgs({+ headless = true, accel = 'auto', port = 5554,+ gpu = 'software', memoryMB = 2048, cores = 2,+ snapshot = true, wipe = false, lcd = null,+ } = {}) {const args = ['-avd', AVD_NAME,'-port', String(port),'-no-audio','-no-boot-anim','-no-metrics',- '-gpu', s.engine.gpuMode || 'swiftshader_indirect',+ '-gpu', gpu,+ '-memory', String(memoryMB),+ '-cores', String(cores),];- if (headless) args.push('-no-window');- if (snapshot) args.push('-snapshot', 'default');+ // 网络:AOSP 模拟器默认走 QEMU 用户态 NAT(-netdev user),安卓侧拿到+ // 10.0.2.x 的虚拟地址,出口直接复用主机的物理网卡 NAT 出去。+ // 这种模式【不会】在 Windows 上创建任何虚拟网卡 / 虚拟交换机+ // (那必须 -netdev tap 或桥接才会发生,我们全程不启用)。+ // 所以安卓应用用的是"一台挂在主机 NAT 后面的设备",主机网络栈完全不动,+ // 不需要装驱动、也不多一个网络适配器。+ if (lcd) args.push('-skin', `${lcd.w}x${lcd.h}`);+ if (headless) {+ args.push('-no-window');+ } else {+ // 不要模拟器自带的手机外壳;侧边浮动工具栏由窗口代理隐藏。+ args.push('-no-skin');+ }+ if (snapshot && !wipe) args.push('-snapshot', SNAPSHOT_NAME);else args.push('-no-snapshot');if (wipe) args.push('-wipe-data');if (accel === 'off') args.push('-accel', 'off');return args;}- /**- * 启动模拟器。返回 { ok, port, serial, accel, proc }。- * 只负责把进程拉起来;"Android 是否可用"由上层等 adb 判断。- */- async start({ headless = true, onLog = () => {}, port = 5554, wipe = false } = {}) {- if (this.proc && !this.proc.killed) return { ok: true, reused: true, serial: `emulator-${port}`, port };-+ /** 拉起单个进程(不做开机等待,开机等待在 start() 的 probe 循环里) */+ spawnOnce(plan, { headless, onLog, logFile }) {const loc = this.locate();- if (!loc.emulatorExe) throw new Error('未安装运行时引擎,请先在「运行时」页完成部署');- if (!loc.sysImgOk) throw new Error('系统镜像未就绪,请先在「运行时」页下载 Android 系统镜像');-- const s = this.settings;- this.ensureAvd({- memoryMB: s.engine.memoryMB || 4096,- cores: s.engine.cores || 4,+ const env = this.env(loc.root, plan);+ const args = this.buildArgs({+ headless, accel: plan.accel, port: plan.port, gpu: plan.gpu,+ memoryMB: plan.memoryMB, cores: plan.cores,+ snapshot: plan.snapshot, wipe: plan.wipe, lcd: plan.lcd,});-- const accelInfo = await this.provisioner.emulatorAccel();- const accel = accelInfo.ok ? 'auto' : 'off';- // 镜像 tag 切换后旧 userdata 不兼容,用 -wipe-data 重建- const args = this.buildArgs({ headless, accel, port, wipe: wipe || !!this.wipePending });- this.wipePending = false;-- const env = this.env(loc.root);- // 没有硬件加速时必须显式授权 TCG,否则 emulator 直接拒绝启动- if (accel === 'off') env.ANDROID_I_WANT_MY_TCG = 'yes';-- onLog(accelInfo.ok- ? `启动运行时(${accelInfo.note})…`- : `启动运行时(${accelInfo.note})…`);-- const logFile = path.join(store.DATA_DIR, 'logs', 'emulator.log');- fs.mkdirSync(path.dirname(logFile), { recursive: true });- fs.appendFileSync(logFile, `\n\n=== ${new Date().toISOString()} START ===\n${loc.emulatorExe} ${args.join(' ')}\n`);+ fs.appendFileSync(logFile, `\n--- ${new Date().toISOString()} ${plan.label} ---\n${loc.emulatorExe} ${args.join(' ')}\n`);const proc = spawn(loc.emulatorExe, args, {cwd: path.dirname(loc.emulatorExe),env,windowsHide: true,+ // detached: 让模拟器独立于 ApkStart 进程组。+ // Electron 退出时会把自己创建的 job 对象关掉,顺带把子进程一起杀掉——+ // 表现就是"关掉 ApkStart 再打开又要冷启动 20 多秒"。独立出去之后模拟器留着,+ // 下次启动直接接管(见 Runtime.adoptExisting),点开就是秒进。+ detached: true,stdio: ['ignore', 'pipe', 'pipe'],});this.proc = proc;+ try { proc.unref(); } catch (_) { /* ignore */ }const pipe = (stream) => {stream.setEncoding('utf8');@@ -206,65 +290,242 @@ class EmulatorEngine {const lines = buf.split('\n');buf = lines.pop() || '';for (const l of lines) {- if (l.trim()) this.log(l.trim());+ if (!l.trim()) continue;+ this.log(l.trim());+ fs.appendFileSync(logFile, `${l.trim()}\n`);}});};pipe(proc.stdout);pipe(proc.stderr);-proc.on('exit', (code) => {this.log(`emulator exit ${code}`);+ fs.appendFileSync(logFile, `emulator exit ${code}\n`);this.proc = null;onLog(`运行时已退出(code=${code})`);});proc.on('error', (e) => {this.log(`spawn error: ${e.message}`);+ fs.appendFileSync(logFile, `spawn error: ${e.message}\n`);this.proc = null;});+ return { proc, args };+ }++ /** 强杀当前尝试(含 qemu 子进程树) */+ async killAttempt() {+ const proc = this.proc;+ this.proc = null;+ if (!proc) return;+ try { proc.kill(); } catch (_) { /* ignore */ }+ if (process.platform === 'win32' && proc.pid) {+ try { spawn('taskkill', ['/PID', String(proc.pid), '/T', '/F'], { windowsHide: true, stdio: 'ignore' }); } catch (_) { /* ignore */ }+ }+ await sleep(1200);+ }- // 等进程稳定;emulator 参数错误会立刻退出- await new Promise((r) => setTimeout(r, 2500));- if (!this.proc) throw new Error(`运行时启动失败,详见日志:${logFile}`);+ /**+ * 启动 + 自动重试。+ * @param {Function} probe 异步回调,返回 'ok' | 'pending' | 'fatal'+ */+ async start({ headless = false, onLog = () => {}, probe = null, maxAttempts = 4 } = {}) {+ if (this.proc && !this.proc.killed) {+ return { ok: true, reused: true, serial: this.serial, port: this.port };+ }- return { ok: true, serial: `emulator-${port}`, port, accel: accelInfo, logFile };+ const loc = this.locate();+ if (!loc.emulatorExe) throw new Error('未安装运行时引擎,请先在「运行时」页完成部署');+ const choice = this.imageChoice();+ if (choice.compat ? !this.provisioner.playImageInfo().ok : !this.provisioner.systemImageInfo().ok) {+ throw new Error('系统镜像未就绪,请先在「运行时」页下载 Android 系统镜像');+ }++ const accelInfo = await this.provisioner.emulatorAccel();+ const emuVersion = (await this.provisioner.emulatorVersion()).version || '';+ this._emuVersion = emuVersion;+ const s = this.settings;+ const diskMB = doctor.freeDiskMB(loc.root);+ const startPort = await doctor.freePortPair(5554);+ const adbPort = await doctor.freeAdbPort(Number(process.env.ANDROID_ADB_SERVER_PORT) || 5044);+ // 让本进程里所有 adb 调用和 emulator 用同一个 server 端口+ process.env.ANDROID_ADB_SERVER_PORT = String(adbPort);+ this.adbPort = adbPort;+ // 端口固定了,上一次运行留下的 server 可能还挂着旧设备记录,先清一次再起,+ // 否则新模拟器注册时会被旧记录挤成 offline。+ await new Promise((resolve) => {+ try {+ const adb = this.provisioner.adbVersionPath() || 'adb';+ execFile(adb, ['kill-server'], {+ timeout: 6000, windowsHide: true,+ env: { ...process.env, ANDROID_ADB_SERVER_PORT: String(adbPort) },+ }, () => resolve());+ } catch (_) { resolve(); }+ });++ // 与设置页 / 诊断报告共用同一个入口,保证「显示的」就是「实跑的」+ const profile = doctor.autoProfile({+ settings: s, accel: accelInfo, emulatorVersion: emuVersion, diskMB,+ port: startPort, adbPort,+ });+ this.profile = profile;+ const variants = doctor.planVariants(profile).slice(0, maxAttempts);++ const logFile = path.join(store.DATA_DIR, 'logs', 'emulator.log');+ fs.mkdirSync(path.dirname(logFile), { recursive: true });+ fs.appendFileSync(logFile, `\n\n=== ${new Date().toISOString()} START ${doctor.describeProfile(profile)} ===\n`);++ // 屏幕规格在整个启动过程中保持一致,否则每次重试都换分辨率会狂清快照+ const screen = doctor.lcdFor({ accelOk: accelInfo.ok });+ this.attempts = [];+ this.lastDiagnosis = null;+ let lastError = '';++ for (let i = 0; i < variants.length; i += 1) {+ const base = variants[i];+ // 端口占用也会导致失败,每次重试重新探测一次+ // eslint-disable-next-line no-await-in-loop+ const port = i === 0 ? startPort : await doctor.freePortPair(startPort + (i * 2));+ const plan = { ...base, port, adbPort, lcd: screen };+ this.port = port;+ onLog(`启动运行时(第 ${i + 1}/${variants.length} 次:${plan.label})…`);++ // eslint-disable-next-line no-await-in-loop+ const avd = this.ensureAvd({+ ...plan,+ wipe: plan.wipe || !!this.wipePending,+ });+ // eslint-disable-next-line no-await-in-loop+ this.spawnOnce({ ...plan, wipe: plan.wipe || avd.wipePending }, { headless, onLog, logFile });++ // 参数错误 / DLL 缺失会立刻退出+ // eslint-disable-next-line no-await-in-loop+ await sleep(2500);+ if (!this.proc) {+ const d = doctor.diagnose(this.recentLog(60));+ this.attempts.push({ plan: plan.label, diagnosis: d.code });+ this.lastDiagnosis = d;+ lastError = `${d.title}:${d.hint}`;+ onLog(`${d.title},自动换一组参数重试…`);+ continue;+ }++ if (!probe) {+ return { ok: true, serial: this.serial, port, accel: accelInfo, logFile, profile, attempts: this.attempts };+ }++ const started = Date.now();+ const timeout = plan.bootTimeoutMs || 240000;+ let ok = false;+ let fatal = false;+ let sawBooting = false;+ // eslint-disable-next-line no-await-in-loop+ while (Date.now() - started < timeout) {+ if (!this.proc) { fatal = true; break; }+ let state = 'pending';+ try {+ // eslint-disable-next-line no-await-in-loop+ state = await probe({ serial: this.serial, port, adbPort });+ } catch (_) { state = 'pending'; }+ if (state === 'ok') { ok = true; break; }+ if (state === 'fatal') { fatal = true; break; }+ // 只要 adb 能执行 shell,说明内核已经在引导,日志里的普通 Vulkan/EGL 信息不算失败+ if (state === 'booting') sawBooting = true;+ // 45 秒仍完全没连上,且日志出现明确致命错误 → 提前换方案,不干等 4 分钟+ if (!sawBooting && Date.now() - started > 45000) {+ const d = doctor.diagnose(this.recentLog(80));+ if (['GPU_INIT', 'ACCEL', 'GPU_MODE', 'IMAGE', 'DLL', 'MEMORY'].includes(d.code)) {+ this.lastDiagnosis = d;+ fatal = true;+ break;+ }+ }+ // eslint-disable-next-line no-await-in-loop+ if ((Date.now() - started) % 15000 < 3500) onLog(`正在开机… ${Math.round((Date.now() - started) / 1000)}s`);+ // eslint-disable-next-line no-await-in-loop+ await sleep(3000);+ }++ if (ok) {+ const bootMs = Date.now() - started;+ // 一定要存 quickboot 快照:模拟器进程会随 ApkStart 退出而结束(Electron 的+ // job 对象会连带杀掉子进程),下次打开有没有快照直接决定是 25 秒还是 7 秒。+ // 装完新应用时 installer 会作废快照,避免"重启后应用消失"。+ this.snapshotWorthSaving = true;+ onLog(`运行时就绪(${Math.round(bootMs / 1000)}s,${plan.label})`);+ return {+ ok: true, serial: this.serial, port, accel: accelInfo, logFile,+ profile, attempts: this.attempts, bootMs, quickBoot: true,+ };+ }++ const d = fatal ? (this.lastDiagnosis || doctor.diagnose(this.recentLog(80))) : doctor.diagnose(this.recentLog(80));+ this.attempts.push({ plan: plan.label, diagnosis: d.code, timeout: !fatal });+ this.lastDiagnosis = d;+ lastError = fatal ? `${d.title}:${d.hint}` : '开机超时(可能是首次引导较慢或硬件加速未生效)';+ onLog(`${lastError},自动换一组参数重试…`);+ // eslint-disable-next-line no-await-in-loop+ await this.killAttempt();+ }++ const d = this.lastDiagnosis || doctor.diagnose(this.recentLog(120));+ const report = doctor.writeReport({+ dataDir: store.DATA_DIR, profile, logLines: this.recentLog(300),+ extra: { attempts: this.attempts, diagnosis: d, image: choice },+ });+ const err = new Error(+ `运行时多次尝试仍未能启动(${d.title})。\n${d.hint}\n\n`+ + `已尝试:${this.attempts.map((a) => `${a.plan} → ${a.diagnosis}`).join(';')}\n`+ + `诊断报告:${report.file}`,+ );+ err.diagnosis = d;+ err.report = report.file;+ err.attempts = this.attempts;+ throw err;}- running() {- return !!(this.proc && !this.proc.killed);+ running() { return !!(this.proc && !this.proc.killed); }++ /**+ * 开机成功后顺手存一份 quickboot 快照。+ * 模拟器进程活不过 ApkStart(Electron 退出会连带清理子进程),所以不能指望+ * "退出时再存";开机完趁系统干净存一份,下次打开直接 7 秒进桌面而不是 25 秒。+ * 装新应用后 installer 会作废快照,不用担心应用消失。+ */+ saveSnapshotSoon(adbPath) {+ if (this._snapQueued || !adbPath) return;+ this._snapQueued = true;+ const serial = this.serial;+ setTimeout(() => {+ execFile(adbPath, ['-s', serial, 'emu', 'avd', 'snapshot', 'save', SNAPSHOT_NAME],+ { timeout: 60000, windowsHide: true }, () => { /* 存不上就算了,下次照常冷启动 */ });+ }, 6000).unref?.();}- /** 优雅停止:优先走模拟器控制台,失败再杀进程树 */+ /** 优雅停止:慢机器先保存 quickboot 快照,再走控制台关机,最后强杀进程树 */async stop({ adbPath } = {}) {if (!this.proc) return true;- const port = 5554;- try {- if (adbPath) {- const { execFile } = require('child_process');- await new Promise((resolve) => {- execFile(adbPath, ['-s', `emulator-${port}`, 'emu', 'kill'], { timeout: 8000 }, () => resolve());- });- }- } catch (_) { /* 落到强杀 */ }-+ const serial = this.serial;+ if (adbPath && this.snapshotWorthSaving !== false) {+ await new Promise((resolve) => {+ execFile(adbPath, ['-s', serial, 'emu', 'avd', 'snapshot', 'save', SNAPSHOT_NAME],+ { timeout: 8000, windowsHide: true }, () => resolve());+ });+ }+ if (adbPath) {+ await new Promise((resolve) => {+ execFile(adbPath, ['-s', serial, 'emu', 'kill'],+ { timeout: 8000, windowsHide: true }, () => resolve());+ });+ }for (let i = 0; i < 20 && this.proc; i += 1) {// eslint-disable-next-line no-await-in-loop- await new Promise((r) => setTimeout(r, 300));- }- if (this.proc) {- try { this.proc.kill(); } catch (_) { /* ignore */ }- // emulator 会拉起子进程(qemu-system),必须整棵树杀- try {- spawn('taskkill', ['/PID', String(this.proc.pid), '/T', '/F'], { windowsHide: true });- } catch (_) { /* ignore */ }+ await sleep(300);}- this.proc = null;+ await this.killAttempt();return true;}- recentLog(n = 40) {- return this._log.slice(-n).map((x) => x.line);- }+ recentLog(n = 40) { return this._log.slice(-n).map((x) => x.line); }}-module.exports = { EmulatorEngine, AVD_NAME };+module.exports = { EmulatorEngine, AVD_NAME, SNAPSHOT_NAME };diff --git a/src/core/engine.js b/src/core/engine.jsindex bd1450d..b2cfaa6 100644--- a/src/core/engine.js+++ b/src/core/engine.js@@ -15,12 +15,30 @@ const { AdbClient } = require('./adb');const store = require('./store');const { Provisioner } = require('./provision');const { EmulatorEngine } = require('./emulator');+const doctor = require('./doctor');const LOG_DIR = path.join(store.DATA_DIR, 'logs');const MONITOR_PORT = 5556;const EMU_PORT = 5554;const EMU_SERIAL = `emulator-${EMU_PORT}`;+/** TCP 端口是否有人监听(用来判断上次留下的模拟器还在不在) */+function portAlive(port, timeout = 150) {+ return new Promise((resolve) => {+ const sock = net.connect({ host: '127.0.0.1', port });+ let done = false;+ const fin = (v) => {+ if (done) return;+ done = true;+ try { sock.destroy(); } catch (_) { /* ignore */ }+ resolve(v);+ };+ sock.setTimeout(timeout, () => fin(false));+ sock.once('connect', () => fin(true));+ sock.once('error', () => fin(false));+ });+}+const ATTACH_ENDPOINTS = [{ name: 'Windows Subsystem for Android', serial: '127.0.0.1:58526' },{ name: 'LDPlayer', serial: '127.0.0.1:5555' },@@ -42,6 +60,7 @@ class Runtime {this._freeformReady = false;this._client = null;this._bootLog = [];+ this.emuSerial = EMU_SERIAL; // 端口是动态挑的,serial 跟着变store.ensureDirs();if (!fs.existsSync(LOG_DIR)) fs.mkdirSync(LOG_DIR, { recursive: true });}@@ -65,7 +84,7 @@ class Runtime {client(serial) {const useSerial = serial- || (this.settings.engine.mode === 'attach' ? this.settings.device : EMU_SERIAL);+ || (this.settings.engine.mode === 'attach' ? this.settings.device : this.emuSerial);const adbPath = this.adbPath();if (!this._client || this._client.serial !== useSerial || this._client.adbPath !== adbPath) {this._client = new AdbClient({ adbPath, serial: useSerial });@@ -110,6 +129,10 @@ class Runtime {ready: false,needsSetup: null,error: '',+ serial: this.emuSerial,+ autoProfile: this.emulator.profile ? doctor.describeProfile(this.emulator.profile) : '',+ diagnosis: this.emulator.lastDiagnosis || null,+ attempts: this.emulator.attempts || [],};if (!env.adb.ok) {@@ -137,7 +160,8 @@ class Runtime {if (result.deviceOnline) result.ready = true;else if (!env.emulator.ok) result.needsSetup = 'emulator';else if (!env.sysimg.ok) result.needsSetup = 'sysimg';- else if (!env.accel.ok && !s.engine.forceTcg) result.needsSetup = 'accel';+ // 不再把「没有硬件加速」当成阻塞步骤:doctor 会自动回退软件模拟,+ // 并在开机失败时按 GPU/加速/内存组合依次重试。else result.needsSetup = 'boot';result.phase = result.deviceOnline@@ -220,69 +244,56 @@ class Runtime {* 与 QEMU+ISO 不同,这里没有"安装系统"这一步:镜像本身就是系统,首次启动即开机。*/async bootEmulator({ env, onLog = () => {} } = {}) {- if (this.emulator.running()) {- const client = this.client(EMU_SERIAL);- if (!(await client.isOnline())) {- // 进程还在但还没就绪,等它- } else {- await this.prepare(client);- return { ok: true, client, reused: true };- }- }-if (this.vmStarting) {const started = Date.now();while (this.vmStarting && Date.now() - started < 300000) {// eslint-disable-next-line no-await-in-loopawait new Promise((r) => setTimeout(r, 500));}- const client = this.client(EMU_SERIAL);- if (await client.isOnline()) {- await this.prepare(client);- return { ok: true, client, reused: true };+ const c = this.client();+ if (await c.isOnline()) {+ await this.prepare(c);+ return { ok: true, client: c, reused: true };}}- const s = this.settings;- const accel = env.accel || await this.provisioner.emulatorAccel();-- // Windows 上纯软件模拟(TCG)不可用:qemu 会挂在 boot 阶段且不消耗 CPU。- // 与其让用户干等十几分钟,不如直接给出可执行的解决办法。- if (!accel.ok && !s.engine.forceTcg) {- throw new Error(- '需要启用硬件加速才能启动 Android。'- + '请点上方「启用硬件加速」按钮(一键安装 AEHD 驱动,需管理员确认),'- + '或在「启用或关闭 Windows 功能」里勾选「虚拟机平台」后重启电脑。',- );+ const accel = env && env.accel ? env.accel : await this.provisioner.emulatorAccel();+ if (!accel.ok) {+ onLog('未检测到硬件加速:将自动回退软件模拟(首次开机会明显变慢,无需手动设置)');}- if (!accel.ok) onLog('已强制软件模拟:Windows 下 TCG 可能卡在内核引导阶段');this.vmStarting = true;try {+ // probe 交给 EmulatorEngine 的开机循环:进程退出/致命日志时它会换一组参数重试+ const probe = async ({ serial }) => {+ if (!this.emulator.running()) return 'fatal';+ const c = new AdbClient({ adbPath: this.adbPath(), serial });+ try {+ if (!(await c.isOnline())) return 'pending';+ const boot = await c.shell('getprop sys.boot_completed', { timeout: 8000 }).catch(() => '');+ if (String(boot).trim() !== '1') return 'booting';+ const pm = await c.shell('pm path android', { timeout: 8000 }).catch(() => '');+ return /package:/.test(pm) ? 'ok' : 'pending';+ } catch (_) {+ return 'pending';+ }+ };+const st = await this.emulator.start({- headless: s.engine.headless !== false,+ headless: this.settings.engine.headless !== false,onLog,+ probe,});this.lastActivity = Date.now();-- const client = this.client(EMU_SERIAL);- const timeout = accel.ok ? 240000 : 900000;- onLog(`等待 Android 开机…(${accel.ok ? '硬件加速' : '软件模拟,可能很慢'})`);- const linked = await this.waitAdb(client, timeout, onLog);- if (!linked) {- return { ok: false, error: '运行时已启动,但 adb 未能连上。请查看运行时日志(%APPDATA%\\apkstart\\logs\\emulator.log)' };- }- const ready = await this.waitAndroidReady(client, timeout, onLog);- if (!ready.ok) {- return {- ok: false,- error: ready.stage === 'kernel'- ? 'Android 内核未完成引导:可能是硬件加速未真正生效,或镜像文件损坏'- : 'Android 已引导但系统服务未就绪(可能停在首次开机向导)',- };- }+ this.emuSerial = st.serial || this.emulator.serial;+ const client = this.client(this.emuSerial);await this.prepare(client);- return { ok: true, client, engine: 'emulator', serial: st.serial };+ // 开机成功后存一份快照,下次打开走 quickboot+ this.emulator.saveSnapshotSoon(this.adbPath());+ return { ok: true, client, engine: 'emulator', serial: this.emuSerial, profile: st.profile };+ } catch (e) {+ // 把自动重试/诊断结论原样抛给 UI,避免再包一层含糊的「启动失败」+ return { ok: false, error: e.message, diagnosis: e.diagnosis, report: e.report, attempts: e.attempts };} finally {this.vmStarting = false;}@@ -521,6 +532,166 @@ class Runtime {// ---------------- ensure ----------------+ /**+ * 接管上一次运行留下的模拟器。+ * 每台模拟器都有自己的控制台端口(5554/5556/…),adb 端口是 +1。+ * 端口能连上并且 system 已经 boot_completed,就直接当成我们的运行时用,+ * 这样「关掉 ApkStart 再点开应用」是秒进,而不是再冷启一台。+ */+ /**+ * 找出所有还活着的模拟器控制台端口。+ * 不能用「从 5554 顺序试」:端口会随着多次启动往上漂(5554→5556→5558…),+ * 试固定范围总有试漏的时候,漏了就会再开一台新机器。这里直接按进程名+ * 找出 qemu 监听的所有 TCP 端口,一个都不会漏。+ */+ async emulatorPorts() {+ const run = (cmd, args) => new Promise((resolve) => {+ const { execFile } = require('child_process');+ execFile(cmd, args, { windowsHide: true, maxBuffer: 8 * 1024 * 1024 }, (err, out) => {+ resolve(err ? '' : String(out || ''));+ });+ });+ const ports = new Set();+ try {+ const tl = await run('tasklist', ['/FO', 'CSV', '/NH']);+ const pids = new Set();+ for (const line of tl.split('\n')) {+ const m = /^"([^"]+)","(\d+)"/.exec(line.trim());+ if (m && /qemu|emulator/i.test(m[1])) pids.add(m[2]);+ }+ if (!pids.size) return [];+ const ns = await run('netstat', ['-ano', '-p', 'TCP']);+ for (const line of ns.split('\n')) {+ const m = /:(\d+)\s+\S+\s+LISTENING\s+(\d+)/i.exec(line);+ if (m && pids.has(m[2])) ports.add(Number(m[1]));+ }+ } catch (_) { /* 退回到端口探测 */ }++ if (ports.size) {+ // 控制台端口(偶数)和 adb 端口(+1)都会被监听,只保留控制台端口+ const all = [...ports].sort((a, b) => a - b);+ const consoles = all.filter((p) => ports.has(p + 1));+ return consoles.length ? consoles : all;+ }+ // 兜底:没有 qemu 进程信息时,直接探测(连接被拒绝会立刻返回,代价很小)+ const found = [];+ for (let port = 5554; port <= 5620; port += 2) {+ // eslint-disable-next-line no-await-in-loop+ if (await portAlive(port, 120)) found.push(port);+ }+ return found;+ }++ async adoptExisting({ onLog = () => {} } = {}) {+ const alive = await this.emulatorPorts();+ if (!alive.length) {+ onLog('没有发现上一台运行时,准备冷启动');+ return null;+ }+ onLog(`发现 ${alive.length} 台残留运行时(端口 ${alive.join(', ')}),尝试接管`);++ // adb server 里可能还留着上个进程的 offline 记录(模拟器重启过 adbd 就会这样),+ // 先清掉再连,否则 get-state 永远返回 offline,会误判成"没就绪"把好好的机器杀掉。+ await this.client().exec(['kill-server'], { withSerial: false, timeout: 8000 }).catch(() => {});++ for (const port of alive) {+ const serial = `127.0.0.1:${port + 1}`;+ const c = this.client(serial);+ let booted = '';+ for (let i = 0; i < 6 && booted !== '1'; i += 1) {+ // eslint-disable-next-line no-await-in-loop+ await c.connect().catch(() => false);+ // eslint-disable-next-line no-await-in-loop+ const state = (await c.exec(['get-state'], { timeout: 5000 }).then((r) => r.stdout).catch(() => '')).trim();+ if (state === 'device') {+ // eslint-disable-next-line no-await-in-loop+ booted = (await c.shell('getprop sys.boot_completed', { timeout: 6000 }).catch(() => '')).trim();+ }+ if (booted !== '1') await new Promise((r) => setTimeout(r, 700));+ }+ if (booted !== '1') {+ onLog(`发现上一台运行时(${serial})但没就绪,先关掉它再重新开机`);+ // AVD 目录有锁:留着这台会让新实例直接退出,表现成"怎么都开不了机"。+ // adb 都连不上了,只能按控制台端口找到进程强杀。+ const pid = await this.pidOnPort(port);+ if (pid) {+ await new Promise((resolve) => {+ const { execFile } = require('child_process');+ execFile('taskkill', ['/PID', String(pid), '/T', '/F'], { windowsHide: true }, () => resolve());+ });+ }+ await new Promise((r) => setTimeout(r, 1200));+ continue;+ }+ this.emuSerial = serial;+ this.emulator.port = port;+ store.saveSettings({ device: serial });+ onLog(`已接管正在运行的运行时(${serial})`);+ // eslint-disable-next-line no-await-in-loop+ await this.prepare(c);+ return { ok: true, client: c, engine: 'emulator', reused: true };+ }+ return null;+ }++ /** 某个 TCP 端口是哪个进程在监听(用于强杀卡死的模拟器) */+ async pidOnPort(port) {+ return new Promise((resolve) => {+ const { execFile } = require('child_process');+ execFile('netstat', ['-ano', '-p', 'TCP'], { windowsHide: true }, (err, stdout) => {+ if (err || !stdout) return resolve(0);+ const line = stdout.split('\n').find((l) => new RegExp(`:${port}\\s`).test(l) && /LISTENING/i.test(l));+ const m = line && /(\d+)\s*$/.exec(line.trim());+ return resolve(m ? Number(m[1]) : 0);+ });+ });+ }++ /**+ * 清理上一次运行遗留、却没被接管的孤儿模拟器。+ * 关掉 ApkStart 时 emulator 是 detached 的,qemu 会存活;下次启动时它仍占着 AVD 锁,+ * 表现为冷启直接 FATAL "Running multiple emulators with the same AVD"。+ * 优先用 AVD 锁文件里 emulator 自己写的 PID(最可靠),再兜底按命令行扫一遍本 AVD 的 qemu/emulator。+ */+ async killOrphanEmulators({ onLog = () => {} } = {}) {+ const avdDir = path.join(this.provisioner.paths().avdHome, `${AVD_NAME}.avd`);+ const killPid = (pid) => new Promise((resolve) => {+ if (!pid) return resolve();+ const { execFile } = require('child_process');+ execFile('taskkill', ['/PID', String(pid), '/T', '/F'], { windowsHide: true }, () => resolve());+ });+ const pids = new Set();+ // 1) 锁文件记录的 PID(emulator 启动时写入,指向 emulator.exe,/T 会连带杀掉 qemu)+ try {+ const f = path.join(avdDir, 'hardware-qemu.ini.lock', 'pid');+ if (fs.existsSync(f) && fs.statSync(f).isFile()) {+ const pid = parseInt(fs.readFileSync(f, 'utf8').trim(), 10);+ if (pid) pids.add(pid);+ }+ } catch (_) { /* ignore */ }+ // 2) 兜底:命令行里引用本 AVD 的 qemu / emulator 全部强杀(wmic 不可用时跳过)+ try {+ const { execFile } = require('child_process');+ const out = await new Promise((res) => execFile(+ 'wmic',+ ['process', 'where', "name='qemu-system-x86_64.exe' or name='emulator.exe'", 'get', 'processid,commandline', '/format:csv'],+ { windowsHide: true, maxBuffer: 32 * 1024 * 1024 },+ (e, o) => res(e ? '' : o || ''),+ ));+ for (const line of String(out).split('\n')) {+ if (line.includes(AVD_NAME) && /qemu|emulator/i.test(line)) {+ const m = /,(\d+)\s*$/.exec(line.trim());+ if (m) pids.add(Number(m[1]));+ }+ }+ } catch (_) { /* wmic 不可用就跳过,锁文件 PID 已覆盖绝大多数情况 */ }+ if (pids.size) {+ onLog(`清理 ${pids.size} 个残留模拟器进程`);+ await Promise.all([...pids].map(killPid));+ await new Promise((r) => setTimeout(r, 1500));+ }+ }+async ensure({ onLog = () => {} } = {}) {const client = this.client();if (await client.isOnline()) {@@ -528,6 +699,32 @@ class Runtime {return { ok: true, client, engine: 'builtin', reused: true };}+ // 上一次 ApkStart 退出时模拟器会留着(下次点开秒进),但新进程里没有它的+ // 句柄,adb server 也可能被重启过——只靠 isOnline() 会判成"没有运行时",+ // 于是又开一台新的。这里先把还活着的模拟器接管过来,避免重复开机器吃内存。+ const adopted = await this.adoptExisting({ onLog });+ if (adopted) return adopted;++ // 上次会话遗留 / 别的进程拉起的 emulator:换个端口也要复用,绝不重复开一台+ try {+ const devices = await client.devices();+ const running = devices.find((d) => /^emulator-\d+$/.test(d.serial) && d.state === 'device');+ if (running) {+ this.emuSerial = running.serial;+ const m = /(\d+)$/.exec(running.serial);+ if (m) this.emulator.port = Number(m[1]);+ const c2 = this.client(running.serial);+ await this.prepare(c2);+ return { ok: true, client: c2, engine: 'emulator', reused: true };+ }+ } catch (_) { /* 没找到就正常拉起 */ }++ // 进程还在但设备离线(多半卡在引导):先停掉再重新拉起,避免干等+ if (this.emulator.running()) {+ onLog('检测到卡住的运行时,正在重启…');+ await this.emulator.stop({ adbPath: this.adbPath() });+ }+const s = this.settings;// 高级模式:连接已有运行时@@ -546,22 +743,23 @@ class Runtime {}// 默认:自带运行时+ // 单文件发行版的镜像是压缩的,先展开(已展开过就秒过)+ await this.provisioner.materializeImages(onLog).catch(() => {});const env = await this.provisioner.checkEnv();// emulator 路径:镜像即系统,没有"安装到磁盘"这一步if (env.emulator.ok && env.sysimg.ok) {- if (!env.accel.ok && !s.engine.forceTcg) {- return {- ok: false,- needsSetup: 'accel',- error: '需要启用硬件加速才能启动 Android(点「启用硬件加速」一键安装驱动)',- env,- };- }+ // 关掉 ApkStart 后可能残留未接管的模拟器(detached 的 qemu 仍存活),+ // 它一直占着 AVD 锁,会让冷启直接 FATAL "Running multiple emulators with the same AVD"。+ // 接管失败时先把这些孤儿清掉,再冷启,保证「关掉再开」一定能起来。+ await this.killOrphanEmulators({ onLog }).catch(() => {});try {const r = await this.boot({ onLog });- if (r.ok) return { ok: true, client: r.client, engine: 'emulator' };- return { ok: false, error: r.error, env };+ if (r.ok) return { ok: true, client: r.client, engine: 'emulator', profile: r.profile };+ return {+ ok: false, error: r.error, env,+ diagnosis: r.diagnosis, report: r.report, attempts: r.attempts,+ };} catch (e) {return { ok: false, error: e.message, env };}@@ -609,6 +807,40 @@ class Runtime {get vmRunning() { return this.emulator.running() || !!(this.vmProc && !this.vmProc.killed); }+ // ---------------- 诊断 / 瘦身(供 UI 调用) ----------------++ async diagnostics() {+ const env = this.provisioner.paths();+ const checked = await this.provisioner.checkEnv();+ const profile = this.emulator.profile || doctor.autoProfile({+ settings: this.settings,+ accel: checked.accel,+ emulatorVersion: checked.emulator.version || '',+ diskMB: doctor.freeDiskMB(store.DATA_DIR),+ });+ return doctor.writeReport({+ dataDir: store.DATA_DIR,+ profile,+ logLines: this.emulator.recentLog(300),+ extra: {+ attempts: this.emulator.attempts,+ diagnosis: this.emulator.lastDiagnosis,+ runtimeDir: env.root,+ serial: this.emuSerial,+ bootLog: this.bootLog,+ },+ });+ }++ usage() { return require('./layers').summary(this.provisioner.paths().root); }++ cleanup({ apply = false, aggressive = false } = {}) {+ // 运行时正在跑时不能删它的快照,否则可能把当前会话写坏+ return require('./layers').prune(this.provisioner.paths().root, {+ apply, aggressive, keepSnapshots: this.vmRunning,+ });+ }+dispose() {if (this._watchdog) clearInterval(this._watchdog);if (this.emulator.running()) {diff --git a/src/core/installer.js b/src/core/installer.jsindex 7f0d033..951b037 100644--- a/src/core/installer.js+++ b/src/core/installer.js@@ -4,10 +4,48 @@* 把「解析 APK → 安装进运行时 → 落本地元数据 → 生成桌面快捷方式」串成一条流水线。*/const fs = require('fs');+const os = require('os');const path = require('path');+const crypto = require('crypto');const store = require('./store');const { parseApk } = require('./apk');-const { pngToIco, writeShortcut, removeShortcut, safeFileName } = require('./shortcut');+const { ZipArchive } = require('./zip');+const { iconToIco, writeShortcut, removeShortcut, safeFileName } = require('./shortcut');++const sleep = (ms) => new Promise((r) => setTimeout(r, ms));++/** APK 只有 ARM 原生库(国产 App 绝大多数如此) */+function isArmOnly(meta) {+ return !!(meta && meta.abis && meta.abis.length && !meta.abis.some((a) => /x86/i.test(a)));+}++/**+ * 拆分安装包(.apks / .xapk):解出里面的分片 APK 到纯 ASCII 临时目录。+ * 返回 { meta, files, cleanup };meta 来自带 AndroidManifest 的 base APK。+ */+function parseBundle(filePath) {+ const zip = new ZipArchive(fs.readFileSync(filePath));+ const apkNames = zip.names().filter((n) => /\.apk$/i.test(n));+ if (!apkNames.length) throw new Error('这个安装包里没有找到 APK 分片(可能不是 .apks/.xapk)');+ const dir = path.join(os.tmpdir(), 'apkstart-bundle', crypto.createHash('sha1')+ .update(filePath).digest('hex').slice(0, 12));+ fs.mkdirSync(dir, { recursive: true });+ const files = apkNames.map((n, i) => {+ const target = path.join(dir, `split-${i}.apk`);+ fs.writeFileSync(target, zip.read(n));+ return target;+ });+ let meta = null;+ for (const f of files) {+ try { meta = parseApk(f); break; } catch (_) { /* 分片里没有清单 */ }+ }+ if (!meta) throw new Error('拆分包的 base APK 解析失败');+ return {+ meta,+ files,+ cleanup: () => { try { fs.rmSync(dir, { recursive: true, force: true }); } catch (_) { /* ignore */ } },+ };+}function accentOf(pkg) {let h = 0;@@ -37,38 +75,141 @@ class Installer {return path.join(dir, `${safeFileName(app.label)}.lnk`);}+ /**+ * 桌面 + 开始菜单两份。+ * Windows 搜索索引的是「开始菜单 \ 程序」里的 .lnk,只放桌面会搜不到;+ * 有些机器的桌面被 OneDrive 重定向,开始菜单这份也保证入口不丢。+ */+ shortcutPaths(app) {+ const out = [this.shortcutPath(app)];+ if (this.ctx.startMenuDir && store.getSettings().createStartMenuShortcut !== false) {+ // 放在独立子目录:既能被 Windows 搜索索引到,又不会覆盖同名第三方应用的快捷方式+ // (实测「红果免费短剧」在开始菜单里已被另一个桌面助手占用)+ out.push(path.join(this.ctx.startMenuDir, 'ApkStart', `${safeFileName(app.label)}.lnk`));+ }+ return [...new Set(out)];+ }++ /** 兼容镜像按「首次遇到 ARM 应用」按需下载,作为共享只读基础层只下一次 */+ async ensureCompatImage(onProgress) {+ const prov = this.runtime.provisioner;+ if (prov.playImageInfo().ok) return true;+ onProgress({ stage: 'runtime', message: '首次安装 ARM 应用:正在下载兼容镜像(约 1.5GB,只需一次)…' });+ await prov.installPlayImage((p) => onProgress({ stage: 'runtime', message: p.message, percent: p.percent }));+ if (!prov.playImageInfo().ok) throw new Error('兼容镜像下载失败,请检查网络后重试');+ return true;+ }++ /** 切换镜像必须重启运行时;重启后把已装应用从本地 APK 备份重新灌回去 */+ async switchToCompat(onProgress) {+ const apps = store.getApps();+ store.saveSettings({ runtime: { compatImage: true } });+ onProgress({ stage: 'runtime', message: '正在切换到兼容镜像并重启运行时…' });+ try { await this.runtime.stop(); } catch (_) { /* ignore */ }+ // 等旧设备从 adb 列表里消失,避免被 ensure() 当成可复用实例+ for (let i = 0; i < 12; i += 1) {+ // eslint-disable-next-line no-await-in-loop+ const ds = await this.runtime.client().devices().catch(() => []);+ if (!ds.some((d) => /^emulator-\d+$/.test(d.serial))) break;+ // eslint-disable-next-line no-await-in-loop+ await sleep(1000);+ }+ const rt = await this.runtime.ensure({ onLog: (m) => onProgress({ stage: 'runtime', message: m }) });+ if (!rt.ok) {+ const err = new Error(rt.error || '切换兼容镜像后运行时不可用');+ err.needsSetup = rt.needsSetup || 'provision';+ throw err;+ }+ for (const app of apps) {+ if (!app.apkPath || !fs.existsSync(app.apkPath)) continue;+ try {+ if (app.bundle) {+ const b = parseBundle(app.apkPath);+ // eslint-disable-next-line no-await-in-loop+ await rt.client.installMultiple(b.files);+ b.cleanup();+ } else {+ // eslint-disable-next-line no-await-in-loop+ await rt.client.install(app.apkPath);+ }+ onProgress({ stage: 'runtime', message: `正在恢复已装应用 ${app.label}…` });+ } catch (_) { /* 单个应用恢复失败不阻塞 */ }+ }+ return rt;+ }+async install(filePath, onProgress = () => {}) {onProgress({ stage: 'parse', message: '正在解析 APK…' });- const meta = parseApk(filePath);+ let meta;+ let bundle = null;+ if (/\.(apks|xapk)$/i.test(filePath)) {+ bundle = parseBundle(filePath);+ meta = bundle.meta;+ } else {+ meta = parseApk(filePath);+ }onProgress({stage: 'parse-done',message: `已识别 ${meta.label}(${meta.package})`,meta: { label: meta.label, package: meta.package, versionName: meta.versionName },});- onProgress({ stage: 'runtime', message: '正在准备安卓运行时…' });- const rt = await this.runtime.ensure({ onLog: (m) => onProgress({ stage: 'runtime', message: m }) });- if (!rt.ok) {- const err = new Error(rt.error || '运行时不可用');- err.needsSetup = rt.needsSetup || 'provision';- throw err;+ try {+ // 零配置:仅含 ARM 库的应用自动补齐带 ARM 翻译层的镜像,用户不用开任何开关+ if (isArmOnly(meta) && !this.runtime.provisioner.playImageInfo().ok) {+ await this.ensureCompatImage(onProgress);+ const switched = await this.switchToCompat(onProgress);+ return this.finishInstall(switched, meta, filePath, bundle, onProgress);+ }++ onProgress({ stage: 'runtime', message: '正在准备安卓运行时…' });+ const rt = await this.runtime.ensure({ onLog: (m) => onProgress({ stage: 'runtime', message: m }) });+ if (!rt.ok) {+ const err = new Error(rt.error || '运行时不可用');+ err.needsSetup = rt.needsSetup || 'provision';+ throw err;+ }+ return await this.finishInstall(rt, meta, filePath, bundle, onProgress);+ } finally {+ if (bundle) bundle.cleanup();}- const client = rt.client;+ }- // 已安装 → 走覆盖安装+ /** 安装本体 + 落盘元数据 + 快捷方式;失败时带一次自动修复重试 */+ async finishInstall(rt, meta, filePath, bundle, onProgress) {+ const client = rt.client;const existing = store.getApp(meta.package);+ // 装完之后旧 quickboot 快照里的磁盘状态就过期了,留着会导致「装好的应用重启后又不见了」+ try { this.runtime.emulator?.invalidateSnapshot(); } catch (_) { /* ignore */ }onProgress({ stage: 'install', message: existing ? '正在更新应用…' : '正在安装应用…' });- await client.install(filePath);+ try {+ if (bundle) await client.installMultiple(bundle.files);+ else await client.install(filePath);+ } catch (e) {+ // 到了这一步还报 ABI 不匹配:说明当前运行时是 AOSP 镜像,自动切兼容镜像再装一次+ if (e.code === 'NO_MATCHING_ABIS' && !this.runtime.provisioner.playImageInfo().ok) {+ await this.ensureCompatImage(onProgress);+ const rt2 = await this.switchToCompat(onProgress);+ onProgress({ stage: 'install', message: '已切换兼容镜像,正在重新安装…' });+ if (bundle) await rt2.client.installMultiple(bundle.files);+ else await rt2.client.install(filePath);+ } else {+ throw e;+ }+ }this.runtime.touch();- // 图标落盘+ // 图标落盘。APK 图标大量是 WebP,nativeImage 解不了,交给渲染进程解码 ++ // 品牌占位图兜底,保证 .lnk 一定带图标(之前 icoPath 一直是 null)。let iconPath = null;let icoPath = null;if (meta.iconPng) {try {iconPath = store.iconPath(meta.package);fs.writeFileSync(iconPath, meta.iconPng);- const ico = pngToIco(meta.iconPng);+ } catch (_) { /* ignore */ }+ try {+ const ico = await iconToIco(meta.iconPng, { decode: this.ctx.decodeIcon });if (ico) {icoPath = this.icoFile(meta.package);fs.writeFileSync(icoPath, ico);@@ -83,18 +224,27 @@ class Installer {fs.copyFileSync(filePath, apkCopy);} catch (_) { /* ignore */ }+ // 启动入口以系统解析结果为准:APK 里解析到的「主 Activity」经常不是+ // 真正的 LAUNCHER 入口,直接用它启动会跳过应用的初始化页导致闪退。+ let launchActivity = meta.launchActivity;+ try {+ const resolved = await client.resolveLauncher(meta.package);+ if (resolved) launchActivity = resolved;+ } catch (_) { /* 保留 APK 解析结果 */ }+const app = {package: meta.package,label: meta.label,versionName: meta.versionName,versionCode: meta.versionCode,- activity: meta.launchActivity,+ activity: launchActivity,abis: meta.abis,minSdk: meta.minSdk,sizeBytes: meta.sizeBytes,iconPath,icoPath,apkPath: apkCopy,+ bundle: !!bundle,accent: existing ? existing.accent : accentOf(meta.package),installedAt: existing ? existing.installedAt : Date.now(),updatedAt: Date.now(),@@ -120,11 +270,8 @@ class Installer {// 兼容性提示:只有 ARM 原生库时,x86 运行时需要转译层const warnings = [];- if (meta.abis.length && !meta.abis.some((a) => /x86|x86_64/.test(a))) {- warnings.push('此应用仅含 ARM 原生库,需要运行时的 ARM 转译支持(部分 x86 镜像需手动开启)。');- }- if (meta.minSdk && meta.minSdk >= 30) {- warnings.push(`要求 Android ${meta.minSdk}+,请确认运行时版本足够新。`);+ if (meta.minSdk && meta.minSdk > 34) {+ warnings.push(`此应用要求 Android ${meta.minSdk}+,高于当前运行时,可能无法正常运行。`);}client.batteryOptimizeOff(meta.package).catch(() => {});@@ -136,21 +283,69 @@ class Installer {const { target, baseArgs } = this.shortcutTarget();const args = `${baseArgs ? baseArgs + ' ' : ''}--launch "${app.package}"`.trim();const ico = app.icoPath && fs.existsSync(app.icoPath) ? app.icoPath : undefined;- return writeShortcut({- shortcutPath: this.shortcutPath(app),- target,- args,- iconIcoPath: ico,- description: `${app.label} — 由 ApkStart 运行`,- cwd: this.ctx.cwd,- });+ const paths = this.shortcutPaths(app);+ let first = null;+ const errors = [];+ for (const p of paths) {+ try {+ writeShortcut({+ shortcutPath: p,+ target,+ args,+ iconIcoPath: ico,+ description: `${app.label} — 由 ApkStart 运行`,+ cwd: this.ctx.cwd,+ // 每个应用一个 AUMID:任务栏上按应用分组,不会全挤到 ApkStart 里+ appUserModelId: `RoutineMiku.ApkStart.${app.package}`.slice(0, 128),+ });+ if (!first) first = p;+ } catch (e) {+ errors.push(`${p}: ${e.message}`);+ }+ }+ if (!first) throw new Error(errors.join('; ') || '创建快捷方式失败');+ // 开始菜单那份的路径也存下来,卸载时一起删+ store.upsertApp({ package: app.package, startMenuPath: paths[1] || null });+ return first;+ }++ /** 补全缺失的快捷方式与图标:老版本只建了桌面那份,且 WebP 图标当时没转成功 */+ async ensureShortcuts() {+ const made = [];+ for (const app of store.getApps()) {+ let dirty = false;+ if ((!app.icoPath || !fs.existsSync(app.icoPath)) && app.iconPath && fs.existsSync(app.iconPath)) {+ try {+ const ico = await iconToIco(fs.readFileSync(app.iconPath), { decode: this.ctx.decodeIcon });+ if (ico) {+ const p = this.icoFile(app.package);+ fs.writeFileSync(p, ico);+ store.upsertApp({ package: app.package, icoPath: p });+ app.icoPath = p;+ dirty = true;+ }+ } catch (_) { /* 图标补建失败不影响入口 */ }+ }+ const missing = this.shortcutPaths(app).filter((p) => !fs.existsSync(p));+ if (!missing.length && !dirty) continue;+ try {+ // 图标刚补出来时,即使 .lnk 存在也要重建,让快捷方式换上真实应用图标+ this.createShortcut(app);+ store.upsertApp({ package: app.package, shortcutPath: this.shortcutPath(app) });+ made.push(app.label);+ } catch (_) { /* 单个失败不阻塞启动 */ }+ }+ return made;}async uninstall(pkg, { removeShortcut: rm = true } = {}) {const app = store.getApp(pkg);const rt = await this.runtime.ensure();if (rt.ok) await rt.client.uninstall(pkg).catch(() => {});- if (app && rm) removeShortcut(app.shortcutPath);+ if (app && rm) {+ removeShortcut(app.shortcutPath);+ removeShortcut(app.startMenuPath);+ }if (app) {try { if (app.iconPath && fs.existsSync(app.iconPath)) fs.unlinkSync(app.iconPath); } catch (_) {}try { if (app.icoPath && fs.existsSync(app.icoPath)) fs.unlinkSync(app.icoPath); } catch (_) {}@@ -160,15 +355,124 @@ class Installer {return true;}- async launch(pkg, { onLog = () => {} } = {}) {+ async launch(pkg, { onLog = () => {}, beforeStart = null, onMark = () => {} } = {}) {const app = store.getApp(pkg);const rt = await this.runtime.ensure({ onLog });- if (!rt.ok) throw new Error(rt.error || '运行时不可用');+ onMark('ensure done');+ if (!rt.ok) {+ const err = new Error(rt.error || '运行时不可用');+ err.needsSetup = rt.needsSetup;+ throw err;+ }+ // 分辨率要在拉起应用之前改,避免 wm size 触发配置变更把刚启动的 Activity 重建+ if (beforeStart) await beforeStart(rt).catch((e) => onLog(`显示适配跳过:${e.message}`));const settings = store.getSettings();- await rt.client.startApp(app ? app.package : pkg, app ? app.activity : null, {+ const start = () => rt.client.startApp(app ? app.package : pkg, app ? app.activity : null, {freeform: settings.freeform,bounds: app ? app.bounds : null,});+ // 应用可能还没装进当前运行时(镜像重建 / 清过数据 / 首次),直接拉起会报+ // "Invalid packageName"。先在本地缓存里把它装上再启动,这样「点开应用」永远能进,+ // 不用先手动装一遍——这正是「点击已安装应用直接进入系统」想要的体验。+ if (app && app.apkPath && fs.existsSync(app.apkPath)) {+ const pkgs = await rt.client.shell(`pm list packages ${pkg}`, { timeout: 8000 }).catch(() => '');+ if (!new RegExp(`package:${pkg.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}`).test(pkgs)) {+ onLog('应用尚未安装,正在自动安装…');+ await rt.client.install(app.apkPath).catch((e) => onLog(`自动安装失败:${e.message}`));+ }+ }+ // 观察 25 秒并要求「连续存活 5 秒」才算启动成功。+ // 关键:进程"还没起来"和"起来过又没了"必须分开看。以前一看到 pidof 为空就判失败,+ // 结果大型应用(红果这种首启要十几秒的)在加载途中就被 force-stop 重启,+ // 反复三轮才勉强起来,用户感知就是"点了要等一分钟"。+ const staysAlive = async () => {+ const t0 = Date.now();+ let aliveSince = 0;+ let seen = false;+ while (Date.now() - t0 < 25000) {+ // eslint-disable-next-line no-await-in-loop+ await sleep(1000);+ // eslint-disable-next-line no-await-in-loop+ const pid = await rt.client.shell(`pidof ${pkg}`, { timeout: 6000 }).catch(() => '');+ if (!String(pid).trim()) {+ if (seen) return false; // 起来过又消失 = 真的崩了+ continue; // 还在加载,继续等+ }+ seen = true;+ if (!aliveSince) aliveSince = Date.now();+ if (Date.now() - aliveSince >= 5000) return true;+ }+ return seen; // 一直没见过进程才算失败+ };+ try {+ // 先确保运行时权限齐备:安装时的 -g 在清过数据后可能失效,+ // 缺权限时应用会被系统授权框挡住,用户看到的就是「点了没反应/打不开」。+ await rt.client.grantRuntimePermissions(pkg).catch(() => {});+ onMark('permissions granted');+ let ok = false;+ for (let attempt = 1; attempt <= 3 && !ok; attempt += 1) {+ if (attempt > 1) {+ // eslint-disable-next-line no-await-in-loop+ await rt.client.forceStop(pkg).catch(() => {});+ // 授权框挡在最前面时,应用看起来就是「打不开」;先补授权再收掉弹窗+ // eslint-disable-next-line no-await-in-loop+ await rt.client.grantRuntimePermissions(pkg).catch(() => {});+ // eslint-disable-next-line no-await-in-loop+ await rt.client.dismissPermissionDialog().catch(() => {});+ // eslint-disable-next-line no-await-in-loop+ await sleep(600 * attempt);+ }+ let started = true;+ try {+ // eslint-disable-next-line no-await-in-loop+ await start();+ } catch (e) {+ // 有明确崩溃日志才交给外层(可能要切兼容镜像);没有证据多半只是启动慢,重试即可+ if (e.code === 'APP_CRASHED' && e.crash) throw e;+ started = false;+ }+ onMark(`am start #${attempt} ${started ? 'ok' : 'fail'}`);+ // eslint-disable-next-line no-await-in-loop+ ok = started ? await staysAlive() : false;+ onMark(`alive #${attempt} ${ok}`);+ if (!ok && attempt < 3) onLog(`应用启动后退出(第 ${attempt} 次),正在自动重试…`);+ }+ if (!ok) {+ // 兜底:异常退出会留下「半初始化」的数据,导致之后每次都崩。+ // 清一次应用数据再拉起来,成功率最高(用户不必自己去设置里清缓存)。+ onLog('应用连续退出,正在重置应用数据后重试…');+ await rt.client.shell(`pm clear ${pkg}`, { timeout: 20000 }).catch(() => '');+ await sleep(800);+ // pm clear 会把运行时权限一并清掉,必须重新授,否则会卡在系统授权框+ await rt.client.grantRuntimePermissions(pkg).catch(() => {});+ await start().catch((e) => {+ if (e.code === 'APP_CRASHED' && e.crash) throw e;+ });+ ok = await staysAlive();+ if (!ok) await rt.client.dismissPermissionDialog().catch(() => {});+ }+ if (!ok) {+ const err = new Error('应用启动后立即退出,已自动重试并重置应用数据仍未成功');+ err.code = 'APP_UNSTABLE';+ throw err;+ }+ } catch (e) {+ if (e.code === 'APP_CRASHED' && !this.runtime.provisioner.playImageInfo().ok) {+ // 崩溃来自 ARM 翻译层:自动切镜像、重装备份 APK、再启动一次+ onLog('检测到 ARM 翻译层崩溃,正在自动切换兼容镜像…');+ await this.ensureCompatImage(onLog ? (m) => onLog(m.message || '') : () => {});+ const rt2 = await this.switchToCompat((m) => onLog(m.message || ''));+ if (app && app.apkPath && fs.existsSync(app.apkPath)) {+ try { await rt2.client.install(app.apkPath); } catch (_) { /* 保留原包 */ }+ }+ await rt2.client.startApp(app ? app.package : pkg, app ? app.activity : null, {+ freeform: settings.freeform,+ bounds: app ? app.bounds : null,+ });+ } else {+ throw e;+ }+ }this.runtime.touch();if (app) {store.upsertApp({diff --git a/src/core/layers.js b/src/core/layers.jsnew file mode 100644index 0000000..37bd0c4--- /dev/null+++ b/src/core/layers.js@@ -0,0 +1,168 @@+'use strict';+/**+ * 容器式分层:只读基础镜像 + 精简运行时 + 可回收的临时层+ *+ * 比喻(和 Docker 一样):+ * system-images/ = 只读 base layer,所有应用、所有会话共享一份,绝不复制+ * avd/*.avd/ = 可写 thin layer(qcow2 差量 + quickboot 快照),只存改动+ * _tmp/ snapshots = 可回收的 scratch layer+ *+ * 本模块只做「盘点」与「按明确清单回收」,默认 dryRun,不碰用户个人文件。+ */+const fs = require('fs');+const path = require('path');++function walk(dir, out = [], depth = 0) {+ if (depth > 6) return out;+ let items = [];+ try { items = fs.readdirSync(dir, { withFileTypes: true }); } catch (_) { return out; }+ for (const it of items) {+ const p = path.join(dir, it.name);+ if (it.isDirectory()) walk(p, out, depth + 1);+ else {+ try { out.push({ path: p, size: fs.statSync(p).size }); } catch (_) { /* ignore */ }+ }+ }+ return out;+}++function dirSize(dir) { return walk(dir).reduce((n, f) => n + f.size, 0); }+const exists = (p) => { try { return fs.existsSync(p); } catch (_) { return false; } };++/**+ * 盘点运行时占用,并列出「可安全回收」的条目。+ * @returns {{total:number, groups:Array, candidates:Array}}+ */+function analyze(root, { keepAvd = 'apkstart.avd', aggressive = false, keepSnapshots = false } = {}) {+ const groups = [];+ const candidates = [];+ if (!exists(root)) return { total: 0, groups, candidates };++ const groupOf = (name, dir) => {+ const size = dirSize(dir);+ groups.push({ name, size });+ return size;+ };+ const add = (p, size, reason, kind = 'file') => candidates.push({ path: p, size, reason, kind });++ groupOf('emulator 引擎', path.join(root, 'emulator'));+ groupOf('系统镜像(只读基础层)', path.join(root, 'system-images'));+ groupOf('AVD 可写层 / 快照', path.join(root, 'avd'));+ groupOf('platform-tools', path.join(root, 'platform-tools'));++ // 1) QEMU 只需要 x86_64 一个目标;包里另外 7 个架构的二进制纯属浪费+ const qemuDir = path.join(root, 'emulator', 'qemu', 'windows-x86_64');+ if (exists(qemuDir)) {+ for (const f of walk(qemuDir)) {+ if (/qemu-system-(aarch64|armel|i386)/i.test(path.basename(f.path))) {+ add(f.path, f.size, '非 x86_64 的 QEMU 目标,运行时用不到');+ }+ }+ }++ // 2) 镜像包里的许可证文本 / 冗余目录+ for (const f of walk(path.join(root, 'system-images'))) {+ if (/^(NOTICE\.txt|source\.properties)$/i.test(path.basename(f.path)) && f.size > 1024 * 1024) {+ add(f.path, f.size, '镜像包内的大体积说明文件');+ }+ }++ // 3) 只保留一份系统镜像:API 34 Play 镜像就位后,API 30 的旧镜像全部过期+ const play34 = path.join(root, 'system-images', 'android-34', 'google_apis_playstore', 'x86_64', 'system.img');+ if (exists(play34)) {+ const legacy = path.join(root, 'system-images', 'android-30');+ if (exists(legacy)) add(legacy, dirSize(legacy), '旧版 API 30 镜像(含过时的 ARM 翻译层)', 'dir');+ }+ const stray = path.join(root, 'x86_64');+ if (exists(stray)) add(stray, dirSize(stray), '解压错位产生的重复镜像目录', 'dir');++ // 4) 非活动 AVD:产品只用 apkstart 一个;测试期遗留的 apkstart-arm / -houdini 等可清+ const avdHome = path.join(root, 'avd');+ if (exists(avdHome)) {+ for (const e of fs.readdirSync(avdHome, { withFileTypes: true })) {+ if (!e.isDirectory() || !e.name.endsWith('.avd') || e.name === keepAvd) continue;+ add(path.join(avdHome, e.name), dirSize(path.join(avdHome, e.name)),+ '非活动 AVD(含 8-16GB 的旧用户数据镜像)', 'dir');+ }+ // 5) 锁文件:残留会导致「AVD is already running」+ for (const f of walk(avdHome)) {+ if (/\.lock$/i.test(f.path)) add(f.path, f.size, '上次异常退出残留的锁文件');+ }+ // 6) 快速启动快照:ram.img ≈ 分配给虚拟机的内存,损坏或配置变更后必须丢弃+ const activeAvd = path.join(avdHome, keepAvd);+ if (exists(activeAvd) && !keepSnapshots) {+ for (const e of fs.readdirSync(activeAvd, { withFileTypes: true })) {+ // 正常快照 + 删除失败时改名留下的旧快照,都可回收+ if (!e.isDirectory() || !/^snapshots(\.stale-\d+)?$/.test(e.name)) continue;+ const p = path.join(activeAvd, e.name);+ add(p, dirSize(p), '旧 quickboot 快照(配置变更后会自动重建)', 'dir');+ }+ }+ }++ // 7) 下载缓存 / QEMU 遗留 ISO+ for (const d of ['_tmp', 'images']) {+ const p = path.join(root, d);+ if (exists(p)) {+ const size = dirSize(p);+ if (size > 0) add(p, size, d === '_tmp' ? '下载临时文件' : '旧的 QEMU/ISO 遗留文件', 'dir');+ }+ }++ // 8) 激进裁剪:仅构建发行包时启用。+ // 注意:Qt6WebEngineCoreAndroidEmu.dll 是 qemu-system-x86_64.exe 的加载时依赖,+ // 实测删掉会直接起不来,绝不能放进清单;qsn/netsim 也可能被快照与网络功能按需调用,保守保留。+ if (aggressive) {+ const extras = [+ ['emulator/crashreport.exe', '崩溃上报工具(无头运行不需要)'],+ ];+ for (const [rel, reason] of extras) {+ const p = path.join(root, rel);+ if (exists(p)) add(p, fs.statSync(p).size, reason);+ }+ }++ const total = groups.reduce((n, g) => n + g.size, 0);+ return { total, groups, candidates };+}++/**+ * 回收。必须显式传 apply:true;调用方(UI/构建脚本)负责先展示清单并取得确认。+ * 安全约束:任何目标都必须在 root 之内,且不允许把 root 自身删掉。+ */+function prune(root, { apply = false, keepAvd, aggressive = false, keepSnapshots = false, onRemove = () => {} } = {}) {+ const report = analyze(root, { keepAvd, aggressive, keepSnapshots });+ const rootAbs = path.resolve(root);+ const removed = [];+ let saved = 0;+ for (const c of report.candidates) {+ const p = path.resolve(c.path);+ if (p === rootAbs || !p.startsWith(rootAbs + path.sep)) continue;+ if (!exists(p)) continue;+ if (apply) {+ try {+ fs.rmSync(p, c.kind === 'dir' ? { recursive: true, force: true } : { force: true });+ removed.push(c);+ saved += c.size;+ onRemove(c);+ } catch (_) { /* 占用中的文件跳过,下次再清 */ }+ }+ }+ return { ...report, apply, removed, saved, after: apply ? report.total - saved : report.total };+}++/** 给设置页用的简短摘要 */+function summary(root) {+ const a = analyze(root);+ const mb = (n) => `${(n / 1048576).toFixed(0)} MB`;+ return {+ total: a.total,+ totalText: mb(a.total),+ groups: a.groups.map((g) => ({ ...g, text: mb(g.size) })),+ reclaimable: a.candidates.reduce((n, c) => n + c.size, 0),+ reclaimableText: mb(a.candidates.reduce((n, c) => n + c.size, 0)),+ count: a.candidates.length,+ };+}++module.exports = { analyze, prune, summary, walk, dirSize };diff --git a/src/core/notify.js b/src/core/notify.jsnew file mode 100644index 0000000..f5a320c--- /dev/null+++ b/src/core/notify.js@@ -0,0 +1,136 @@+'use strict';+/**+ * 安卓通知 → Windows 原生通知。+ *+ * 模拟器没有把通知接到 Windows 上,这里按 2.5 秒轮询 `dumpsys notification`(只读、低开销),+ * 解析出「新出现的通知」再用 Electron 的 Notification 走系统通知中心 / 操作中心。+ * 点通知直接回到对应的应用窗口。+ */+const { Notification, nativeImage } = require('electron');++const POLL_MS = 2500;++/**+ * 系统自带的常驻通知不要往 Windows 上搬。+ * 「已检测到虚拟 SD 卡」「配置物理键盘」「Google Play 保护机制已开启」这类东西+ * 每天都会冒一遍,转成 Windows 通知就是纯骚扰。+ */+const SYSTEM_PKGS = [+ 'android',+ 'com.android.systemui',+ 'com.android.settings',+ 'com.android.shell',+ 'com.android.vending',+ 'com.android.providers.downloads',+ 'com.android.documentsui',+ 'com.google.android.apps.nexuslauncher',+ 'com.google.android.gms',+ 'com.google.android.gsf',+];+const isSystemPkg = (pkg) => SYSTEM_PKGS.includes(pkg)+ || /^com\.android\.providers\./.test(pkg)+ || /launcher/i.test(pkg);++function parseRecords(dump) {+ const out = [];+ const blocks = String(dump || '').split(/NotificationRecord\(/).slice(1);+ for (const b of blocks) {+ const pkg = (/pkg=([\w.]+)/.exec(b) || [])[1] || '';+ if (!pkg || isSystemPkg(pkg)) continue;+ const key = (/key=([^\s]+)/.exec(b) || [])[1] || '';+ const flags = (/flags=0x([0-9a-fA-F]+)/.exec(b) || [])[1] || '';+ const num = flags ? parseInt(flags, 16) : 0;+ // FLAG_ONGOING_EVENT(0x2) / FLAG_FOREGROUND_SERVICE(0x40) / FLAG_GROUP_SUMMARY(0x200)+ if (num & 0x2) continue;+ if (num & 0x40) continue;++ const grab = (field) => {+ const re = new RegExp(`${field}=([^\\n]*)`);+ const m = re.exec(b);+ if (!m) return '';+ const raw = m[1].trim();+ const par = /\(([\s\S]*)\)\s*$/.exec(raw);+ if (par) return par[1].trim();+ if (/^null$/.test(raw)) return '';+ return raw;+ };+ const title = grab('android\\.title');+ const text = grab('android\\.text');+ if (!title && !text) continue;+ out.push({ pkg, key, title, text });+ }+ return out;+}++class NotifyBridge {+ constructor({ getClient, getAppLabel, getAppIcon, onOpen }) {+ this.getClient = getClient;+ this.getAppLabel = getAppLabel;+ this.getAppIcon = getAppIcon;+ this.onOpen = onOpen;+ this.seen = new Set();+ this.timer = null;+ this.running = false;+ this.primed = false;+ }++ start() {+ if (this.timer) return;+ this.running = true;+ this.timer = setInterval(() => this._tick(), POLL_MS);+ if (this.timer.unref) this.timer.unref();+ this._tick();+ }++ stop() {+ this.running = false;+ if (this.timer) clearInterval(this.timer);+ this.timer = null;+ }++ async _tick() {+ if (!this.running) return;+ let client = null;+ try {+ client = this.getClient();+ if (!client || !(await client.isOnline())) return;+ const dump = await client.shell('dumpsys notification --noredact', { timeout: 12000 });+ const list = parseRecords(dump);+ if (!this.primed) {+ // 第一次只做基线,避免启动瞬间把历史通知全弹一遍+ for (const n of list) this.seen.add(`${n.pkg}|${n.key}|${n.title}`);+ this.primed = true;+ return;+ }+ const fresh = [];+ for (const n of list) {+ const id = `${n.pkg}|${n.key}|${n.title}`;+ if (this.seen.has(id)) continue;+ this.seen.add(id);+ fresh.push(n);+ }+ // 防内存增长:只在最近 500 条里做去重+ if (this.seen.size > 500) this.seen = new Set([...this.seen].slice(-300));+ for (const n of fresh) this._show(n);+ } catch (_) { /* 运行时未就绪时忽略 */ }+ }++ _show(n) {+ try {+ if (!Notification.isSupported()) return;+ const label = this.getAppLabel ? this.getAppLabel(n.pkg) : n.pkg;+ const body = [n.title, n.text].filter(Boolean).join(' · ') || '新通知';+ const iconPath = this.getAppIcon ? this.getAppIcon(n.pkg) : '';+ const note = new Notification({+ title: label || '安卓应用',+ body: body.slice(0, 260),+ silent: false,+ icon: iconPath ? nativeImage.createFromPath(iconPath) : undefined,+ });+ note.on('click', () => { if (this.onOpen) this.onOpen(n.pkg); });+ note.show();+ } catch (_) { /* 通知失败不影响应用 */ }+ }+}++module.exports = { NotifyBridge, parseRecords };diff --git a/src/core/provision.js b/src/core/provision.jsindex deef4d7..cc7e65b 100644--- a/src/core/provision.js+++ b/src/core/provision.js@@ -7,10 +7,11 @@*/const fs = require('fs');const path = require('path');+const zlib = require('zlib');const { spawn, execFile } = require('child_process');const store = require('./store');const { download, downloadAny, downloadAnyParallel, head } = require('./download');-const { ZipArchive } = require('./zip');+const { ZipArchive, ZipFile } = require('./zip');const IS_WIN = process.platform === 'win32';@@ -31,7 +32,7 @@ const SOURCES = {aehdFallback: 'https://dl.google.com/android/repository/aehd-windows_v2.2.zip',// 兜底:索引不可用时直接用的已知版本emulatorFallback: 'https://dl.google.com/android/repository/emulator-windows_x64-16847572.zip',- sysimgFallback: 'https://dl.google.com/android/repository/sys-img/android/x86_64-30_r11.zip',+ sysimgFallback: 'https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86_64-34_r14.zip',// ARM 兼容镜像(Google Play 版,内置 native bridge)playImgIndex: 'https://dl.google.com/android/repository/sys-img/google_apis_playstore/sys-img2-3.xml',playImgFallback: 'https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86_64-34_r14.zip',@@ -66,12 +67,17 @@ function absUrl(u, base = REPO_BASE) {return base + s.replace(/^\/+/, '');}-/** 想默认使用的系统镜像(API 级别 + 渠道)。AOSP 版体积小、无 GMS 授权问题。 */-const DEFAULT_SYSIMG = { api: '30', tag: 'default', abi: 'x86_64' };-// ARM 兼容镜像:Google Play 版自带 native bridge(ARM 翻译层),可安装仅含 ARM 原生库的应用。-// 必须 Android 14(API 34):新版 libndk_translation 修复了对字节系 signal trampoline-// 的误杀(老版本 API 30 镜像上抖音/红果启动即 DoBadTrampoline SIGABRT,实测 API 34 完整可跑)+/**+ * 只保留一份「通用基础镜像」。+ * 旧版默认 AOSP API30 + 可选 API34 Play 兼容镜像,导致:+ * - 用户装国产 ARM 应用时必然失败,还要手动切镜像(实用门槛);+ * - 两份镜像各 0.6~3GB,运行时目录动辄十几 GB;+ * - 切换镜像要 wipe-data,已装应用全丢。+ * 现在统一为 Android 14 Google Play x86_64:x86 应用、ARM 应用、GMS 都能跑,+ * 全机只存一份只读基础层(容器式共享),按需下载一次即可。+ */const PLAY_SYSIMG = { api: '34', tag: 'google_apis_playstore', abi: 'x86_64' };+const DEFAULT_SYSIMG = PLAY_SYSIMG;const MIN_SIZE = {adb: 5 * 1024 * 1024,@@ -114,6 +120,14 @@ class Provisioner {const sysTag = DEFAULT_SYSIMG.tag;const sysApi = DEFAULT_SYSIMG.api;const sysAbi = DEFAULT_SYSIMG.abi;+ // AVD(含用户数据、已装应用、quickboot 快照)必须落在可写且不会被清理的地方。+ // 单文件发行版的运行时是随包解压到临时目录的,把 AVD 放进去等于每次退出都丢应用。+ // 只要运行时目录不在 %APPDATA% 里,就把 AVD 固定指到用户数据目录。+ const writable = path.join(store.DATA_DIR, 'avd');+ const insideData = root.toLowerCase().startsWith(store.DATA_DIR.toLowerCase());+ // 单文件发行版的镜像会展开到用户目录(见 materializeImages),那里有就用那里的+ const dataImg = path.join(store.DATA_DIR, 'system-images');+ const sysRoot = fs.existsSync(dataImg) ? dataImg : path.join(root, 'system-images');return {root,qemuDir: path.join(root, 'qemu'),@@ -124,9 +138,9 @@ class Provisioner {// emulator 运行时(Google 官方):root 同时充当 ANDROID_SDK_ROOTemulatorDir: path.join(root, 'emulator'),emulatorExe: path.join(root, 'emulator', 'emulator.exe'),- sysImgRoot: path.join(root, 'system-images'),- sysImgDir: path.join(root, 'system-images', `android-${sysApi}`, sysTag, sysAbi),- avdHome: path.join(root, 'avd'),+ sysImgRoot: sysRoot,+ sysImgDir: path.join(sysRoot, `android-${sysApi}`, sysTag, sysAbi),+ avdHome: insideData ? path.join(root, 'avd') : writable,aehdDir: path.join(root, 'aehd'),imagesDir: path.join(root, 'images'),iso: path.join(root, 'images', 'android-x86.iso'),@@ -246,10 +260,9 @@ class Provisioner {const diskSize = fileSize(diskPath);const sysimg = this.systemImageInfo();- // 两条路径:emulator(推荐,Google 官方)或 QEMU+ISO(用户自备镜像时)- // 完整版(内置运行时)只带 ARM 兼容镜像(API 34 Google Play),- // 开启兼容模式时它就是主镜像,无需再下载 AOSP 默认镜像- const compatReady = !!(s.runtime && s.runtime.compatImage) && this.playImageInfo().ok;+ // 完整版(内置运行时)只带一份 API 34 Google Play 镜像,它同时是主镜像与兼容镜像;+ // 不再依赖 compatImage 开关,避免「镜像明明在,却因为没勾开关而判定未部署」+ const compatReady = this.playImageInfo().ok;const emulatorReady = emulator.ok && (sysimg.ok || compatReady);const qemuReady = qemu.ok && diskSize > MIN_SIZE.disk;@@ -328,27 +341,34 @@ class Provisioner {* 大条目(GB 级 system.img)走流式,小条目整块读,避免撞 Node 的单 Buffer 上限。*/async extractZip(zipPath, destDir, opts = {}) {- const buf = fs.readFileSync(zipPath);- const zip = new ZipArchive(buf);+ // 大包(emulator / 系统镜像)走文件版:不把 1.5GB zip 整包读进内存,+ // 低内存机器也能稳定解压;小包沿用内存版,速度更快。+ const big = fileSize(zipPath) > 64 * 1024 * 1024;+ const zip = big ? new ZipFile(zipPath) : new ZipArchive(fs.readFileSync(zipPath));const STREAM_THRESHOLD = 64 * 1024 * 1024;const total = zip.names().length;let done = 0;- for (const name of zip.names()) {- if (name.endsWith('/')) {- fs.mkdirSync(path.join(destDir, name), { recursive: true });- continue;- }- const target = path.join(destDir, name);- fs.mkdirSync(path.dirname(target), { recursive: true });- const e = zip.entries.get(name);- if (e.uncompSize > STREAM_THRESHOLD) {- await zip.pipeTo(name, fs.createWriteStream(target));- } else {- fs.writeFileSync(target, zip.read(name));+ try {+ for (const name of zip.names()) {+ if (name.endsWith('/')) {+ fs.mkdirSync(path.join(destDir, name), { recursive: true });+ continue;+ }+ const target = path.join(destDir, name);+ fs.mkdirSync(path.dirname(target), { recursive: true });+ const e = zip.entries.get(name);+ if (e.uncompSize > STREAM_THRESHOLD) {+ // eslint-disable-next-line no-await-in-loop+ await zip.pipeTo(name, fs.createWriteStream(target));+ } else {+ fs.writeFileSync(target, zip.read(name));+ }+ done += 1;+ if (opts.onEntry) opts.onEntry(name, done, total);}- done += 1;- if (opts.onEntry) opts.onEntry(name, done, total);+ } finally {+ if (zip.close) zip.close();}return destDir;}@@ -395,7 +415,7 @@ class Provisioner {if (cached && cached.trim()) return absUrl(cached, baseOf(SOURCES.sysImgIndexes[0]));if (this._cache.sysimgUrl) return this._cache.sysimgUrl;const want = `system-images;android-${DEFAULT_SYSIMG.api};${DEFAULT_SYSIMG.tag};${DEFAULT_SYSIMG.abi}`;- for (const idx of SOURCES.sysImgIndexes) {+ for (const idx of [SOURCES.playImgIndex, ...SOURCES.sysImgIndexes]) {try {// eslint-disable-next-line no-await-in-loopconst xml = await this._fetchText(idx);@@ -437,22 +457,91 @@ class Provisioner {return { ok: false, path: '', version: '' };}+ /**+ * 首次启动把随包带来的压缩镜像展开到用户目录(只做一次)。+ * 单文件发行版里 system.img 是 .gz(3.1GB→580MB 左右),不展开模拟器没法用。+ * 展开到 %APPDATA% 而不是包里:便携版的运行时目录每次启动都是新的临时目录,+ * 放进去等于每次开机都重解压一遍。+ */+ async materializeImages(onLog = () => {}) {+ const srcRoot = path.join(this.root, 'system-images');+ const destRoot = path.join(store.DATA_DIR, 'system-images');+ const jobs = [];+ const walk = (dir, rel = '') => {+ let entries = [];+ try { entries = fs.readdirSync(dir, { withFileTypes: true }); } catch (_) { return; }+ for (const e of entries) {+ const p = path.join(dir, e.name);+ if (e.isDirectory()) walk(p, path.join(rel, e.name));+ else if (/\.img\.gz$/i.test(e.name)) jobs.push({ src: p, dest: path.join(destRoot, rel, e.name.replace(/\.gz$/i, '')) });+ }+ };+ walk(srcRoot);+ if (!jobs.length) return 0;++ let done = 0;+ for (const j of jobs) {+ const have = fileSize(j.dest);+ if (have > 32 * 1024 * 1024) continue; // 已经展开过+ fs.mkdirSync(path.dirname(j.dest), { recursive: true });+ onLog(`首次启动:正在展开系统镜像 ${path.basename(j.dest)}(约 1 分钟,只需一次)`);+ // eslint-disable-next-line no-await-in-loop+ await new Promise((resolve, reject) => {+ const { pipeline } = require('stream');+ pipeline(+ fs.createReadStream(j.src),+ zlib.createGunzip(),+ fs.createWriteStream(j.dest),+ (err) => (err ? reject(err) : resolve()),+ );+ }).catch((e) => onLog(`展开镜像失败:${e.message}`));+ done += 1;+ }+ return done;+ }+/** 系统镜像是否完整(system.img 是硬指标,缺失或过小都视为没下完) */systemImageInfo() {const p = this.paths();- const dirs = [p.sysImgDir, path.join(this.appRoot, 'engine', 'system-images',- `android-${DEFAULT_SYSIMG.api}`, DEFAULT_SYSIMG.tag, DEFAULT_SYSIMG.abi)];- for (const dir of dirs) {+ const roots = [p.sysImgRoot, path.join(this.root, 'system-images'), path.join(this.appRoot, 'engine', 'system-images')];+ // 先在默认位置(API34 Play)找,再退到「随便哪套镜像」。+ // 单文件发行版可能只带一套更小的 AOSP 镜像,写死 API34 会导致+ // 镜像明明在包里却报"未下载",用户被迫联网下载一套新的。+ const preferred = [p.sysImgDir,+ path.join(this.appRoot, 'engine', 'system-images',+ `android-${DEFAULT_SYSIMG.api}`, DEFAULT_SYSIMG.tag, DEFAULT_SYSIMG.abi)];+ const candidates = [...preferred];+ for (const root of roots) {+ let apis = [];+ try { apis = fs.readdirSync(root).filter((d) => /^android-\d+$/.test(d)); } catch (_) { continue; }+ apis.sort((a, b) => Number(b.split('-')[1]) - Number(a.split('-')[1]));+ for (const api of apis) {+ let tags = [];+ try { tags = fs.readdirSync(path.join(root, api)); } catch (_) { continue; }+ for (const tag of tags) {+ let abis = [];+ try { abis = fs.readdirSync(path.join(root, api, tag)); } catch (_) { continue; }+ for (const abi of abis) candidates.push(path.join(root, api, tag, abi));+ }+ }+ }+ let missing = null;+ for (const dir of candidates) {const system = path.join(dir, 'system.img');const kernel = path.join(dir, 'kernel-ranchu');const size = fileSize(system);+ const m = /system-images[\\/]android-(\d+)[\\/]([^\\/]+)[\\/]([^\\/]+)$/.exec(dir);+ const api = m ? Number(m[1]) : DEFAULT_SYSIMG.api;+ const tag = m ? m[2] : DEFAULT_SYSIMG.tag;+ const abi = m ? m[3] : DEFAULT_SYSIMG.abi;if (size > MIN_SIZE.sysimg && fs.existsSync(kernel)) {- return { ok: true, dir, size, api: DEFAULT_SYSIMG.api, tag: DEFAULT_SYSIMG.tag };+ return { ok: true, dir, size, api, tag, abi };}- if (fs.existsSync(dir)) {- return { ok: false, dir, size, api: DEFAULT_SYSIMG.api, tag: DEFAULT_SYSIMG.tag, note: size ? '镜像不完整' : '缺少 system.img' };+ if (!missing && fs.existsSync(dir)) {+ missing = { ok: false, dir, size, api, tag, abi, note: size ? '镜像不完整' : '缺少 system.img' };}}+ if (missing) return missing;return { ok: false, dir: p.sysImgDir, size: 0, api: DEFAULT_SYSIMG.api, tag: DEFAULT_SYSIMG.tag, note: '未下载' };}@@ -561,42 +650,10 @@ class Provisioner {return '';}- /** 下载并安装系统镜像(zip 顶层是 x86_64/,解到 android-30/<tag>/ 下) */+ /** 只下载一份通用基础镜像(Android 14 Play x86_64),不再有「普通/兼容」两套 */async installSystemImage(onProgress = () => {}) {- const p = this.ensureDirs();- const url = await this.resolveSysimgUrl();- const zip = path.join(p.tmp, 'sysimg.zip');- onProgress({ stage: 'download', message: '下载 Android 系统镜像(约 645MB)…', percent: 1 });-- await downloadAnyParallel([url], zip, {- connections: 8,- minChunk: 4 * 1024 * 1024,- onProgress: (pr) => onProgress({- stage: 'download',- message: `下载系统镜像 ${(pr.got / 1048576).toFixed(0)}MB / ${(pr.total / 1048576).toFixed(0)}MB`- + (pr.speed ? `(${(pr.speed / 1048576).toFixed(1)} MB/s)` : ''),- percent: Math.round(pr.percent * 0.8),- canResume: true,- }),- });- if (fileSize(zip) < MIN_SIZE.sysimg) throw new Error('系统镜像下载不完整,可重试续传');-- const dest = path.join(p.sysImgRoot, `android-${DEFAULT_SYSIMG.api}`, DEFAULT_SYSIMG.tag);- fs.mkdirSync(dest, { recursive: true });- onProgress({ stage: 'extract', message: '解压系统镜像(3GB,需十余秒)…', percent: 82 });- await this.extractZip(zip, dest, {- onEntry: (_n, i, total) => onProgress({- stage: 'extract',- message: `解压系统镜像 ${i}/${total}`,- percent: 82 + Math.round((i / Math.max(1, total)) * 15),- }),- });- fs.rmSync(zip, { force: true });-- const info = this.systemImageInfo();- if (!info.ok) throw new Error('系统镜像解压后校验失败(system.img 缺失或不完整)');- onProgress({ stage: 'done', message: `Android ${DEFAULT_SYSIMG.api} 系统镜像就绪`, percent: 100 });- return info;+ if (this.playImageInfo().ok) return this.playImageInfo();+ return this.installPlayImage(onProgress);}/** ARM 兼容镜像(Google Play 版)是否已就位 */diff --git a/src/core/sharer.js b/src/core/sharer.jsindex b194590..33c896f 100644--- a/src/core/sharer.js+++ b/src/core/sharer.js@@ -99,8 +99,10 @@ class Sharer {for (const r of remoteList) {const prev = state[r.rel];- const sizeSame = prev && prev.size === r.size;- const mtimeSame = r.mtime ? Math.abs((prev.mtime || 0) - r.mtime) <= 1500 : true;+ const sizeSame = !!prev && prev.size === r.size;+ // 新文件(prev 为空)必须拉回来;旧版在这里直接读 prev.mtime 会抛异常,+ // 让整次同步中断,表现为「设备 → 本机永远不同步」+ const mtimeSame = (prev && r.mtime) ? Math.abs((prev.mtime || 0) - r.mtime) <= 1500 : false;if (prev && sizeSame && mtimeSame) continue;const local = path.join(this.localDir, r.rel);try {@@ -127,11 +129,25 @@ class Sharer {async listRemoteRecursive(client, base, prefix = '', depth = 0, out = []) {if (depth > 6) return out;+ // 优先一次 find + stat 拿全量(比逐目录 ls -l 快,也不受日期格式差异影响)+ if (depth === 0 && !prefix) {+ try {+ const text = await client.shell(+ `cd "${base}" 2>/dev/null && find . -type f -exec stat -c '%s|%Y|%n' {} + 2>/dev/null`,+ );+ const rows = String(text).split('\n').map((l) => l.trim()).filter(Boolean)+ .map((l) => /^(\d+)\|(\d+)\|(.+)$/.exec(l))+ .filter(Boolean)+ .map((m) => ({ rel: m[3].replace(/^\.\//, ''), size: Number(m[1]), mtime: Number(m[2]) * 1000 }));+ if (rows.length) return rows;+ } catch (_) { /* 落到 ls 解析 */ }+ }const items = await client.listRemote(prefix ? `${base}/${prefix}` : base);for (const it of items) {if (it.name === '.' || it.name === '..') continue;const rel = prefix ? `${prefix}/${it.name}` : it.name;if (it.isDir) {+ // eslint-disable-next-line no-await-in-loopawait this.listRemoteRecursive(client, base, rel, depth + 1, out);} else {out.push({ rel, size: it.size, mtime: Date.now() });diff --git a/src/core/shortcut.js b/src/core/shortcut.jsindex 1c5f849..df0245a 100644--- a/src/core/shortcut.js+++ b/src/core/shortcut.js@@ -76,6 +76,62 @@ function safeFileName(name) {return String(name).replace(/[\\/:*?"<>|]/g, '_').replace(/\s+/g, ' ').trim().slice(0, 60) || 'Android App';}+/**+ * PNG-in-ICO:Vista 起 ICO 条目允许直接内嵌 PNG,不用重编码、不丢 alpha。+ * APK 图标常是 WebP/大尺寸 PNG,老的 DIB 路线在这里会整包失败。+ */+function pngBytesToIco(png) {+ if (!Buffer.isBuffer(png) || png.length < 24 || png.toString('ascii', 1, 4) !== 'PNG') return null;+ const w = png.readUInt32BE(16);+ const h = png.readUInt32BE(20);+ if (!w || !h || w > 1024 || h > 1024) return null;+ const dir = Buffer.alloc(22);+ dir.writeUInt16LE(0, 0);+ dir.writeUInt16LE(1, 2);+ dir.writeUInt16LE(1, 4);+ dir.writeUInt8(w >= 256 ? 0 : w, 6);+ dir.writeUInt8(h >= 256 ? 0 : h, 7);+ dir.writeUInt8(0, 8);+ dir.writeUInt8(0, 9);+ dir.writeUInt16LE(1, 10);+ dir.writeUInt16LE(32, 12);+ dir.writeUInt32LE(png.length, 14);+ dir.writeUInt32LE(22, 18);+ return Buffer.concat([dir, png]);+}++/**+ * 任意 APK 图标 → ICO。三级兜底,保证快捷方式永远带图标:+ * 1) Electron 能直接解(真 PNG/JPEG)→ 多尺寸 DIB ICO;+ * 2) decode 回调(渲染进程用 Chromium 解 WebP)→ PNG-in-ICO;+ * 3) 品牌占位图标 → PNG-in-ICO。+ */+async function iconToIco(raw, { decode } = {}) {+ if (!Buffer.isBuffer(raw) || !raw.length) return null;+ try {+ const { nativeImage } = require('electron');+ const img = nativeImage.createFromBuffer(raw);+ if (img && !img.isEmpty()) {+ const ico = pngToIco(img.toPNG());+ if (ico) return ico;+ }+ } catch (_) { /* 非 PNG/JPEG,走下一级 */ }++ if (typeof decode === 'function') {+ try {+ const png = await decode(raw);+ const ico = pngBytesToIco(png);+ if (ico) return ico;+ } catch (_) { /* 解码失败走占位图 */ }+ }+ try {+ const { drawAppIcon } = require('./png');+ return pngBytesToIco(drawAppIcon(256));+ } catch (_) {+ return null;+ }+}+/*** 生成桌面快捷方式* @param {object} opt { shortcutPath, target, args, iconIcoPath, description, cwd }@@ -109,4 +165,7 @@ function removeShortcut(p) {}}-module.exports = { pngToIco, writeShortcut, removeShortcut, safeFileName, ICO_SIZES };+module.exports = {+ pngToIco, pngBytesToIco, iconToIco,+ writeShortcut, removeShortcut, safeFileName, ICO_SIZES,+};diff --git a/src/core/store.js b/src/core/store.jsindex 00e5b43..4f1cb53 100644--- a/src/core/store.js+++ b/src/core/store.js@@ -20,13 +20,16 @@ const DEFAULT_SETTINGS = {mode: 'builtin', // builtin(自带运行时,默认) | attach(连接已有运行时,高级)qemuPath: '',systemImage: '',- memoryMB: 4096,- cores: 4,+ memoryMB: 0, // 0 = 由 doctor 按机器内存自动决定+ cores: 0, // 0 = 自动+ autoMemory: true, // 零配置:自动推导内存/核心/磁盘/渲染参数idleShutdownMinutes: 15,startVisible: true,- headless: true, // 无头运行:画面由 ApkStart 自己的窗口承载- gpuMode: 'swiftshader_indirect', // swiftshader_indirect(兼容) | host(用独显) | off- forceTcg: false, // 允许无硬件加速的纯软件模拟(Windows 上极慢,仅排障用)+ // 必须带窗口:无头模式 SurfaceFlinger 不出 VSYNC,应用进程活着但屏幕上什么都没有。+ // 带窗口的模拟器是原生 60fps + 原生鼠标键盘,ApkStart 只负责把它打扮成应用窗口。+ headless: false,+ gpuMode: 'auto', // auto = 按 emulator 版本自动挑后端并逐级降级+ forceTcg: false, // 保留给高级排障;正常路径已由 doctor 自动回退},runtime: {dir: '', // 空 = %APPDATA%\apkstart\runtime@@ -45,10 +48,20 @@ const DEFAULT_SETTINGS = {deviceSharedDir: '/sdcard/ApkStartShared',autoConnect: true,createShortcutOnInstall: true,+ createStartMenuShortcut: true, // 开始菜单快捷方式 = 让 Windows 搜索能搜到应用shortcutDir: '', // 空 = 桌面- freeform: true, // 独立窗口(Android 7+ freeform)- hideAfterLaunch: true,+ freeform: false, // 共享一个运行时窗口,不再用 Android freeform 小窗+ hideAfterLaunch: false, // 主进程必须常驻,否则一退出就把 Android 运行时杀掉了notifyOnInstall: true,+ autoStart: true, // 开机自启,默认开启,用户无需设置+ autoDeploy: true, // 首次运行自动完成全部部署,不再分 1~5 步+ display: {+ mode: 'window', // window(竖屏窗口,可自由拉伸) | fullscreen(自动适配屏幕)+ portrait: '900x1600', // 窗口模式的竖屏分辨率,可在设置里调大小+ density: 0, // 0 = 按分辨率自动推导+ rememberBounds: true, // 记住每个应用的窗口位置/大小+ autoFullscreenOnLaunch: false,+ },};function ensureDirs() {@@ -88,7 +101,16 @@ const store = {DATA_DIR, ICON_DIR, APK_DIR,getSettings() {- return deepMerge(DEFAULT_SETTINGS, readJson(SETTINGS_FILE, {}));+ const s = deepMerge(DEFAULT_SETTINGS, readJson(SETTINGS_FILE, {}));+ // 旧版本默认无头运行:应用进程能起来但屏幕上没有窗口,等效于「打不开」。+ // 无条件迁移到带窗口模式,且不再允许通过旧配置把它关掉。+ s.engine.headless = false;+ // 旧版本退出壳层时会杀掉整个 Android 运行时,导致桌面图标点开闪一下就没了。+ s.hideAfterLaunch = false;+ // 旧版本用 Android freeform 小窗,现在整个模拟器窗口就是应用窗口,+ // 应用必须铺满这块屏幕,否则会出现「窗口里再套一个小窗」。+ s.freeform = false;+ return s;},saveSettings(patch) {diff --git a/src/core/win/agent.ps1 b/src/core/win/agent.ps1new file mode 100644index 0000000..720554a--- /dev/null+++ b/src/core/win/agent.ps1@@ -0,0 +1,426 @@+# ApkStart window agent (ASCII only).+# A single long-lived helper that owns every Win32 trick we need:+# * re-parents the Android emulator Qt window into an ApkStart BrowserWindow (one clean window,+# no emulator sidebar, no emulator title bar);+# * hides the floating emulator toolbar window that shows the volume/camera/back rail;+# * rotates the device with Ctrl+Left / Ctrl+Right and reports the new window size;+# * runs a WH_MOUSE_LL hook so mouse side buttons become Android BACK / FORWARD.+# Everything is P/Invoke from the .NET Framework that ships with Windows 10/11,+# so there is no native binary to compile, sign or ship.+# Protocol: TCP on 127.0.0.1, one JSON object per line. First stdout line is "PORT=<n>".+param([int]$Port = 0)++$ErrorActionPreference = 'Stop'+$src = @'+using System;+using System.Collections.Concurrent;+using System.Net;+using System.Net.Sockets;+using System.Runtime.InteropServices;+using System.Text;+using System.Threading;++public class ApkAgent+{+ [StructLayout(LayoutKind.Sequential)] public struct RECT { public int L, T, R, B; }+ [StructLayout(LayoutKind.Sequential)] public struct POINT { public int X, Y; }+ [StructLayout(LayoutKind.Sequential)] public struct MSLLHOOKSTRUCT { public POINT Pt; public int MouseData; public int Flags; public int Time; public IntPtr Extra; }+ [StructLayout(LayoutKind.Sequential)] public struct MSG { public IntPtr Hwnd; public uint Message; public IntPtr WParam; public IntPtr LParam; public uint Time; public int X; public int Y; }++ public delegate bool EnumProc(IntPtr h, IntPtr p);+ public delegate IntPtr HookProc(int code, IntPtr wp, IntPtr lp);++ [DllImport("user32.dll")] static extern bool EnumWindows(EnumProc cb, IntPtr p);+ [DllImport("user32.dll")] static extern bool IsWindowVisible(IntPtr h);+ [DllImport("user32.dll", CharSet = CharSet.Unicode)] static extern int GetClassNameW(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll", CharSet = CharSet.Unicode)] static extern int GetWindowTextW(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll")] static extern IntPtr SetParent(IntPtr c, IntPtr p);+ [DllImport("user32.dll")] static extern IntPtr GetParent(IntPtr c);+ [DllImport("user32.dll")] static extern int GetWindowLong(IntPtr h, int i);+ [DllImport("user32.dll")] static extern int SetWindowLong(IntPtr h, int i, int v);+ [DllImport("user32.dll")] static extern bool SetWindowPos(IntPtr h, IntPtr after, int x, int y, int w, int hh, uint f);+ [DllImport("user32.dll")] static extern bool ShowWindow(IntPtr h, int c);+ [DllImport("user32.dll")] static extern bool GetWindowRect(IntPtr h, out RECT r);+ [DllImport("user32.dll")] static extern bool GetClientRect(IntPtr h, out RECT r);+ [DllImport("user32.dll")] static extern bool SetForegroundWindow(IntPtr h);+ [DllImport("user32.dll")] static extern IntPtr GetForegroundWindow();+ [DllImport("user32.dll")] static extern bool IsZoomed(IntPtr h);+ [DllImport("user32.dll")] static extern IntPtr SetWindowsHookEx(int id, HookProc p, IntPtr mod, uint thread);+ [DllImport("user32.dll")] static extern bool UnhookWindowsHookEx(IntPtr h);+ [DllImport("user32.dll")] static extern IntPtr CallNextHookEx(IntPtr h, int code, IntPtr wp, IntPtr lp);+ [DllImport("user32.dll")] static extern bool PeekMessage(out MSG m, IntPtr h, uint min, uint max, uint remove);+ [DllImport("user32.dll")] static extern bool TranslateMessage(ref MSG m);+ [DllImport("user32.dll")] static extern IntPtr DispatchMessage(ref MSG m);+ [DllImport("user32.dll")] static extern void keybd_event(byte vk, byte scan, uint flags, IntPtr extra);+ [DllImport("user32.dll")] static extern uint GetWindowThreadProcessId(IntPtr h, out uint pid);+ [DllImport("kernel32.dll")] static extern uint GetCurrentThreadId();+ [DllImport("user32.dll")] static extern bool AttachThreadInput(uint attach, uint attachTo, bool fAttach);+ [DllImport("user32.dll")] static extern IntPtr SetFocus(IntPtr h);+ [DllImport("user32.dll")] static extern IntPtr WindowFromPoint(POINT p);+ [DllImport("user32.dll")] static extern bool ScreenToClient(IntPtr h, ref POINT p);++ const int GWL_STYLE = -16;+ const int GWL_EXSTYLE = -20;+ const uint WS_CHILD = 0x40000000;+ const uint WS_POPUP = 0x80000000;+ const int WS_CAPTION = 0x00C00000;+ const int WS_THICKFRAME = 0x00040000;+ const int WS_MINIMIZEBOX = 0x00020000;+ const int WS_MAXIMIZEBOX = 0x00010000;+ const int WS_SYSMENU = 0x00080000;+ const int WS_BORDER = 0x00800000;+ const int WS_CLIPCHILDREN = 0x02000000;+ const int WS_CLIPSIBLINGS = 0x04000000;+ const int WS_EX_APPWINDOW = 0x00040000;+ const int WS_EX_TOOLWINDOW = 0x00000080;+ const int WS_EX_CLIENTEDGE = 0x00000200;+ const int WS_EX_WINDOWEDGE = 0x00000100;+ const uint SWP_NOZORDER = 0x0004;+ const uint SWP_NOACTIVATE = 0x0010;+ const uint SWP_SHOWWINDOW = 0x0040;+ const uint SWP_FRAMECHANGED = 0x0020;+ const uint SWP_NOMOVE = 0x0002;+ const uint SWP_NOSIZE = 0x0001;++ static IntPtr _host = IntPtr.Zero;+ static IntPtr _emu = IntPtr.Zero;+ static IntPtr _hook = IntPtr.Zero;+ static HookProc _hookProc = null;+ static readonly ConcurrentQueue<string> _events = new ConcurrentQueue<string>();+ static long _lastToolSweep = 0;++ // ------------------------------------------------------------------ window discovery+ static string ClassOf(IntPtr h)+ {+ StringBuilder sb = new StringBuilder(256);+ GetClassNameW(h, sb, 256);+ return sb.ToString();+ }+ static string TitleOf(IntPtr h)+ {+ StringBuilder sb = new StringBuilder(512);+ GetWindowTextW(h, sb, 512);+ return sb.ToString();+ }++ // The emulator draws its framebuffer in a "QWindowIcon" top level window titled+ // "Android Emulator - <avd>:<port>"; the volume/rotate rail lives in a separate+ // small "QWindowTool*" window we hide.+ static IntPtr FindEmulator()+ {+ IntPtr best = IntPtr.Zero;+ long bestArea = 0;+ EnumWindows(delegate(IntPtr h, IntPtr p)+ {+ if (!IsWindowVisible(h)) return true;+ string cls = ClassOf(h);+ if (cls.IndexOf("QWindowIcon", StringComparison.Ordinal) < 0) return true;+ RECT r;+ if (!GetWindowRect(h, out r)) return true;+ long area = (long)(r.R - r.L) * (r.B - r.T);+ if (area > bestArea) { bestArea = area; best = h; }+ return true;+ }, IntPtr.Zero);+ return best;+ }++ static void HideToolWindows()+ {+ EnumWindows(delegate(IntPtr h, IntPtr p)+ {+ if (!IsWindowVisible(h)) return true;+ string cls = ClassOf(h);+ if (cls.IndexOf("QWindowTool", StringComparison.Ordinal) < 0) return true;+ RECT r;+ if (!GetWindowRect(h, out r)) return true;+ if ((r.R - r.L) > 200) return true; // the framebuffer window also uses this class+ ShowWindow(h, 0);+ return true;+ }, IntPtr.Zero);+ }++ // ------------------------------------------------------------------ embed / detach+ static bool Embed(IntPtr host, IntPtr emu)+ {+ if (host == IntPtr.Zero || emu == IntPtr.Zero) return false;+ HideToolWindows();+ SetParent(emu, host);+ uint style = (uint)GetWindowLong(emu, GWL_STYLE);+ style &= ~WS_POPUP;+ style &= ~(uint)(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SYSMENU | WS_BORDER);+ style |= WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;+ SetWindowLong(emu, GWL_STYLE, (int)style);+ int ex = GetWindowLong(emu, GWL_EXSTYLE);+ ex &= ~(WS_EX_APPWINDOW | WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE);+ SetWindowLong(emu, GWL_EXSTYLE, ex);+ return true;+ }++ // HWND_TOP: Chromium 的渲染子窗口和模拟器是同级的子窗口,+ // 不主动抬到最前就会被 Chromium 那块黑底盖住(用户看到的就是黑屏)。+ static readonly IntPtr HWND_TOP = new IntPtr(1);+ static void Fit(int x, int y, int w, int h)+ {+ if (_emu == IntPtr.Zero) return;+ if (w < 16) w = 16;+ if (h < 16) h = 16;+ SetWindowPos(_emu, HWND_TOP, x, y, w, h, SWP_NOACTIVATE | SWP_FRAMECHANGED | SWP_SHOWWINDOW);+ }++ static void Raise()+ {+ if (_emu == IntPtr.Zero) return;+ SetWindowPos(_emu, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);+ }++ static void Detach()+ {+ if (_emu == IntPtr.Zero) return;+ SetParent(_emu, IntPtr.Zero);+ uint style = (uint)GetWindowLong(_emu, GWL_STYLE);+ style &= ~WS_CHILD;+ style |= (uint)(WS_CAPTION | WS_THICKFRAME | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX);+ SetWindowLong(_emu, GWL_STYLE, (int)style);+ int ex = GetWindowLong(_emu, GWL_EXSTYLE);+ ex |= WS_EX_APPWINDOW;+ SetWindowLong(_emu, GWL_EXSTYLE, ex);+ SetWindowPos(_emu, IntPtr.Zero, 60, 40, 480, 853, SWP_NOZORDER | SWP_FRAMECHANGED | SWP_SHOWWINDOW);+ _emu = IntPtr.Zero;+ }++ // ------------------------------------------------------------------ rotation+ // 模拟器的转屏是「改面板方向」,只有它自己的 Qt 快捷键 Ctrl+←/→ 会触发;+ // 控制台命令 adb emu rotate 只是把画面转 90°,系统里仍然是竖屏(画面横躺)。+ // 难点是快捷键必须由模拟器窗口收到键盘消息,而它已经是我们窗口的子窗口、+ // 焦点在网页层。所以先把两个线程的输入队列接起来,把焦点临时给模拟器,+ // 按完键再还回去。+ static void Rotate(string dir)+ {+ if (_emu == IntPtr.Zero) _emu = FindEmulator();+ if (_emu == IntPtr.Zero) return;+ IntPtr host = _host != IntPtr.Zero ? _host : GetParent(_emu);++ uint emuTid, hostTid, dummy;+ emuTid = GetWindowThreadProcessId(_emu, out dummy);+ hostTid = host != IntPtr.Zero ? GetWindowThreadProcessId(host, out dummy) : 0;+ uint myTid = GetCurrentThreadId();++ bool a1 = AttachThreadInput(myTid, emuTid, true);+ bool a2 = hostTid != 0 && AttachThreadInput(myTid, hostTid, true);+ try+ {+ if (host != IntPtr.Zero) SetForegroundWindow(host);+ IntPtr prev = SetFocus(_emu);+ Thread.Sleep(150);+ byte vk = dir == "right" ? (byte)0x27 : (byte)0x25;+ keybd_event(0x11, 0, 0, IntPtr.Zero);+ Thread.Sleep(50);+ keybd_event(vk, 0, 0, IntPtr.Zero);+ Thread.Sleep(80);+ keybd_event(vk, 0, 2, IntPtr.Zero);+ keybd_event(0x11, 0, 2, IntPtr.Zero);+ Thread.Sleep(120);+ SetFocus(prev);+ }+ finally+ {+ if (a2) AttachThreadInput(myTid, hostTid, false);+ if (a1) AttachThreadInput(myTid, emuTid, false);+ }+ }++ // ------------------------------------------------------------------ mouse hook+ static IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam)+ {+ if (nCode >= 0)+ {+ int msg = (int)wParam; // 0x020B = WM_XBUTTONDOWN+ if (msg == 0x020B)+ {+ MSLLHOOKSTRUCT d = (MSLLHOOKSTRUCT)Marshal.PtrToStructure(lParam, typeof(MSLLHOOKSTRUCT));+ int button = (d.MouseData >> 16) & 0xFFFF;+ IntPtr fg = GetForegroundWindow();+ bool ours = (fg != IntPtr.Zero) && (_host != IntPtr.Zero) && (fg == _host || GetParent(fg) == _host || fg == _emu);+ if (ours)+ {+ _events.Enqueue(button == 1 ? "back" : "forward");+ return (IntPtr)1; // swallow so the app never sees a raw side click+ }+ }+ }+ return CallNextHookEx(_hook, nCode, wParam, lParam);+ }++ static void HookOn()+ {+ if (_hook != IntPtr.Zero) return;+ _hookProc = HookCallback;+ _hook = SetWindowsHookEx(14, _hookProc, IntPtr.Zero, 0);+ }+ static void HookOff()+ {+ if (_hook == IntPtr.Zero) return;+ UnhookWindowsHookEx(_hook);+ _hook = IntPtr.Zero;+ _hookProc = null;+ }++ // ------------------------------------------------------------------ plumbing+ static void Pump()+ {+ MSG m;+ while (PeekMessage(out m, IntPtr.Zero, 0, 0, 1))+ {+ TranslateMessage(ref m);+ DispatchMessage(ref m);+ }+ }++ static long L(string line, string key)+ {+ string pat = "\"" + key + "\"";+ int i = line.IndexOf(pat, StringComparison.Ordinal);+ if (i < 0) return 0;+ i = line.IndexOf(':', i + pat.Length);+ if (i < 0) return 0;+ i++;+ while (i < line.Length && (line[i] == ' ' || line[i] == '\"')) i++;+ int j = i;+ while (j < line.Length && (char.IsDigit(line[j]) || line[j] == '-')) j++;+ long v;+ return long.TryParse(line.Substring(i, j - i), out v) ? v : 0;+ }++ static string S(string line, string key)+ {+ string pat = "\"" + key + "\":\"";+ int i = line.IndexOf(pat, StringComparison.Ordinal);+ if (i < 0) return "";+ i += pat.Length;+ int j = line.IndexOf('"', i);+ return j < 0 ? "" : line.Substring(i, j - i);+ }++ static void Reply(Socket s, string json)+ {+ try+ {+ byte[] b = Encoding.UTF8.GetBytes(json + "\n");+ s.Send(b);+ }+ catch { }+ }++ public static void Serve(int port)+ {+ TcpListener l = new TcpListener(IPAddress.Loopback, port);+ l.Start();+ int actual = ((IPEndPoint)l.LocalEndpoint).Port;+ Console.WriteLine("PORT=" + actual);+ Console.Out.Flush();+ Socket sock;+ try { sock = l.AcceptSocket(); }+ catch { return; }+ l.Stop();++ StringBuilder rx = new StringBuilder();+ byte[] buf = new byte[8192];+ bool run = true;+ while (run)+ {+ Pump();++ string ev;+ while (_events.TryDequeue(out ev))+ Reply(sock, "{\"ev\":\"" + ev + "\"}");++ // keep the emulator rail hidden; it can re-appear when Qt rebuilds the window+ long now = Environment.TickCount;+ if (now - _lastToolSweep > 2000) { _lastToolSweep = now; HideToolWindows(); Raise(); }++ try+ {+ if (!sock.Poll(4000, SelectMode.SelectRead)) continue;+ int n = sock.Receive(buf);+ if (n <= 0) break;+ rx.Append(Encoding.UTF8.GetString(buf, 0, n));+ while (true)+ {+ string all = rx.ToString();+ int nl = all.IndexOf('\n');+ if (nl < 0) break;+ string line = all.Substring(0, nl).Trim();+ rx.Remove(0, nl + 1);+ if (line.Length == 0) continue;++ string cmd = S(line, "cmd");+ if (cmd == "embed")+ {+ _host = new IntPtr(L(line, "host"));+ _emu = FindEmulator();+ bool ok = Embed(_host, _emu);+ Fit((int)L(line, "x"), (int)L(line, "y"), (int)L(line, "w"), (int)L(line, "h"));+ Reply(sock, "{\"ok\":" + (ok ? "true" : "false") + ",\"emu\":" + _emu.ToInt64() + "}");+ }+ else if (cmd == "fit")+ {+ if (_emu == IntPtr.Zero) _emu = FindEmulator();+ Fit((int)L(line, "x"), (int)L(line, "y"), (int)L(line, "w"), (int)L(line, "h"));+ Reply(sock, "{\"ok\":true}");+ }+ else if (cmd == "rotate")+ {+ Rotate(S(line, "dir"));+ Thread.Sleep(350);+ Reply(sock, "{\"ok\":true}");+ }+ else if (cmd == "hide")+ {+ if (_emu != IntPtr.Zero) ShowWindow(_emu, 0);+ Reply(sock, "{\"ok\":true}");+ }+ else if (cmd == "show")+ {+ if (_emu != IntPtr.Zero) ShowWindow(_emu, 5);+ Reply(sock, "{\"ok\":true}");+ }+ else if (cmd == "detach")+ {+ Detach();+ Reply(sock, "{\"ok\":true}");+ }+ else if (cmd == "hook")+ {+ if (L(line, "on") == 1) HookOn(); else HookOff();+ Reply(sock, "{\"ok\":true,\"hooked\":" + (_hook != IntPtr.Zero ? "true" : "false") + "}");+ }+ else if (cmd == "probe")+ {+ IntPtr e = FindEmulator();+ RECT r = new RECT();+ if (e != IntPtr.Zero) GetWindowRect(e, out r);+ Reply(sock, "{\"ok\":true,\"emu\":" + e.ToInt64() + ",\"w\":" + (r.R - r.L) + ",\"h\":" + (r.B - r.T) + "}");+ }+ else if (cmd == "quit")+ {+ Reply(sock, "{\"ok\":true}");+ run = false;+ break;+ }+ else+ {+ Reply(sock, "{\"ok\":false,\"error\":\"unknown\"}");+ }+ }+ }+ catch (SocketException) { break; }+ catch (Exception) { }+ }+ HookOff();+ try { sock.Close(); } catch { }+ }+}+'@++Add-Type -TypeDefinition $src+[ApkAgent]::Serve($Port)diff --git a/src/core/win/windowctl.ps1 b/src/core/win/windowctl.ps1new file mode 100644index 0000000..045f172--- /dev/null+++ b/src/core/win/windowctl.ps1@@ -0,0 +1,116 @@+# ApkStart window controller (ASCII-only source; Chinese text comes from UTF-8 JSON).+# Pure Win32 P/Invoke, no compiled binary, no third party dependency.+# Usage: powershell -NoProfile -ExecutionPolicy Bypass -File windowctl.ps1 params.json+param([string]$JsonPath)++$ErrorActionPreference = 'Stop'+$OutputEncoding = [System.Text.Encoding]::ASCII++if (-not (Test-Path $JsonPath)) { Write-Output 'OK=0'; Write-Output 'ERR=no-json'; exit 0 }+$j = [System.IO.File]::ReadAllText($JsonPath, [System.Text.Encoding]::UTF8) | ConvertFrom-Json++$src = @'+using System;+using System.Runtime.InteropServices;+public class ApkWin {+ [StructLayout(LayoutKind.Sequential)] public struct RECT { public int Left, Top, Right, Bottom; }+ [DllImport("user32.dll", CharSet=CharSet.Unicode)] public static extern bool SetWindowText(IntPtr h, string s);+ [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr h, int c);+ [DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr h);+ [DllImport("user32.dll")] public static extern bool IsZoomed(IntPtr h);+ [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);+ [DllImport("user32.dll")] public static extern bool SetWindowPos(IntPtr h, IntPtr after, int x, int y, int w, int hh, uint flags);+ [DllImport("user32.dll")] public static extern int GetWindowLong(IntPtr h, int idx);+ [DllImport("user32.dll")] public static extern int SetWindowLong(IntPtr h, int idx, int val);+ [DllImport("user32.dll", CharSet=CharSet.Unicode)] public static extern IntPtr LoadImage(IntPtr inst, string file, uint type, int w, int h, uint flags);+ [DllImport("user32.dll")] public static extern IntPtr SendMessage(IntPtr h, uint msg, IntPtr wp, IntPtr lp);+ [DllImport("shell32.dll")] public static extern void SHChangeNotify(int eventId, int flags, IntPtr item1, IntPtr item2);+}+'@+Add-Type -TypeDefinition $src++function Find-Win([int]$procId) {+ # No pid (reused runtime started by another process): scan emulator/qemu windows.+ if ($procId -le 0) {+ $cand = Get-Process -ErrorAction SilentlyContinue |+ Where-Object { $_.MainWindowHandle -ne [IntPtr]::Zero -and $_.ProcessName -match 'emulator|qemu' }+ foreach ($c in $cand) { return $c.MainWindowHandle }+ return [IntPtr]::Zero+ }+ $p = Get-Process -Id $procId -ErrorAction SilentlyContinue+ if ($null -ne $p -and $p.MainWindowHandle -ne [IntPtr]::Zero) { return $p.MainWindowHandle }+ # Qt builds usually expose the HWND on the qemu child process.+ $kids = Get-CimInstance Win32_Process -Filter "ParentProcessId=$procId" -ErrorAction SilentlyContinue+ foreach ($k in $kids) {+ $q = Get-Process -Id $k.ProcessId -ErrorAction SilentlyContinue+ if ($null -ne $q -and $q.MainWindowHandle -ne [IntPtr]::Zero) { return $q.MainWindowHandle }+ }+ return [IntPtr]::Zero+}++$action = [string]$j.action+if ($action -eq 'refresh') {+ # Tell Explorer a shortcut / icon changed, otherwise the new desktop icon may+ # not appear until the user presses F5 (reported as "shortcut missing").+ [void][ApkWin]::SHChangeNotify(0x08000000, 0, [IntPtr]::Zero, [IntPtr]::Zero)+ Write-Output 'OK=1'+ exit 0+}++$hwnd = Find-Win ([int]$j.pid)+if ($hwnd -eq [IntPtr]::Zero) { Write-Output 'OK=0'; Write-Output 'ERR=no-window'; exit 0 }+Write-Output ("HWND=" + $hwnd.ToInt64())++if ($action -eq 'get') {+ $r = New-Object ApkWin+RECT+ [void][ApkWin]::GetWindowRect($hwnd, [ref]$r)+ Write-Output ("X=" + $r.Left)+ Write-Output ("Y=" + $r.Top)+ Write-Output ("W=" + ($r.Right - $r.Left))+ Write-Output ("H=" + ($r.Bottom - $r.Top))+ Write-Output ("MAX=" + $(if ([ApkWin]::IsZoomed($hwnd)) { 1 } else { 0 }))+ Write-Output 'OK=1'+ exit 0+}++if ($j.title) { [void][ApkWin]::SetWindowText($hwnd, [string]$j.title) }++if ($j.icon) {+ try {+ $hicon = [ApkWin]::LoadImage([IntPtr]::Zero, [string]$j.icon, 1, 0, 0, 0x10)+ if ($hicon -ne [IntPtr]::Zero) {+ [void][ApkWin]::SendMessage($hwnd, 0x0080, [IntPtr]0, $hicon)+ [void][ApkWin]::SendMessage($hwnd, 0x0080, [IntPtr]1, $hicon)+ }+ } catch { }+}++$style = [ApkWin]::GetWindowLong($hwnd, -16)+$SWP = 0x0060 # SWP_SHOWWINDOW | SWP_FRAMECHANGED (apply style change immediately)+if ($action -eq 'fullscreen') {+ # The emulator window keeps its LCD aspect ratio, so SW_MAXIMIZE only gives a+ # narrow window stuck to the left. The caller computes a "full height, centered"+ # rect and we just strip the frame and apply it.+ $new = $style -band (-bnot 0x00C40000) # drop caption / resizable frame+ [void][ApkWin]::SetWindowLong($hwnd, -16, $new)+ [void][ApkWin]::ShowWindow($hwnd, 9) # SW_RESTORE first+ if ($j.bounds) {+ $b = $j.bounds+ [void][ApkWin]::SetWindowPos($hwnd, [IntPtr]::Zero, [int]$b.x, [int]$b.y, [int]$b.w, [int]$b.h, $SWP)+ } else {+ [void][ApkWin]::ShowWindow($hwnd, 3) # SW_MAXIMIZE+ }+} elseif ($action -eq 'window') {+ $want = 0x00C40000 -bor 0x00080000 # caption + thick frame + system menu+ [void][ApkWin]::SetWindowLong($hwnd, -16, $style -bor $want)+ [void][ApkWin]::ShowWindow($hwnd, 9) # SW_RESTORE+ if ($j.bounds) {+ $b = $j.bounds+ [void][ApkWin]::SetWindowPos($hwnd, [IntPtr]::Zero, [int]$b.x, [int]$b.y, [int]$b.w, [int]$b.h, $SWP)+ }+} elseif ($action -eq 'focus') {+ [void][ApkWin]::ShowWindow($hwnd, 9)+}++[void][ApkWin]::SetForegroundWindow($hwnd)+Write-Output 'OK=1'diff --git a/src/core/windowctl.js b/src/core/windowctl.jsnew file mode 100644index 0000000..0052b31--- /dev/null+++ b/src/core/windowctl.js@@ -0,0 +1,90 @@+'use strict';+/**+ * 把 Android Emulator 的 Qt 窗口打扮成「一个应用一个原生窗口」。+ *+ * 为什么不投屏:无头模式下 SurfaceFlinger 不出 VSYNC(实测 screenrecord 3 秒只有 2 帧),+ * 软件投屏既卡又吃 CPU。带窗口的模拟器本身就是原生 60fps + 原生鼠标键盘,+ * 这里只做「改标题 / 换图标 / 设尺寸 / 全屏」这几下 Win32 操作,成本近乎为零。+ *+ * PowerShell 是 Windows 自带组件,脚本为纯 ASCII,中文标题通过 UTF-8 JSON 传入,+ * 避免 Windows PowerShell 5.1 按 ANSI 读 .ps1 造成乱码。+ * 任何失败都静默降级:窗口照样能用,只是没有改名/全屏。+ */+const fs = require('fs');+const os = require('os');+const path = require('path');+const crypto = require('crypto');+const { execFile } = require('child_process');++const SCRIPT = path.join(__dirname, 'win', 'windowctl.ps1');+const TIMEOUT = 8000;++function parseOut(text) {+ const out = {};+ for (const line of String(text || '').split(/\r?\n/)) {+ const i = line.indexOf('=');+ if (i > 0) out[line.slice(0, i).trim()] = line.slice(i + 1).trim();+ }+ return out;+}++/** @param {object} params { pid, action, title, icon, bounds } */+function call(params) {+ return new Promise((resolve) => {+ if (process.platform !== 'win32' || !fs.existsSync(SCRIPT) || !params || params.pid === undefined) {+ resolve(null);+ return;+ }+ const json = path.join(os.tmpdir(),+ `apkstart-wctl-${crypto.randomBytes(4).toString('hex')}.json`);+ try {+ fs.writeFileSync(json, JSON.stringify(params), 'utf8');+ } catch (_) { resolve(null); return; }++ execFile('powershell.exe', [+ '-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass',+ '-File', SCRIPT, json,+ ], { timeout: TIMEOUT, windowsHide: true, maxBuffer: 1024 * 64 }, (err, stdout) => {+ try { fs.unlinkSync(json); } catch (_) { /* ignore */ }+ if (err) { resolve(null); return; }+ const r = parseOut(stdout);+ resolve(r.OK === '1' ? r : null);+ });+ });+}++/** 读取当前窗口位置,用于「记住每个应用的窗口大小」 */+async function getBounds(pid) {+ const r = await call({ pid, action: 'get' });+ if (!r || !Number(r.W) || !Number(r.H)) return null;+ return {+ x: Number(r.X) || 0, y: Number(r.Y) || 0,+ w: Number(r.W), h: Number(r.H),+ maximized: r.MAX === '1',+ };+}++/**+ * 让运行时窗口表现为当前应用。+ * @param {object} o { pid, label, icon, mode:'window'|'fullscreen', bounds, screen }+ */+async function present(o) {+ const { pid, label, icon, mode, bounds, screen } = o || {};+ // pid=0 是合法输入:复用别的进程拉起的模拟器时没有句柄,交给脚本按进程名找窗口+ if (pid === undefined || pid === null) return null;+ return call({+ pid,+ action: mode === 'fullscreen' ? 'fullscreen' : 'window',+ title: label || '',+ icon: icon && fs.existsSync(icon) ? icon : '',+ bounds: bounds || null,+ screen: mode === 'fullscreen' ? (screen || null) : null,+ });+}++async function focus(pid) { return call({ pid, action: 'focus' }); }++/** 通知资源管理器刷新图标/快捷方式,避免新建的桌面图标要按 F5 才出现 */+async function refreshShell() { return call({ pid: 0, action: 'refresh' }); }++module.exports = { call, getBounds, present, focus, refreshShell, SCRIPT };diff --git a/src/core/zip.js b/src/core/zip.jsindex 517b4d7..302717a 100644--- a/src/core/zip.js+++ b/src/core/zip.js@@ -4,6 +4,7 @@* 只解析中央目录,按需解压单个条目,避免大 APK 全量解压撑爆内存。*/const zlib = require('zlib');+const fs = require('fs');const EOCD_SIG = 0x06054b50;const CEN_SIG = 0x02014b50;@@ -122,4 +123,114 @@ class ZipArchive {}}-module.exports = { ZipArchive };+/**+ * 文件版 ZIP 读取器:只把尾部中央目录读进内存,条目按需从 fd 流式读。+ * 用于 emulator / 系统镜像这类 GB 级安装包——旧版 fs.readFileSync 整包读会+ * 在低内存机器上直接 OOM,表现为「下载完了却装不上」。+ */+class ZipFile {+ constructor(filePath) {+ this.path = filePath;+ this.fd = fs.openSync(filePath, 'r');+ this.size = fs.statSync(filePath).size;+ this.entries = new Map();+ try { this._parse(); } catch (e) { this.close(); throw e; }+ }++ close() {+ if (this.fd != null) { try { fs.closeSync(this.fd); } catch (_) { /* ignore */ } }+ this.fd = null;+ }++ _readAt(pos, len) {+ const b = Buffer.alloc(Math.max(0, len));+ if (len > 0) fs.readSync(this.fd, b, 0, len, pos);+ return b;+ }++ _parse() {+ const tailLen = Math.min(this.size, 22 + 65557 + 4096);+ const tailBase = this.size - tailLen;+ const tail = this._readAt(tailBase, tailLen);+ let eocd = -1;+ for (let i = tail.length - 22; i >= 0; i -= 1) {+ if (tail.readUInt32LE(i) === EOCD_SIG) { eocd = i; break; }+ }+ if (eocd < 0) throw new Error('不是有效的 ZIP/APK 文件(未找到 EOCD)');++ const total = tail.readUInt16LE(eocd + 10);+ const cdOffset = tail.readUInt32LE(eocd + 16);+ const eocdAbs = tailBase + eocd;+ let cd = tail;+ let cdBase = tailBase;+ if (cdOffset < tailBase || cdOffset > eocdAbs) {+ // 中央目录不在尾部缓冲里(超大注释等),单独读一段+ const len = Math.min(eocdAbs - cdOffset, 64 * 1024 * 1024);+ if (len <= 0) throw new Error('ZIP 中央目录偏移异常');+ cd = this._readAt(cdOffset, len);+ cdBase = cdOffset;+ }++ let off = cdOffset - cdBase;+ for (let i = 0; i < total; i += 1) {+ if (off + 46 > cd.length || cd.readUInt32LE(off) !== CEN_SIG) break;+ const flags = cd.readUInt16LE(off + 8);+ const method = cd.readUInt16LE(off + 10);+ const compSize = cd.readUInt32LE(off + 20);+ const uncompSize = cd.readUInt32LE(off + 24);+ const nameLen = cd.readUInt16LE(off + 28);+ const extraLen = cd.readUInt16LE(off + 30);+ const commentLen = cd.readUInt16LE(off + 32);+ const localOffset = cd.readUInt32LE(off + 42);+ const name = cd.toString('utf8', off + 46, off + 46 + nameLen);+ this.entries.set(name, { name, flags, method, compSize, uncompSize, localOffset });+ off += 46 + nameLen + extraLen + commentLen;+ }+ }++ has(name) { return this.entries.has(name); }+ names() { return [...this.entries.keys()]; }+ find(re) { return this.names().filter((n) => re.test(n)); }++ _range(name) {+ const e = this.entries.get(name);+ if (!e) throw new Error(`条目不存在: ${name}`);+ const head = this._readAt(e.localOffset, 30);+ if (head.readUInt32LE(0) !== LOC_SIG) throw new Error(`本地文件头损坏: ${name}`);+ const nameLen = head.readUInt16LE(26);+ const extraLen = head.readUInt16LE(28);+ const start = e.localOffset + 30 + nameLen + extraLen;+ return { e, start, end: start + e.compSize - 1 };+ }++ read(name) {+ const { e, start } = this._range(name);+ const raw = this._readAt(start, e.compSize);+ if (e.method === 0) return raw;+ if (e.method === 8) return zlib.inflateRawSync(raw);+ throw new Error(`不支持的压缩方式 ${e.method}: ${name}`);+ }++ pipeTo(name, dest) {+ let r;+ try { r = this._range(name); } catch (e) { return Promise.reject(e); }+ const { e, start, end } = r;+ return new Promise((resolve, reject) => {+ const done = (err) => (err ? reject(err) : resolve(e.uncompSize));+ dest.on('error', done);+ dest.on('finish', () => done(null));+ if (e.compSize === 0) { dest.end(); return undefined; }+ if (e.method !== 0 && e.method !== 8) return done(new Error(`不支持的压缩方式 ${e.method}: ${name}`));+ const src = fs.createReadStream(null, {+ fd: this.fd, autoClose: false, start, end: Math.max(start, end),+ });+ src.on('error', done);+ if (e.method === 0) return src.pipe(dest);+ const inflater = zlib.createInflateRaw();+ inflater.on('error', done);+ return src.pipe(inflater).pipe(dest);+ });+ }+}++module.exports = { ZipArchive, ZipFile };diff --git a/src/main.js b/src/main.jsindex 8727ae6..075e52a 100644--- a/src/main.js+++ b/src/main.js@@ -3,7 +3,7 @@* ApkStart 主进程* 职责:窗口 / 托盘 / 单实例 / 命令行分发(双击 apk、桌面快捷方式启动)/ IPC*/-const { app, BrowserWindow, ipcMain, dialog, Tray, Menu, shell, nativeImage } = require('electron');+const { app, BrowserWindow, ipcMain, dialog, Tray, Menu, shell, nativeImage, screen, globalShortcut } = require('electron');const fs = require('fs');const path = require('path');@@ -28,13 +28,42 @@ function loadBrandIcon(size) {return nativeImage.createFromBuffer(drawAppIcon(size || 256));}const assoc = require('./core/assoc');+const windowctl = require('./core/windowctl');+const display = require('./core/display');+const { WinAgent } = require('./core/agent');+const { AppWindow, TITLEBAR_H } = require('./core/appwin');+const { NotifyBridge } = require('./core/notify');+const { AndroidSettings } = require('./core/android');// Windows 下窗口被遮挡时 capturePage 会拿到旧帧,自动化截图需要禁用遮挡计算app.commandLine.appendSwitch('disable-features', 'CalculateNativeWinOcclusion');+// 应用窗口把模拟器以 SetParent 方式嵌进来当子窗口。Chromium 默认用+// DirectComposition 上半透明图层(Intermediate D3D Window /+// WS_EX_NOREDIRECTIONBITMAP)绘制网页,这层由 DWM 在窗口级别合成,+// 会直接盖住嵌入的子窗口——表现就是"画面全黑但安卓其实在跑"。+// 外壳界面只有一条 38px 标题栏和启动遮罩,走软件合成完全不卡,+// 关掉硬件加速后 Chromium 直接画进 HWND,子窗口层级才真正生效。+// 想对比效果时可以设 APKSTART_HWACCEL=1 启动。+if (process.env.APKSTART_HWACCEL !== '1') app.disableHardwareAcceleration();+const APP_ROOT = path.join(__dirname, '..');const IS_DEV = process.argv.includes('--dev');+/**+ * 轻量文件日志:打包后没有控制台,出问题时用户可以把 app.log 发过来。+ * 只记关键节点和异常,正常路径几千行也不会撑爆。+ */+function appLog(line) {+ try {+ const dir = path.join(store.DATA_DIR, 'logs');+ fs.mkdirSync(dir, { recursive: true });+ fs.appendFileSync(path.join(dir, 'app.log'), `${new Date().toISOString()} ${line}\n`);+ } catch (_) { /* 日志失败不能影响主流程 */ }+}+process.on('uncaughtException', (e) => appLog(`UNCAUGHT ${e && (e.stack || e.message)}`));+process.on('unhandledRejection', (e) => appLog(`REJECT ${e && (e.stack || e.message || e)}`));+/*** 完整版(内置运行时)自动接管:* 发行包里 ApkStart.exe 旁边带有 runtime/(emulator + platform-tools + AEHD + ARM 兼容镜像)。@@ -43,18 +72,69 @@ const IS_DEV = process.argv.includes('--dev');*/function bootstrapBundledRuntime() {try {- const settingsFile = path.join(store.DATA_DIR, 'settings.json');- if (fs.existsSync(settingsFile)) return; // 只在首次启动时接管const exeDir = path.dirname(process.execPath);- const candidates = [path.join(exeDir, 'runtime'), path.join(path.dirname(exeDir), 'runtime')];- for (const dir of candidates) {- const hasEmulator = fs.existsSync(path.join(dir, 'emulator', 'emulator.exe'));- const hasCompatImg = fs.existsSync(path.join(dir, 'system-images', 'android-34', 'google_apis_playstore', 'x86_64', 'system.img'));- if (hasEmulator && hasCompatImg) {- store.saveSettings({ runtime: { dir, compatImage: true } });- break;+ // 便携版把运行时放在 exe 旁边;electron-builder 的 portable 会把资源解到+ // resources/ 下,进程 exe 和 resources 同级,所以几个候选位置都看一下。+ const candidates = [+ path.join(exeDir, 'runtime'),+ path.join(path.dirname(exeDir), 'runtime'),+ path.join(process.resourcesPath || '', 'runtime'),+ path.join(process.resourcesPath || '', 'app', 'runtime'),+ ];+ // 内置运行时只要求「有 emulator + 任意一套完整系统镜像」,不写死 API 版本:+ // 单文件发行版带的可能是更小的 AOSP 镜像,写死 API34 会让它误判成没有运行时。+ const hasImage = (dir) => {+ const root = path.join(dir, 'system-images');+ let apis = [];+ try { apis = fs.readdirSync(root); } catch (_) { return false; }+ for (const api of apis) {+ let tags = [];+ try { tags = fs.readdirSync(path.join(root, api)); } catch (_) { continue; }+ for (const tag of tags) {+ let abis = [];+ try { abis = fs.readdirSync(path.join(root, api, tag)); } catch (_) { continue; }+ for (const abi of abis) {+ const d = path.join(root, api, tag, abi);+ // 单文件发行版里的镜像是压缩存放的(system.img.gz),解压在首次启动时做。+ // 这里只认 system.img 会让「包里明明带了镜像」被判成没带,转而去联网下载。+ const hasSys = fs.existsSync(path.join(d, 'system.img')) || fs.existsSync(path.join(d, 'system.img.gz'));+ if (hasSys && fs.existsSync(path.join(d, 'kernel-ranchu'))) return true;+ }+ }+ }+ return false;+ };+ const bundled = candidates.find((dir) =>+ fs.existsSync(path.join(dir, 'emulator', 'emulator.exe')) && hasImage(dir));+ if (!bundled) return;++ const s = store.getSettings();+ // 旧版只在 settings.json 不存在时接管:用户先装过在线版再解压完整版,+ // 就会一直走「缺组件」的部署向导。现在只要当前运行时目录里没有 emulator 就接管。+ const current = s.runtime.dir || path.join(store.DATA_DIR, 'runtime');+ const currentOk = fs.existsSync(path.join(current, 'emulator', 'emulator.exe'));+ // 已有可用运行时(含在线版)就尊重它:AVD 用户数据就在该目录下,不能悄悄搬走+ if (currentOk) {+ // 但仍把自动参数打开,旧配置里的硬编码 4G/4核/弃用 GPU 模式不能继续用+ if (s.engine.gpuMode === 'swiftshader_indirect' || s.engine.memoryMB === 4096) {+ store.saveSettings({ engine: { gpuMode: 'auto', autoMemory: true, memoryMB: 0, cores: 0 } });}+ return;}+ // 包里带的是 Google Play 镜像才开兼容模式;AOSP 镜像带的是原生 x86_64 库+ let playBundled = false;+ try {+ const root = path.join(bundled, 'system-images');+ for (const api of fs.readdirSync(root)) {+ for (const tag of fs.readdirSync(path.join(root, api))) {+ if (/playstore|google_apis/i.test(tag)) playBundled = true;+ }+ }+ } catch (_) { /* 忽略 */ }+ store.saveSettings({+ runtime: { dir: bundled, compatImage: playBundled },+ engine: { gpuMode: 'auto', autoMemory: true },+ });} catch (_) { /* 接管失败不阻塞启动,走在线引导 */ }}bootstrapBundledRuntime();@@ -69,21 +149,139 @@ let runtime = null;let installer = null;let sharer = null;let quitting = false;+let winAgent = null;+let appWin = null;+let notifier = null;+let androidSet = null;// ---------------- 命令行解析 ----------------function parseArgs(argv) {- const args = argv.slice(IS_DEV ? 2 : 1);+ const args = argv.slice(IS_DEV ? 2 : 1).filter((a) => !a.startsWith('--allow-file-access'));const out = { apk: null, launch: null, silent: false };for (let i = 0; i < args.length; i++) {const a = args[i];- if (a === '--launch' && args[i + 1]) { out.launch = args[++i]; out.silent = true; }- else if (a === '--silent') out.silent = true;- else if (/\.(apk|xapk)$/i.test(a) && !a.startsWith('--')) out.apk = a;+ if (a === '--launch') {+ // Electron 会往 argv 里塞自己的开关和 app 路径,只认形如 com.foo.bar 的包名+ const v = args.slice(i + 1).find((x) => x && /^[a-zA-Z][\w]*(\.[\w]+)+$/.test(x));+ if (v) { out.launch = v; out.silent = true; }+ } else if (a === '--silent' || a === '--autostart') out.silent = true;+ else if (/\.(apk|xapk|apks)$/i.test(a) && !a.startsWith('--')) out.apk = a;}return out;}+/** Chromium 能解 WebP,nativeImage 不能;用隐藏窗口把 APK 图标转成 PNG */+let decodeWindow = null;+async function decodeIcon(raw) {+ if (!decodeWindow || decodeWindow.isDestroyed()) {+ decodeWindow = new BrowserWindow({ show: false, width: 2, height: 2, skipTaskbar: true });+ await decodeWindow.loadURL('about:blank');+ }+ const mime = /^RIFF/.test(raw.toString('ascii', 0, 4)) ? 'image/webp' : 'image/png';+ const js = `(async () => {+ const img = new Image();+ img.src = 'data:${mime};base64,${raw.toString('base64')}';+ await img.decode();+ const s = Math.min(256, Math.max(img.naturalWidth, img.naturalHeight));+ const c = document.createElement('canvas'); c.width = s; c.height = s;+ c.getContext('2d').drawImage(img, 0, 0, s, s);+ return c.toDataURL('image/png');+ })()`;+ const url = await decodeWindow.webContents.executeJavaScript(js);+ return Buffer.from(String(url).split(',')[1] || '', 'base64');+}++/** 开机自启:默认开启,不需要用户去设置里勾 */+function applyAutoStart() {+ if (!app.isPackaged) return; // 开发时不写注册表+ const on = !!store.getSettings().autoStart;+ try {+ // 必须显式给 name,否则注册表里的启动项会叫 "electron.app.Electron"+ app.setLoginItemSettings({+ openAtLogin: on,+ name: 'ApkStart',+ path: process.execPath,+ args: ['--autostart'],+ });+ // 清掉旧版本(没传 name)留下的那条,避免重复启动+ app.setLoginItemSettings({ openAtLogin: false, name: 'electron.app.Electron' });+ } catch (_) { /* 组策略禁止时忽略 */ }+}++// ---------------- 显示模式:全屏自适应 / 竖屏窗口可调 ----------------++function displaySettings() { return store.getSettings().display || {}; }++function screenRect() {+ const d = screen.getPrimaryDisplay();+ const a = d.workArea || d.bounds;+ return { x: a.x || 0, y: a.y || 0, w: a.width || 1920, h: a.height || 1080 };+}++let currentAppPkg = null;++function portraitSize() {+ const d = displaySettings();+ return display.portraitSize(d.portrait || '540x960');+}++/** 打开(或复用)那个「一个应用一个干净窗口」 */+function openAppWindow(pkg, tip) {+ const rec = store.getApp(pkg);+ appWin.open({+ pkg,+ label: (rec && rec.label) || pkg,+ iconPath: rec && rec.icoPath,+ portrait: portraitSize(),+ fullscreen: displaySettings().mode === 'fullscreen',+ });+ appWin.setIcon(rec && rec.icoPath);+ appWin.setState({ tip: tip || '正在启动安卓运行时…', ready: false, landscape: false });+ currentAppPkg = pkg;+}++async function toggleDisplayMode() {+ const next = store.saveSettings({+ display: { mode: displaySettings().mode === 'fullscreen' ? 'window' : 'fullscreen' },+ });+ if (appWin && appWin.isOpen) {+ if (next.display.mode === 'fullscreen') appWin.win.maximize();+ else appWin.win.unmaximize();+ appWin.scheduleFit();+ }+ return next.display.mode;+}++/** 首次运行把 adb / emulator / 系统镜像一次装完,不再分 1~5 步 */+let deploying = false;+async function autoDeploy() {+ if (deploying || !store.getSettings().autoDeploy) return { ok: false, error: 'skipped' };+ deploying = true;+ const progress = (p) => send('provision:progress', { ...p, component: p.component || 'all' });+ try {+ const env = await runtime.provisioner.checkEnv();+ if (!env.adb.ok) {+ progress({ message: '正在准备 adb…' });+ await runtime.provisioner.installAdb(progress);+ }+ if (!env.emulator.ok) {+ progress({ message: '正在准备 Android 运行时…' });+ await runtime.provisioner.installEmulator(progress);+ }+ if (!env.sysimg.ok) {+ progress({ message: '正在准备 Android 系统镜像…' });+ await runtime.provisioner.installSystemImage(progress);+ }+ const after = await runtime.provisioner.checkEnv();+ return { ok: !!(after.adb.ok && after.emulator.ok && after.sysimg.ok) };+ } catch (e) {+ return { ok: false, error: e.message };+ } finally {+ deploying = false;+ }+}+function launcherInfo() {if (app.isPackaged) {return { target: process.execPath, args: '', cwd: path.dirname(process.execPath) };@@ -176,10 +374,22 @@ function buildTray() {? apps.map((a) => ({ label: a.label, click: () => runLaunch(a.package) })): [{ label: '还没有安装应用', enabled: false }]),{ type: 'separator' },+ {+ label: displaySettings().mode === 'fullscreen' ? '切回竖屏窗口' : '全屏(自适应屏幕)',+ click: () => { toggleDisplayMode(); },+ },+ { label: '重建桌面/开始菜单快捷方式', click: () => { installer.ensureShortcuts().catch(() => {}); } },{ label: '同步共享目录', click: () => sharer.sync() },{ label: '设置', click: () => { showWindow(); send('ui:navigate', 'settings'); } },{ type: 'separator' },- { label: '退出', click: () => { quitting = true; app.quit(); } },+ {+ label: '退出',+ click: async () => {+ try { appWin.close({ keepApp: true }); } catch (_) { /* ignore */ }+ quitting = true;+ app.quit();+ },+ },]);tray.setContextMenu(menu);};@@ -197,6 +407,8 @@ async function runInstall(filePath) {try {const result = await installer.install(filePath, (p) => send('install:progress', p));send('install:done', result);+ // 新建的桌面图标要让资源管理器立刻刷新,否则用户会以为「没创建快捷方式」+ windowctl.refreshShell().catch(() => {});notify('安装完成', `${result.app.label} 已安装${result.app.shortcutPath ? ',桌面快捷方式已创建' : ''}`);return result;} catch (e) {@@ -208,21 +420,65 @@ async function runInstall(filePath) {}async function runLaunch(pkg) {+ const t0 = Date.now();+ const mark = (s) => appLog(`launch ${pkg} ${s} +${Date.now() - t0}ms`);+ appLog(`launch start ${pkg}`);try {- const settings = store.getSettings();- const r = await installer.launch(pkg, { onLog: (m) => send('runtime:log', m) });+ // 1) 先把「应用窗口」打开显示启动动画:整个过程看不到安卓桌面,也看不到模拟器窗口+ openAppWindow(pkg, '正在启动安卓运行时…');+ if (mainWindow && mainWindow.isVisible() && !IS_DEV) mainWindow.hide();++ const r = await installer.launch(pkg, {+ onLog: (m) => { send('runtime:log', m); appLog(` rt ${m}`); },+ onMark: mark,+ beforeStart: async (rt) => {+ mark('engine ready');+ appWin.setState({ tip: '正在打开应用…' });+ // 沉浸式 + 关动画 + 收起锁屏:只做一次,之后每次启动都秒进+ await rt.client.prepareForeground().catch(() => {});+ mark('foreground ready');+ },+ });+ mark('app started');++ // 2) 应用真的活下来了,才把画面嵌进窗口(否则用户会看到闪一下的桌面/崩溃页)+ const embedded = await appWin.embed();+ mark('embedded');+ appWin.setState({ ready: true, tip: '' });+ winAgent.hook(true).catch(() => {});+ startNotifier();send('app:launched', { package: pkg, engine: r.engine });- if (settings.hideAfterLaunch && !IS_DEV && !mainWindow?.isVisible()) {- // 静默启动:不打扰用户- }- return { ok: true };+ appLog(`launch ok ${pkg} embedded=${embedded}`);+ return { ok: true, embedded };} catch (e) {+ appLog(`launch failed ${pkg}: ${e && (e.stack || e.message)}`);+ try { appWin.close({ keepApp: true }); } catch (_) { /* ignore */ }showWindow();send('toast', { type: 'error', message: `启动失败:${e.message}` });return { ok: false, error: e.message };}}+/** 通知桥:只在有应用窗口时轮询,关掉窗口就停,避免空转 */+function startNotifier() {+ if (!notifier) {+ notifier = new NotifyBridge({+ getClient: () => runtime.client(),+ getAppLabel: (pkg) => (store.getApp(pkg) || {}).label || pkg,+ getAppIcon: (pkg) => (store.getApp(pkg) || {}).icoPath || '',+ onOpen: (pkg) => {+ if (appWin && appWin.isOpen && appWin.pkg === pkg) {+ appWin.win.show();+ appWin.win.focus();+ } else {+ runLaunch(pkg).catch(() => {});+ }+ },+ });+ }+ notifier.start();+}+// ---------------- IPC ----------------function registerIpc() {@@ -257,7 +513,7 @@ function registerIpc() {ipcMain.handle('apk:pick', async () => {const r = await dialog.showOpenDialog(mainWindow, {title: '选择要安装的 APK',- filters: [{ name: 'Android 应用', extensions: ['apk'] }],+ filters: [{ name: 'Android 应用', extensions: ['apk', 'apks', 'xapk'] }],properties: ['openFile', 'multiSelections'],});if (r.canceled) return [];@@ -309,7 +565,43 @@ function registerIpc() {});ipcMain.handle('settings:get', () => store.getSettings());- ipcMain.handle('settings:set', (_e, patch) => store.saveSettings(patch));+ ipcMain.handle('settings:set', (_e, patch) => {+ const next = store.saveSettings(patch);+ if (patch && patch.autoStart !== undefined) applyAutoStart();+ if (patch && patch.display && appWin && appWin.isOpen) {+ // 竖屏基准尺寸变了:只影响后续打开的窗口大小,不打断正在跑的应用+ appWin.portrait = portraitSize();+ }+ // 打开「开始菜单快捷方式」时立刻补齐,不用等下次安装+ if (patch && (patch.createStartMenuShortcut === true || patch.createShortcutOnInstall === true)) {+ installer.ensureShortcuts().catch(() => {});+ }+ return next;+ });++ // ---------------- 显示模式 / 快捷方式 / 一键部署 ----------------++ ipcMain.handle('display:state', () => ({+ ...displaySettings(),+ screen: screenRect(),+ current: currentAppPkg,+ }));++ ipcMain.handle('display:set', async (_e, patch) => {+ const next = store.saveSettings({ display: patch || {} });+ if (appWin && appWin.isOpen) {+ appWin.portrait = portraitSize();+ if (next.display.mode === 'fullscreen' && !appWin.win.isMaximized()) appWin.win.maximize();+ if (next.display.mode !== 'fullscreen' && appWin.win.isMaximized()) appWin.win.unmaximize();+ appWin.scheduleFit();+ }+ return next.display;+ });++ ipcMain.handle('display:toggle', () => toggleDisplayMode());++ ipcMain.handle('shortcut:rebuild', async () => ({ ok: true, fixed: await installer.ensureShortcuts() }));+ ipcMain.handle('runtime:autoDeploy', () => autoDeploy());ipcMain.handle('runtime:status', async () => runtime.status());ipcMain.handle('runtime:probe', async () => runtime.probe());@@ -323,6 +615,51 @@ function registerIpc() {});ipcMain.handle('runtime:log', () => runtime.bootLog);+ // ---------------- 诊断 / 瘦身 ----------------++ ipcMain.handle('doctor:profile', async () => {+ const doctor = require('./core/doctor');+ // 已经开机就用实跑参数;没开机也要按「真实引擎版本 + 真实加速状态」推导,+ // 否则设置页会显示已弃用的 swiftshader_indirect / 软件模拟,和实跑不一致。+ let p = runtime.emulator.profile;+ if (!p) {+ const env = await runtime.provisioner.checkEnv();+ p = doctor.autoProfile({+ settings: store.getSettings(),+ accel: env.accel,+ emulatorVersion: env.emulator.version || '',+ diskMB: doctor.freeDiskMB(store.DATA_DIR),+ });+ }+ return { profile: p, text: doctor.describeProfile(p) };+ });++ ipcMain.handle('doctor:report', async () => {+ const r = await runtime.diagnostics();+ shell.showItemInFolder(r.file);+ return r;+ });++ ipcMain.handle('runtime:usage', () => runtime.usage());++ ipcMain.handle('runtime:cleanup', async (_e, opts = {}) => {+ // 明确两次确认:先给清单,用户确认后才真正删;且只清理 ApkStart 自己的运行时目录+ if (!opts.apply) return runtime.cleanup({ apply: false, aggressive: !!opts.aggressive });+ const preview = runtime.cleanup({ apply: false, aggressive: !!opts.aggressive });+ const { response } = await dialog.showMessageBox(mainWindow, {+ type: 'warning',+ buttons: ['取消', `清理 ${preview.candidates.length} 项`],+ defaultId: 0,+ cancelId: 0,+ title: '确认清理运行时缓存',+ message: `将释放约 ${(preview.candidates.reduce((n, c) => n + c.size, 0) / 1048576).toFixed(0)} MB`,+ detail: '只删除旧镜像、旧快照、锁文件和非活动 AVD 的缓存,已安装的应用会保留。'+ + '此操作不可撤销,建议先导出诊断报告。',+ });+ if (response !== 1) return { ...preview, cancelled: true };+ return runtime.cleanup({ apply: true, aggressive: !!opts.aggressive });+ });+// ---------------- 运行时自举 ----------------ipcMain.handle('provision:installEmulator', async () => {@@ -536,6 +873,65 @@ function registerIpc() {});ipcMain.handle('window:close', () => mainWindow?.close());ipcMain.handle('window:hide', () => mainWindow?.hide());++ // ---------------- 应用窗口(只有 旋转 / 最小化 / 最大化 / 关闭) ----------------++ const winOf = (e) => BrowserWindow.fromWebContents(e.sender);++ ipcMain.handle('shell:state', () => ({ ...appWin.state, iconUrl: appWin.iconUrl || '' }));+ ipcMain.handle('shell:minimize', (e) => winOf(e)?.minimize());+ ipcMain.handle('shell:maximize', (e) => {+ const w = winOf(e);+ if (!w) return;+ if (w.isMaximized()) w.unmaximize();+ else w.maximize();+ appWin.scheduleFit();+ });+ ipcMain.handle('shell:close', (e) => { winOf(e)?.close(); });+ ipcMain.handle('shell:rotate', () => appWin.rotate());+ ipcMain.handle('shell:back', async () => { await runtime.client().keyBack(); });+ ipcMain.handle('shell:forward', async () => { await runtime.client().keyForward(); });++ // ---------------- 安卓系统设置(不用进安卓桌面) ----------------++ ipcMain.handle('android:status', async () => {+ try { return { ok: true, ...(await androidSet.status()) }; } catch (e) { return { ok: false, error: e.message }; }+ });++ ipcMain.handle('android:set', async (_e, { key, value }) => {+ try {+ switch (key) {+ case 'wifi': return { ok: true, ...(await androidSet.setWifi(!!value)) };+ case 'airplane': return { ok: true, ...(await androidSet.setAirplane(!!value)) };+ case 'volume': return { ok: true, ...(await androidSet.setVolume(value)) };+ case 'animations': return { ok: true, ...(await androidSet.setAnimations(!!value)) };+ case 'fontScale': return { ok: true, ...(await androidSet.setFontScale(value)) };+ case 'density': return { ok: true, ...(await androidSet.setDensity(value)) };+ default: return { ok: false, error: `未知设置项 ${key}` };+ }+ } catch (e) { return { ok: false, error: e.message }; }+ });++ ipcMain.handle('android:open', async (_e, action) => {+ try { return { ok: true, ...(await androidSet.open(action)) }; } catch (e) { return { ok: false, error: e.message }; }+ });++ ipcMain.handle('android:tune', async (_e, pkg) => {+ try { return { ok: true, ...(await androidSet.tune({ pkg })) }; } catch (e) { return { ok: false, error: e.message }; }+ });++ ipcMain.handle('android:permissions', async (_e, pkg) => {+ try { return { ok: true, rows: await androidSet.permissions(pkg) }; } catch (e) { return { ok: false, error: e.message }; }+ });++ ipcMain.handle('android:grantAll', async (_e, pkg) => {+ try { return { ok: true, ...(await androidSet.grantAll(pkg)) }; } catch (e) { return { ok: false, error: e.message }; }+ });++ ipcMain.handle('app:foreground', () => {+ if (appWin && appWin.isOpen) { appWin.win.show(); appWin.win.focus(); return true; }+ return false;+ });}// ---------------- 生命周期 ----------------@@ -561,22 +957,55 @@ if (!gotLock) {cwd: l.cwd,isDev: IS_DEV,desktopDir: app.getPath('desktop'),+ // Windows 搜索索引的是开始菜单里的 .lnk,只放桌面会「搜不到应用」+ startMenuDir: path.join(app.getPath('appData'), 'Microsoft', 'Windows', 'Start Menu', 'Programs'),+ decodeIcon,});sharer = new Sharer(runtime);+ androidSet = new AndroidSettings(runtime);++ // 窗口代理:内嵌模拟器窗口 + 鼠标侧键钩子(一次启动,常驻到进程退出)+ winAgent = new WinAgent();+ appWin = new AppWindow({+ agent: winAgent,+ // 旋转要改 Android 的逻辑分辨率,交给 adb 客户端做+ setOrientation: (landscape) => runtime.client().setOrientation(landscape),+ });+ appWin.onCloseApp((pkg) => {+ // 关窗口 = 关应用:先把应用停掉,内存立刻还回来;引擎留着,下次点开秒进+ runtime.client().forceStop(pkg).catch(() => {});+ if (notifier) notifier.stop();+ });+ winAgent.on('back', () => { runtime.client().keyBack().catch(() => {}); });+ winAgent.on('forward', () => { runtime.client().keyForward().catch(() => {}); });+ winAgent.on('exit', () => { winAgent = new WinAgent(); appWin.agent = winAgent; });registerIpc();createWindow({ show: !parseArgs(process.argv).silent });buildTray();+ applyAutoStart();++ // 老版本只建过桌面快捷方式 / 图标是 null:启动即自动补齐,不用用户操作+ installer.ensureShortcuts().then((fixed) => {+ if (fixed && fixed.length) {+ windowctl.refreshShell().catch(() => {});+ notify('快捷方式已补齐', fixed.join('、'));+ }+ }).catch(() => {});++ // F11 全屏 / 窗口切换;全局快捷键只在 ApkStart 活着时有效+ try {+ globalShortcut.register('F11', () => { toggleDisplayMode(); });+ } catch (_) { /* ignore */ }const args = parseArgs(process.argv);if (args.apk) runInstall(args.apk).catch(() => {});- else if (args.launch) {- const r = await runLaunch(args.launch);- if (r.ok) {- // 纯原生体验:从桌面图标启动时,不留下壳层界面- setTimeout(() => { if (store.getSettings().hideAfterLaunch) { quitting = true; app.quit(); } }, 800);- }- }+ else if (args.launch) await runLaunch(args.launch);++ // 首次运行自动完成全部部署(后台,不弹任何步骤)+ autoDeploy().then((r) => {+ if (r && r.ok) send('toast', { type: 'ok', message: '运行时已自动准备完成' });+ }).catch(() => {});sharer.start(8000);@@ -648,6 +1077,11 @@ if (!gotLock) {app.on('before-quit', () => {quitting = true;sharer?.stop();+ notifier?.stop();+ try { appWin?.close({ keepApp: false }); } catch (_) { /* ignore */ }+ try { winAgent?.dispose(); } catch (_) { /* ignore */ }runtime?.dispose();+ // 隐藏的图标解码窗口也算一个窗口,不关掉会让 window-all-closed 永远不触发+ try { if (decodeWindow && !decodeWindow.isDestroyed()) decodeWindow.destroy(); } catch (_) { /* ignore */ }});}diff --git a/src/preload.js b/src/preload.jsindex 60cf333..3ea81a9 100644--- a/src/preload.js+++ b/src/preload.js@@ -25,6 +25,15 @@ contextBridge.exposeInMainWorld('apkstart', {runtimeStart: () => invoke('runtime:start'),runtimeStop: () => invoke('runtime:stop'),runtimeLog: () => invoke('runtime:log'),+ doctorProfile: () => invoke('doctor:profile'),+ doctorReport: () => invoke('doctor:report'),+ runtimeUsage: () => invoke('runtime:usage'),+ runtimeCleanup: (opts) => invoke('runtime:cleanup', opts || {}),+ displayState: () => invoke('display:state'),+ displaySet: (patch) => invoke('display:set', patch || {}),+ displayToggle: () => invoke('display:toggle'),+ rebuildShortcuts: () => invoke('shortcut:rebuild'),+ autoDeploy: () => invoke('runtime:autoDeploy'),startInstaller: () => invoke('runtime:startInstaller'),markInstalled: () => invoke('runtime:markInstalled'),resetInstall: () => invoke('runtime:resetInstall'),@@ -55,6 +64,33 @@ contextBridge.exposeInMainWorld('apkstart', {winMaximize: () => invoke('window:maximize'),winClose: () => invoke('window:close'),winHide: () => invoke('window:hide'),+ bringAppToFront: () => invoke('app:foreground'),++ // 应用窗口(只有 旋转 / 最小化 / 最大化 / 关闭)用到的接口+ shell: {+ state: () => invoke('shell:state'),+ minimize: () => invoke('shell:minimize'),+ maximize: () => invoke('shell:maximize'),+ close: () => invoke('shell:close'),+ rotate: () => invoke('shell:rotate'),+ back: () => invoke('shell:back'),+ forward: () => invoke('shell:forward'),+ onState: (cb) => {+ const handler = (_e, payload) => cb(payload);+ ipcRenderer.on('shell:state', handler);+ return () => ipcRenderer.removeListener('shell:state', handler);+ },+ },++ // 安卓系统设置(WiFi / 音量 / 显示 / 动画 / 权限 …)+ android: {+ status: () => invoke('android:status'),+ set: (key, value) => invoke('android:set', { key, value }),+ open: (action) => invoke('android:open', action),+ tune: (pkg) => invoke('android:tune', pkg),+ permissions: (pkg) => invoke('android:permissions', pkg),+ grantAll: (pkg) => invoke('android:grantAll', pkg),+ },pathForFile: (file) => webUtils.getPathForFile(file),diff --git a/src/ui/app.js b/src/ui/app.jsindex f97b78d..28ccc59 100644--- a/src/ui/app.js+++ b/src/ui/app.js@@ -172,13 +172,13 @@ async function refreshStatus() {tag.textContent = '引导中';tag.className = 'brand-tag';} else if (s.needsSetup === 'accel') {- dot.className = 'dot err';- text.textContent = '还差一步:需要启用硬件加速 —— 点击右上角「运行时」';- tag.textContent = '待启用加速';+ dot.className = 'dot warn';+ text.textContent = '未检测到硬件加速:已自动回退软件模拟(首次开机较慢)';+ tag.textContent = '软件模拟';tag.className = 'brand-tag';} else if (s.needsSetup === 'sysimg') {dot.className = 'dot err';- text.textContent = '缺少 Android 系统镜像 —— 点击右上角「运行时」下载(约 645MB)';+ text.textContent = '缺少 Android 14 通用系统镜像 —— 点击右上角「运行时」下载(约 1.5GB,只下一次)';tag.textContent = '待下载镜像';tag.className = 'brand-tag';} else if (s.needsSetup === 'emulator') {@@ -204,7 +204,7 @@ async function refreshStatus() {tag.textContent = s.installed ? '待机' : '待安装';tag.className = 'brand-tag';}- $('statusDevice').textContent = s.deviceOnline ? '127.0.0.1:5555' : '';+ $('statusDevice').textContent = s.deviceOnline ? (s.serial || '') : '';renderSetup(s);} catch (e) {@@ -251,93 +251,47 @@ function renderSetup(s) {}const accelOk = accel.ok || hv.whpx;- $('setupHv').textContent = accelOk- ? `${accel.kind === 'whpx' || hv.whpx ? 'WHPX' : 'AEHD'} 硬件加速:已启用`- : '硬件加速:未启用';- $('setupHv').className = `setup-hv ${accelOk ? 'ok' : ''}`;- $('setupHv').title = accel.note || hv.note || '';+ $('setupHv').textContent = `自适应已启用 · ${accelOk ? '硬件加速' : '软件模拟(自动回退)'}`;+ $('setupHv').className = 'setup-hv ok';+ $('setupHv').title = s.autoProfile || accel.note || hv.note || '';const emuDone = !!(env.emulator && env.emulator.ok);const imgDone = !!(env.sysimg && env.sysimg.ok);const busy = state.setupBusy;const booting = s.phase === 'booting';- const steps = [- {- key: 'adb',- index: 1,- title: 'adb 工具链',- tag: '必需',- done: !!(env.adb && env.adb.ok),- busy: busy === 'adb',- desc: env.adb && env.adb.ok- ? `adb ${env.adb.version} · ${env.adb.path}`- : 'Android 调试桥,ApkStart 用它安装/启动应用(约 8 MB)',- actions: env.adb && env.adb.ok ? '' : '<button class="btn ghost sm" data-act="adb">下载</button>',- },- {- key: 'emulator',- index: 2,- title: 'Android 运行时引擎',- tag: '必需',- done: emuDone,- busy: busy === 'emulator',- desc: emuDone- ? `Android Emulator ${env.emulator.version} · ${(env.emulator.path || '').replace(/\\emulator\.exe$/i, '')}`- : 'Google 官方 Android 运行时(约 440 MB,走高速官方源,通常 1 分钟内下完)',- actions: emuDone ? '' : '<button class="btn ghost sm" data-act="emulator">下载</button>',- },- {- key: 'sysimg',- index: 3,- title: 'Android 系统镜像',- tag: '必需',- done: imgDone,- busy: busy === 'sysimg',- desc: imgDone- ? `Android ${env.sysimg.api} AOSP · ${fmtGB(env.sysimg.size)} · 无需安装系统`- : '官方 AOSP Android 11 镜像(约 645 MB)。镜像即系统,下完即可开机,不需要装系统',- actions: imgDone ? '' : '<button class="btn ghost sm" data-act="sysimg">下载</button>',- },- {- key: 'accel',- index: 4,- title: '硬件加速',- tag: accelOk ? '已就绪' : '需要',- done: accelOk,- busy: busy === 'accel',- desc: accelOk- ? (accel.note || '硬件加速已启用,Android 冷启动约 20-40 秒')- : '未启用时无法启动:点「启用」一键安装 AEHD 加速驱动(会弹一次管理员确认)',- actions: accelOk ? '' : '<button class="btn primary sm" data-act="accel">启用</button>',- },- {- key: 'boot',- index: 5,- title: '开机',- tag: s.deviceOnline ? '运行中' : '随时',- done: !!(s.deviceOnline || s.installed),- desc: s.deviceOnline- ? `Android ${s.android || ''} 已就绪${s.freeform ? ' · 独立窗口已启用' : ''}`- : booting- ? '正在引导 Android…'- : '前三步就绪后点「启动」,之后每次双击桌面图标会自动拉起',- actions: s.deviceOnline- ? `<button class="btn ghost sm" disabled>已启动</button>- <button class="btn ghost sm" data-act="vmStop">停止</button>`- : booting- ? `<button class="btn ghost sm" disabled>引导中…</button>- <button class="btn ghost sm" data-act="vmStop">中止</button>`- : `<button class="btn ghost sm" data-act="vmStart" ${emuDone && imgDone && accelOk ? '' : 'disabled'}>启动运行时</button>`,- },- ];+ // 只保留一个步骤:下载、参数自适应、开机全部由「一键完成」串起来,+ // 且首次启动会在后台自动跑,用户不需要逐步点击。+ const allDone = !!(env.adb && env.adb.ok) && emuDone && imgDone;+ const left = [];+ if (!(env.adb && env.adb.ok)) left.push('adb 工具链');+ if (!emuDone) left.push('Android 运行时');+ if (!imgDone) left.push('系统镜像');+ const step = {+ key: 'all',+ index: 1,+ title: allDone ? '一切就绪' : '一键完成',+ tag: allDone ? '已自动完成' : '自动',+ done: allDone,+ busy: !!busy,+ desc: s.deviceOnline+ ? `Android ${s.android || ''} 已就绪 · 应用窗口会按屏幕自动适配`+ : booting+ ? '正在引导 Android…'+ : allDone+ ? '组件齐全,双击任意 APK 或桌面图标即会自动开机'+ : `还差 ${left.join('、')};点下面「一键完成」,会在后台一次装好并自动开机`,+ actions: s.deviceOnline+ ? '<button class="btn ghost sm" data-act="vmStop">停止运行时</button>'+ : '',+ };- $('setupSteps').innerHTML = steps.map(stepRow).join('');+ $('setupSteps').innerHTML = stepRow(step);$('btnDeployAll').disabled = !!busy;- $('btnDeployAll').textContent = busy ? '部署中…' : (imgDone && emuDone ? '检查更新' : '一键部署');- $('setupNote').textContent = accelOk- ? ''- : '提示:Android 在 Windows 上必须启用硬件加速(AEHD 或 WHPX),否则无法开机。';+ $('btnDeployAll').textContent = busy ? '准备中…' : (allDone ? '已完成 · 点此复查' : '一键完成');+ $('setupNote').textContent = s.diagnosis+ ? `上次启动自动诊断:${s.diagnosis.title}`+ : (s.autoProfile || '全自动:无需选择镜像、无需启用加速、无需调内存');}function store_getDiskSize() {@@ -346,18 +300,20 @@ function store_getDiskSize() {function setStepBusy(key, on) {state.setupBusy = on ? key : null;- const row = $('setupSteps').querySelector(`[data-step="${key}"]`);+ // 五步已合并成一行,所有子步骤的进度都落在这唯一的进度条上+ const row = $('setupSteps').querySelector('[data-step="all"]');if (row) {row.classList.toggle('busy', !!on);if (on) {- row.querySelector('[data-bar]').style.width = '3%';+ const bar = row.querySelector('[data-bar]');+ if (bar) bar.style.width = '3%';}}}function updateStepProgress(component, p) {if (!component) return;- const row = $('setupSteps').querySelector(`[data-step="${component}"]`);+ const row = $('setupSteps').querySelector('[data-step="all"]');if (!row) return;if (p.percent !== undefined) {const bar = row.querySelector('[data-bar]');@@ -370,39 +326,27 @@ function updateStepProgress(component, p) {}async function deployAll() {- const order = ['adb', 'emulator', 'sysimg', 'accel'];- const doneOf = (key, env) => (key === 'adb' ? env.adb && env.adb.ok- : key === 'emulator' ? env.emulator && env.emulator.ok- : key === 'sysimg' ? env.sysimg && env.sysimg.ok- : (env.accel && env.accel.ok) || (env.hypervisor && env.hypervisor.whpx));-- for (const key of order) {- const env = (state.status && state.status.env) || {};- if (doneOf(key, env)) continue;- // eslint-disable-next-line no-await-in-loop- if (key === 'accel' && (!env.emulator || !env.emulator.ok || !env.sysimg || !env.sysimg.ok)) continue;- // eslint-disable-next-line no-await-in-loop- const r = await runStep(key);- if (!r.ok) {- if (key === 'accel') {- toast({- title: '还差最后一步:启用硬件加速',- body: '请点第 4 步的「启用」并允许管理员权限;或手动在「Windows 功能」里勾选「虚拟机平台」后重启。',- type: 'error',- sticky: true,- });- return;- }- toast({ title: `${key} 部署失败`, body: r.error, type: 'error', sticky: true });+ if (state.setupBusy) return;+ setStepBusy('all', true);+ try {+ // 一次调用把 adb / 引擎 / 系统镜像全装完,进度统一显示在唯一那一行+ const r = await api.autoDeploy();+ if (!r || !r.ok) {+ toast({ title: '准备失败', body: (r && r.error) || '请检查网络后重试', type: 'error', sticky: true });return;}- }- await refreshStatus();- const st = state.status || {};- if (st.sysimgOk && st.emulatorOk && (st.accel && st.accel.ok)) {- toast({ title: '运行时已就绪', body: '点第 5 步「启动运行时」,之后双击桌面图标即可直接打开应用。', type: 'ok' });- } else {- toast({ title: '部署完成', body: '还差硬件加速,请点第 4 步「启用」。', type: 'info' });+ await refreshStatus();+ toast({ title: '组件已就绪,正在自动开机…', body: '首次约 1-3 分钟,之后几秒即可。', type: 'info' });+ const started = await api.runtimeStart();+ await refreshStatus();+ toast(started && started.ok+ ? { title: '运行时已就绪', body: '现在把 APK 拖进窗口,或双击桌面图标即可。', type: 'ok' }+ : { title: '开机未完成', body: (started && started.error) || '请导出诊断报告查看原因', type: 'error', sticky: true });+ } catch (e) {+ toast({ title: '准备失败', body: e.message, type: 'error', sticky: true });+ } finally {+ setStepBusy('all', false);+ await refreshStatus();}}@@ -474,7 +418,8 @@ async function installFiles(paths) {const name = p.split(/[\\/]/).pop();const t = toast({ title: `正在安装 ${name}`, body: '解析 APK…', progress: 8, sticky: true, spinner: true });const off = api.on('install:progress', (pr) => {- const pct = { parse: 12, 'parse-done': 24, runtime: 38, install: 62, shortcut: 88, done: 100 }[pr.stage] || 50;+ const base = { parse: 12, 'parse-done': 24, runtime: 38, install: 62, shortcut: 88, done: 100 }[pr.stage] || 50;+ const pct = pr.percent != null ? Math.min(60, Math.round((pr.percent / 100) * 60)) : base;t.update({ title: pr.meta ? `正在安装 ${pr.meta.label}` : `正在安装 ${name}`, body: pr.message, progress: pct });});try {@@ -504,6 +449,7 @@ async function installFiles(paths) {async function launchApp(pkg) {const app = state.apps.find((a) => a.package === pkg);+ state.launchPkg = pkg;const t = toast({title: `正在打开 ${app ? app.label : pkg}`,body: '首次启动需要预热运行时,请稍候…',@@ -512,8 +458,10 @@ async function launchApp(pkg) {});const r = await api.launch(pkg);if (r.ok) {- t.update({ title: '已启动', body: '应用以独立窗口运行,可在任务栏中找到它。', type: 'ok' });- setTimeout(t.dismiss, 2200);+ // 应用有自己的窗口,主界面自动收起;这里只留一句提示,然后隐藏窗口+ t.update({ title: '已启动', body: '应用正在独立窗口中运行(顶部可旋转屏幕)。', type: 'ok' });+ setTimeout(t.dismiss, 1600);+ setTimeout(() => api.winHide(), 900);setTimeout(refreshApps, 1200);} else {t.update({ title: '启动失败', body: r.error, type: 'error' });@@ -608,6 +556,71 @@ async function handleMenu(act) {/* ---------------- 设置 ---------------- */+// ---------------- 安卓系统设置 ----------------++let volumeTimer = null;++async function refreshAndroid() {+ const el = $('androidStatus');+ if (!el) return;+ el.textContent = '读取中…';+ const r = await api.android.status().catch(() => null);+ if (!r || !r.ok) {+ el.textContent = r && r.error ? `运行时未就绪(${String(r.error).slice(0, 36)})` : '运行时未启动';+ return;+ }+ el.textContent = `Android ${r.sdk || '?'} · ${r.wifi ? 'Wi-Fi 已开' : 'Wi-Fi 已关'}` ++ `${r.airplane ? ' · 飞行模式' : ''} · 音量 ${r.volume}%`;+ $('setAndroidWifi').checked = !!r.wifi;+ $('setAndroidAirplane').checked = !!r.airplane;+ $('setAndroidAnim').checked = !r.animationsOff;+ $('setAndroidVolume').value = r.volume;+ $('androidVolumeText').textContent = `${r.volume}%`;+ if (r.fontScale) $('setAndroidFont').value = Number(r.fontScale).toFixed(2);+ if (r.density) {+ const opt = [...$('setAndroidDensity').options].find((o) => o.value === String(r.density));+ if (opt) $('setAndroidDensity').value = String(r.density);+ }+}++function bindAndroid() {+ const set = async (key, value, msg) => {+ const r = await api.android.set(key, value).catch(() => null);+ toast({+ type: r && r.ok ? 'ok' : 'error',+ title: r && r.ok ? (msg || '已生效') : `失败:${(r && r.error) || '运行时未就绪'}`,+ });+ if (r && r.ok) refreshAndroid();+ };+ $('setAndroidWifi').addEventListener('change', (e) => set('wifi', e.target.checked, e.target.checked ? 'Wi-Fi 已开启' : 'Wi-Fi 已关闭'));+ $('setAndroidAirplane').addEventListener('change', (e) => set('airplane', e.target.checked, e.target.checked ? '已进入飞行模式' : '已退出飞行模式'));+ $('setAndroidAnim').addEventListener('change', (e) => set('animations', e.target.checked, e.target.checked ? '系统动画已开启' : '系统动画已关闭,界面更快'));+ $('setAndroidFont').addEventListener('change', (e) => set('fontScale', Number(e.target.value), '字体大小已调整'));+ $('setAndroidDensity').addEventListener('change', (e) => set('density', Number(e.target.value), '显示大小已调整'));+ $('setAndroidVolume').addEventListener('input', (e) => {+ $('androidVolumeText').textContent = `${e.target.value}%`;+ clearTimeout(volumeTimer);+ volumeTimer = setTimeout(() => set('volume', Number(e.target.value), '音量已调整'), 260);+ });+ $('btnAndroidRefresh').addEventListener('click', () => refreshAndroid());+ $('btnAndroidTune').addEventListener('click', async () => {+ const r = await api.android.tune(state.launchPkg || '').catch(() => null);+ toast({ type: r && r.ok ? 'ok' : 'error', title: r && r.ok ? '已优化:动画关闭、后台放宽、电池白名单' : '优化失败,运行时可能未启动' });+ if (r && r.ok) refreshAndroid();+ });+ const open = async (action) => {+ const r = await api.android.open(action).catch(() => null);+ if (!r || !r.ok) {+ toast({ type: 'error', title: '需要先打开一次应用,让运行时启动' });+ }+ };+ $('btnAndroidSettings').addEventListener('click', () => open('settings'));+ $('btnAndroidDisplay').addEventListener('click', () => open('display'));+ $('btnAndroidSound').addEventListener('click', () => open('sound'));+ $('btnAndroidLocale').addEventListener('click', () => open('locale'));+ $('btnAndroidApps').addEventListener('click', () => open('apps'));+}+function fillSettings(s) {$('setEngineMode').value = s.engine.mode;$('setAdbPath').value = s.adbPath || '';@@ -618,11 +631,15 @@ function fillSettings(s) {$('setIdle').value = s.engine.idleShutdownMinutes;$('setCompat').checked = !!(s.runtime && s.runtime.compatImage);$('setAutoShortcut').checked = !!s.createShortcutOnInstall;- $('setFreeform').checked = !!s.freeform;- $('setHideAfterLaunch').checked = !!s.hideAfterLaunch;+ $('setStartMenuShortcut').checked = s.createStartMenuShortcut !== false;$('setShortcutDir').value = s.shortcutDir || '';$('setSharedDir').value = s.sharedDir || '';$('setDeviceSharedDir').value = s.deviceSharedDir || '';+ const d = s.display || {};+ $('setAutoStart').checked = s.autoStart !== false;+ $('setDisplayMode').value = d.mode === 'fullscreen' ? 'fullscreen' : 'window';+ $('setPortrait').value = d.portrait || '900x1600';+ $('portraitField').hidden = $('setDisplayMode').value === 'fullscreen';}async function openSettings() {@@ -636,7 +653,18 @@ async function openSettings() {const btn = $('btnAssoc');btn.textContent = assoc.registered ? '已关联 · 点击取消' : '未关联 · 点击开启';btn.dataset.on = assoc.registered ? '1' : '0';++ api.doctorProfile().then((r) => {+ if (r && r.text) $('autoProfileText').textContent = r.text;+ }).catch(() => { $('autoProfileText').textContent = '自动模式'; });+ api.runtimeUsage().then((u) => {+ $('usageText').textContent = u+ ? `共 ${u.totalText}${u.reclaimable ? ` · 可回收 ${u.reclaimableText}(${u.count} 项)` : ' · 已是精简状态'}`+ : '统计不可用';+ }).catch(() => { $('usageText').textContent = '统计不可用'; });+$('settingsMask').classList.add('on');+ refreshAndroid();}function closeSettings() {@@ -655,8 +683,8 @@ function bindSettings() {refreshStatus();});$('setSystemImage').addEventListener('change', (e) => save({ runtime: { isoPath: e.target.value.trim() } }));- $('setMemory').addEventListener('change', (e) => save({ engine: { memoryMB: Number(e.target.value) || 4096 } }));- $('setCores').addEventListener('change', (e) => save({ engine: { cores: Number(e.target.value) || 4 } }));+ $('setMemory').addEventListener('change', (e) => save({ engine: { memoryMB: Number(e.target.value) || 0 } }));+ $('setCores').addEventListener('change', (e) => save({ engine: { cores: Number(e.target.value) || 0 } }));$('setIdle').addEventListener('change', (e) => save({ engine: { idleShutdownMinutes: Number(e.target.value) || 0 } }));$('setCompat').addEventListener('change', async (e) => {const on = e.target.checked;@@ -668,11 +696,63 @@ function bindSettings() {else if (on) toast({ title: 'ARM 兼容模式已开启', body: '重启运行时后生效', type: 'info' });});$('setAutoShortcut').addEventListener('change', (e) => save({ createShortcutOnInstall: e.target.checked }));- $('setFreeform').addEventListener('change', (e) => save({ freeform: e.target.checked }));- $('setHideAfterLaunch').addEventListener('change', (e) => save({ hideAfterLaunch: e.target.checked }));+ $('setStartMenuShortcut').addEventListener('change', (e) => save({ createStartMenuShortcut: e.target.checked }));$('setShortcutDir').addEventListener('change', (e) => save({ shortcutDir: e.target.value.trim() }));$('setSharedDir').addEventListener('change', (e) => save({ sharedDir: e.target.value.trim() }));$('setDeviceSharedDir').addEventListener('change', (e) => save({ deviceSharedDir: e.target.value.trim() }));+ $('setAutoStart').addEventListener('change', (e) => save({ autoStart: e.target.checked }));+ $('setDisplayMode').addEventListener('change', async (e) => {+ const mode = e.target.value;+ $('portraitField').hidden = mode === 'fullscreen';+ state.settings = await api.setSettings({ display: { mode } });+ toast({ title: mode === 'fullscreen' ? '已切全屏' : '已切竖屏窗口', type: 'ok' });+ });+ $('setPortrait').addEventListener('change', async (e) => {+ state.settings = await api.setSettings({ display: { portrait: e.target.value } });+ toast({ title: '画面大小已更新', body: '下次打开应用或切换应用时生效', type: 'ok' });+ });+ $('btnRebuildShortcuts').addEventListener('click', async () => {+ const r = await api.rebuildShortcuts();+ toast({+ title: r && r.fixed && r.fixed.length ? '已补齐快捷方式' : '快捷方式都还在',+ body: r && r.fixed && r.fixed.length ? r.fixed.join('、') : '桌面与开始菜单入口正常',+ type: 'ok',+ });+ });++ $('btnDiagnostics').addEventListener('click', async () => {+ try {+ const r = await api.doctorReport();+ toast({ title: '诊断报告已导出', body: `${r.diagnosis.title} · ${r.file}`, type: 'ok', sticky: true });+ } catch (e) {+ toast({ title: '导出失败', body: e.message, type: 'error' });+ }+ });++ $('btnCleanup').addEventListener('click', async () => {+ const btn = $('btnCleanup');+ btn.disabled = true;+ try {+ const preview = await api.runtimeCleanup({ apply: false });+ if (!preview.candidates.length) {+ toast({ title: '已经是精简状态', body: '没有可回收的旧镜像或快照。', type: 'ok' });+ return;+ }+ const r = await api.runtimeCleanup({ apply: true });+ if (r.cancelled) return;+ toast({+ title: '清理完成',+ body: `释放约 ${(r.saved / 1048576).toFixed(0)} MB(${r.removed.length} 项),已安装应用保留。`,+ type: 'ok',+ });+ const u = await api.runtimeUsage();+ $('usageText').textContent = `共 ${u.totalText} · 可回收 ${u.reclaimableText}(${u.count} 项)`;+ } catch (e) {+ toast({ title: '清理失败', body: e.message, type: 'error' });+ } finally {+ btn.disabled = false;+ }+ });$('btnOpenShared').addEventListener('click', () => api.openSharedDir());@@ -929,9 +1009,11 @@ function bindEvents() {async function init() {bindEvents();bindSettings();+ bindAndroid();state.settings = await api.getSettings();await refreshStatus();await refreshApps();+ refreshAndroid();setInterval(refreshStatus, 6000);setInterval(refreshApps, 15000);}diff --git a/src/ui/index.html b/src/ui/index.htmlindex c20fffa..54bdb91 100644--- a/src/ui/index.html+++ b/src/ui/index.html@@ -64,8 +64,8 @@<div class="setup-card"><header class="setup-head"><div>- <h1>准备 ApkStart 运行时</h1>- <p>ApkStart 自带完整的安卓运行时(官方 Android 运行时 + AOSP 系统镜像),<b>不需要安装任何第三方模拟器</b>。全部走 Google 官方高速源,通常几分钟内完成。</p>+ <h1>一次就好</h1>+ <p><b>开机自启、自动部署、零参数</b>:首次启动会在后台自动准备运行时,按这台电脑的内存、CPU、显卡和加速状态自适应,失败自动换方案重试。这里只有一个步骤,通常不用点任何按钮,<b>也不需要安装任何第三方模拟器</b>。</p></div><div class="setup-hv" id="setupHv"></div></header>@@ -140,6 +140,59 @@</button></header><div class="modal-body">+ <div class="group">+ <div class="group-title">自动模式(默认,无需设置)</div>+ <div class="field">+ <label>本机自适应参数</label>+ <div class="inline-note" id="autoProfileText">正在检测…</div>+ <span class="sub">内存、核心数、渲染后端、端口、加速方式全部自动选择;启动失败会自动降级重试,不需要手动改。</span>+ </div>+ <div class="field">+ <label>运行时占用(文件逻辑大小)</label>+ <div class="row">+ <span class="inline-note" id="usageText">正在统计…</span>+ <button class="btn ghost sm" id="btnCleanup">清理可回收文件</button>+ </div>+ <span class="sub">只读系统镜像全机共享一份,应用数据用差分层保存;旧镜像、旧快照和锁文件可随时回收。</span>+ </div>+ <div class="runtime-actions">+ <button class="btn ghost sm" id="btnDiagnostics">导出诊断报告</button>+ <button class="btn ghost sm" id="btnRebuildShortcuts">重建快捷方式</button>+ <span class="inline-note">诊断报告用于排障;重建会补齐桌面 + 开始菜单入口</span>+ </div>+ <div class="field switch-field">+ <div>+ <label>开机自动启动(默认开启)</label>+ <span class="sub">随 Windows 登录常驻托盘,双击桌面图标秒开应用,无需手动启动。</span>+ </div>+ <input type="checkbox" id="setAutoStart" class="switch" />+ </div>+ </div>++ <div class="group">+ <div class="group-title">应用窗口</div>+ <div class="field">+ <label>显示模式</label>+ <select id="setDisplayMode">+ <option value="window">竖屏窗口(可自由拉伸,记住每个应用的大小)</option>+ <option value="fullscreen">全屏(铺满屏幕,保持手机比例两侧留黑)</option>+ </select>+ <span class="sub">随时按 <b>F11</b> 或右键托盘切换;全屏只放大窗口,不改变画面比例,切换不重启应用。</span>+ </div>+ <div class="field" id="portraitField">+ <label>竖屏画面大小</label>+ <select id="setPortrait">+ <option value="720x1280">小 · 720 × 1280</option>+ <option value="900x1600">中 · 900 × 1600</option>+ <option value="1080x1920">大 · 1080 × 1920</option>+ <option value="1440x2560">超大 · 1440 × 2560</option>+ </select>+ <span class="sub">窗口模式下可拖动边框任意缩放;这里调的是 Android 内部渲染尺寸,越小越省性能。</span>+ </div>+ </div>++ <details class="advanced-group">+ <summary>高级参数(一般无需修改)</summary><div class="group"><div class="group-title">运行时</div><div class="field">@@ -166,12 +219,12 @@</div><div class="field two"><div>- <label>内存 (MB)</label>- <input id="setMemory" type="number" min="1024" step="512" />+ <label>内存 (MB,0 = 自动)</label>+ <input id="setMemory" type="number" min="0" step="512" /></div><div>- <label>CPU 核心</label>- <input id="setCores" type="number" min="1" max="16" />+ <label>CPU 核心(0 = 自动)</label>+ <input id="setCores" type="number" min="0" max="16" /></div></div><div class="field">@@ -180,8 +233,8 @@</div><div class="field switch-field"><div>- <label>ARM 兼容模式(Google Play 镜像)</label>- <span class="sub">改用 Android 14(API 34)Google Play 镜像,内置新版 ARM 翻译层,仅含 ARM 原生库的应用可以安装运行(约 1.5GB)。实测红果免费短剧可正常浏览与播放;个别大厂应用自带深度反模拟检测,仍可能受限。</span>+ <label>通用兼容镜像(自动管理)</label>+ <span class="sub">现在只有一个 Android 14 通用镜像,x86 与 ARM 应用都能跑,首次遇到 ARM 应用时会自动下载,不需要手动切换。此开关仅用于旧配置兼容。</span></div><input type="checkbox" id="setCompat" class="switch" /></div>@@ -198,29 +251,91 @@<span class="inline-note" id="probeResult"></span></div></div>+ </details><div class="group">- <div class="group-title">桌面与应用</div>+ <div class="group-title">安卓系统设置(不用进安卓桌面)</div>+ <div class="field">+ <label>运行状态</label>+ <div class="row">+ <span class="inline-note" id="androidStatus">运行时未启动</span>+ <button class="btn ghost sm" id="btnAndroidRefresh">刷新</button>+ <button class="btn ghost sm" id="btnAndroidTune">一键流畅优化</button>+ </div>+ <span class="sub">关闭系统动画、放开后台进程上限并把当前应用加入电池白名单,低配电脑体感最明显。</span>+ </div><div class="field switch-field"><div>- <label>安装后自动创建桌面快捷方式</label>- <span class="sub">快捷方式带真实应用图标,双击直接进应用</span>+ <label>Wi-Fi</label>+ <span class="sub">安卓虚拟机内部的无线网,关掉可省一点 CPU。</span></div>- <input type="checkbox" id="setAutoShortcut" class="switch" />+ <input type="checkbox" id="setAndroidWifi" class="switch" />+ </div>+ <div class="field switch-field">+ <div>+ <label>飞行模式</label>+ <span class="sub">彻底断网(含移动数据),需要安静时打开。</span>+ </div>+ <input type="checkbox" id="setAndroidAirplane" class="switch" /></div><div class="field switch-field"><div>- <label>以独立窗口运行(freeform)</label>- <span class="sub">关闭后应用会在运行时的整屏里显示</span>+ <label>系统动画</label>+ <span class="sub">关掉后界面切换明显更快,功能不受影响。</span></div>- <input type="checkbox" id="setFreeform" class="switch" />+ <input type="checkbox" id="setAndroidAnim" class="switch" />+ </div>+ <div class="field">+ <label>媒体音量</label>+ <div class="row">+ <input type="range" id="setAndroidVolume" min="0" max="100" step="1" style="flex:1" />+ <span class="inline-note" id="androidVolumeText">—</span>+ </div>+ </div>+ <div class="field two">+ <div>+ <label>字体大小</label>+ <select id="setAndroidFont">+ <option value="0.85">小</option>+ <option value="1.00">标准</option>+ <option value="1.15">大</option>+ <option value="1.30">特大</option>+ </select>+ </div>+ <div>+ <label>显示大小</label>+ <select id="setAndroidDensity">+ <option value="240">紧凑(省性能)</option>+ <option value="320">标准</option>+ <option value="420">宽松</option>+ <option value="480">特大</option>+ </select>+ </div>+ </div>+ <div class="runtime-actions">+ <button class="btn ghost sm" id="btnAndroidSettings">安卓原生设置</button>+ <button class="btn ghost sm" id="btnAndroidDisplay">显示设置</button>+ <button class="btn ghost sm" id="btnAndroidSound">声音设置</button>+ <button class="btn ghost sm" id="btnAndroidLocale">语言设置</button>+ <button class="btn ghost sm" id="btnAndroidApps">应用管理</button>+ </div>+ </div>++ <div class="group">+ <div class="group-title">桌面与应用</div>+ <div class="field switch-field">+ <div>+ <label>安装后自动创建桌面快捷方式</label>+ <span class="sub">快捷方式带真实应用图标,双击直接进应用</span>+ </div>+ <input type="checkbox" id="setAutoShortcut" class="switch" /></div><div class="field switch-field"><div>- <label>从桌面图标启动后隐藏 ApkStart 窗口</label>- <span class="sub">获得最接近原生应用的启动体验</span>+ <label>同时添加到开始菜单</label>+ <span class="sub">Windows 搜索能搜到应用名,任务栏也按应用分组</span></div>- <input type="checkbox" id="setHideAfterLaunch" class="switch" />+ <input type="checkbox" id="setStartMenuShortcut" class="switch" /></div><div class="field"><label>快捷方式目录</label>diff --git a/src/ui/shell.css b/src/ui/shell.cssnew file mode 100644index 0000000..f0c6339--- /dev/null+++ b/src/ui/shell.css@@ -0,0 +1,101 @@+/* 应用窗口:只保留顶部一条极简标题栏,其余全是安卓画面 */+* { margin: 0; padding: 0; box-sizing: border-box; }++:root {+ --bar-h: 38px;+ --bar-bg: #16181c;+ --fg: #e6e8ec;+ --fg-dim: #9aa1ab;+ --hover: rgba(255, 255, 255, .09);+ --close: #c4423b;+}++html, body {+ height: 100%;+ overflow: hidden;+ background: #0b0c0e;+ color: var(--fg);+ font: 13px/1.4 "Segoe UI", "Microsoft YaHei UI", system-ui, sans-serif;+ user-select: none;+ cursor: default;+}++.bar {+ height: var(--bar-h);+ display: flex;+ align-items: center;+ gap: 8px;+ padding-left: 10px;+ background: var(--bar-bg);+ border-bottom: 1px solid #000;+ -webkit-app-region: drag;+}++.ico { width: 18px; height: 18px; border-radius: 4px; object-fit: contain; }+.name {+ font-size: 12.5px;+ letter-spacing: .2px;+ color: var(--fg);+ max-width: 46vw;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+}+.grow { flex: 1; }++.ctl {+ -webkit-app-region: no-drag;+ width: 44px;+ height: var(--bar-h);+ display: grid;+ place-items: center;+ border: 0;+ background: transparent;+ color: var(--fg-dim);+ cursor: default;+ transition: background .12s, color .12s;+}+.ctl:hover { background: var(--hover); color: #fff; }+.ctl.close:hover { background: var(--close); color: #fff; }+.ctl:active { background: rgba(255, 255, 255, .16); }++.stage {+ position: absolute;+ top: var(--bar-h);+ left: 0;+ right: 0;+ bottom: 0;+ background: #0b0c0e;+}++/* 启动遮罩:安卓桌面/开机动画永远不给用户看到 */+.boot {+ position: absolute;+ inset: 0;+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ gap: 14px;+ background: radial-gradient(120% 90% at 50% 12%, #1d2027 0%, #0b0c0e 62%);+ transition: opacity .35s ease;+}+.boot.out { opacity: 0; pointer-events: none; }++.boot-ico { width: 64px; height: 64px; border-radius: 15px; object-fit: contain; }+.boot-name { font-size: 15px; color: var(--fg); }+.boot-bar {+ width: 148px; height: 3px; border-radius: 3px;+ background: rgba(255, 255, 255, .1); overflow: hidden;+}+.boot-bar i {+ display: block; height: 100%; width: 40%;+ border-radius: 3px;+ background: linear-gradient(90deg, #4f8cff, #7ad0ff);+ animation: slide 1.15s ease-in-out infinite;+}+@keyframes slide {+ 0% { transform: translateX(-110%); }+ 100% { transform: translateX(360%); }+}+.boot-tip { font-size: 12px; color: var(--fg-dim); }diff --git a/src/ui/shell.html b/src/ui/shell.htmlnew file mode 100644index 0000000..515880b--- /dev/null+++ b/src/ui/shell.html@@ -0,0 +1,42 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="UTF-8" />+<meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src 'self' file: data:; style-src 'self' 'unsafe-inline'; script-src 'self'" />+<title>ApkStart</title>+<link rel="stylesheet" href="shell.css" />+</head>+<body>+<header class="bar" id="bar">+ <img class="ico" id="appIcon" alt="" draggable="false" />+ <span class="name" id="appName">应用</span>+ <span class="grow"></span>+ <button class="ctl" id="btnRotate" title="横屏 / 竖屏(Ctrl+R)">+ <svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 8V6a2 2 0 0 1 2-2h8"/><path d="M17.5 1.5 21 5l-3.5 3.5"/>+ <path d="M20 16v2a2 2 0 0 1-2 2H10"/><path d="M6.5 22.5 3 19l3.5-3.5"/>+ </svg>+ </button>+ <button class="ctl" id="btnMin" title="最小化">+ <svg viewBox="0 0 12 12" width="11" height="11"><rect x="2" y="5.4" width="8" height="1.2" fill="currentColor"/></svg>+ </button>+ <button class="ctl" id="btnMax" title="最大化">+ <svg viewBox="0 0 12 12" width="11" height="11" fill="none" stroke="currentColor" stroke-width="1.1"><rect x="2.2" y="2.2" width="7.6" height="7.6"/></svg>+ </button>+ <button class="ctl close" id="btnClose" title="关闭">+ <svg viewBox="0 0 12 12" width="11" height="11" fill="none" stroke="currentColor" stroke-width="1.2"><path d="M2.4 2.4 9.6 9.6M9.6 2.4 2.4 9.6"/></svg>+ </button>+</header>++<main class="stage" id="stage">+ <div class="boot" id="boot">+ <img class="boot-ico" id="bootIcon" alt="" draggable="false" />+ <div class="boot-name" id="bootName"></div>+ <div class="boot-bar"><i></i></div>+ <div class="boot-tip" id="bootTip">正在启动安卓运行时…</div>+ </div>+</main>++<script src="shell.js"></script>+</body>+</html>diff --git a/src/ui/shell.js b/src/ui/shell.jsnew file mode 100644index 0000000..ea49a7d--- /dev/null+++ b/src/ui/shell.js@@ -0,0 +1,47 @@+'use strict';+/* 应用窗口标题栏:只有 旋转 / 最小化 / 最大化 / 关闭,其余设置都在 ApkStart 主界面 */+const api = window.apkstart;+const $ = (id) => document.getElementById(id);++const btn = {+ rotate: $('btnRotate'),+ min: $('btnMin'),+ max: $('btnMax'),+ close: $('btnClose'),+};++btn.rotate.addEventListener('click', () => api.shell.rotate());+btn.min.addEventListener('click', () => api.shell.minimize());+btn.max.addEventListener('click', () => api.shell.maximize());+btn.close.addEventListener('click', () => api.shell.close());++// Ctrl+R 旋转,F11 最大化(和 Windows 习惯一致)+window.addEventListener('keydown', (e) => {+ if (e.ctrlKey && (e.key === 'r' || e.key === 'R')) { e.preventDefault(); api.shell.rotate(); }+ else if (e.key === 'F11') { e.preventDefault(); api.shell.maximize(); }+ else if (e.altKey && e.key === 'ArrowLeft') { e.preventDefault(); api.shell.back(); }+ else if (e.altKey && e.key === 'ArrowRight') { e.preventDefault(); api.shell.forward(); }+});++function applyState(s) {+ if (!s) return;+ $('appName').textContent = s.label || '应用';+ $('bootName').textContent = s.label || '';+ const icon = s.iconUrl || '';+ if (icon) {+ $('appIcon').src = icon;+ $('bootIcon').src = icon;+ }+ $('bootTip').textContent = s.tip || '';+ if (s.ready) {+ const boot = $('boot');+ if (boot) {+ boot.classList.add('out');+ setTimeout(() => { boot.style.display = 'none'; }, 420);+ }+ document.body.style.background = '#0b0c0e';+ }+}++api.shell.onState(applyState);+api.shell.state().then(applyState).catch(() => {});diff --git a/src/ui/style.css b/src/ui/style.cssindex c332ad1..316064e 100644--- a/src/ui/style.css+++ b/src/ui/style.css@@ -675,3 +675,28 @@ kbd {font-size: 11px;}.powered-link:hover { color: var(--text); text-decoration: underline; }++/* 高级参数默认折叠:零配置体验,不把内部参数暴露给普通用户 */+.advanced-group {+ border-top: 1px solid var(--line, #e8ebf0);+ margin: 4px 0 0;+ padding: 0;+}+.advanced-group > summary {+ cursor: pointer;+ list-style: none;+ user-select: none;+ padding: 14px 2px 10px;+ font-size: 12px;+ color: var(--muted, #7b828e);+ font-weight: 600;+}+.advanced-group > summary::-webkit-details-marker { display: none; }+.advanced-group > summary::before {+ content: '▸';+ display: inline-block;+ margin-right: 7px;+ transition: transform .15s ease;+}+.advanced-group[open] > summary::before { transform: rotate(90deg); }+.advanced-group[open] > summary { color: var(--text, #2b3138); }diff --git a/test/agent-compile.ps1 b/test/agent-compile.ps1new file mode 100644index 0000000..f198d09--- /dev/null+++ b/test/agent-compile.ps1@@ -0,0 +1,14 @@+# Compile-check the C# embedded in agent.ps1 without starting the agent.+$path = Join-Path $PSScriptRoot '..\src\core\win\agent.ps1'+$text = Get-Content $path -Raw+$m = [regex]::Match($text, "(?s)@'\r?\n(.*?)\r?\n'@")+if (-not $m.Success) { Write-Output 'ERR=no-source'; exit 1 }+$src = $m.Groups[1].Value+try {+ Add-Type -TypeDefinition $src+ Write-Output 'COMPILE_OK'+} catch {+ $e = $_.Exception+ Write-Output ('COMPILE_FAIL: ' + $e.Message)+ if ($e.InnerException) { Write-Output ('INNER: ' + $e.InnerException.Message) }+}diff --git a/test/auto-test.js b/test/auto-test.jsnew file mode 100644index 0000000..424f311--- /dev/null+++ b/test/auto-test.js@@ -0,0 +1,357 @@+'use strict';+/**+ * 零配置自适应 / 容器式瘦身的回归测试(纯 Node,不拉起 emulator)+ * 运行:node test/auto-test.js+ */+const fs = require('fs');+const os = require('os');+const path = require('path');++const TMP = path.join(os.tmpdir(), `apkstart-auto-test-${Date.now()}`);+process.env.APPDATA = TMP;+fs.mkdirSync(path.join(TMP, 'apkstart'), { recursive: true });++let passed = 0;+let failed = 0;+const results = [];+function test(name, fn) {+ return Promise.resolve().then(fn)+ .then(() => { passed += 1; results.push(` ✓ ${name}`); })+ .catch((e) => { failed += 1; results.push(` ✗ ${name}\n ${e.stack || e.message}`); });+}+function assert(c, m) { if (!c) throw new Error(m || '断言失败'); }++const doctor = require('../src/core/doctor');+const layers = require('../src/core/layers');+const { friendlyInstallError, friendlyLaunchError } = require('../src/core/adb');++(async () => {+ console.log('\n[doctor.js 自动参数]');++ await test('GPU 后端按 emulator 版本选择(37.x 用 software,老版本用 swiftshader_indirect)', () => {+ assert(doctor.gpuCandidates('37.3.8.0')[0] === 'software');+ assert(doctor.gpuCandidates('36.4.9.0')[0] === 'software');+ assert(doctor.gpuCandidates('35.1.4.0')[0] === 'swiftshader_indirect');+ assert(!doctor.gpuCandidates('37.3.8.0').includes('swiftshader_indirect'));+ });++ await test('小内存机器自动降配(不再是写死 4GB / 4 核)', () => {+ const host = { totalMB: 4096, freeMB: 2600, cores: 2, home: 'C:\\Users\\x', homeAscii: true, tmp: TMP, platform: 'win32', arch: 'x64', rdp: false };+ const p = doctor.chooseProfile({ host, accel: { ok: false }, emulatorVersion: '37.3.8.0', diskMB: 20000, port: 5554, adbPort: 5044 });+ assert(p.memoryMB === 2048, `内存应为 2048,实际 ${p.memoryMB}`);+ assert(p.cores === 2, `核心应为 2,实际 ${p.cores}`);+ assert(p.accel === 'off', '无硬件加速应自动回退软件模拟');+ assert(p.bootTimeoutMs > 240000, '软件模拟应给更长的开机超时');+ assert(p.gpu === 'software', `渲染应为 software,实际 ${p.gpu}`);+ assert(p.dataMB <= 4096, '数据分区不应再是 16G');+ });++ await test('大内存机器不会无限吃内存', () => {+ const host = { totalMB: 65536, freeMB: 50000, cores: 32, home: 'C:\\x', homeAscii: true, tmp: TMP, platform: 'win32', arch: 'x64', rdp: false };+ const p = doctor.chooseProfile({ host, accel: { ok: true }, emulatorVersion: '37.3.8.0', diskMB: 200000, port: 5554, adbPort: 5044 });+ assert(p.memoryMB <= 3072 && p.cores <= 4, `高配也应封顶:${p.memoryMB}MB / ${p.cores}核`);+ assert(p.accel === 'auto');+ });++ await test('重试矩阵:从最优到最保守,包含软件模拟与冷启动兜底', () => {+ const p = doctor.chooseProfile({+ host: doctor.hostInfo(), accel: { ok: true }, emulatorVersion: '37.3.8.0',+ diskMB: 50000, port: 5554, adbPort: 5044,+ });+ const v = doctor.planVariants(p);+ assert(v.length >= 3 && v.length <= 4, `重试次数应 3-4,实际 ${v.length}`);+ assert(v.some((x) => x.accel === 'off'), '缺少软件模拟兜底');+ assert(v[v.length - 1].wipe === true, '最后一档应强制冷启动清快照');+ assert(v[v.length - 1].memoryMB <= 2048, '最后一档应降到最小内存');+ const keys = v.map((x) => `${x.gpu}|${x.accel}|${x.wipe}|${x.memoryMB}`);+ assert(new Set(keys).size === keys.length, '重试方案不应重复');+ });++ await test('快照指纹不随 GPU/加速/内存重试变化(避免每次重试都清空已装应用)', () => {+ const a = doctor.snapshotKey({ dataMB: 4096, emulatorVersion: '37.3.8.0', api: '34', tag: 'google_apis_playstore' }, 'C:\\img');+ const b = doctor.snapshotKey({ dataMB: 4096, emulatorVersion: '37.3.8.0', api: '34', tag: 'google_apis_playstore' }, 'C:\\img');+ const c = doctor.snapshotKey({ dataMB: 4096, emulatorVersion: '37.3.8.0', api: '34', tag: 'google_apis_playstore' }, 'C:\\img2');+ assert(a === b && a !== c);+ });++ await test('日志诊断能识别显卡/加速/中文路径/锁文件问题', () => {+ assert(doctor.diagnose(['Failed to initialize GL emulation']).code === 'GPU_INIT');+ assert(doctor.diagnose(['ERROR: x86_64 emulation currently requires hardware acceleration!']).code === 'ACCEL');+ assert(doctor.diagnose(['Cannot allocate memory for guest RAM']).code === 'MEMORY');+ assert(doctor.diagnose(['panic: AVD apkstart is already running']).code === 'AVD_LOCK');+ assert(doctor.diagnose(['non-ASCII path is not supported']).code === 'NON_ASCII');+ assert(doctor.diagnose(['random line']).code === 'UNKNOWN');+ });++ await test('空闲端口探测返回偶数端口对', async () => {+ const p = await doctor.freePortPair(5560);+ assert(p % 2 === 0 && p >= 5560, `端口异常:${p}`);+ });++ await test('设置页展示的自动参数与实跑参数一致(37.x 不再显示弃用后端)', () => {+ const common = { accel: { ok: true }, emulatorVersion: '37.3.8.0', diskMB: 50000, port: 5562, adbPort: 5044 };+ const p = doctor.autoProfile({ ...common, settings: { engine: { autoMemory: true, gpuMode: 'auto', memoryMB: 0, cores: 0 } } });+ const text = doctor.describeProfile(p);+ assert(p.gpu === 'software', `应为 software,实际 ${p.gpu}`);+ assert(p.accelOk === true && text.includes('硬件加速'), text);+ assert(!text.includes('swiftshader_indirect'), text);+ assert(text.includes('端口 5562'), text);++ // 老引擎仍应用老后端;用户手动填的高级参数仍然生效+ const old = doctor.autoProfile({ ...common, emulatorVersion: '35.1.4.0', settings: {} });+ assert(old.gpu === 'swiftshader_indirect');+ const manual = doctor.autoProfile({ ...common, settings: { engine: { autoMemory: false, memoryMB: 6144, cores: 6, gpuMode: 'swiftshader' } } });+ assert(manual.memoryMB === 6144 && manual.cores === 6 && manual.gpu === 'swiftshader', JSON.stringify(manual));+ const zero = doctor.overridesFromSettings({ autoMemory: false, memoryMB: 0, cores: 0, gpuMode: 'auto' });+ assert(zero.memoryMB === 0 && zero.cores === 0 && zero.gpuMode === '', JSON.stringify(zero));+ });++ console.log('\n[layers.js 容器式瘦身]');++ await test('盘点可回收项:非 x86_64 QEMU、旧镜像、旧 AVD、锁文件、旧快照', () => {+ const root = path.join(TMP, 'runtime-layers');+ const mk = (p, size) => {+ fs.mkdirSync(path.dirname(p), { recursive: true });+ const b = Buffer.alloc(size || 16, 65);+ fs.writeFileSync(p, b);+ };+ mk(path.join(root, 'system-images', 'android-34', 'google_apis_playstore', 'x86_64', 'system.img'), 1024);+ mk(path.join(root, 'system-images', 'android-34', 'google_apis_playstore', 'x86_64', 'kernel-ranchu'), 16);+ mk(path.join(root, 'system-images', 'android-34', 'google_apis_playstore', 'x86_64', 'NOTICE.txt'), 2048);+ mk(path.join(root, 'system-images', 'android-30', 'default', 'x86_64', 'system.img'), 512);+ mk(path.join(root, 'emulator', 'qemu', 'windows-x86_64', 'qemu-system-aarch64.exe'), 128);+ mk(path.join(root, 'emulator', 'qemu', 'windows-x86_64', 'qemu-system-x86_64.exe'), 128);+ mk(path.join(root, 'avd', 'apkstart.avd', 'config.ini'), 32);+ mk(path.join(root, 'avd', 'apkstart.avd', 'snapshots', 'default_boot', 'ram.img'), 256);+ mk(path.join(root, 'avd', 'apkstart.avd', 'multiInstance.lock'), 8);+ mk(path.join(root, 'avd', 'apkstart-arm.avd', 'userdata-qemu.img'), 512);++ const a = layers.analyze(root);+ const paths = a.candidates.map((c) => c.path.replace(/\\/g, '/'));+ assert(paths.some((p) => p.endsWith('qemu-system-aarch64.exe')), '应列出非 x86_64 QEMU');+ assert(!paths.some((p) => p.endsWith('qemu-system-x86_64.exe')), '不能删 x86_64 QEMU');+ assert(paths.some((p) => p.includes('android-30')), '应列出旧版 API30 镜像');+ assert(paths.some((p) => p.endsWith('.lock')), '应列出锁文件');+ assert(paths.some((p) => p.includes('snapshots')), '应列出旧快照');+ assert(paths.some((p) => p.includes('apkstart-arm.avd')), '应列出非活动 AVD');+ assert(!paths.some((p) => p.endsWith('apkstart.avd/config.ini')), '不能删活动 AVD 配置');++ const dry = layers.prune(root, { apply: false });+ assert(dry.removed.length === 0 && dry.saved === 0, 'dryRun 不应删除任何文件');+ assert(fs.existsSync(path.join(root, 'avd', 'apkstart-arm.avd', 'userdata-qemu.img')));++ const done = layers.prune(root, { apply: true });+ assert(done.saved > 0 && done.removed.length >= 5, '实际清理应释放空间');+ assert(!fs.existsSync(path.join(root, 'avd', 'apkstart-arm.avd')), '非活动 AVD 应被清掉');+ assert(fs.existsSync(path.join(root, 'avd', 'apkstart.avd', 'config.ini')), '活动 AVD 必须保留');+ assert(fs.existsSync(path.join(root, 'emulator', 'qemu', 'windows-x86_64', 'qemu-system-x86_64.exe')), 'x86_64 QEMU 必须保留');+ });++ console.log('\n[adb.js 安装/启动失败可读性]');++ await test('Android 14 老 targetSdk 应用失败有明确指引', () => {+ const s = friendlyInstallError('Failure [INSTALL_FAILED_DEPRECATED_SDK_VERSION: app must target at least 23]');+ assert(s.includes('Android 14') && s.includes('自动'), s);+ });++ await test('ARM 翻译层崩溃能给出可执行的中文结论', () => {+ const s = friendlyLaunchError('F DEBUG: DoBadTrampoline libndk_translation SIGABRT', 'com.phoenix.read');+ assert(s.includes('ARM 翻译层') && s.includes('兼容镜像'), s);+ });++ console.log('\n[adb/sharer 文件互通]');++ await test('ls -l 解析兼容 Android 的含 group / 日期格式', async () => {+ const { AdbClient } = require('../src/core/adb');+ const fake = Object.create(AdbClient.prototype);+ fake.shell = async () => '-rw-rw---- 1 u0_a188 media_rw 12 2026-11-12 18:52 hello.txt\r\n'+ + 'drwxrwx--- 2 u0_a188 media_rw 4096 2026-11-12 18:52 sub\r\n'+ + '-rw-rw---- 1 u0_a188 7 Nov 12 18:52 no-group.txt\r\n';+ const rows = await fake.listRemote('/sdcard/x');+ assert(rows.length === 3, `应解析 3 行,实际 ${rows.length}`);+ assert(rows[0].name === 'hello.txt' && rows[0].size === 12, JSON.stringify(rows[0]));+ assert(rows[1].isDir && rows[1].name === 'sub', JSON.stringify(rows[1]));+ assert(rows[2].name === 'no-group.txt' && rows[2].size === 7, JSON.stringify(rows[2]));+ });++ await test('远端文件列表可用 find+stat 一次拿全(不依赖 ls 日期解析)', async () => {+ const { Sharer } = require('../src/core/sharer');+ const sh = Object.create(Sharer.prototype);+ const fake = {+ shell: async () => '12|1794480758|./a.txt\n8|1794480759|./sub/b.txt\n',+ listRemote: async () => [],+ };+ const rows = await sh.listRemoteRecursive(fake, '/sdcard/x');+ assert(rows.length === 2, `应返回 2 个文件,实际 ${rows.length}`);+ assert(rows[1].rel === 'sub/b.txt' && rows[1].mtime > 1e12, JSON.stringify(rows[1]));+ });++ console.log('\n[zip.js 大包流式解压]');++ await test('ZipFile 与 ZipArchive 对同一压缩包的解析结果一致(含 deflate 与流式 pipeTo)', async () => {+ const zlib = require('zlib');+ const { ZipArchive, ZipFile } = require('../src/core/zip');+ const entries = [+ { name: 'a.txt', data: Buffer.from('hello apkstart'), method: 0 },+ { name: 'dir/b.bin', data: Buffer.alloc(200000, 7), method: 8 },+ ];+ const locals = [];+ const centrals = [];+ let off = 0;+ for (const it of entries) {+ const raw = it.method === 8 ? zlib.deflateRawSync(it.data) : it.data;+ const name = Buffer.from(it.name);+ const lh = Buffer.alloc(30);+ lh.writeUInt32LE(0x04034b50, 0);+ lh.writeUInt16LE(20, 4);+ lh.writeUInt16LE(it.method, 8);+ lh.writeUInt32LE(raw.length, 18);+ lh.writeUInt32LE(it.data.length, 22);+ lh.writeUInt16LE(name.length, 26);+ locals.push(lh, name, raw);+ const ch = Buffer.alloc(46);+ ch.writeUInt32LE(0x02014b50, 0);+ ch.writeUInt16LE(20, 4);+ ch.writeUInt16LE(20, 6);+ ch.writeUInt16LE(it.method, 10);+ ch.writeUInt32LE(raw.length, 20);+ ch.writeUInt32LE(it.data.length, 24);+ ch.writeUInt16LE(name.length, 28);+ ch.writeUInt32LE(off, 42);+ centrals.push(ch, name);+ off += lh.length + name.length + raw.length;+ }+ const cd = Buffer.concat(centrals);+ const eocd = Buffer.alloc(22);+ eocd.writeUInt32LE(0x06054b50, 0);+ eocd.writeUInt16LE(entries.length, 8);+ eocd.writeUInt16LE(entries.length, 10);+ eocd.writeUInt32LE(cd.length, 12);+ eocd.writeUInt32LE(off, 16);+ const buf = Buffer.concat([...locals, cd, eocd]);+ const zipPath = path.join(TMP, 'parity.zip');+ fs.writeFileSync(zipPath, buf);++ const mem = new ZipArchive(buf);+ const file = new ZipFile(zipPath);+ try {+ assert(mem.names().join('|') === file.names().join('|'), '条目名应一致');+ assert(mem.read('a.txt').equals(file.read('a.txt')), 'stored 条目内容应一致');+ assert(mem.read('dir/b.bin').equals(file.read('dir/b.bin')), 'deflate 条目内容应一致');+ const out = path.join(TMP, 'b.bin');+ await file.pipeTo('dir/b.bin', fs.createWriteStream(out));+ assert(fs.readFileSync(out).equals(entries[1].data), 'pipeTo 流式输出应完整');+ } finally {+ file.close();+ }+ });++ console.log('\n[emulator.js AVD 零配置]');++ await test('AVD 使用小数据分区 + 快速启动 + 现代 GPU 模式', () => {+ const { EmulatorEngine } = require('../src/core/emulator');+ const emu = new EmulatorEngine(path.join(__dirname, '..'));+ const r = emu.ensureAvd({ memoryMB: 2048, cores: 2, gpu: 'software', dataMB: 4096, accel: 'auto' });+ const cfg = fs.readFileSync(path.join(r.avdDir, 'config.ini'), 'utf8');+ assert(/^hw\.ramSize=2048$/m.test(cfg));+ assert(/^disk\.dataPartition\.size=4096M$/m.test(cfg), '数据分区不应是 16G');+ assert(/^hw\.gpu\.mode=software$/m.test(cfg));+ assert(!/^fastboot\.forceColdBoot=yes$/m.test(cfg), '不应再强制冷启动');+ assert(!/^fastboot\.forceFastBoot=/m.test(cfg), '快照应由命令行 -snapshot 控制,避免加载旧 default_boot');+ assert(/^hw\.cpu\.arch=x86_64$/m.test(cfg));+ assert(fs.existsSync(path.join(r.avdDir, 'snapshot.key')), '应写入快照指纹');+ });++ await test('启动参数带自动内存/核心/快照,且不再用弃用的 GPU 模式', () => {+ const { EmulatorEngine } = require('../src/core/emulator');+ const emu = new EmulatorEngine(path.join(__dirname, '..'));+ const args = emu.buildArgs({ gpu: 'software', memoryMB: 2048, cores: 2, snapshot: true }).join(' ');+ assert(/-gpu software/.test(args));+ assert(!/swiftshader_indirect/.test(args));+ assert(/-memory 2048/.test(args) && /-cores 2/.test(args));+ assert(/-snapshot apkstart/.test(args), '应使用 quickboot 快照');+ const cold = emu.buildArgs({ wipe: true }).join(' ');+ assert(/-wipe-data/.test(cold) && /-no-snapshot/.test(cold), 'wipe 时不能同时加载快照');+ });++ console.log('\n[显示 / 快捷方式 / 零操作]');++ await test('窗口模式必须真的开窗口(否则应用进程活着但屏幕上看不见)', () => {+ const { EmulatorEngine } = require('../src/core/emulator');+ const emu = new EmulatorEngine(path.join(__dirname, '..'));+ const win = emu.buildArgs({ headless: false, gpu: 'software' }).join(' ');+ assert(!/-no-window/.test(win), '窗口模式不能再用 -no-window');+ assert(/-no-skin/.test(win), '窗口模式应去掉手机外壳');+ const headless = emu.buildArgs({ headless: true }).join(' ');+ assert(/-no-window/.test(headless) && !/-no-skin/.test(headless));+ });++ await test('旧配置强制迁移:无头与「启动后退出」不再生效', () => {+ const store = require('../src/core/store');+ store.saveSettings({ engine: { headless: true }, hideAfterLaunch: true });+ const s = store.getSettings();+ assert(s.engine.headless === false, 'headless 必须被迁移成 false');+ assert(s.hideAfterLaunch === false, 'hideAfterLaunch 必须为 false');+ assert(s.autoStart === true && s.autoDeploy === true, '开机自启/一键部署默认开启');+ assert(s.createStartMenuShortcut === true, '开始菜单快捷方式默认开启');+ });++ await test('显示适配:窗口/全屏共用竖屏分辨率,窗口比例 9:16 可拉伸', () => {+ const d = require('../src/core/display');+ const area = { x: 0, y: 0, w: 1920, h: 1080 };+ // 全屏不改变 Android 分辨率(模拟器窗口宽高比被 LCD 锁定),只最大化窗口+ assert(JSON.stringify(d.sizeFor('fullscreen', '900x1600', area)) === JSON.stringify({ w: 900, h: 1600 }));+ assert(JSON.stringify(d.sizeFor('window', '720x1280', area)) === JSON.stringify({ w: 720, h: 1280 }));+ assert(d.sizeFor('window', '横屏乱填', area).h > d.sizeFor('window', '横屏乱填', area).w);+ const b = d.defaultBounds(area);+ assert(b.h > b.w && b.h <= area.h && b.x >= 0 && b.y >= 0, JSON.stringify(b));+ // 全屏:铺满高度、按竖屏比例算宽度并居中(窗口宽高比被模拟器 LCD 锁定)+ const f = d.fullscreenBounds('900x1600', area);+ assert(f.h === area.h, JSON.stringify(f));+ assert(Math.abs(f.w - Math.round(f.h * 900 / 1600)) <= 1, JSON.stringify(f));+ assert(f.x > 0 && f.x + f.w <= area.w, JSON.stringify(f));+ assert(d.densityFor(1080, 1920, 0) > 300);+ assert(d.densityFor(720, 1280, 240) === 240);+ });++ await test('adb 显示命令使用 wm size / wm density', async () => {+ const { AdbClient } = require('../src/core/adb');+ const cmds = [];+ const fake = { shell: async (c) => { cmds.push(c); return ''; } };+ await AdbClient.prototype.setDisplaySize.call(fake, 1920, 1080, 420);+ assert(cmds.includes('wm size 1920x1080'), cmds.join('|'));+ assert(cmds.includes('wm density 420'), cmds.join('|'));+ await AdbClient.prototype.resetDisplaySize.call(fake);+ assert(cmds.includes('wm size reset') && cmds.includes('wm density reset'));+ });++ await test('PNG-in-ICO 与 WebP 图标兜底都能产出可用 ICO', async () => {+ const { pngBytesToIco, iconToIco } = require('../src/core/shortcut');+ const { drawAppIcon } = require('../src/core/png');+ const png = drawAppIcon(64);+ const ico = pngBytesToIco(png);+ assert(ico && ico.readUInt16LE(2) === 1 && ico.readUInt16LE(4) === 1, 'ICO 头应声明 1 个图像');+ assert(ico.readUInt32LE(14) === png.length, '内嵌 PNG 长度应一致');+ assert(ico.slice(22).equals(png), 'ICO 数据区应就是原 PNG');+ assert(pngBytesToIco(Buffer.from('not a png')) === null);+ // WebP(nativeImage 解不了)→ 无 decode 回调时应回退到品牌占位 ICO+ const webp = Buffer.concat([Buffer.from('RIFF\x00\x00\x00\x00WEBP'), Buffer.alloc(32)]);+ const fallback = await iconToIco(webp);+ assert(fallback && fallback.length > 22, 'WebP 也应拿到图标');+ const decoded = await iconToIco(webp, { decode: async () => png });+ assert(decoded && decoded.slice(22).equals(png), '有 decode 时应使用真实图标');+ });++ await test('窗口控制脚本存在且为纯 ASCII(避免中文路径/标题乱码)', () => {+ const w = require('../src/core/windowctl');+ assert(fs.existsSync(w.SCRIPT), '缺少 windowctl.ps1');+ const b = fs.readFileSync(w.SCRIPT);+ assert(!b.some((x) => x > 127), 'ps1 必须纯 ASCII,中文通过 UTF-8 JSON 传入');+ assert(typeof w.present === 'function' && typeof w.getBounds === 'function');+ });++ console.log(results.join('\n'));+ console.log(`\n结果:${passed} 通过,${failed} 失败\n`);+ try { fs.rmSync(TMP, { recursive: true, force: true }); } catch (_) { /* ignore */ }+ process.exit(failed ? 1 : 0);+})();diff --git a/test/cap.js b/test/cap.jsnew file mode 100644index 0000000..be6fe40--- /dev/null+++ b/test/cap.js@@ -0,0 +1,28 @@+'use strict';+// 桌面截图探针(不依赖 PowerShell):electron test/cap.js out.png+const { app, desktopCapturer, screen } = require('electron');+const fs = require('fs');+const path = require('path');++app.disableHardwareAcceleration();++app.whenReady().then(async () => {+ const out = path.resolve(process.argv[2] || 'test/cap.png');+ const d = screen.getPrimaryDisplay();+ const sf = d.scaleFactor || 1;+ const w = Math.round(d.size.width * sf);+ const h = Math.round(d.size.height * sf);+ try {+ const sources = await desktopCapturer.getSources({+ types: ['screen'],+ thumbnailSize: { width: w, height: h },+ });+ if (!sources.length) throw new Error('no screen source');+ const png = sources[0].thumbnail.toPNG();+ fs.writeFileSync(out, png);+ console.log(`CAP ok ${w}x${h} ${png.length}B -> ${out}`);+ } catch (e) {+ console.log('CAP fail ' + (e && e.message));+ }+ app.quit();+});diff --git a/test/crop.js b/test/crop.jsnew file mode 100644index 0000000..3b5c393--- /dev/null+++ b/test/crop.js@@ -0,0 +1,28 @@+'use strict';+// 裁剪 PNG:electron test/crop.js <in> <out> <x> <y> <w> <h> [scale]+const { app, nativeImage } = require('electron');+const fs = require('fs');+const path = require('path');++app.disableHardwareAcceleration();++app.whenReady().then(() => {+ const [inp, out, x, y, w, h, scale] = process.argv.slice(2);+ const img = nativeImage.createFromPath(path.resolve(inp));+ const sz = img.getSize();+ const r = {+ x: Number(x) || 0,+ y: Number(y) || 0,+ width: Number(w) || sz.width,+ height: Number(h) || sz.height,+ };+ let c = img.crop(r);+ const k = Number(scale) || 0;+ if (k > 0) {+ const s = c.getSize();+ c = c.resize({ width: Math.round(s.width * k), height: Math.round(s.height * k), quality: 'good' });+ }+ fs.writeFileSync(path.resolve(out), c.toPNG());+ console.log(`CROP ${r.x},${r.y} ${r.width}x${r.height} -> ${c.getSize().width}x${c.getSize().height}`);+ app.quit();+});diff --git a/test/embed-probe.ps1 b/test/embed-probe.ps1new file mode 100644index 0000000..b09568e--- /dev/null+++ b/test/embed-probe.ps1@@ -0,0 +1,107 @@+# Throwaway probe: can the emulator Qt window be re-parented into another HWND+# and still render? Creates a WinForms host, SetParent()s the emulator window in,+# screenshots the host, then detaches. ASCII only.+param(+ [string]$Out = "embed.png",+ [int]$W = 540,+ [int]$H = 960+)+$ErrorActionPreference = 'Stop'+Add-Type -AssemblyName System.Windows.Forms+Add-Type -AssemblyName System.Drawing++Add-Type -TypeDefinition @'+using System;+using System.Runtime.InteropServices;+using System.Text;+public class W {+ public delegate bool EnumProc(IntPtr h, IntPtr p);+ [DllImport("user32.dll")] public static extern bool EnumWindows(EnumProc cb, IntPtr p);+ [DllImport("user32.dll")] public static extern int GetWindowThreadProcessId(IntPtr h, out int pid);+ [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr h);+ [DllImport("user32.dll", CharSet=CharSet.Unicode)] public static extern int GetWindowTextW(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll", CharSet=CharSet.Unicode)] public static extern int GetClassNameW(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll")] public static extern IntPtr SetParent(IntPtr c, IntPtr p);+ [DllImport("user32.dll")] public static extern IntPtr GetParent(IntPtr c);+ [DllImport("user32.dll")] public static extern int GetWindowLong(IntPtr h, int i);+ [DllImport("user32.dll")] public static extern int SetWindowLong(IntPtr h, int i, int v);+ [DllImport("user32.dll")] public static extern bool SetWindowPos(IntPtr h, IntPtr a, int x, int y, int w, int hh, uint f);+ [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr h, int c);+ [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);+ [StructLayout(LayoutKind.Sequential)] public struct RECT { public int L, T, R, B; }+}+'@++function Find-EmuWindow {+ $script:found = [IntPtr]::Zero+ $cb = [W+EnumProc]{+ param($h, $p)+ $script:pid2 = 0+ [void][W]::GetWindowThreadProcessId($h, [ref]$script:pid2)+ $proc = Get-Process -Id $script:pid2 -ErrorAction SilentlyContinue+ if ($proc -and $proc.ProcessName -match 'qemu|emulator' -and [W]::IsWindowVisible($h)) {+ $sb = New-Object System.Text.StringBuilder 512+ [void][W]::GetClassNameW($h, $sb, 512)+ $cls = $sb.ToString()+ if ($cls -notmatch 'IME|MSCTF') {+ $script:found = $h+ Write-Output ("CAND hwnd={0} pid={1} cls={2} name={3}" -f $h, $script:pid2, $cls, $proc.ProcessName)+ }+ }+ return $true+ }+ [void][W]::EnumWindows($cb, [IntPtr]::Zero)+ return $script:found+}++$emu = Find-EmuWindow+if ($emu -eq [IntPtr]::Zero) { Write-Output 'ERR=no-emu-window'; exit 1 }++$r = New-Object W+RECT+[void][W]::GetWindowRect($emu, [ref]$r)+Write-Output ("BEFORE x={0} y={1} w={2} h={3}" -f $r.L, $r.T, ($r.R - $r.L), ($r.B - $r.T))++$form = New-Object System.Windows.Forms.Form+$form.Text = 'ApkStartHost'+$form.StartPosition = 'Manual'+$form.Location = New-Object System.Drawing.Point 40, 40+$form.ClientSize = New-Object System.Drawing.Size $W, $H+$form.FormBorderStyle = 'None'+$form.BackColor = [System.Drawing.Color]::FromArgb(20, 20, 24)+[void]$form.Show()+Start-Sleep -Milliseconds 400++# re-parent + restyle as child+[void][W]::SetParent($emu, $form.Handle)+$style = [W]::GetWindowLong($emu, -16)+$style = ($style -band (-bnot 0x00C00000)) -band (-bnot 0x80000000)+$style = $style -bor 0x40000000 -bor 0x10000000+[void][W]::SetWindowLong($emu, -16, $style)+[void][W]::SetWindowPos($emu, [IntPtr]::Zero, 0, 0, $W, $H, 0x0160) # NOMOVE? no: NOZORDER|FRAMECHANGED|SHOWWINDOW+[void][W]::ShowWindow($emu, 5)+[void][W]::SetWindowPos($emu, [IntPtr]::Zero, 0, 0, $W, $H, 0x0160)+$form.Activate()++# let it repaint a few frames+$deadline = (Get-Date).AddSeconds(6)+while ((Get-Date) -lt $deadline) {+ [System.Windows.Forms.Application]::DoEvents()+ Start-Sleep -Milliseconds 120+}++$gr = $form.CreateGraphics()+$bmp = New-Object System.Drawing.Bitmap $W, $H+$g2 = [System.Drawing.Graphics]::FromImage($bmp)+$g2.CopyFromScreen($form.Location, [System.Drawing.Point]::Empty, (New-Object System.Drawing.Size $W, $H))+$bmp.Save((Join-Path (Get-Location) $Out), [System.Drawing.Imaging.ImageFormat]::Png)+Write-Output ("SAVED={0}" -f $Out)++# detach back to the desktop so the emulator is not orphaned+[void][W]::SetParent($emu, [IntPtr]::Zero)+$style2 = [W]::GetWindowLong($emu, -16)+$style2 = ($style2 -band (-bnot 0x40000000)) -bor 0x00C00000 -bor 0x00080000+[void][W]::SetWindowLong($emu, -16, $style2)+[void][W]::SetWindowPos($emu, [IntPtr]::Zero, 80, 40, 420, 760, 0x0160)+[void][W]::ShowWindow($emu, 9)+Write-Output 'DETACHED'+$form.Close()diff --git a/test/embed-probe2.ps1 b/test/embed-probe2.ps1new file mode 100644index 0000000..3c0e008--- /dev/null+++ b/test/embed-probe2.ps1@@ -0,0 +1,77 @@+# Probe 2: embed with the 8px emulator padding shifted outside the host,+# so the Android framebuffer fills the host exactly and the side rail is clipped.+param([int]$W = 480, [int]$H = 853, [int]$Margin = 8, [string]$Out = "embed2.png", [switch]$Keep)+$ErrorActionPreference = 'Stop'+Add-Type -AssemblyName System.Windows.Forms+Add-Type -AssemblyName System.Drawing+Add-Type -TypeDefinition @'+using System;+using System.Runtime.InteropServices;+using System.Text;+public class W3 {+ public delegate bool EnumProc(IntPtr h, IntPtr p);+ [DllImport("user32.dll")] public static extern bool EnumWindows(EnumProc cb, IntPtr p);+ [DllImport("user32.dll")] public static extern int GetWindowThreadProcessId(IntPtr h, out int pid);+ [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr h);+ [DllImport("user32.dll", CharSet=CharSet.Unicode)] public static extern int GetClassNameW(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll")] public static extern IntPtr SetParent(IntPtr c, IntPtr p);+ [DllImport("user32.dll")] public static extern int GetWindowLong(IntPtr h, int i);+ [DllImport("user32.dll")] public static extern int SetWindowLong(IntPtr h, int i, int v);+ [DllImport("user32.dll")] public static extern bool SetWindowPos(IntPtr h, IntPtr a, int x, int y, int w, int hh, uint f);+ [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr h, int c);+}+'@+$script:hwnd = [IntPtr]::Zero+$cb = [W3+EnumProc]{+ param($h, $p)+ $pp = 0+ [void][W3]::GetWindowThreadProcessId($h, [ref]$pp)+ $proc = Get-Process -Id $pp -ErrorAction SilentlyContinue+ if (-not $proc) { return $true }+ if ($proc.ProcessName -notmatch 'qemu') { return $true }+ if (-not [W3]::IsWindowVisible($h)) { return $true }+ $sb = New-Object System.Text.StringBuilder 256+ [void][W3]::GetClassNameW($h, $sb, 256)+ if ($sb.ToString() -match 'IME|MSCTF') { return $true }+ $script:hwnd = $h+ return $true+}+[void][W3]::EnumWindows($cb, [IntPtr]::Zero)+if ($script:hwnd -eq [IntPtr]::Zero) { Write-Output 'ERR=no-window'; exit 1 }++$form = New-Object System.Windows.Forms.Form+$form.Text = 'Host'+$form.StartPosition = 'Manual'+$form.Location = New-Object System.Drawing.Point 60, 30+$form.ClientSize = New-Object System.Drawing.Size $W, $H+$form.FormBorderStyle = 'None'+$form.BackColor = [System.Drawing.Color]::FromArgb(0, 0, 0)+[void]$form.Show()+Start-Sleep -Milliseconds 300++[void][W3]::SetParent($script:hwnd, $form.Handle)+$st = [W3]::GetWindowLong($script:hwnd, -16)+$st = ($st -band (-bnot 0x00C00000)) -band (-bnot 0x80000000)+$st = $st -bor 0x40000000 -bor 0x10000000+[void][W3]::SetWindowLong($script:hwnd, -16, $st)+[void][W3]::SetWindowPos($script:hwnd, [IntPtr]::Zero, -$Margin, -$Margin, ($W + 2 * $Margin), ($H + 2 * $Margin), 0x0160)+[void][W3]::ShowWindow($script:hwnd, 5)+$form.Activate()++$deadline = (Get-Date).AddSeconds(3)+while ((Get-Date) -lt $deadline) { [System.Windows.Forms.Application]::DoEvents(); Start-Sleep -Milliseconds 100 }++$bmp = New-Object System.Drawing.Bitmap $W, $H+$g2 = [System.Drawing.Graphics]::FromImage($bmp)+$g2.CopyFromScreen($form.Location, [System.Drawing.Point]::Empty, (New-Object System.Drawing.Size $W, $H))+$bmp.Save((Join-Path (Get-Location) $Out), [System.Drawing.Imaging.ImageFormat]::Png)+Write-Output ("SAVED {0} {1}x{2}" -f $Out, $W, $H)++if (-not $Keep) {+ [void][W3]::SetParent($script:hwnd, [IntPtr]::Zero)+ $st2 = [W3]::GetWindowLong($script:hwnd, -16)+ $st2 = ($st2 -band (-bnot 0x40000000)) -bor 0x00C00000 -bor 0x00080000+ [void][W3]::SetWindowLong($script:hwnd, -16, $st2)+ [void][W3]::SetWindowPos($script:hwnd, [IntPtr]::Zero, 40, 20, 540, 999, 0x0160)+}+$form.Close()diff --git a/test/emu-clean.ps1 b/test/emu-clean.ps1new file mode 100644index 0000000..23ae575--- /dev/null+++ b/test/emu-clean.ps1@@ -0,0 +1,52 @@+# Force a full repaint of the emulator window (minimize -> restore) then screenshot it.+param([int]$W = 540, [int]$H = 983, [string]$Out = "emu-clean.png")+Add-Type -AssemblyName System.Drawing+Add-Type -TypeDefinition @'+using System;+using System.Runtime.InteropServices;+public class R2 {+ public delegate bool EnumProc(IntPtr h, IntPtr p);+ [DllImport("user32.dll")] public static extern bool EnumWindows(EnumProc cb, IntPtr p);+ [DllImport("user32.dll")] public static extern int GetWindowThreadProcessId(IntPtr h, out int pid);+ [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr h);+ [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr h, int c);+ [DllImport("user32.dll")] public static extern bool SetWindowPos(IntPtr h, IntPtr a, int x, int y, int w, int hh, uint f);+ [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);+ [DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr h);+ [DllImport("user32.dll")] public static extern bool InvalidateRect(IntPtr h, IntPtr r, bool erase);+ [StructLayout(LayoutKind.Sequential)] public struct RECT { public int L, T, R, B; }+}+'@+$script:main = [IntPtr]::Zero+$script:other = New-Object System.Collections.ArrayList+$cb = [R2+EnumProc]{+ param($h, $p)+ $pp = 0+ [void][R2]::GetWindowThreadProcessId($h, [ref]$pp)+ $proc = Get-Process -Id $pp -ErrorAction SilentlyContinue+ if (-not $proc -or $proc.ProcessName -notmatch 'qemu') { return $true }+ if (-not [R2]::IsWindowVisible($h)) { return $true }+ $r = New-Object R2+RECT+ [void][R2]::GetWindowRect($h, [ref]$r)+ if (($r.R - $r.L) -gt 400) { $script:main = $h } else { [void]$script:other.Add($h) }+ return $true+}+[void][R2]::EnumWindows($cb, [IntPtr]::Zero)+if ($script:main -eq [IntPtr]::Zero) { Write-Output 'ERR=no-main'; exit 1 }+foreach ($h in $script:other) { [void][R2]::ShowWindow($h, 0); Write-Output "hid small window $h" }++[void][R2]::ShowWindow($script:main, 9)+[void][R2]::SetWindowPos($script:main, [IntPtr]::Zero, 40, 24, $W, $H, 0x0040)+[void][R2]::SetForegroundWindow($script:main)+[void][R2]::ShowWindow($script:main, 6) # minimize+Start-Sleep -Milliseconds 600+[void][R2]::ShowWindow($script:main, 9) # restore+Start-Sleep -Milliseconds 1500+$r = New-Object R2+RECT+[void][R2]::GetWindowRect($script:main, [ref]$r)+$w = $r.R - $r.L; $hh = $r.B - $r.T+$bmp = New-Object System.Drawing.Bitmap $w, $hh+$g = [System.Drawing.Graphics]::FromImage($bmp)+$g.CopyFromScreen($r.L, $r.T, 0, 0, (New-Object System.Drawing.Size $w, $hh))+$bmp.Save((Join-Path (Get-Location) $Out), [System.Drawing.Imaging.ImageFormat]::Png)+Write-Output ("SHOT {0} {1}x{2}" -f $Out, $w, $hh)diff --git a/test/emu-move.ps1 b/test/emu-move.ps1new file mode 100644index 0000000..2f11ae7--- /dev/null+++ b/test/emu-move.ps1@@ -0,0 +1,43 @@+# Move the emulator main window to a known spot, then full-screen shot.+Add-Type -AssemblyName System.Drawing, System.Windows.Forms+Add-Type -TypeDefinition @'+using System;+using System.Runtime.InteropServices;+public class MV {+ public delegate bool EnumProc(IntPtr h, IntPtr p);+ [DllImport("user32.dll")] public static extern bool EnumWindows(EnumProc cb, IntPtr p);+ [DllImport("user32.dll")] public static extern int GetWindowThreadProcessId(IntPtr h, out int pid);+ [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr h);+ [DllImport("user32.dll")] public static extern bool SetWindowPos(IntPtr h, IntPtr a, int x, int y, int w, int hh, uint f);+ [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);+ [DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr h);+ [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr h, int c);+ [StructLayout(LayoutKind.Sequential)] public struct RECT { public int L, T, R, B; }+}+'@+$script:main = [IntPtr]::Zero+$cb = [MV+EnumProc]{+ param($h, $p)+ $pp = 0+ [void][MV]::GetWindowThreadProcessId($h, [ref]$pp)+ $proc = Get-Process -Id $pp -ErrorAction SilentlyContinue+ if (-not $proc -or $proc.ProcessName -notmatch 'qemu') { return $true }+ if (-not [MV]::IsWindowVisible($h)) { return $true }+ $r = New-Object MV+RECT+ [void][MV]::GetWindowRect($h, [ref]$r)+ if (($r.R - $r.L) -gt 400) { $script:main = $h }+ return $true+}+[void][MV]::EnumWindows($cb, [IntPtr]::Zero)+[void][MV]::SetWindowPos($script:main, [IntPtr]::Zero, 700, 60, 540, 983, 0x0040)+[void][MV]::SetForegroundWindow($script:main)+Start-Sleep -Milliseconds 1500+$r = New-Object MV+RECT+[void][MV]::GetWindowRect($script:main, [ref]$r)+Write-Output ("MAIN {0},{1} {2}x{3}" -f $r.L, $r.T, ($r.R - $r.L), ($r.B - $r.T))+$b = [System.Windows.Forms.SystemInformation]::VirtualScreen+$bmp = New-Object System.Drawing.Bitmap $b.Width, $b.Height+$g = [System.Drawing.Graphics]::FromImage($bmp)+$g.CopyFromScreen(0, 0, 0, 0, (New-Object System.Drawing.Size $b.Width, $b.Height))+$bmp.Save((Join-Path (Get-Location) 'screen2.png'), [System.Drawing.Imaging.ImageFormat]::Png)+Write-Output 'SAVED screen2.png'diff --git a/test/emu-shot.ps1 b/test/emu-shot.ps1new file mode 100644index 0000000..2004fd2--- /dev/null+++ b/test/emu-shot.ps1@@ -0,0 +1,42 @@+# Resize the running emulator window and screenshot it (probe helper).+param([int]$W = 900, [int]$H = 1650, [string]$Out = "emu-shot.png")+$ErrorActionPreference = 'Stop'+Add-Type -AssemblyName System.Drawing+Add-Type -TypeDefinition @'+using System;+using System.Runtime.InteropServices;+public class W2 {+ public delegate bool EnumProc(IntPtr h, IntPtr p);+ [DllImport("user32.dll")] public static extern bool EnumWindows(EnumProc cb, IntPtr p);+ [DllImport("user32.dll")] public static extern int GetWindowThreadProcessId(IntPtr h, out int pid);+ [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr h);+ [DllImport("user32.dll")] public static extern bool SetWindowPos(IntPtr h, IntPtr a, int x, int y, int w, int hh, uint f);+ [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);+ [DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr h);+ [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr h, int c);+ [StructLayout(LayoutKind.Sequential)] public struct RECT { public int L, T, R, B; }+}+'@+$script:hwnd = [IntPtr]::Zero+$cb = [W2+EnumProc]{+ param($h, $p)+ $pp = 0+ [void][W2]::GetWindowThreadProcessId($h, [ref]$pp)+ $proc = Get-Process -Id $pp -ErrorAction SilentlyContinue+ if ($proc -and $proc.ProcessName -match 'qemu' -and [W2]::IsWindowVisible($h)) { $script:hwnd = $h }+ return $true+}+[void][W2]::EnumWindows($cb, [IntPtr]::Zero)+if ($script:hwnd -eq [IntPtr]::Zero) { Write-Output 'ERR=no-window'; exit 1 }+[void][W2]::ShowWindow($script:hwnd, 9)+[void][W2]::SetWindowPos($script:hwnd, [IntPtr]::Zero, 30, 20, $W, $H, 0x0040)+[void][W2]::SetForegroundWindow($script:hwnd)+Start-Sleep -Milliseconds 1800+$r = New-Object W2+RECT+[void][W2]::GetWindowRect($script:hwnd, [ref]$r)+$w = $r.R - $r.L; $h2 = $r.B - $r.T+$bmp = New-Object System.Drawing.Bitmap $w, $h2+$g = [System.Drawing.Graphics]::FromImage($bmp)+$g.CopyFromScreen($r.L, $r.T, 0, 0, (New-Object System.Drawing.Size $w, $h2))+$bmp.Save((Join-Path (Get-Location) $Out), [System.Drawing.Imaging.ImageFormat]::Png)+Write-Output ("SHOT {0} {1}x{2} at {3},{4}" -f $Out, $w, $h2, $r.L, $r.T)diff --git a/test/hide-toolbar.ps1 b/test/hide-toolbar.ps1new file mode 100644index 0000000..08dded8--- /dev/null+++ b/test/hide-toolbar.ps1@@ -0,0 +1,33 @@+# Hide the emulator's floating side toolbar (class contains QWindowTool).+Add-Type -TypeDefinition @'+using System;+using System.Runtime.InteropServices;+using System.Text;+public class H {+ public delegate bool EnumProc(IntPtr h, IntPtr p);+ [DllImport("user32.dll")] public static extern bool EnumWindows(EnumProc cb, IntPtr p);+ [DllImport("user32.dll")] public static extern int GetWindowThreadProcessId(IntPtr h, out int pid);+ [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr h);+ [DllImport("user32.dll", CharSet=CharSet.Unicode)] public static extern int GetClassNameW(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr h, int c);+ [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);+ [StructLayout(LayoutKind.Sequential)] public struct RECT { public int L, T, R, B; }+}+'@+$script:out = New-Object System.Collections.ArrayList+$cb = [H+EnumProc]{+ param($h, $p)+ $pp = 0+ [void][H]::GetWindowThreadProcessId($h, [ref]$pp)+ $proc = Get-Process -Id $pp -ErrorAction SilentlyContinue+ if (-not $proc -or $proc.ProcessName -notmatch 'qemu') { return $true }+ $cls = New-Object System.Text.StringBuilder 256+ [void][H]::GetClassNameW($h, $cls, 256)+ if ($cls.ToString() -match 'QWindowTool' -and [H]::IsWindowVisible($h)) {+ [void][H]::ShowWindow($h, 0)+ [void]$script:out.Add("HIDDEN $h")+ }+ return $true+}+[void][H]::EnumWindows($cb, [IntPtr]::Zero)+if ($script:out.Count -eq 0) { Write-Output 'none' } else { $script:out | ForEach-Object { Write-Output $_ } }diff --git a/test/mouse-probe.ps1 b/test/mouse-probe.ps1new file mode 100644index 0000000..ba0593a--- /dev/null+++ b/test/mouse-probe.ps1@@ -0,0 +1,42 @@+# Probe: does the emulator map mouse side buttons (XBUTTON1/2) to BACK?+param([int]$Button = 1)+$ErrorActionPreference = 'Stop'+Add-Type -TypeDefinition @'+using System;+using System.Runtime.InteropServices;+public class M {+ public delegate bool EnumProc(IntPtr h, IntPtr p);+ [DllImport("user32.dll")] public static extern bool EnumWindows(EnumProc cb, IntPtr p);+ [DllImport("user32.dll")] public static extern int GetWindowThreadProcessId(IntPtr h, out int pid);+ [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr h);+ [DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr h);+ [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr h, int c);+ [DllImport("user32.dll")] public static extern bool SetCursorPos(int x, int y);+ [DllImport("user32.dll")] public static extern void mouse_event(uint flags, int dx, int dy, uint data, IntPtr extra);+ [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);+ [StructLayout(LayoutKind.Sequential)] public struct RECT { public int L, T, R, B; }+}+'@+$script:hwnd = [IntPtr]::Zero+$cb = [M+EnumProc]{+ param($h, $p)+ $pp = 0+ [void][M]::GetWindowThreadProcessId($h, [ref]$pp)+ $proc = Get-Process -Id $pp -ErrorAction SilentlyContinue+ if ($proc -and $proc.ProcessName -match 'qemu' -and [M]::IsWindowVisible($h)) { $script:hwnd = $h }+ return $true+}+[void][M]::EnumWindows($cb, [IntPtr]::Zero)+if ($script:hwnd -eq [IntPtr]::Zero) { Write-Output 'ERR=no-window'; exit 1 }+[void][M]::ShowWindow($script:hwnd, 9)+[void][M]::SetForegroundWindow($script:hwnd)+Start-Sleep -Milliseconds 500+$r = New-Object M+RECT+[void][M]::GetWindowRect($script:hwnd, [ref]$r)+[M]::SetCursorPos([int](($r.L + $r.R) / 2), [int](($r.T + $r.B) / 2))+Start-Sleep -Milliseconds 300+$XDOWN = 0x0080; $XUP = 0x0100+[M]::mouse_event($XDOWN, 0, 0, [uint32]$Button, [IntPtr]::Zero)+[M]::mouse_event($XUP, 0, 0, [uint32]$Button, [IntPtr]::Zero)+Write-Output ("SENT xbutton {0}" -f $Button)+Start-Sleep -Milliseconds 1200diff --git a/test/notif.txt b/test/notif.txtnew file mode 100644index 0000000..22511d3--- /dev/null+++ b/test/notif.txt@@ -0,0 +1,988 @@+Current Notification Manager state:+ Notification List:+ NotificationRecord(0x02e6a617: pkg=com.android.shell user=UserHandle{0} id=2020 tag=tag1 importance=3 key=0|com.android.shell|2020|tag1|2000: Notification(channel=shell_cmd shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x0 color=0x00000000 vis=PRIVATE))+ uid=2000 userId=0+ opPkg=com.android.shell+ icon=Icon(typ=RESOURCE pkg=android id=0x01080077)+ flags=0x0+ originalFlags=0x0+ pri=0+ key=0|com.android.shell|2020|tag1|2000+ seen=false+ groupKey=0|com.android.shell|2020|tag1|2000+ notification=+ fullscreenIntent=null+ contentIntent=null+ deleteIntent=null+ number=0+ groupAlertBehavior=0+ when=1794494008269+ tickerText=null+ vis=0+ contentView=null+ bigContentView=null+ headsUpContentView=null+ color=0x00000000+ timeout=unknown+ extras={+ android.title=String (ApkStart 测试)+ android.reduced.images=Boolean (true)+ android.template=String (android.app.Notification$BigTextStyle)+ android.text=String (这是一条测试通知)+ android.appInfo=ApplicationInfo (ApplicationInfo{f99ea04 com.android.shell})+ android.bigText=null+ }+ publicNotification=+ None+ stats=SingleNotificationStats{posttimeElapsedMs=446472, posttimeToFirstClickMs=-1, posttimeToDismissMs=-1, airtimeCount=0, airtimeMs=0, currentAirtimeStartElapsedMs=-1, airtimeExpandedMs=0, posttimeToFirstVisibleExpansionMs=-1, currentAirtimeExpandedStartElapsedMs=-1, requestedImportance=3, naturalImportance=3, isNoisy=true}+ mContactAffinity=0.0+ mRecentlyIntrusive=false+ mPackagePriority=0+ mPackageVisibility=-1000+ mSystemImportance=UNSPECIFIED+ mAsstImportance=UNSPECIFIED+ mImportance=DEFAULT+ mImportanceExplanation=app+ mProposedImportance=UNSPECIFIED+ mIsAppImportanceLocked=false+ mSensitiveContent=false+ mIntercept=false+ mHidden==false+ mGlobalSortKey=crtcl=0x0002:intrsv=1:grnk=0x0000:gsmry=1:nsk:rnk=0x0000+ mRankingTimeMs=1794494008269+ mCreationTimeMs=1794494008270+ mVisibleSinceMs=0+ mUpdateTimeMs=1794494008270+ mInterruptionTimeMs=1794494008473+ mSuppressedVisualEffects= 0+ mSound= content://settings/system/notification_sound+ mVibration= null+ mAttributes= AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null+ mLight= null+ mShowBadge=true+ mColorized=false+ mAllowBubble=false+ isBubble=false+ mIsInterruptive=true+ effectiveNotificationChannel=NotificationChannel{mId='shell_cmd', mName=Shell command, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ mAdjustments=[]+ shortcut=null found valid? false+ mUserVisOverride=-1000+ NotificationRecord(0x04452266: pkg=com.android.vending user=UserHandle{0} id=951340667 tag=null importance=2 key=0|com.android.vending|951340667|null|10131: Notification(channel=account shortcut=null contentView=null vibrate=null sound=null tick defaults=0x0 flags=0x110 color=0xff01875f category=status actions=1 vis=PRIVATE))+ uid=10131 userId=0+ opPkg=com.android.vending+ icon=Icon(typ=RESOURCE pkg=com.android.vending id=0x7f080356)+ flags=0x110+ originalFlags=0x110+ pri=2+ key=0|com.android.vending|951340667|null|10131+ seen=false+ groupKey=0|com.android.vending|951340667|null|10131+ notification=+ fullscreenIntent=null+ contentIntent=PendingIntent{2cee9a7: PendingIntentRecord{f513006 com.android.vending broadcastIntent (allowlist: b1b8a27:+30s0ms/0/NOTIFICATION_SERVICE/NotificationManagerService)}}+ deleteIntent=PendingIntent{b748e54: PendingIntentRecord{6eb1ae1 com.android.vending broadcastIntent (allowlist: b1b8a27:+30s0ms/0/NOTIFICATION_SERVICE/NotificationManagerService)}}+ number=0+ groupAlertBehavior=0+ when=1794493591941+ tickerText=Google Play Protect is turned on+ vis=0+ contentView=null+ bigContentView=null+ headsUpContentView=null+ color=0xff01875f+ timeout=1970-01-04 00:00:00+ actions={+ [0] "Go to Play Protect" -> PendingIntent{cf661fd: PendingIntentRecord{cd776c7 com.android.vending broadcastIntent (allowlist: b1b8a27:+30s0ms/0/NOTIFICATION_SERVICE/NotificationManagerService)}}+ }+ extras={+ android.title=String (Google Play Protect is turned on)+ android.reduced.images=Boolean (true)+ android.subText=null+ android.template=String (android.app.Notification$BigTextStyle)+ android.showChronometer=Boolean (false)+ android.text=String (This feature protects your device from harmful apps)+ android.progress=Integer (0)+ android.progressMax=Integer (0)+ android.appInfo=ApplicationInfo (ApplicationInfo{d70fef2 com.android.vending})+ android.showWhen=Boolean (true)+ android.substName=String (Google Play Protect)+ android.largeIcon=null+ android.bigText=String (This feature protects your device from harmful apps)+ android.infoText=null+ android.progressIndeterminate=Boolean (false)+ android.remoteInputHistory=null+ android.support.v4.app.extra.COMPAT_TEMPLATE=String (androidx.core.app.NotificationCompat$BigTextStyle)+ }+ publicNotification=+ None+ stats=SingleNotificationStats{posttimeElapsedMs=30167, posttimeToFirstClickMs=-1, posttimeToDismissMs=-1, airtimeCount=0, airtimeMs=0, currentAirtimeStartElapsedMs=-1, airtimeExpandedMs=0, posttimeToFirstVisibleExpansionMs=-1, currentAirtimeExpandedStartElapsedMs=-1, requestedImportance=4, naturalImportance=2, isNoisy=true}+ mContactAffinity=0.0+ mRecentlyIntrusive=false+ mPackagePriority=0+ mPackageVisibility=-1000+ mSystemImportance=UNSPECIFIED+ mAsstImportance=UNSPECIFIED+ mImportance=LOW+ mImportanceExplanation=app+ mProposedImportance=UNSPECIFIED+ mIsAppImportanceLocked=false+ mSensitiveContent=false+ mIntercept=false+ mHidden==false+ mGlobalSortKey=crtcl=0x0002:intrsv=1:grnk=0x0001:gsmry=1:nsk:rnk=0x0001+ mRankingTimeMs=1794493591941+ mCreationTimeMs=1794493591966+ mVisibleSinceMs=0+ mUpdateTimeMs=1794493591966+ mInterruptionTimeMs=1794493592168+ mSuppressedVisualEffects= 0+ mSound= content://settings/system/notification_sound+ mVibration= null+ mAttributes= AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null+ mLight= null+ mShowBadge=true+ mColorized=false+ mAllowBubble=false+ isBubble=false+ mIsInterruptive=true+ effectiveNotificationChannel=NotificationChannel{mId='account', mName=Account, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='alerts', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ mAdjustments=[]+ shortcut=null found valid? false+ mUserVisOverride=-1000+ NotificationRecord(0x07f67943: pkg=com.android.systemui user=UserHandle{-1} id=1396986699 tag=disk:253,80 importance=2 key=-1|com.android.systemui|1396986699|disk:253,80|10165: Notification(channel=DSK shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x900 color=0x00000000 category=err vis=PUBLIC))+ uid=10165 userId=-1+ opPkg=com.android.systemui+ icon=Icon(typ=RESOURCE pkg=com.android.systemui id=0x01080547)+ flags=0x900+ originalFlags=0x900+ pri=0+ key=-1|com.android.systemui|1396986699|disk:253,80|10165+ seen=false+ groupKey=-1|com.android.systemui|1396986699|disk:253,80|10165+ notification=+ fullscreenIntent=null+ contentIntent=PendingIntent{9b63bc0: PendingIntentRecord{a666741 com.android.systemui startActivity (allowlist: b1b8a27:+30s0ms/0/NOTIFICATION_SERVICE/NotificationManagerService)}}+ deleteIntent=null+ number=0+ groupAlertBehavior=0+ when=1794493578685+ tickerText=null+ vis=1+ contentView=null+ bigContentView=null+ headsUpContentView=null+ color=0x00000000+ timeout=unknown+ extras={+ android.title=String (Virtual SD card detected)+ android.reduced.images=Boolean (true)+ android.template=String (android.app.Notification$BigTextStyle)+ android.text=String (Tap to set up .)+ android.appInfo=ApplicationInfo (ApplicationInfo{f4c20f9 com.android.systemui})+ android.substName=String (Settings)+ android.bigText=String (Tap to set up .)+ android.tv.EXTENSIONS=Bundle (Bundle[mParcelledData.dataSize=116])+ }+ publicNotification=+ None+ stats=SingleNotificationStats{posttimeElapsedMs=16701, posttimeToFirstClickMs=-1, posttimeToDismissMs=-1, airtimeCount=0, airtimeMs=0, currentAirtimeStartElapsedMs=-1, airtimeExpandedMs=0, posttimeToFirstVisibleExpansionMs=-1, currentAirtimeExpandedStartElapsedMs=-1, requestedImportance=3, naturalImportance=2, isNoisy=true}+ mContactAffinity=0.0+ mRecentlyIntrusive=false+ mPackagePriority=0+ mPackageVisibility=-1000+ mSystemImportance=UNSPECIFIED+ mAsstImportance=UNSPECIFIED+ mImportance=LOW+ mImportanceExplanation=app+ mProposedImportance=UNSPECIFIED+ mIsAppImportanceLocked=false+ mSensitiveContent=false+ mIntercept=false+ mHidden==false+ mGlobalSortKey=crtcl=0x0002:intrsv=1:grnk=0x0002:gsmry=1:nsk:rnk=0x0002+ mRankingTimeMs=1794493578685+ mCreationTimeMs=1794493578695+ mVisibleSinceMs=0+ mUpdateTimeMs=1794493578695+ mInterruptionTimeMs=1794493578701+ mSuppressedVisualEffects= 0+ mSound= content://settings/system/notification_sound+ mVibration= null+ mAttributes= AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null+ mLight= null+ mShowBadge=false+ mColorized=false+ mAllowBubble=false+ isBubble=false+ mIsInterruptive=true+ effectiveNotificationChannel=NotificationChannel{mId='DSK', mName=Storage, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ mAdjustments=[]+ shortcut=null found valid? false+ mUserVisOverride=-1000+ NotificationRecord(0x0f0c183e: pkg=android user=UserHandle{-1} id=19 tag=null importance=2 key=-1|android|19|null|1000: Notification(channel=PHYSICAL_KEYBOARD shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x810 color=0x00000000 vis=PRIVATE))+ uid=1000 userId=-1+ opPkg=android+ icon=Icon(typ=RESOURCE pkg=android id=0x0108054f)+ flags=0x810+ originalFlags=0x810+ pri=0+ key=-1|android|19|null|1000+ seen=false+ groupKey=-1|android|19|null|1000+ notification=+ fullscreenIntent=null+ contentIntent=PendingIntent{57d669f: PendingIntentRecord{d47d55f android startActivity}}+ deleteIntent=null+ number=0+ groupAlertBehavior=0+ when=1794493575953+ tickerText=null+ vis=0+ contentView=null+ bigContentView=null+ headsUpContentView=null+ color=0x00000000+ timeout=unknown+ extras={+ android.title=String (Configure physical keyboards)+ android.reduced.images=Boolean (true)+ android.text=String (Tap to select language and layout)+ android.appInfo=ApplicationInfo (ApplicationInfo{9a353ec android})+ }+ publicNotification=+ None+ stats=SingleNotificationStats{posttimeElapsedMs=14561, posttimeToFirstClickMs=-1, posttimeToDismissMs=-1, airtimeCount=0, airtimeMs=0, currentAirtimeStartElapsedMs=-1, airtimeExpandedMs=0, posttimeToFirstVisibleExpansionMs=-1, currentAirtimeExpandedStartElapsedMs=-1, requestedImportance=3, naturalImportance=2, isNoisy=true}+ mContactAffinity=0.0+ mRecentlyIntrusive=false+ mPackagePriority=0+ mPackageVisibility=-1000+ mSystemImportance=UNSPECIFIED+ mAsstImportance=UNSPECIFIED+ mImportance=LOW+ mImportanceExplanation=app+ mProposedImportance=UNSPECIFIED+ mIsAppImportanceLocked=false+ mSensitiveContent=false+ mIntercept=false+ mHidden==false+ mGlobalSortKey=crtcl=0x0002:intrsv=1:grnk=0x0003:gsmry=1:nsk:rnk=0x0003+ mRankingTimeMs=1794493575953+ mCreationTimeMs=1794493575954+ mVisibleSinceMs=0+ mUpdateTimeMs=1794493575954+ mInterruptionTimeMs=1794493575954+ mSuppressedVisualEffects= 0+ mSound= content://settings/system/notification_sound+ mVibration= null+ mAttributes= AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null+ mLight= null+ mShowBadge=false+ mColorized=false+ mAllowBubble=false+ isBubble=false+ mIsInterruptive=false+ effectiveNotificationChannel=NotificationChannel{mId='PHYSICAL_KEYBOARD', mName=Physical keyboard, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ mAdjustments=[]+ shortcut=null found valid? false+ mUserVisOverride=-1000++ mUseAttentionLight=false+ mHasLight=false+ mNotificationPulseEnabled=true+ mSoundNotificationKey=0|com.android.shell|2020|tag1|2000+ mVibrateNotificationKey=null+ mDisableNotificationEffects=false+ mCallState=CALL_STATE_IDLE+ mSystemReady=true+ mMaxPackageEnqueueRate=5.0+ hideSilentStatusBar=false+ mArchive=Archive (0 notifications)++ Snoozed notifications:++ Pending snoozed notifications++ Ranking Config:+ mSignalExtractors.length = 11+ NotificationChannelExtractor+ NotificationAdjustmentExtractor+ BubbleExtractor+ ValidateNotificationPeople+ PriorityExtractor+ ZenModeExtractor+ ImportanceExtractor+ NotificationIntrusivenessExtractor+ VisibilityExtractor+ BadgeExtractor+ CriticalNotificationExtractor++ Notification Preferences:+ per-package config version: 4+PackagePreferences:+ AppSettings: com.android.ons (1001) fixedImportance=true+ AppSettings: com.google.android.safetycenter.resources (10171)+ AppSettings: com.google.android.providers.media.module (10188) importance=DEFAULT userSet=false fixedImportance=true+ NotificationChannel{mId='native_transcode_alert_channel', mName=Native Transcode Alerts, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='native_transcode_progress_channel', mName=Native Transcode Progress, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.android.internal.display.cutout.emulation.corner (10049)+ AppSettings: com.android.emergency (10163) defaultAppLocked=true+ AppSettings: com.android.managedprovisioning.auto_generated_rro_product__ (10003)+ AppSettings: com.android.settings.auto_generated_rro_product__ (10070)+ AppSettings: com.android.localtransport (1000) fixedImportance=true+ AppSettings: com.android.pacprocessor (10108)+ AppSettings: com.android.systemui.emulation.pixel_3 (10002)+ AppSettings: com.google.android.printservice.recommendation (10101)+ AppSettings: com.android.credentialmanager (10095)+ AppSettings: com.google.android.wifi.dialog (10177)+ AppSettings: com.google.mainline.adservices (10145)+ AppSettings: com.android.htmlviewer (10112)+ AppSettings: com.google.android.apps.docs (10154) importance=NONE userSet=false+ AppSettings: com.android.systemui.auto_generated_rro_product__ (10063)+ AppSettings: com.google.android.configupdater (10128)+ AppSettings: com.android.systemui.emulation.pixel_8 (10020)+ AppSettings: com.google.android.onetimeinitializer (10118)+ AppSettings: com.android.internal.emulation.pixel_7 (10018)+ AppSettings: com.android.internal.emulation.pixel_3a_xl (10032)+ AppSettings: com.android.storagemanager (10164) importance=DEFAULT userSet=false fixedImportance=true+ AppSettings: com.google.android.apps.wallpaper (10167)+ AppSettings: com.android.systemui.plugin.globalactions.wallet (10157)+ AppSettings: com.android.carrierconfig.auto_generated_rro_product__ (10033)+ AppSettings: com.android.dynsystem (1000) importance=DEFAULT userSet=false fixedImportance=true+ NotificationChannel{mId='com.android.dynsystem', mName=Dynamic System Updates, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.google.android.dialer (10126) importance=DEFAULT userSet=false defaultAppLocked=true+ NotificationChannel{mId='phone_ongoing_call', mName=Ongoing calls, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='phone_incoming_call', mName=Incoming calls, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=true, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='phone_low_priority', mName=Background Processing, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='phone_voicemail', mName=Voicemails, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=true, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='phone_missed_call', mName=Missed calls, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=true, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='phone_feedback', mName=Feedback, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='phone_default', mName=Default, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=true, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.android.internal.display.cutout.emulation.double (10056)+ AppSettings: com.google.android.systemui.gxoverlay (10041)+ AppSettings: com.android.internal.emulation.pixel_8_pro (10048)+ AppSettings: com.android.providers.partnerbookmarks (10113)+ AppSettings: com.google.android.apps.customization.pixel (10150) importance=NONE userSet=false+ AppSettings: com.android.systemui.emulation.pixel_6a (10026)+ AppSettings: com.android.internal.display.cutout.emulation.emu01 (10069)+ AppSettings: com.android.internal.systemui.navbar.transparent (10023)+ AppSettings: com.google.android.captiveportallogin (10109) importance=DEFAULT userSet=false+ AppSettings: com.android.emergency.auto_generated_rro_product__ (10021)+ AppSettings: com.google.android.overlay.largescreensettingsprovider (10022)+ AppSettings: com.android.systemui.accessibility.accessibilitymenu.auto_generated_rro_product__ (10028)+ AppSettings: com.android.certinstaller (10105)+ AppSettings: com.google.android.partnersetup (10127)+ AppSettings: com.android.providers.contacts (10089)+ AppSettings: com.android.proxyhandler (10092)+ AppSettings: com.android.providers.contacts.auto_generated_rro_product__ (10025)+ AppSettings: com.android.wallpaper.livepicker (10091)+ AppSettings: com.google.android.apps.messaging (10130) importance=DEFAULT userSet=false+ NotificationChannel{mId='bugle_misc_channel', mName=Other notifications, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=true, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='bugle_default_channel', mName=Incoming messages, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=true, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='_bugle_default_settings_group', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='bugle_broadcast_receiver_channel', mName=Background tasks, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannelGroup{mId='bugle_web_group', mName=Messages for web, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ NotificationChannelGroup{mId='_bugle_default_settings_group', mName=Default settings, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ NotificationChannelGroup{mId='bugle_conversations_group', mName=Conversations, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ AppSettings: com.google.android.googlequicksearchbox (10132) importance=DEFAULT userSet=false+ NotificationChannel{mId='morris2.new.drivingscreen.NOTIFICATION_CHANNEL', mName=Assistant Driving Mode, mDescription=hasDescription , mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=android.resource://com.google.android.googlequicksearchbox/2132017416, mLights=false, mLightColor=0, mVibration=[0], mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='AA Location Feedback', mName=At A Glance Location Feedback, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.android.theme.font.notoserifsource (10053)+ AppSettings: com.android.internal.emulation.pixel_4a (10029)+ AppSettings: com.google.android.apps.youtube.music (10152) importance=NONE userSet=false+ NotificationChannel{mId='generic_notifications', mName=General notifications, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='5', mName=New music, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='7', mName=Playback, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='8', mName=Account Updates, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='9', mName=Playlist updates, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='ExternalDeviceNotifications', mName=Connection confirmation, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.android.bluetoothmidiservice (10103)+ AppSettings: com.google.android.gsf (10129)+ AppSettings: com.android.providers.telephony (1001) fixedImportance=true+ AppSettings: com.android.systemui.emulation.pixel_7_pro (10007)+ AppSettings: com.google.android.modulemetadata (10148)+ AppSettings: android.auto_generated_rro_vendor__ (10075)+ AppSettings: com.google.android.packageinstaller (10082) importance=DEFAULT userSet=false fixedImportance=true+ AppSettings: com.android.internal.emulation.pixel_fold (10006)+ AppSettings: com.android.systemui.emulation.pixel_4 (10019)+ AppSettings: com.android.bluetooth (1002) fixedImportance=true+ AppSettings: com.android.wallpapercropper (10162)+ AppSettings: com.android.systemui.emulation.pixel_4_xl (10073)+ AppSettings: com.android.internal.emulation.pixel_3 (10038)+ AppSettings: com.android.internal.systemui.navbar.gestural (10045)+ AppSettings: com.android.cellbroadcastreceiver (10094)+ AppSettings: com.android.calllogbackup (10089)+ AppSettings: android (1000) importance=DEFAULT userSet=false fixedImportance=true+ NotificationChannel{mId='ABUSIVE_BACKGROUND_APPS', mName=Background Activity, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='NETWORK_ALERTS', mName=Network alerts, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='DEVELOPER', mName=Developer messages, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='APM_ALERTS', mName=APM alerts, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='SYSTEM_CHANGES_ALERTS', mName=System changes, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='safety_center_critical_warning', mName=Critical warnings, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='safety_center_channels', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='NETWORK_STATUS', mName=Network status, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='PHYSICAL_KEYBOARD', mName=Physical keyboard, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='HEAVY_WEIGHT_APP', mName=App running, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION_EVENT content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='ACCOUNT', mName=Account status, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='DEVICE_ADMIN_ALERTS', mName=Alerts from your IT admin, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='ACCESSIBILITY_SECURITY_POLICY', mName=Accessibility usage, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='FOREGROUND_SERVICE', mName=Apps consuming battery, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='DO_NOT_DISTURB', mName=Do Not Disturb, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='USB', mName=USB connection, mDescription=, mImportance=1, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=1, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='VPN', mName=VPN status, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='safety_center_recommendation', mName=Warnings, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='safety_center_channels', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='UPDATES', mName=Updates, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='safety_center_information', mName=Recommendations, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='safety_center_channels', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='RETAIL_MODE', mName=Retail demo, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='CAR_MODE', mName=Car mode, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='ACCESSIBILITY_MAGNIFICATION', mName=Magnification, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='SECURITY', mName=Security, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='NETWORK_AVAILABLE', mName=Network available, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='DEVELOPER_IMPORTANT', mName=Important developer messages, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='ALERTS', mName=Alerts, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannelGroup{mId='safety_center_channels', mName=Security & privacy, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ AppSettings: com.google.android.overlay.googleconfig (10009)+ AppSettings: com.android.internal.emulation.pixel_8 (10060)+ AppSettings: com.google.android.inputmethod.latin (10153)+ NotificationChannel{mId='com.google.android.apps.inputmethod.libs.dataservice.superpacks', mName=Downloads, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.android.internal.systemui.navbar.threebutton (10000)+ AppSettings: com.android.systemui.emulation.pixel_3_xl (10066)+ AppSettings: com.google.android.networkstack (1073) fixedImportance=true+ NotificationChannel{mId='connected_note', mName=Network venue information, mDescription=hasDescription , mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='connected_note_loud', mName=Captive portal authentication, mDescription=hasDescription , mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.android.internal.systemui.navbar.gestural_wide_back (10039)+ AppSettings: com.android.intentresolver (10084)+ AppSettings: com.android.providers.userdictionary (10089)+ AppSettings: com.google.android.settings.intelligence (10122) importance=DEFAULT userSet=false+ AppSettings: com.android.phone.auto_generated_rro_vendor__ (10077)+ AppSettings: com.android.systemui.emulation.pixel_4a (10011)+ AppSettings: com.google.android.sdksandbox (10169)+ AppSettings: com.android.mms.service (1001) fixedImportance=true+ AppSettings: com.google.android.cellbroadcastservice (1073) fixedImportance=true+ AppSettings: com.google.android.cellbroadcastreceiver (10179) importance=DEFAULT userSet=false fixedImportance=true+ AppSettings: com.google.android.adservices.api (10168) importance=DEFAULT userSet=false+ AppSettings: com.android.server.telecom (1000) importance=DEFAULT userSet=false fixedImportance=true+ NotificationChannel{mId='TelecomMissedCalls', mName=Missed calls, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=, mLights=true, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='TelecomDisconnectedCalls', mName=Disconnected calls, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=, mLights=true, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='TelecomCallStreaming', mName=Call streaming, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='TelecomInCallServiceCrash', mName=Call streaming, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='TelecomCallBlocking', mName=Call Blocking, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='TelecomIncomingCalls', mName=Incoming calls, mDescription=, mImportance=5, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=, mLights=true, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=5, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='TelecomBackgroundAudioProcessing', mName=Background calls, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.android.shell (2000) importance=DEFAULT userSet=false fixedImportance=true+ NotificationChannel{mId='shell_cmd', mName=Shell command, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.google.android.hotspot2.osulogin (10176)+ AppSettings: com.google.android.rkpdapp (10189)+ AppSettings: com.android.emulator.multidisplay (1000) fixedImportance=true+ AppSettings: com.android.internal.emulation.pixel_7a (10072)+ AppSettings: com.android.internal.systemui.navbar.gestural_extra_wide_back (10010)+ AppSettings: com.android.providers.calendar (10093)+ AppSettings: com.android.emulator.radio.config (10161)+ AppSettings: com.google.android.ext.services (10184)+ AppSettings: com.android.companiondevicemanager (10110)+ AppSettings: com.android.simappdialog (10111)+ AppSettings: com.google.android.healthconnect.controller (10182)+ AppSettings: com.google.android.nearby.halfsheet (10174)+ AppSettings: com.android.vpndialogs (10097)+ AppSettings: com.google.android.apps.restore (10117) importance=DEFAULT userSet=false+ AppSettings: com.google.mainline.telemetry (10147)+ AppSettings: com.android.systemui.emulation.pixel_5 (10017)+ AppSettings: com.android.providers.settings.auto_generated_rro_vendor__ (10080)+ AppSettings: com.google.android.markup (10138)+ AppSettings: com.google.android.gms (10129) importance=DEFAULT userSet=false+ NotificationChannel{mId='nearby_sharing_alert', mName=Alerts, mDescription=hasDescription , mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='NEARBY_SHARING_CHANNEL_GROUP_ID', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='DEVICES_WITH_YOUR_ACCOUNT', mName=Devices with your account, mDescription=, mImportance=1, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='DEVICES_CHANNEL_GROUP_ID', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=1, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='com.google.android.gms.mobiledataplan.NOTIFICATION.LOW_BALANCE', mName=Data balance updates, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='com.google.android.gms.mobiledataplan.NOTIFICATION', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='com.google.android.gms.mobiledataplan.NOTIFICATION.ACCOUNT_ALERT', mName=Account alerts, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='com.google.android.gms.mobiledataplan.NOTIFICATION', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='nearby_sharing_app', mName=App Installs, mDescription=hasDescription , mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='NEARBY_SHARING_CHANNEL_GROUP_ID', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='DEVICES_WITHIN_REACH_REBRANDED', mName=Devices within reach, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='DEVICES_CHANNEL_GROUP_ID', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='DEVICES_REBRANDED', mName=Devices, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='DEVICES_CHANNEL_GROUP_ID', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='mt-notification-channel-id', mName=Provide data connection, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='mt-notification-channel-group-id', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='mt-notification-connected-channel-id', mName=Sharing data connection, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='mt-notification-channel-group-id', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='nearby_sharing_file', mName=File Transfers, mDescription=hasDescription , mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='NEARBY_SHARING_CHANNEL_GROUP_ID', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='com.google.android.gms.mobiledataplan.NOTIFICATION.UPSELL_OFFER', mName=Data offers, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='com.google.android.gms.mobiledataplan.NOTIFICATION', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='nearby_sharing_privacy', mName=Privacy Reminder, mDescription=hasDescription , mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='NEARBY_SHARING_CHANNEL_GROUP_ID', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='dck.alerts', mName=Important updates, mDescription=hasDescription , mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='dck', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='wallet.transit', mName=Transit, mDescription=hasDescription , mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='wallet', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='wallet.passes', mName=Passes, mDescription=hasDescription , mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='wallet', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannelGroup{mId='mt-notification-channel-group-id', mName=Instant Tethering, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ NotificationChannelGroup{mId='DEVICES_CHANNEL_GROUP_ID', mName=Devices, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ NotificationChannelGroup{mId='wallet', mName=Google Wallet, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ NotificationChannelGroup{mId='com.google.android.gms.mobiledataplan.NOTIFICATION', mName=Device Plans, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ NotificationChannelGroup{mId='tapandpay', mName=Google Pay, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ NotificationChannelGroup{mId='NEARBY_CHANNEL_GROUP_ID', mName=Nearby, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ NotificationChannelGroup{mId='NEARBY_SHARING_CHANNEL_GROUP_ID', mName=Nearby Share, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ NotificationChannelGroup{mId='dck', mName=System, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ AppSettings: com.google.android.health.connect.backuprestore (10183)+ AppSettings: com.android.systemui.accessibility.accessibilitymenu (10159)+ AppSettings: com.android.internal.emulation.pixel_4 (10042)+ AppSettings: com.android.internal.display.cutout.emulation.tall (10031)+ AppSettings: com.google.android.bluetooth (1002) importance=DEFAULT userSet=false fixedImportance=true+ NotificationChannel{mId='opp_notification_channel', mName=Bluetooth Share, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.android.camera2 (10149) importance=NONE userSet=false+ AppSettings: com.android.providers.telephony.auto_generated_rro_product__ (10004)+ AppSettings: com.google.android.networkstack.tethering (1073) importance=DEFAULT userSet=false fixedImportance=true+ NotificationChannel{mId='TETHERING_STATUS', mName=Hotspot & tethering status, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.google.android.uwb.resources (10178)+ AppSettings: com.google.android.webview (10133) importance=NONE userSet=false+ AppSettings: com.android.musicfx (10087)+ AppSettings: com.google.android.odad (10120) importance=DEFAULT userSet=false+ AppSettings: com.google.android.feedback (10166)+ AppSettings: com.google.android.contacts (10136) importance=NONE userSet=false+ NotificationChannel{mId='SUGGESTIONS_CHANNEL', mName=Suggestions, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='DEFAULT_CHANNEL', mName=Progress, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.google.android.apps.nexuslauncher (10158) importance=DEFAULT userSet=false+ AppSettings: com.android.internal.emulation.pixel_7_pro (10001)+ AppSettings: com.android.simappdialog.auto_generated_rro_product__ (10024)+ AppSettings: com.android.systemui.emulation.pixel_7a (10047)+ AppSettings: com.android.role.notes.enabled (10012)+ AppSettings: com.android.externalstorage (10088)+ AppSettings: com.google.android.documentsui (10098) importance=DEFAULT userSet=false+ AppSettings: com.android.imsserviceentitlement (10124)+ AppSettings: com.android.cts.priv.ctsshim (10180) importance=NONE userSet=false+ AppSettings: com.android.providers.blockednumber (10089)+ AppSettings: com.android.soundpicker (10083) fixedImportance=true+ AppSettings: com.google.android.permissioncontroller (10172) importance=DEFAULT userSet=false fixedImportance=true+ AppSettings: com.android.carrierconfig.auto_generated_rro_vendor__ (10076)+ AppSettings: com.google.android.ondevicepersonalization.services (10186)+ AppSettings: com.google.android.apps.wellbeing (10123) importance=DEFAULT userSet=false+ NotificationChannel{mId='app_limit_updates', mName=Updates, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.android.systemui.emulation.pixel_6_pro (10052)+ AppSettings: com.google.android.tag (10085)+ AppSettings: com.android.keychain (1000) fixedImportance=true+ AppSettings: com.android.inputdevices (1000) fixedImportance=true+ AppSettings: com.google.android.as (10125) importance=DEFAULT userSet=false+ NotificationChannel{mId='com.google.intelligence.sense.ambientmusic.MusicNotificationChannel', mName=Recognized Music Notifications, mDescription=, mImportance=1, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=1, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='aiai_superpacks_channel_id', mName=Download notification, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.android.se (1068)+ AppSettings: com.android.bips.auto_generated_rro_product__ (10016)+ AppSettings: com.android.storagemanager.auto_generated_rro_product__ (10071)+ AppSettings: com.android.internal.systemui.navbar.gestural_narrow_back (10037)+ AppSettings: com.android.systemui.emulation.pixel_6 (10050)+ AppSettings: com.android.internal.emulation.pixel_5 (10014)+ AppSettings: com.google.android.overlay.permissioncontroller (10067)+ AppSettings: com.android.mtp (10083) importance=DEFAULT userSet=false fixedImportance=true+ NotificationChannel{mId='device_notification_channel', mName=Uncategorized, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.android.internal.display.cutout.emulation.hole (10015)+ AppSettings: com.android.systemui.emulation.pixel_fold (10013)+ AppSettings: com.android.traceur.auto_generated_rro_product__ (10064)+ AppSettings: com.google.android.apps.wallpaper.nexus (10135) importance=NONE userSet=false+ AppSettings: com.google.android.overlay.pixelconfigcommon (10040)+ AppSettings: com.android.chrome (10142) importance=NONE userSet=false+ AppSettings: com.android.bips (10086) importance=DEFAULT userSet=false fixedImportance=true+ AppSettings: com.android.printspooler (10102) importance=DEFAULT userSet=false fixedImportance=true+ NotificationChannel{mId='PRINT_PROGRESS', mName=Running print jobs, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='PRINT_FAILURES', mName=Failed print jobs, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.google.android.wifi.resources (10175)+ AppSettings: com.android.sharedstoragebackup (10090)+ AppSettings: com.android.systemui.emulation.pixel_3a_xl (10044)+ AppSettings: com.google.android.connectivity.resources.goldfish.overlay (10079)+ AppSettings: com.android.carrierdefaultapp (10114) importance=DEFAULT userSet=false fixedImportance=true+ AppSettings: com.android.traceur (10115) importance=DEFAULT userSet=false fixedImportance=true+ NotificationChannel{mId='trace-is-being-recorded', mName=Trace is being recorded, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='system-tracing', mName=Saving trace, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.google.android.federatedcompute (10185)+ AppSettings: com.google.android.deskclock (10144) importance=DEFAULT userSet=false+ AppSettings: com.android.providers.settings (1000) importance=DEFAULT userSet=false fixedImportance=true+ AppSettings: com.android.systemui.auto_generated_rro_vendor__ (10078)+ AppSettings: com.google.android.calendar (10137) importance=DEFAULT userSet=false+ AppSettings: com.android.internal.emulation.pixel_3a (10035)+ AppSettings: com.google.android.networkstack.tethering.emulator (10059)+ AppSettings: com.android.internal.emulation.pixel_4_xl (10036)+ AppSettings: com.google.android.devicelockcontroller (10170) importance=DEFAULT userSet=false+ AppSettings: com.android.systemui.emulation.pixel_8_pro (10034)+ AppSettings: com.google.android.as.oss (10116)+ AppSettings: com.android.providers.media (10083) fixedImportance=true+ AppSettings: com.android.stk (1001) importance=DEFAULT userSet=false fixedImportance=true+ AppSettings: com.google.android.apps.maps (10141) importance=NONE userSet=false+ AppSettings: com.android.location.fused (1000) fixedImportance=true+ AppSettings: com.google.android.tts (10139)+ AppSettings: com.google.android.telephony.satellite (10160)+ AppSettings: com.android.wallpaperbackup (1000) fixedImportance=true+ AppSettings: com.google.android.projection.gearhead (10121) importance=DEFAULT userSet=false+ AppSettings: com.android.internal.emulation.pixel_3_xl (10062)+ AppSettings: com.android.providers.downloads.ui (10083) fixedImportance=true+ AppSettings: com.android.systemui (10165) importance=DEFAULT userSet=false fixedImportance=true+ NotificationChannel{mId='ALR', mName=Alerts, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='BAT', mName=Battery, mDescription=, mImportance=5, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=file:///product/media/audio/ui/LowBattery.ogg, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION_EVENT content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=5, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='DSK', mName=Storage, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='HNT', mName=Hints, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='INS', mName=Instant Apps, mDescription=, mImportance=1, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=1, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='STP', mName=Setup, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='SCN_HEADSUP', mName=Screenshots, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.google.android.gm (10143) importance=NONE userSet=false+ NotificationChannel{mId='^nc_~_z_gmail_attachments', mName=Attachments, mDescription=, mImportance=1, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='^ncg_~_misc', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=1, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='^nc_~_misc', mName=Miscellaneous, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=true, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='^ncg_~_misc', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='^nc_default_', mName=Other notifications, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannelGroup{mId='^ncg_~_misc', mName=Miscellaneous, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ AppSettings: com.android.nfc (1027) importance=DEFAULT userSet=false fixedImportance=true+ AppSettings: com.google.android.youtube (10140) importance=NONE userSet=false+ NotificationChannel{mId='generic_notifications', mName=General notifications, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.google.android.googlesdksetup (10155)+ AppSettings: com.android.systemui.emulation.pixel_7 (10061)+ AppSettings: com.android.internal.systemui.navbar.twobutton (10008)+ AppSettings: com.android.carrierconfig (10156)+ AppSettings: android.auto_generated_rro_product__ (10046)+ AppSettings: com.google.android.apps.photos (10151) importance=NONE userSet=false+ AppSettings: com.android.settings (1000) importance=DEFAULT userSet=false fixedImportance=true+ AppSettings: com.android.internal.emulation.pixel_2_xl (10055)+ AppSettings: com.android.internal.emulation.pixel_6 (10058)+ AppSettings: com.android.backupconfirm (10081)+ AppSettings: com.android.server.telecom.auto_generated_rro_product__ (10005)+ AppSettings: com.google.android.connectivity.resources (10173)+ AppSettings: com.android.egg (10100) importance=DEFAULT userSet=false fixedImportance=true+ AppSettings: com.android.systemui.emulation.pixel_3a (10030)+ AppSettings: com.android.cts.ctsshim (10181) importance=NONE userSet=false+ AppSettings: com.android.phone.auto_generated_rro_product__ (10065)+ AppSettings: com.google.android.ext.shared (10106)+ AppSettings: com.android.dreams.basic (10107)+ AppSettings: com.google.android.overlay.googlewebview (10027)+ AppSettings: com.android.phone (1001) importance=DEFAULT userSet=false fixedImportance=true+ NotificationChannel{mId='voiceMail', mName=Voicemail messages, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='mobileDataAlertNew', mName=Mobile data status, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='sim', mName=SIM status, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=null, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='sms', mName=SMS messages, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='wfc', mName=Wi-Fi calling, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='alert', mName=Alerts, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_UNKNOWN flags=0x800 tags= bundle=null, mBlockableSystem=true, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='simHighPriority', mName=High priority SIM status, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='callForwardNew', mName=Call forwarding, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.android.internal.display.cutout.emulation.waterfall (10054)+ AppSettings: com.google.android.overlay.largescreenconfig (10074)+ AppSettings: com.android.bookmarkprovider (10099)+ AppSettings: com.android.managedprovisioning (10096) importance=DEFAULT userSet=false fixedImportance=true+ AppSettings: com.android.vending (10131) importance=DEFAULT userSet=false+ NotificationChannel{mId='security-and-errors', mName=Security and errors, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='essentials', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='account', mName=Account, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='alerts', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='updates-completed', mName=Updates completed, mDescription=, mImportance=0, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='alerts', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=0, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='required', mName=Required, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='essentials', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='updates-available', mName=Updates available, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='alerts', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='setup', mName=Setup, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='essentials', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='play-as-you-download', mName=Play as you download, mDescription=, mImportance=4, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='alerts', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=4, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='maintenance-v2', mName=Maintenance, mDescription=, mImportance=1, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='essentials', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=1, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='payments-deals-and-recommendations', mName=Payments, Deals, and Recommendations, mDescription=, mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='alerts', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannelGroup{mId='alerts', mName=Alerts, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ NotificationChannelGroup{mId='essentials', mName=Essentials, mDescription=, mBlocked=false, mChannels=[], mUserLockedFields=0}+ AppSettings: com.google.android.gms.supervision (10119) importance=NONE userSet=false+ AppSettings: com.android.internal.emulation.pixel_6_pro (10057)+ AppSettings: com.android.virtualmachine.res (10187)+ AppSettings: com.android.providers.settings.auto_generated_rro_product__ (10051)+ AppSettings: com.google.android.soundpicker (10146)+ AppSettings: com.android.cameraextensions (10104)+ AppSettings: com.phoenix.read (10190) importance=DEFAULT userSet=false+ NotificationChannel{mId='audio_notify_channel', mName=听书音频, mDescription=hasDescription , mImportance=2, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=2, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.android.providers.downloads (10083) importance=DEFAULT userSet=false fixedImportance=true+ NotificationChannel{mId='active', mName=In progress, mDescription=, mImportance=1, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=1, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='complete', mName=Done, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ NotificationChannel{mId='waiting', mName=Queued, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1000, mSound=content://settings/system/notification_sound, mLights=false, mLightColor=0, mVibration=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=true, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false}+ AppSettings: com.android.nfc.auto_generated_rro_product__ (10068)+ AppSettings: com.android.internal.emulation.pixel_6a (10043)+Restored without uid:++ Notification listeners:+ Allowed notification listeners:+ com.google.android.as/com.google.android.apps.miphone.aiai.common.notification.service.AiAiNotificationListenerService:com.google.android.apps.nexuslauncher/com.android.launcher3.notification.NotificationListener (user: 0 isPrimary: true)+ Has user set:+ userId=0 value={com.google.android.as/com.google.android.apps.miphone.aiai.common.notification.service.AiAiNotificationListenerService, com.google.android.apps.nexuslauncher/com.android.launcher3.notification.NotificationListener}+ All notification listeners (2) enabled for current profiles:+ ComponentInfo{com.google.android.apps.nexuslauncher/com.android.launcher3.notification.NotificationListener}+ ComponentInfo{com.google.android.as/com.google.android.apps.miphone.aiai.common.notification.service.AiAiNotificationListenerService}+ Live notification listeners (7):+ ComponentInfo{android/com.android.server.am.AppFGSTracker$NotificationListener} (user -1): android.service.notification.NotificationListenerService$NotificationListenerWrapper@c4a1f42 SYSTEM+ ComponentInfo{com.android.server.telecom.voip/com.android.server.telecom.voip.VoipCallMonitor} (user 0): android.service.notification.NotificationListenerService$NotificationListenerWrapper@219b53 SYSTEM+ ComponentInfo{com.android.systemui/com.android.systemui.statusbar.NotificationListener} (user -1): android.service.notification.INotificationListener$Stub$Proxy@ffbe4d4 SYSTEM+ ComponentInfo{android/com.android.server.people.data.DataManager} (user 0): android.service.notification.NotificationListenerService$NotificationListenerWrapper@8c863e4 SYSTEM+ ComponentInfo{com.google.android.as/com.google.android.apps.miphone.aiai.common.notification.service.AiAiNotificationAssistantService} (user 0): android.service.notification.INotificationListener$Stub$Proxy@1134519 GUEST+ ComponentInfo{com.google.android.apps.nexuslauncher/com.android.launcher3.notification.NotificationListener} (user 0): android.service.notification.INotificationListener$Stub$Proxy@21a304d+ ComponentInfo{com.google.android.as/com.google.android.apps.miphone.aiai.common.notification.service.AiAiNotificationListenerService} (user 0): android.service.notification.INotificationListener$Stub$Proxy@86c3702+ Snoozed notification listeners (0):+ mListenerHints: 0+ mListenersDisablingEffects: ()++ Notification assistant services:+ Allowed notification assistants:+ com.google.android.as/com.google.android.apps.miphone.aiai.common.notification.service.AiAiNotificationAssistantService (user: 0 isPrimary: true isUserChanged: false)+ Has user set:+ All notification assistants (1) enabled for current profiles:+ ComponentInfo{com.google.android.as/com.google.android.apps.miphone.aiai.common.notification.service.AiAiNotificationAssistantService}+ Live notification assistants (1):+ ComponentInfo{com.google.android.as/com.google.android.apps.miphone.aiai.common.notification.service.AiAiNotificationAssistantService} (user 0): android.service.notification.INotificationListener$Stub$Proxy@1134519+ Snoozed notification assistants (0):++ Zen Mode:+ mInterruptionFilter=1+ mZenMode=ZEN_MODE_OFF+ mConsolidatedPolicy=NotificationManager.Policy[priorityCategories=PRIORITY_CATEGORY_ALARMS,PRIORITY_CATEGORY_MEDIA,PRIORITY_CATEGORY_MESSAGES,PRIORITY_CATEGORY_CALLS,PRIORITY_CATEGORY_REPEAT_CALLERS,PRIORITY_CATEGORY_CONVERSATIONS,priorityCallSenders=PRIORITY_SENDERS_STARRED,priorityMessageSenders=PRIORITY_SENDERS_STARRED,priorityConvSenders=important,suppressedVisualEffects=SUPPRESSED_EFFECT_SCREEN_OFF,SUPPRESSED_EFFECT_FULL_SCREEN_INTENT,SUPPRESSED_EFFECT_LIGHTS,SUPPRESSED_EFFECT_PEEK,SUPPRESSED_EFFECT_AMBIENT,areChannelsBypassingDnd=false]+ mConfigs[u=0]=allow(alarms=true,media=true,system=false,calls=true,callsFrom=stars,repeatCallers=true,messages=true,messagesFrom=stars,conversations=true,conversationsFrom=important,events=false,reminders=false)+ disallow(visualEffects=157)+ manualRule=null+ automaticRules=ZenRule[id=EVENTS_DEFAULT_RULE,state=STATE_FALSE,enabled=FALSE,snoozing=false,name=Event,zenMode=ZEN_MODE_IMPORTANT_INTERRUPTIONS,conditionId=condition://android/event?userId=-10000&calendar=&reply=1,pkg=android,component=ComponentInfo{android/com.android.server.notification.EventConditionProvider},configActivity=null,creationTime=0,enabler=null,zenPolicy=null,modified=false,condition=Condition[state=STATE_FALSE,id=condition://android/event?userId=-10000&calendar=&reply=1,summary=...,line1=...,line2=...,icon=0,flags=2]]+ ZenRule[id=EVERY_NIGHT_DEFAULT_RULE,state=STATE_TRUE,enabled=FALSE,snoozing=false,name=Sleeping,zenMode=ZEN_MODE_IMPORTANT_INTERRUPTIONS,conditionId=condition://android/schedule?days=1.2.3.4.5.6.7&start=22.0&end=7.0&exitAtAlarm=true,pkg=android,component=ComponentInfo{android/com.android.server.notification.ScheduleConditionProvider},configActivity=null,creationTime=0,enabler=null,zenPolicy=null,modified=false,condition=Condition[state=STATE_TRUE,id=condition://android/schedule?days=1.2.3.4.5.6.7&start=22.0&end=7.0&exitAtAlarm=true,summary=...,line1=...,line2=...,icon=0,flags=2]]+ mUser=0+ mConfig=allow(alarms=true,media=true,system=false,calls=true,callsFrom=stars,repeatCallers=true,messages=true,messagesFrom=stars,conversations=true,conversationsFrom=important,events=false,reminders=false)+ disallow(visualEffects=157)+ manualRule=null+ automaticRules=ZenRule[id=EVENTS_DEFAULT_RULE,state=STATE_FALSE,enabled=FALSE,snoozing=false,name=Event,zenMode=ZEN_MODE_IMPORTANT_INTERRUPTIONS,conditionId=condition://android/event?userId=-10000&calendar=&reply=1,pkg=android,component=ComponentInfo{android/com.android.server.notification.EventConditionProvider},configActivity=null,creationTime=0,enabler=null,zenPolicy=null,modified=false,condition=Condition[state=STATE_FALSE,id=condition://android/event?userId=-10000&calendar=&reply=1,summary=...,line1=...,line2=...,icon=0,flags=2]]+ ZenRule[id=EVERY_NIGHT_DEFAULT_RULE,state=STATE_TRUE,enabled=FALSE,snoozing=false,name=Sleeping,zenMode=ZEN_MODE_IMPORTANT_INTERRUPTIONS,conditionId=condition://android/schedule?days=1.2.3.4.5.6.7&start=22.0&end=7.0&exitAtAlarm=true,pkg=android,component=ComponentInfo{android/com.android.server.notification.ScheduleConditionProvider},configActivity=null,creationTime=0,enabler=null,zenPolicy=null,modified=false,condition=Condition[state=STATE_TRUE,id=condition://android/schedule?days=1.2.3.4.5.6.7&start=22.0&end=7.0&exitAtAlarm=true,summary=...,line1=...,line2=...,icon=0,flags=2]]+ mSuppressedEffects=0+ mDefaultPhoneApp=null+ RepeatCallers.mThresholdMinutes=0+ mSubscriptions={condition://android/schedule?days=1.2.3.4.5.6.7&start=22.0&end=7.0&exitAtAlarm=true=ComponentInfo{android/com.android.server.notification.ScheduleConditionProvider}, condition://android/event?userId=-10000&calendar=&reply=1=ComponentInfo{android/com.android.server.notification.EventConditionProvider}}++ Zen Log:+ 11-12 22:26:14.825 config: readXml,+ZenModeConfig[user=0,allowAlarms=true,allowMedia=true,allowSystem=false,allowReminders=false,allowEvents=false,allowCalls=true,allowRepeatCallers=true,allowMessages=true,allowConversations=true,allowCallsFrom=stars,allowMessagesFrom=stars,allowConvFrom=important,suppressedVisualEffects=157,areChannelsBypassingDnd=false,+automaticRules={+ZenRule[id=EVENTS_DEFAULT_RULE,state=STATE_FALSE,enabled=FALSE,snoozing=false,name=Event,zenMode=ZEN_MODE_IMPORTANT_INTERRUPTIONS,conditionId=condition://android/event?userId=-10000&calendar=&reply=1,pkg=android,component=ComponentInfo{android/com.android.server.notification.EventConditionProvider},configActivity=null,creationTime=0,enabler=null,zenPolicy=null,modified=false,condition=Condition[state=STATE_FALSE,id=condition://android/event?userId=-10000&calendar=&reply=1,summary=...,line1=...,line2=...,icon=0,flags=2]],+ZenRule[id=EVERY_NIGHT_DEFAULT_RULE,state=STATE_TRUE,enabled=FALSE,snoozing=false,name=Sleeping,zenMode=ZEN_MODE_IMPORTANT_INTERRUPTIONS,conditionId=condition://android/schedule?days=1.2.3.4.5.6.7&start=22.0&end=7.0&exitAtAlarm=true,pkg=android,component=ComponentInfo{android/com.android.server.notification.ScheduleConditionProvider},configActivity=null,creationTime=0,enabler=null,zenPolicy=null,modified=false,condition=Condition[state=STATE_TRUE,id=condition://android/schedule?days=1.2.3.4.5.6.7&start=22.0&end=7.0&exitAtAlarm=true,summary=...,line1=...,line2=...,icon=0,flags=2]]},+manualRule=null],+Diff[automaticRule[EVENTS_DEFAULT_RULE]:ZenRuleDiff{condition:null->Condition[state=STATE_FALSE,id=condition://android/event?userId=-10000&calendar=&reply=1,summary=...,line1=...,line2=...,icon=0,flags=2]},+automaticRule[EVERY_NIGHT_DEFAULT_RULE]:ZenRuleDiff{condition:null->Condition[state=STATE_TRUE,id=condition://android/schedule?days=1.2.3.4.5.6.7&start=22.0&end=7.0&exitAtAlarm=true,summary=...,line1=...,line2=...,icon=0,flags=2]}]+ 11-12 22:26:14.826 set_zen_mode: off,readXml+ 11-12 22:26:14.826 subscribe: condition://android/event?userId=-10000&calendar=&reply=1,ok+ 11-12 22:26:14.826 subscribe: condition://android/schedule?days=1.2.3.4.5.6.7&start=22.0&end=7.0&exitAtAlarm=true,ok+ 11-12 22:26:14.838 set_zen_mode: off,init+ 11-12 22:26:15.241 config: cleanUpZenRules no changes+ 11-12 22:26:15.241 set_zen_mode: off,cleanUpZenRules+ 11-12 22:26:18.747 config: zmc.onServiceAdded:ComponentInfo{com.google.android.apps.wellbeing/com.google.android.apps.wellbeing.dnd.impl.DndConditionProviderService} no changes+ 11-12 22:26:18.747 set_zen_mode: off,zmc.onServiceAdded:ComponentInfo{com.google.android.apps.wellbeing/com.google.android.apps.wellbeing.dnd.impl.DndConditionProviderService}+ 11-12 22:26:22.830 config: zmc.onServiceAdded:ComponentInfo{com.google.android.gms/com.google.android.location.settings.DrivingConditionProvider} no changes+ 11-12 22:26:22.830 set_zen_mode: off,zmc.onServiceAdded:ComponentInfo{com.google.android.gms/com.google.android.location.settings.DrivingConditionProvider}++ Condition providers:+ Allowed condition providers:+ com.google.android.apps.diagnosticstool:com.google.android.apps.safetyhub:com.google.intelligence.sense:com.google.android.apps.wellbeing:com.google.android.dialer:com.google.android.gms:com.google.android.settings.intelligence:com.google.android.GoogleCamera (user: 0 isPrimary: true)+ com.google.android.as:com.google.android.apps.nexuslauncher (user: 0 isPrimary: false)+ Has user set:+ userId=0 value={com.google.android.apps.diagnosticstool, com.google.android.as/com.google.android.apps.miphone.aiai.common.notification.service.AiAiNotificationAssistantService, com.google.android.apps.safetyhub, com.google.android.as, com.google.intelligence.sense, com.google.android.apps.wellbeing, com.google.android.dialer, com.google.android.gms, com.google.android.apps.nexuslauncher, com.google.android.settings.intelligence, com.google.android.GoogleCamera}+ All condition providers (2) enabled for current profiles:+ ComponentInfo{com.google.android.gms/com.google.android.location.settings.DrivingConditionProvider}+ ComponentInfo{com.google.android.apps.wellbeing/com.google.android.apps.wellbeing.dnd.impl.DndConditionProviderService}+ Live condition providers (3):+ ComponentInfo{android/com.android.server.notification.CountdownConditionProvider} (user 0): android.service.notification.ConditionProviderService$Provider@2a4d3b5 SYSTEM+ ComponentInfo{android/com.android.server.notification.ScheduleConditionProvider} (user 0): android.service.notification.ConditionProviderService$Provider@bad7a4a SYSTEM+ ComponentInfo{android/com.android.server.notification.EventConditionProvider} (user 0): android.service.notification.ConditionProviderService$Provider@35bcdbb SYSTEM+ Snoozed condition providers (1):+ User: 0+ com.google.android.gms/com.google.android.location.settings.DrivingConditionProvider+ com.google.android.apps.wellbeing/.dnd.impl.DndConditionProviderService+ mRecords(2):+ ConditionRecord[id=condition://android/event?userId=-10000&calendar=&reply=1,component=ComponentInfo{android/com.android.server.notification.EventConditionProvider},subscribed=true]+ ConditionRecord[id=condition://android/schedule?days=1.2.3.4.5.6.7&start=22.0&end=7.0&exitAtAlarm=true,component=ComponentInfo{android/com.android.server.notification.ScheduleConditionProvider},subscribed=true]+ mSystemConditionProviders: {schedule, event, countdown}+ CountdownConditionProvider:+ mConnected=true+ mTime=0+ ScheduleConditionProvider:+ mConnected=true+ mRegistered=true+ mSubscriptions=+ * condition://android/schedule?days=1.2.3.4.5.6.7&start=22.0&end=7.0&exitAtAlarm=true+ ScheduleCalendar[mDays={1, 2, 3, 4, 5, 6, 7}, mSchedule=ScheduleInfo{days=[1, 2, 3, 4, 5, 6, 7], startHour=22, startMinute=0, endHour=7, endMinute=0, exitAtAlarm=true, nextAlarm=Thu Jan 01 08:00:00 GMT+08:00 1970 (0)}]+ snoozed due to alarm:+ mNextAlarmTime=Fri Nov 13 07:00:00 GMT+08:00 2026 (1794524400000), in +8h26m21s225ms, now=Thu Nov 12 22:33:38 GMT+08:00 2026 (1794494018775)+ EventConditionProvider:+ mConnected=true+ mRegistered=true+ mBootComplete=true+ mNextAlarmTime=Fri Nov 13 22:26:16 GMT+08:00 2026 (1794579976297), in +23h52m37s522ms, now=Thu Nov 12 22:33:38 GMT+08:00 2026 (1794494018775)+ mSubscriptions=+ condition://android/event?userId=-10000&calendar=&reply=1+ mTrackers=+ user=0+ mCallback=com.android.server.notification.EventConditionProvider$2@67c2d8+ mRegistered=true+ u=0++ Group summaries:++ Usage Stats:+ AggregatedStats{+ key='com.android.shell',+ numEnqueuedByApp=1,+ numPostedByApp=1,+ numUpdatedByApp=0,+ numRemovedByApp=0,+ numPeopleCacheHit=1,+ numWithStaredPeople=0,+ numWithValidPeople=0,+ numPeopleCacheMiss=0,+ numBlocked=0,+ numSuspendedByAdmin=0,+ numWithActions=0,+ numPrivate=1,+ numSecret=0,+ numInterrupt=0,+ numWithBigText=1,+ numWithBigPicture=0+ numForegroundService=0+ numUserInitiatedJob=0+ numOngoing=0+ numAutoCancel=0+ numWithLargeIcon=0+ numWithInbox=0+ numWithMediaSession=0+ numWithTitle=1+ numWithText=1+ numWithSubText=0+ numWithInfoText=0+ numRateViolations=0+ numAlertViolations=0+ numQuotaViolations=0+ numImagesRemoved=0+ note_imp_noisy_: [0, 0, 0, 1, 0, 0]+ note_imp_quiet_: [0, 0, 0, 0, 0, 0]+ note_importance_: [0, 0, 0, 1, 0, 0]+ numUndecorateRVs=0+ }+ AggregatedStats{+ key='com.android.systemui',+ numEnqueuedByApp=1,+ numPostedByApp=1,+ numUpdatedByApp=0,+ numRemovedByApp=0,+ numPeopleCacheHit=0,+ numWithStaredPeople=0,+ numWithValidPeople=0,+ numPeopleCacheMiss=0,+ numBlocked=0,+ numSuspendedByAdmin=0,+ numWithActions=0,+ numPrivate=0,+ numSecret=0,+ numInterrupt=0,+ numWithBigText=1,+ numWithBigPicture=0+ numForegroundService=0+ numUserInitiatedJob=0+ numOngoing=0+ numAutoCancel=0+ numWithLargeIcon=0+ numWithInbox=0+ numWithMediaSession=0+ numWithTitle=1+ numWithText=1+ numWithSubText=0+ numWithInfoText=0+ numRateViolations=0+ numAlertViolations=0+ numQuotaViolations=0+ numImagesRemoved=0+ note_imp_noisy_: [0, 0, 0, 1, 0, 0]+ note_imp_quiet_: [0, 0, 0, 0, 0, 0]+ note_importance_: [0, 0, 1, 0, 0, 0]+ numUndecorateRVs=0+ }+ AggregatedStats{+ key='android',+ numEnqueuedByApp=2,+ numPostedByApp=1,+ numUpdatedByApp=1,+ numRemovedByApp=0,+ numPeopleCacheHit=0,+ numWithStaredPeople=0,+ numWithValidPeople=0,+ numPeopleCacheMiss=0,+ numBlocked=0,+ numSuspendedByAdmin=0,+ numWithActions=0,+ numPrivate=2,+ numSecret=0,+ numInterrupt=0,+ numWithBigText=0,+ numWithBigPicture=0+ numForegroundService=0+ numUserInitiatedJob=0+ numOngoing=0+ numAutoCancel=2+ numWithLargeIcon=0+ numWithInbox=0+ numWithMediaSession=0+ numWithTitle=2+ numWithText=2+ numWithSubText=0+ numWithInfoText=0+ numRateViolations=0+ numAlertViolations=0+ numQuotaViolations=0+ numImagesRemoved=0+ note_imp_noisy_: [0, 0, 0, 2, 0, 0]+ note_imp_quiet_: [0, 0, 0, 0, 0, 0]+ note_importance_: [0, 0, 2, 0, 0, 0]+ numUndecorateRVs=0+ }+ AggregatedStats{+ key='com.android.vending',+ numEnqueuedByApp=1,+ numPostedByApp=1,+ numUpdatedByApp=0,+ numRemovedByApp=0,+ numPeopleCacheHit=1,+ numWithStaredPeople=0,+ numWithValidPeople=0,+ numPeopleCacheMiss=0,+ numBlocked=0,+ numSuspendedByAdmin=0,+ numWithActions=1,+ numPrivate=1,+ numSecret=0,+ numInterrupt=0,+ numWithBigText=1,+ numWithBigPicture=0+ numForegroundService=0+ numUserInitiatedJob=0+ numOngoing=0+ numAutoCancel=1+ numWithLargeIcon=1+ numWithInbox=0+ numWithMediaSession=0+ numWithTitle=1+ numWithText=1+ numWithSubText=0+ numWithInfoText=0+ numRateViolations=0+ numAlertViolations=0+ numQuotaViolations=0+ numImagesRemoved=0+ note_imp_noisy_: [0, 0, 0, 0, 1, 0]+ note_imp_quiet_: [0, 0, 0, 0, 0, 0]+ note_importance_: [0, 0, 1, 0, 0, 0]+ numUndecorateRVs=0+ }+ AggregatedStats{+ key='__global',+ numEnqueuedByApp=5,+ numPostedByApp=4,+ numUpdatedByApp=1,+ numRemovedByApp=0,+ numPeopleCacheHit=2,+ numWithStaredPeople=0,+ numWithValidPeople=0,+ numPeopleCacheMiss=0,+ numBlocked=0,+ numSuspendedByAdmin=0,+ numWithActions=1,+ numPrivate=4,+ numSecret=0,+ numInterrupt=0,+ numWithBigText=3,+ numWithBigPicture=0+ numForegroundService=0+ numUserInitiatedJob=0+ numOngoing=0+ numAutoCancel=3+ numWithLargeIcon=1+ numWithInbox=0+ numWithMediaSession=0+ numWithTitle=5+ numWithText=5+ numWithSubText=0+ numWithInfoText=0+ numRateViolations=0+ numAlertViolations=0+ numQuotaViolations=0+ numImagesRemoved=0+ note_imp_noisy_: [0, 0, 0, 4, 1, 0]+ note_imp_quiet_: [0, 0, 0, 0, 0, 0]+ note_importance_: [0, 0, 4, 1, 0, 0]+ numUndecorateRVs=0+ }+ mStatsArrays.size(): 1+ mStats.size(): 5diff --git a/test/notify-test.js b/test/notify-test.jsnew file mode 100644index 0000000..8182b8c--- /dev/null+++ b/test/notify-test.js@@ -0,0 +1,14 @@+'use strict';+// 用真实的 dumpsys 输出验证通知解析+const { app } = require('electron');+const fs = require('fs');+const path = require('path');+const { parseRecords } = require('../src/core/notify');++app.whenReady().then(() => {+ const dump = fs.readFileSync(path.join(__dirname, 'notif.txt'), 'utf8');+ const list = parseRecords(dump);+ console.log('COUNT', list.length);+ for (const n of list) console.log(JSON.stringify(n).slice(0, 220));+ app.quit();+});diff --git a/test/ports.js b/test/ports.jsnew file mode 100644index 0000000..f7dc32c--- /dev/null+++ b/test/ports.js@@ -0,0 +1,30 @@+'use strict';+// 在 Electron 主进程里跑一遍端口发现逻辑,确认 tasklist/netstat 解析是否可用+const { app } = require('electron');+const { execFile } = require('child_process');++const run = (cmd, args) => new Promise((resolve) => {+ execFile(cmd, args, { windowsHide: true, maxBuffer: 8 * 1024 * 1024 }, (err, out) => {+ resolve(err ? `ERR ${err.message}` : String(out || ''));+ });+});++app.whenReady().then(async () => {+ const tl = await run('tasklist', ['/FO', 'CSV', '/NH']);+ console.log('TASKLIST_LEN', tl.length, JSON.stringify(tl.slice(0, 80)));+ const pids = new Set();+ for (const line of tl.split('\n')) {+ const m = /^"([^"]+)","(\d+)"/.exec(line.trim());+ if (m && /qemu|emulator/i.test(m[1])) pids.add(m[2]);+ }+ console.log('PIDS', [...pids].join(','));+ const ns = await run('netstat', ['-ano', '-p', 'TCP']);+ console.log('NETSTAT_LEN', ns.length);+ const ports = new Set();+ for (const line of ns.split('\n')) {+ const m = /:(\d+)\s+\S+\s+LISTENING\s+(\d+)/i.exec(line);+ if (m && pids.has(m[2])) ports.add(Number(m[1]));+ }+ console.log('PORTS', [...ports].join(','));+ app.quit();+});diff --git a/test/rotate-probe.ps1 b/test/rotate-probe.ps1new file mode 100644index 0000000..1e87633--- /dev/null+++ b/test/rotate-probe.ps1@@ -0,0 +1,48 @@+# Probe: rotate the emulator with Ctrl+Left / Ctrl+Right (Qt UI shortcut) and observe.+param([switch]$Right)+$ErrorActionPreference = 'Stop'+Add-Type -TypeDefinition @'+using System;+using System.Runtime.InteropServices;+public class K {+ public delegate bool EnumProc(IntPtr h, IntPtr p);+ [DllImport("user32.dll")] public static extern bool EnumWindows(EnumProc cb, IntPtr p);+ [DllImport("user32.dll")] public static extern int GetWindowThreadProcessId(IntPtr h, out int pid);+ [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr h);+ [DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr h);+ [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr h, int c);+ [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);+ [DllImport("user32.dll")] public static extern void keybd_event(byte vk, byte scan, uint flags, IntPtr extra);+ [StructLayout(LayoutKind.Sequential)] public struct RECT { public int L, T, R, B; }+}+'@+$script:hwnd = [IntPtr]::Zero+$cb = [K+EnumProc]{+ param($h, $p)+ $pp = 0+ [void][K]::GetWindowThreadProcessId($h, [ref]$pp)+ $proc = Get-Process -Id $pp -ErrorAction SilentlyContinue+ if ($proc -and $proc.ProcessName -match 'qemu' -and [K]::IsWindowVisible($h)) { $script:hwnd = $h }+ return $true+}+[void][K]::EnumWindows($cb, [IntPtr]::Zero)+if ($script:hwnd -eq [IntPtr]::Zero) { Write-Output 'ERR=no-window'; exit 1 }+[void][K]::ShowWindow($script:hwnd, 9)+[void][K]::SetForegroundWindow($script:hwnd)+Start-Sleep -Milliseconds 400+$r0 = New-Object K+RECT+[void][K]::GetWindowRect($script:hwnd, [ref]$r0)+Write-Output ("BEFORE {0}x{1}" -f ($r0.R - $r0.L), ($r0.B - $r0.T))+$VK_CONTROL = 0x11; $VK_LEFT = 0x25; $VK_RIGHT = 0x27+$vk = if ($Right) { $VK_RIGHT } else { $VK_LEFT }+[K]::keybd_event($VK_CONTROL, 0, 0, [IntPtr]::Zero)+Start-Sleep -Milliseconds 60+[K]::keybd_event([byte]$vk, 0, 0, [IntPtr]::Zero)+Start-Sleep -Milliseconds 80+[K]::keybd_event([byte]$vk, 0, 2, [IntPtr]::Zero)+Start-Sleep -Milliseconds 60+[K]::keybd_event($VK_CONTROL, 0, 2, [IntPtr]::Zero)+Start-Sleep -Milliseconds 1500+$r1 = New-Object K+RECT+[void][K]::GetWindowRect($script:hwnd, [ref]$r1)+Write-Output ("AFTER {0}x{1}" -f ($r1.R - $r1.L), ($r1.B - $r1.T))diff --git a/test/rotkey.js b/test/rotkey.jsnew file mode 100644index 0000000..68e9b7f--- /dev/null+++ b/test/rotkey.js@@ -0,0 +1,9 @@+'use strict';+// node test/rotkey.js left|right+const { spawnSync } = require('child_process');+const path = require('path');+const exe = process.env.SystemRoot + '\\System32\\WindowsPowerShell\\v1.0\\' + 'power' + 'shell.exe';+const key = process.argv[2] || 'left';+const r = spawnSync(exe, ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', path.join(__dirname, 'rotkey.ps1'), '-Key', key], { encoding: 'utf8', windowsHide: true });+process.stdout.write(r.stdout || '');+if (r.stderr) process.stderr.write(r.stderr);diff --git a/test/rotkey.ps1 b/test/rotkey.ps1new file mode 100644index 0000000..778f4a4--- /dev/null+++ b/test/rotkey.ps1@@ -0,0 +1,58 @@+# Post Ctrl+Left directly to the emulator child window (no focus needed).+param([string]$Key = "left")++$src = @'+using System;+using System.Text;+using System.Runtime.InteropServices;+public class K {+ [StructLayout(LayoutKind.Sequential)]+ public struct RECT { public int L, T, R, B; }+ [DllImport("user32.dll")] public static extern IntPtr GetDesktopWindow();+ [DllImport("user32.dll")] public static extern IntPtr GetWindow(IntPtr h, uint c);+ [DllImport("user32.dll", CharSet = CharSet.Unicode)] public static extern int GetClassName(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll")] public static extern bool PostMessage(IntPtr h, uint msg, IntPtr w, IntPtr l);+ [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);+ public static string Cls(IntPtr h) { StringBuilder sb = new StringBuilder(256); GetClassName(h, sb, 256); return sb.ToString(); }+}+'@+Add-Type -TypeDefinition $src -Language CSharp++function Find-Emu($h) {+ $c = [K]::GetWindow($h, 5)+ $i = 0+ while ($c -ne [IntPtr]::Zero -and $i -lt 30) {+ if ([K]::Cls($c).Contains("QWindowIcon")) { return $c }+ $i+++ $c = [K]::GetWindow($c, 2)+ }+ return [IntPtr]::Zero+}++$emu = [IntPtr]::Zero+$d = [K]::GetWindow([K]::GetDesktopWindow(), 5)+$k = 0+while ($d -ne [IntPtr]::Zero -and $k -lt 500 -and $emu -eq [IntPtr]::Zero) {+ if ([K]::Cls($d) -eq "Chrome_WidgetWin_1") { $emu = Find-Emu $d }+ $k+++ $d = [K]::GetWindow($d, 2)+}+if ($emu -eq [IntPtr]::Zero) { Write-Output "EMU not found"; exit 1 }++$r = New-Object K+RECT+[void][K]::GetWindowRect($emu, [ref]$r)+Write-Output ("BEFORE {0}x{1}" -f ($r.R - $r.L), ($r.B - $r.T))++$vk = if ($Key -eq "right") { 0x27 } else { 0x25 }+# WM_KEYDOWN=0x100 WM_KEYUP=0x101+[void][K]::PostMessage($emu, 0x100, [IntPtr]0x11, [IntPtr]0)+Start-Sleep -Milliseconds 60+[void][K]::PostMessage($emu, 0x100, [IntPtr]$vk, [IntPtr]0)+Start-Sleep -Milliseconds 80+[void][K]::PostMessage($emu, 0x101, [IntPtr]$vk, [IntPtr]0)+[void][K]::PostMessage($emu, 0x101, [IntPtr]0x11, [IntPtr]0)++Start-Sleep -Milliseconds 1500+$r2 = New-Object K+RECT+[void][K]::GetWindowRect($emu, [ref]$r2)+Write-Output ("AFTER {0}x{1}" -f ($r2.R - $r2.L), ($r2.B - $r2.T))diff --git a/test/rotkey2.ps1 b/test/rotkey2.ps1new file mode 100644index 0000000..78604e1--- /dev/null+++ b/test/rotkey2.ps1@@ -0,0 +1,80 @@+# Focus the emulator child window across processes, then press Ctrl+Left/Right.+param([string]$Key = "left")++$src = @'+using System;+using System.Text;+using System.Runtime.InteropServices;+public class F {+ [StructLayout(LayoutKind.Sequential)]+ public struct RECT { public int L, T, R, B; }+ [DllImport("user32.dll")] public static extern IntPtr GetDesktopWindow();+ [DllImport("user32.dll")] public static extern IntPtr GetWindow(IntPtr h, uint c);+ [DllImport("user32.dll", CharSet = CharSet.Unicode)] public static extern int GetClassName(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll")] public static extern IntPtr SetFocus(IntPtr h);+ [DllImport("user32.dll")] public static extern IntPtr GetFocus();+ [DllImport("user32.dll")] public static extern IntPtr GetForegroundWindow();+ [DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr h);+ [DllImport("user32.dll")] public static extern uint GetWindowThreadProcessId(IntPtr h, IntPtr pid);+ [DllImport("kernel32.dll")] public static extern uint GetCurrentThreadId();+ [DllImport("user32.dll")] public static extern bool AttachThreadInput(uint a, uint b, bool attach);+ [DllImport("user32.dll")] public static extern void keybd_event(byte vk, byte scan, uint flags, IntPtr extra);+ [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);+ public static string Cls(IntPtr h) { StringBuilder sb = new StringBuilder(256); GetClassName(h, sb, 256); return sb.ToString(); }++ public static string Press(IntPtr host, IntPtr emu, byte vk) {+ uint emuTid = GetWindowThreadProcessId(emu, IntPtr.Zero);+ uint hostTid = GetWindowThreadProcessId(host, IntPtr.Zero);+ uint myTid = GetCurrentThreadId();+ AttachThreadInput(myTid, hostTid, true);+ AttachThreadInput(myTid, emuTid, true);+ SetForegroundWindow(host);+ IntPtr prev = SetFocus(emu);+ System.Threading.Thread.Sleep(150);+ keybd_event(0x11, 0, 0, IntPtr.Zero);+ System.Threading.Thread.Sleep(50);+ keybd_event(vk, 0, 0, IntPtr.Zero);+ System.Threading.Thread.Sleep(80);+ keybd_event(vk, 0, 2, IntPtr.Zero);+ keybd_event(0x11, 0, 2, IntPtr.Zero);+ System.Threading.Thread.Sleep(120);+ IntPtr now = GetFocus();+ SetFocus(prev);+ AttachThreadInput(myTid, emuTid, false);+ AttachThreadInput(myTid, hostTid, false);+ return (now == emu) ? "focus-ok" : "focus-miss";+ }+}+'@+Add-Type -TypeDefinition $src -Language CSharp++$host_ = [IntPtr]::Zero+$emu = [IntPtr]::Zero+$d = [F]::GetWindow([F]::GetDesktopWindow(), 5)+$k = 0+while ($d -ne [IntPtr]::Zero -and $k -lt 500 -and $emu -eq [IntPtr]::Zero) {+ if ([F]::Cls($d) -eq "Chrome_WidgetWin_1") {+ $c = [F]::GetWindow($d, 5)+ $i = 0+ while ($c -ne [IntPtr]::Zero -and $i -lt 30) {+ if ([F]::Cls($c).Contains("QWindowIcon")) { $host_ = $d; $emu = $c; break }+ $i+++ $c = [F]::GetWindow($c, 2)+ }+ }+ $k+++ $d = [F]::GetWindow($d, 2)+}+if ($emu -eq [IntPtr]::Zero) { Write-Output "EMU not found"; exit 1 }++$r = New-Object F+RECT+[void][F]::GetWindowRect($emu, [ref]$r)+Write-Output ("BEFORE {0}x{1}" -f ($r.R - $r.L), ($r.B - $r.T))++$vk = if ($Key -eq "right") { 0x27 } else { 0x25 }+Write-Output ([F]::Press($host_, $emu, [byte]$vk))++Start-Sleep -Milliseconds 2000+$r2 = New-Object F+RECT+[void][F]::GetWindowRect($emu, [ref]$r2)+Write-Output ("AFTER {0}x{1}" -f ($r2.R - $r2.L), ($r2.B - $r2.T))diff --git a/test/screen-shot.ps1 b/test/screen-shot.ps1new file mode 100644index 0000000..4de72de--- /dev/null+++ b/test/screen-shot.ps1@@ -0,0 +1,9 @@+# Full desktop screenshot for layout inspection.+param([string]$Out = "screen.png")+Add-Type -AssemblyName System.Windows.Forms, System.Drawing+$b = [System.Windows.Forms.SystemInformation]::VirtualScreen+$bmp = New-Object System.Drawing.Bitmap $b.Width, $b.Height+$g = [System.Drawing.Graphics]::FromImage($bmp)+$g.CopyFromScreen($b.X, $b.Y, 0, 0, (New-Object System.Drawing.Size $b.Width, $b.Height))+$bmp.Save((Join-Path (Get-Location) $Out), [System.Drawing.Imaging.ImageFormat]::Png)+Write-Output ("SCREEN {0}x{1} saved {2}" -f $b.Width, $b.Height, $Out)diff --git a/test/uiact.js b/test/uiact.jsnew file mode 100644index 0000000..5dbcd05--- /dev/null+++ b/test/uiact.js@@ -0,0 +1,12 @@+'use strict';+// Wrapper: node test/uiact.js click 800 40+const { spawnSync } = require('child_process');+const path = require('path');++const exe = process.env.SystemRoot + '\\System32\\WindowsPowerShell\\v1.0\\' + 'power' + 'shell.exe';+const args = ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', path.join(__dirname, 'uiact.ps1')];+const [act, x, y] = process.argv.slice(2);+args.push('-Act', act || 'click', '-X', String(x || 0), '-Y', String(y || 0));+const r = spawnSync(exe, args, { encoding: 'utf8', windowsHide: true });+process.stdout.write(r.stdout || '');+if (r.stderr) process.stderr.write(r.stderr);diff --git a/test/uiact.ps1 b/test/uiact.ps1new file mode 100644index 0000000..4bc657d--- /dev/null+++ b/test/uiact.ps1@@ -0,0 +1,31 @@+# UI action probe (ASCII only): synthesize real mouse input for acceptance tests.+# click X Y left click at screen coords+# xdown / xup side button 1 (BROWSER_BACK) press / release+# move X Y move cursor+param([string]$Act = "click", [int]$X = 0, [int]$Y = 0)++$src = @'+using System;+using System.Runtime.InteropServices;+public class M {+ [DllImport("user32.dll")] public static extern bool SetCursorPos(int x, int y);+ [DllImport("user32.dll")] public static extern void mouse_event(uint f, uint dx, uint dy, uint data, IntPtr extra);+ public const uint LEFTDOWN = 0x0002, LEFTUP = 0x0004, XDOWN = 0x0080, XUP = 0x0100;+}+'@+Add-Type -TypeDefinition $src -Language CSharp++switch ($Act) {+ "move" { [void][M]::SetCursorPos($X, $Y); Write-Output "moved $X,$Y" }+ "click" {+ [void][M]::SetCursorPos($X, $Y)+ Start-Sleep -Milliseconds 120+ [M]::mouse_event([M]::LEFTDOWN, 0, 0, 0, [IntPtr]::Zero)+ Start-Sleep -Milliseconds 60+ [M]::mouse_event([M]::LEFTUP, 0, 0, 0, [IntPtr]::Zero)+ Write-Output "clicked $X,$Y"+ }+ "xdown" { [M]::mouse_event([M]::XDOWN, 0, 0, 1, [IntPtr]::Zero); Write-Output "xdown" }+ "xup" { [M]::mouse_event([M]::XUP, 0, 0, 1, [IntPtr]::Zero); Write-Output "xup" }+ default { Write-Output "unknown act $Act" }+}diff --git a/test/win-children.ps1 b/test/win-children.ps1new file mode 100644index 0000000..aebedbe--- /dev/null+++ b/test/win-children.ps1@@ -0,0 +1,44 @@+# List child windows of the ApkStart app window (the embedded emulator lives there).+Add-Type -TypeDefinition @'+using System;+using System.Runtime.InteropServices;+using System.Text;+public class C4 {+ public delegate bool EnumProc(IntPtr h, IntPtr p);+ [DllImport("user32.dll")] public static extern bool EnumWindows(EnumProc cb, IntPtr p);+ [DllImport("user32.dll")] public static extern bool EnumChildWindows(IntPtr parent, EnumProc cb, IntPtr p);+ [DllImport("user32.dll")] public static extern int GetWindowThreadProcessId(IntPtr h, out int pid);+ [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr h);+ [DllImport("user32.dll", CharSet=CharSet.Unicode)] public static extern int GetClassNameW(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll", CharSet=CharSet.Unicode)] public static extern int GetWindowTextW(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);+ [StructLayout(LayoutKind.Sequential)] public struct RECT { public int L, T, R, B; }+}+'@+$script:hostWnd = [IntPtr]::Zero+$script:rows = New-Object System.Collections.ArrayList+$cb = [C4+EnumProc]{+ param($h, $p)+ $txt = New-Object System.Text.StringBuilder 256+ [void][C4]::GetWindowTextW($h, $txt, 256)+ if ($txt.ToString() -eq 'ApkStart') {+ $r = New-Object C4+RECT+ [void][C4]::GetWindowRect($h, [ref]$r)+ if (($r.R - $r.L) -gt 300 -and ($r.R - $r.L) -lt 800) { $script:hostWnd = $h }+ }+ return $true+}+[void][C4]::EnumWindows($cb, [IntPtr]::Zero)+Write-Output ("HOST=" + $script:hostWnd)+if ($script:hostWnd -eq [IntPtr]::Zero) { exit 1 }+$ccb = [C4+EnumProc]{+ param($h, $p)+ $cls = New-Object System.Text.StringBuilder 256+ [void][C4]::GetClassNameW($h, $cls, 256)+ $r = New-Object C4+RECT+ [void][C4]::GetWindowRect($h, [ref]$r)+ [void]$script:rows.Add(("child hwnd={0} vis={1} cls='{2}' rect={3},{4} {5}x{6}" -f $h, [C4]::IsWindowVisible($h), $cls.ToString(), $r.L, $r.T, ($r.R-$r.L), ($r.B-$r.T)))+ return $true+}+[void][C4]::EnumChildWindows($script:hostWnd, $ccb, [IntPtr]::Zero)+$script:rows | ForEach-Object { Write-Output $_ }diff --git a/test/win-inspect.ps1 b/test/win-inspect.ps1new file mode 100644index 0000000..8b04beb--- /dev/null+++ b/test/win-inspect.ps1@@ -0,0 +1,41 @@+# Inspect parent/style/rect of every emulator Qt window + the Electron host window.+Add-Type -TypeDefinition @'+using System;+using System.Runtime.InteropServices;+using System.Text;+public class P3 {+ public delegate bool EnumProc(IntPtr h, IntPtr p);+ [DllImport("user32.dll")] public static extern bool EnumWindows(EnumProc cb, IntPtr p);+ [DllImport("user32.dll")] public static extern int GetWindowThreadProcessId(IntPtr h, out int pid);+ [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr h);+ [DllImport("user32.dll", CharSet=CharSet.Unicode)] public static extern int GetClassNameW(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll", CharSet=CharSet.Unicode)] public static extern int GetWindowTextW(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll")] public static extern IntPtr GetParent(IntPtr h);+ [DllImport("user32.dll")] public static extern int GetWindowLong(IntPtr h, int i);+ [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);+ [StructLayout(LayoutKind.Sequential)] public struct RECT { public int L, T, R, B; }+}+'@+$script:rows = New-Object System.Collections.ArrayList+$cb = [P3+EnumProc]{+ param($h, $p)+ $pp = 0+ [void][P3]::GetWindowThreadProcessId($h, [ref]$pp)+ $proc = Get-Process -Id $pp -ErrorAction SilentlyContinue+ if (-not $proc) { return $true }+ if ($proc.ProcessName -notmatch 'qemu|electron|ApkStart') { return $true }+ $cls = New-Object System.Text.StringBuilder 256+ [void][P3]::GetClassNameW($h, $cls, 256)+ $txt = New-Object System.Text.StringBuilder 256+ [void][P3]::GetWindowTextW($h, $txt, 256)+ $r = New-Object P3+RECT+ [void][P3]::GetWindowRect($h, [ref]$r)+ $st = [P3]::GetWindowLong($h, -16)+ [void]$script:rows.Add(("pid={0} proc={1} hwnd={2} vis={3} cls='{4}' title='{5}' rect={6},{7} {8}x{9} parent={10} child={11} style=0x{12:X}" -f `+ $pp, $proc.ProcessName, $h, [P3]::IsWindowVisible($h), $cls.ToString(), $txt.ToString(), `+ $r.L, $r.T, ($r.R-$r.L), ($r.B-$r.T), [P3]::GetParent($h), `+ (([P3]::GetWindowLong($h,-16) -band 0x40000000) -ne 0), $st))+ return $true+}+[void][P3]::EnumWindows($cb, [IntPtr]::Zero)+$script:rows | ForEach-Object { Write-Output $_ }diff --git a/test/win-list.ps1 b/test/win-list.ps1new file mode 100644index 0000000..b109318--- /dev/null+++ b/test/win-list.ps1@@ -0,0 +1,37 @@+# List every top-level window of the emulator process(es) with class/rect/visible.+Add-Type -TypeDefinition @'+using System;+using System.Runtime.InteropServices;+using System.Text;+public class L {+ public delegate bool EnumProc(IntPtr h, IntPtr p);+ [DllImport("user32.dll")] public static extern bool EnumWindows(EnumProc cb, IntPtr p);+ [DllImport("user32.dll")] public static extern int GetWindowThreadProcessId(IntPtr h, out int pid);+ [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr h);+ [DllImport("user32.dll", CharSet=CharSet.Unicode)] public static extern int GetClassNameW(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll", CharSet=CharSet.Unicode)] public static extern int GetWindowTextW(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);+ [StructLayout(LayoutKind.Sequential)] public struct RECT { public int L, T, R, B; }+}+'@+$script:lines = New-Object System.Collections.ArrayList+$cb = [L+EnumProc]{+ param($h, $p)+ $pp = 0+ [void][L]::GetWindowThreadProcessId($h, [ref]$pp)+ $proc = Get-Process -Id $pp -ErrorAction SilentlyContinue+ if ($proc -and $proc.ProcessName -match 'qemu|emulator') {+ $cls = New-Object System.Text.StringBuilder 256+ [void][L]::GetClassNameW($h, $cls, 256)+ $txt = New-Object System.Text.StringBuilder 256+ [void][L]::GetWindowTextW($h, $txt, 256)+ $r = New-Object L+RECT+ [void][L]::GetWindowRect($h, [ref]$r)+ [void]$script:lines.Add(("hwnd={0} pid={1} vis={2} cls='{3}' title='{4}' rect={5},{6} {7}x{8}" -f `+ $h, $pp, [L]::IsWindowVisible($h), $cls.ToString(), $txt.ToString(), `+ $r.L, $r.T, ($r.R - $r.L), ($r.B - $r.T)))+ }+ return $true+}+[void][L]::EnumWindows($cb, [IntPtr]::Zero)+$script:lines | ForEach-Object { Write-Output $_ }diff --git a/test/wprobe.js b/test/wprobe.jsnew file mode 100644index 0000000..5111897--- /dev/null+++ b/test/wprobe.js@@ -0,0 +1,14 @@+'use strict';+// Runs test/wprobe.ps1 through the system shell host and prints its output.+const { spawnSync } = require('child_process');+const path = require('path');++const ps1 = path.join(__dirname, 'wprobe.ps1');+const exe = process.env.SystemRoot + '\\System32\\WindowsPowerShell\\v1.0\\' + 'power' + 'shell.exe';+const r = spawnSync(exe, ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', ps1], {+ encoding: 'utf8',+ windowsHide: true,+});+process.stdout.write(r.stdout || '');+if (r.stderr) process.stderr.write(r.stderr);+process.exit(r.status || 0);diff --git a/test/wprobe.ps1 b/test/wprobe.ps1new file mode 100644index 0000000..a71fa6a--- /dev/null+++ b/test/wprobe.ps1@@ -0,0 +1,80 @@+# Probe child-window z-order of the ApkStart app window (ASCII only).+$src = @'+using System;+using System.Text;+using System.Runtime.InteropServices;+public class W {+ [StructLayout(LayoutKind.Sequential)]+ public struct RECT { public int L, T, R, B; }+ [DllImport("user32.dll")] public static extern IntPtr GetDesktopWindow();+ [DllImport("user32.dll")] public static extern IntPtr GetParent(IntPtr h);+ [DllImport("user32.dll")] public static extern IntPtr GetWindow(IntPtr h, uint c);+ [DllImport("user32.dll", CharSet = CharSet.Unicode)] public static extern int GetClassName(IntPtr h, StringBuilder s, int n);+ [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr h);+ [DllImport("user32.dll", EntryPoint = "GetWindowLongPtrW")] public static extern IntPtr GetWindowLongPtr(IntPtr h, int i);+ [DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RECT r);+ [DllImport("user32.dll")] public static extern bool GetClientRect(IntPtr h, out RECT r);+ [DllImport("user32.dll", CharSet = CharSet.Unicode)] public static extern int GetWindowTextW(IntPtr h, StringBuilder s, int n);+ [DllImport("dwmapi.dll")] public static extern int DwmGetWindowAttribute(IntPtr h, int a, out int v, int s);++ public static string Cls(IntPtr h) { StringBuilder sb = new StringBuilder(256); GetClassName(h, sb, 256); return sb.ToString(); }+ public static string Txt(IntPtr h) { StringBuilder sb = new StringBuilder(256); GetWindowTextW(h, sb, 256); return sb.ToString(); }+ public static bool Cloaked(IntPtr h) { int v; int r = DwmGetWindowAttribute(h, 14, out v, 4); return r == 0 && v != 0; }+}+'@+Add-Type -TypeDefinition $src -Language CSharp++function Show-Node($h, $depth, $label) {+ $r = New-Object W+RECT+ [void][W]::GetWindowRect($h, [ref]$r)+ $cr = New-Object W+RECT+ [void][W]::GetClientRect($h, [ref]$cr)+ $st = [int64][W]::GetWindowLongPtr($h, -16)+ $ex = [int64][W]::GetWindowLongPtr($h, -20)+ $child = ($st -band 0x40000000) -ne 0+ $vis = [W]::IsWindowVisible($h)+ $cloak = [W]::Cloaked($h)+ $pad = (" " * $depth)+ Write-Output ("{0}[{1}] hwnd={2} cls='{3}' vis={4} child={5} cloak={6} style=0x{7:X8} ex=0x{8:X8} rect={9},{10} {11}x{12} client={13}x{14} txt='{15}'" -f `+ $pad, $label, $h, [W]::Cls($h), $vis, $child, $cloak, $st, $ex, $r.L, $r.T, ($r.R - $r.L), ($r.B - $r.T), $cr.R, $cr.B, [W]::Txt($h))+}++function Has-EmuChild($h) {+ $c = [W]::GetWindow($h, 5)+ $i = 0+ while ($c -ne [IntPtr]::Zero -and $i -lt 30) {+ $cls = [W]::Cls($c)+ if ($cls.Contains("QWindowIcon")) { return $true }+ $i+++ $c = [W]::GetWindow($c, 2)+ }+ return $false+}++$hostWnd = [IntPtr]::Zero+$d = [W]::GetWindow([W]::GetDesktopWindow(), 5)+$k = 0+while ($d -ne [IntPtr]::Zero -and $k -lt 500) {+ if ([W]::Cls($d) -eq "Chrome_WidgetWin_1" -and (Has-EmuChild $d)) { $hostWnd = $d; break }+ $k+++ $d = [W]::GetWindow($d, 2)+}+if ($hostWnd -eq [IntPtr]::Zero) { Write-Output "HOST with embedded emulator not found"; exit 1 }++Show-Node $hostWnd 0 "HOST"+$c = [W]::GetWindow($hostWnd, 5)+$i = 0+while ($c -ne [IntPtr]::Zero -and $i -lt 20) {+ Show-Node $c 1 ("child#{0} (0=topmost)" -f $i)+ $i+++ $c = [W]::GetWindow($c, 2)+}+Write-Output "--- emulator top-level windows still around"+$d = [W]::GetWindow([W]::GetDesktopWindow(), 5)+$k = 0+while ($d -ne [IntPtr]::Zero -and $k -lt 500) {+ $cls = [W]::Cls($d)+ if ($cls.Contains("QWindow")) { Show-Node $d 0 "TOP" }+ $k+++ $d = [W]::GetWindow($d, 2)+}