Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#817 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
android, typescript
Ambito
api, backend

Direzione di ricerca

Leggi src/http/tracker.ts intorno alla riga 71 e lo schema del dispositivo in src/contract/schemas.ts intorno alle righe 211 e 272; confronta la risposta del lease con l’output device.address della CLI. Controlla i campi del driver Android intorno alle righe 918 e 948 per confermare l’origine del numero seriale. Il lavoro è terminato quando l’oggetto lease HTTP espone l’indirizzo del dispositivo, incluso il numero seriale adb su Android, e il contratto della risposta lo riporta.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
20
Fork
2
Merge medio
8h
PR unite (30g)
316

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstackincubator/simlock

Tutte le issue di callstackincubator/simlock

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.