Android leases over HTTP give no adb serial: udid is the AVD name
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- android, typescript
Research direction
Read src/http/tracker.ts around line 71 and the device schema in src/contract/schemas.ts around lines 211 and 272; compare the lease response with the CLI’s device.address output. Check the Android driver fields around lines 918 and 948 to confirm the serial source. Done when the HTTP lease object exposes the device address, including the adb serial on Android, and the response contract reflects it.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 20
- Forks
- 2
- Avg merge
- 8h
- Merged PRs (30d)
- 316
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from callstackincubator/simlock
-
bug:triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
callstackincubator/simlock#778 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
callstackincubator/simlock#639 · 1 comment ·
Maintainers usually reply within 1 day
-
task:draft
Difficulty 4/5 3-5 days Newbie friendliness 35/100
callstackincubator/simlock#839 ·
Maintainers usually reply within 1 day
-
task:ready
Difficulty 5/5 Over a week Newbie friendliness 35/100
callstackincubator/simlock#838 ·
Maintainers usually reply within 1 day
-
task:ready
Difficulty 4/5 3-5 days Newbie friendliness 57/100
callstackincubator/simlock#837 ·
Maintainers usually reply within 1 day
All issues in callstackincubator/simlock
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
zts212653/clowder-ai#1678 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Progressive-Victory/the-website#680 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100