Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Android leases over HTTP give no adb serial: udid is the AVD name

未关闭 适合新手
#817 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
android, typescript
领域
api, backend

调研方向

阅读第71行附近的src/http/tracker.ts以及src/contract/schemas.ts中第211行和第272行附近的设备 schema;将 lease 响应与 CLI 的device.address输出进行比较。检查第918行和第948行附近的 Android 驱动字段,以确认序列号来源。当 HTTP lease 对象公开设备地址(包括 Android 上的 adb 序列号),且响应契约也体现这一点时,工作即告完成。

由索引模型根据 Issue 内容生成。

描述

bug:new
What happened

A lease granted over the HTTP API gives no way to reach an Android emulator with adb. The lease object's udid is the device's driver id (device.driverDeviceId, src/http/tracker.ts:71). For an Android emulator that is the AVD name (simlock_<uuid>), not the adb serial (emulator-5554) that adb -s needs. No HTTP response carries the serial: the lease object has no address field, although the contract's device record has one (src/contract/schemas.ts:211,272) and the CLI's lease line includes device.address.

So a remote agent that leases an Android device over HTTP cannot run adb -s <serial> … through POST /v1/leases/{id}/exec without first running adb devices and then adb -s <serial> emu avd name on each serial to find its own. iOS is not affected, because a simulator's driver id and its address are both the UDID.

What you expected

The HTTP lease object names the address to point tools at (the adb serial on Android, the UDID on iOS), the same value the CLI prints as device.address.

How to reproduce
  1. On a worker with Android set up and HTTP on, create an agent token: simlock token create --role agent.
  2. curl -X POST http://127.0.0.1:4701/v1/lease-requests -H "Authorization: Bearer <secret>" -H 'Content-Type: application/json' -d '{"platform":"android","model":"Pixel 8"}', then wait until the request is granted.
  3. Look at the lease object: udid is simlock_…, and no field holds emulator-5554.
  4. Compare simlock lease --platform android --device "Pixel 8" --detach, whose device.address is the serial.
Environment

main at 4cc44f82. Found while writing the website's "Remote agents over HTTP" page (PR #816), which documents the adb devices workaround.

Logs and evidence
  • src/http/tracker.ts:71: udid: device.driverDeviceId
  • src/drivers/android/index.ts:948: a running emulator's address is running.serial; :918: its deviceId is the AVD name.

Written by an agent.

主要语言
TypeScript
星标
20
派生
2
平均合并
8 小时 10 分钟
30 天内合并 PR
354

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

callstackincubator/simlock 的其他 Issue

查看 callstackincubator/simlock 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。