Android leases over HTTP give no adb serial: udid is the AVD name
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- android, typescript
調査の方向性
src/http/tracker.tsの71行目付近と、src/contract/schemas.tsの211行目および272行目付近にあるデバイススキーマを読み、leaseレスポンスとCLIのdevice.address出力を比較してください。Androidドライバーの918行目および948行目付近のフィールドを確認し、シリアル番号の取得元を確かめてください。HTTP leaseオブジェクトがAndroidのadbシリアル番号を含むデバイスアドレスを公開し、レスポンス契約にも反映されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- On a worker with Android set up and HTTP on, create an agent token:
simlock token create --role agent. 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 isgranted.- Look at the lease object:
udidissimlock_…, and no field holdsemulator-5554. - Compare
simlock lease --platform android --device "Pixel 8" --detach, whosedevice.addressis 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.driverDeviceIdsrc/drivers/android/index.ts:948: a running emulator'saddressisrunning.serial;:918: itsdeviceIdis the AVD name.
Written by an agent.
- 主要言語
- TypeScript
- スター
- 20
- フォーク
- 2
- 平均マージ
- 8時間
- マージ済み PR(30日)
- 316
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstackincubator/simlock のほかの issue
-
bug:triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
callstackincubator/simlock#778 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
callstackincubator/simlock#639 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
task:draft
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
callstackincubator/simlock#839 ·
メンテナーはふだん 1 日以内に返信
-
task:ready
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
callstackincubator/simlock#838 ·
メンテナーはふだん 1 日以内に返信
-
task:ready
難易度 4/5 3〜5日 初心者へのやさしさ 57/100
callstackincubator/simlock#837 ·
メンテナーはふだん 1 日以内に返信
callstackincubator/simlock の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
zts212653/clowder-ai#1678 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
Progressive-Victory/the-website#680 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100