fix(amsd): 注册表扫空自愈 (agent-250) — 根因: svcd trigger=boot 拉起 amsd 时 TF 卡未挂载, 启动首扫打空挂载点且此后永不重扫 → am start 报 pkg not registered (M2.90 真机日志实证). 修: registry_scan 改合并式重扫(只刷静态字段, 运行时状态/DECLARE路由保留, 源不可达绝不清表) + 主循环自愈重扫(源未通 3s 快重试/常态 30s 合并重扫) + am rescan 手动触发 + 兼容 M2.90 固件 launcher 旧 5 段 EV LAUNCH(nt==5 无 chain, epoch 不再错当 pid). 宿主+qemu+真机全链 PASS: 空目录启动 4s 自愈出 3 App, 真机 am start dev.player.ncm→OK(真pid)→kill 全通. meow_amsd da9a5004 / am 9e323faf (fw_content.conf 已更新, 待 M2.91 入固件闭环冷启动)
This commit is contained in:
1 parent
7cb1bdace4
commit
ca2290e691
7 files changed
+102
-31
No files matched your search
@@ -9,6 +9,7 @@
|
||||
* am history [pkg] → 事件历史(每 App 最近 8 条;无 pkg=全部)
|
||||
* am start <pkg>[/<activity>] → 经 amsd→launcher 拉起
|
||||
* am kill <pkg> → 经 amsd→launcher 终止(SIGTERM 语义)
|
||||
* am rescan → 手动触发注册表重扫(卡刚挂载/热装 App 后立即可见)
|
||||
*
|
||||
* 编译(mipsel 静态):zig-mipsel-cc -Os -Wall -Wextra -static am.c -o am
|
||||
* 宿主:gcc -Os -Wall -Wextra am.c -o am_host
|
||||
@@ -125,10 +126,15 @@ static int cmd_kill(const char *pkg)
|
||||
return am_query(line);
|
||||
}
|
||||
|
||||
static int cmd_rescan(void)
|
||||
{
|
||||
return am_query("rescan\n");
|
||||
}
|
||||
|
||||
static void usage(const char *a0)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"usage: %s [--sock <path>] status|list|history [pkg]|start <pkg>[/<act>]|kill <pkg>\n"
|
||||
"usage: %s [--sock <path>] status|list|history [pkg]|start <pkg>[/<act>]|kill <pkg>|rescan\n"
|
||||
" %s resolve <pkg> <activity> | picker <action> | picker-status [reqid]\n"
|
||||
" --sock <path> amsd socket (default %s, or $MEOW_AMS_SOCK)\n",
|
||||
a0, a0, AMS_SOCK_DEFAULT);
|
||||
@@ -181,6 +187,7 @@ int main(int argc, char **argv)
|
||||
if (!strcmp(cmd, "picker-status")) {
|
||||
return cmd_picker_status(arg);
|
||||
}
|
||||
if (!strcmp(cmd, "rescan")) return cmd_rescan();
|
||||
usage(argv[0]);
|
||||
return 2;
|
||||
}
|
||||
Reference in new issue
Block a user