Files
RemoteCompilation/docs/deployment-192.168.5.222.md
T

58 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Windows 192.168.5.222 部署记录
日期:2026-11-24(Asia/Shanghai)。
## 运行环境
- Windows 11 x64,观察到系统版本 10.0.26300.9974。
- SSH 用户 tt;具有管理员权限;登录密码未写入文件。
- Android SDK:`D:\AndroidSdk\Windows`,已存在完整平台、Build Tools 和 licenses。
- JAVA_HOME:`C:\Program Files\Java\jdk-25.0.3`。未修改系统全局环境变量。扫描范围内只找到 JDK25 和用户目录中的旧 JBR11,暂未确认 JDK17/21。
## 已安装
- 服务名:`RemoteCompile`,状态 Running,Automatic 延迟启动。
- 运行账户:`NT AUTHORITY\LocalService`。
- 程序及配置:`C:\ProgramData\VibeCodingRemoteCompilation\bin`。
- 服务包装器:官方 WinSW 2.12.0 x64;文件上传前后 SHA-256 已核对。
- 数据:`C:\ProgramData\VibeCodingRemoteCompilation\data`。
- 缓存与用户目录:`C:\ProgramData\VibeCodingRemoteCompilation\home`。
- 日志:`C:\ProgramData\VibeCodingRemoteCompilation\logs`。
- 服务端监听:`127.0.0.1:8765`;未增加明文接口防火墙入站规则。
- Gradle 任务白名单:`:app:assembleDebug`。
## 本机插件配置
| 字段 | 值 |
| --- | --- |
| 地址 | `http://127.0.0.1:18765` |
| Token | 本机 `.deployment/client-token-192.168.5.222.txt`,复制到插件 PasswordSafe |
| 任务 | `:app:assembleDebug` |
| adb 与设备 | 使用本机 adb,指定设备序列号 |
已建立 SSH 隧道:本机 18765 → tt@192.168.5.222 → 服务器 127.0.0.1:8765。该隧道不设为开机启动;重新连接可运行 `examples/connect-192.168.5.222.ps1`,终端保持开启。
Ubuntu 192.168.5.224 的本机 8765 隧道和 Token 文件未被替换。
服务器 Token 在受 ACL 保护的 `bin\RemoteCompileService.xml`;给 tt 的副本在 `C:\Users\tt\.remotecompile-service-token.txt`。本机凭据在被 Git 忽略的 `.deployment/` 目录,不包含 SSH 密码。
## 验证结果
- 认证健康接口通过;本机经 SSH 隧道返回 HTTP 200,os=windows。
- 以 LocalService 账户启动 JDK,通过环境变量读取 SDK android-35 的 android.jar,并成功执行 Build Tools 35.0.0 的 aapt2。
- 源码同步、模拟构建、独立 APK 产物下载与 SHA-256 校验通过。
- 验收 buildId:`1063235cb4c172b6b725995b9cdd00be`。
- 验收产物是模拟文件,不是真实 Android APK,不能安装。
## 实际项目构建前
JDK25 与旧版 Gradle 不兼容。根据实际项目的 Gradle/AGP 版本配置 JDK17 或 JDK21,然后编辑 `bin\RemoteCompileService.xml` 中的 JAVA_HOME 并重启服务。本次未安装新 JDK,也未执行实际项目构建或手机安装。
管理命令(管理员 PowerShell):
```powershell
Get-Service RemoteCompile
Restart-Service RemoteCompile
Get-Content 'C:\ProgramData\VibeCodingRemoteCompilation\logs\*.log' -Tail 30
```