Compare commits

...
Author SHA1 Message Date
QiuSWandClaude Opus 5.5 59a483f53a docs: mirror wiki for Agent APK signing per device (#385 #386)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTDbDcwbDw1TSAcE6wfh2F
2026-10-13 09:38:38 +08:00
QiuSWandClaude Opus 5.5 328afde919 chore(android): bump Agent to 0.9.71 (84) (#385 #386)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTDbDcwbDw1TSAcE6wfh2F
2026-10-13 09:22:22 +08:00
QiuSWandClaude Opus 5.5 afa03ef3e4 merge: drop diagnostic record lock to avoid deadlock (#386)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTDbDcwbDw1TSAcE6wfh2F
2026-10-13 09:22:16 +08:00
QiuSWandClaude Opus 5.5 71165b1fe7 fix(android): drop object lock on diagnostic record to avoid deadlock (#386)
AgentDiagnosticStore.record() held the helper monitor (@Synchronized) while
waiting for the SQLite write connection, while failure-snapshot and sync
diagnostic transactions held the connection and re-entered
getWritableDatabase() (same monitor). The inverted lock order deadlocked and
blocked the sync/heartbeat thread forever (seen on purchase device 1).
record() only touches locals inside its own transaction and is called from a
single-thread executor, so the monitor is unnecessary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTDbDcwbDw1TSAcE6wfh2F
2026-10-13 09:22:04 +08:00
QiuSWandClaude Opus 5.5 7c0d37b512 merge: pause task claiming when accessibility is not ready (#385)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTDbDcwbDw1TSAcE6wfh2F
2026-10-13 09:21:50 +08:00
3 changed files with 23 additions and 5 deletions
+2 -2
View File
@@ -11,8 +11,8 @@ android {
applicationId = "cn.ilapage.goauto.agent"
minSdk = 23
targetSdk = 34
versionCode = 83
versionName = "0.9.70"
versionCode = 84
versionName = "0.9.71"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -166,7 +166,6 @@ class AgentDiagnosticStore(context: Context) : SQLiteOpenHelper(context, DATABAS
}
}
@Synchronized
fun record(event: AgentDiagnosticEvent) {
require(event.taskId > 0)
require(event.taskType in setOf("collection", "purchase"))
+21 -2
View File
@@ -2,8 +2,8 @@
generated: true (请先修改 Gitea Wiki,禁止直接编辑本文件)
wiki_page: Deployment-and-Operations
wiki_url: https://git.ilapage.cn/OPC/goauto/wiki/Deployment-and-Operations.-
wiki_revision: 7e91eea0ec077f5af813375bdd94d8878e7e16d7
synchronized_at: 2026-10-12T15:16:03Z
wiki_revision: 37630e95b7e03248546467826525f45921033f74
synchronized_at: 2026-10-13T01:37:19Z
<!-- gitea-wiki-mirror:end -->
<!-- gitea-wiki-mirror:start -->
@@ -347,6 +347,25 @@ Provider 故障日志只允许记录调用关联 ID、操作类型、耗时、
- 换机生成的调试签名与旧机不同会导致 `INSTALL_FAILED_UPDATE_INCOMPATIBLE`;不可为更新擅自卸载。用户提供的原调试签名已与手机证书核对一致,私有文件位于 `D:/OPC/goauto/debug.keystore`,仅在本地Git排除规则中忽略,绝不提交。应另行私密备份,不能重新生成替代。
- 当前Windows用户级 `C:/Users/Qiu/.gradle/init.d/goauto-debug-signing.gradle` 使用Android Components的 `finalizeDsl`,仅对applicationId `cn.ilapage.goauto.agent` 的debug签名指定原文件;其他项目及release配置不变。普通Gradle调试构建自动生效,文件缺失则明确失败,不退回新签名。更换电脑或GRADLE_USER_HOME时需带入相同私有文件及配置;不要把本机设置当作仓库内或其他电脑已配置。构建后用signingReport与apksigner复核,再以install -r更新。
### Agent 装机签名对照(2026-10-13 核对)
采购机和测试机上已装的 Agent 签名不同,装包前必须按目标设备选对签名:
| 设备 | 序列号 | 已装证书 SHA-256 | 签名文件 |
|---|---|---|---|
| 采购1(PKG110) | `3B65BD02H7F00000` | `bf86d7465c6092be74ce9c4187eb30c9a7d045c3b91891a547e2598429766dec` | `D:/OPC/goauto/debug.keystore`(私有,不提交) |
| 采购2(PLY110) | `3B663A00JW500000` | 同采购1 | 同采购1 |
| 测试机(PLY110) | `3B668T01GF400000` | `3eab2527dc3ce592fe22f2f8cc31e4d0fa07dd1fa54b6209948ea6ce9cd7c4f6` | `C:/Users/Qiu/.android/debug.keystore` |
- 本机 Gradle 调试构建产物已经是采购机签名(由上面的 init 脚本强制),可以直接装采购机;装测试机前需用 apksigner 以测试机签名改签。
- 装包前逐台核对:
- `ro.serialno` 确认目标设备(USB 连接的手机不一定是测试机);
- 用 `pm path` 拉取已装 `base.apk`,比较它与待装 APK 的 `apksigner verify --print-certs`;
- 设备空闲,没有待执行或执行中的任务。
- 签名不一致会报 `INSTALL_FAILED_UPDATE_INCOMPATIBLE`,**不得卸载重装**:卸载会清掉设备凭据和本地采购数据。
- 装完后手动打开 Agent,等待心跳恢复;无障碍显示未连接时,在系统设置中把 GoAuto 关闭后重新打开(#385)。
- 2026-10-13 记录:0.9.71(84,main `328afde`)测试机包 SHA256 `10ad5a2b898230897b15a54f73212ae56a11fcf2f73beffc0392321699d7cf00`,采购1 包 SHA256 `3004cda3784182381e98ce9953cabcdba4017eb535c8578a2b317b3a7303e6ab`,均以 `install -r` 覆盖安装,未卸载。
## Android 商品导航诊断(#373,诊断阶段)