# Keeping track of 100+ Android test devices: 8 practices for naming, tagging and access

> Source: <https://dev.to/aleena_khan_b2f4d6c5df6c4/keeping-track-of-100-android-test-devices-8-practices-for-naming-tagging-and-access-584p>
> Published: 2026-11-24 19:37:58+00:00

**Recommendation:** Generate your device inventory from scheduled `adb devices -l` output and key each record by a stable identifier like the AVD name or USB serial, not the emulator port or network address.
More in the playbook "Running AI in production": <https://wpnews.pro/playbooks/production-ops>

To manage 100+ Android test devices, give each one a role-based name and key its record by the one identifier that doesn't drift. Tag it from a short shared vocabulary, assign one owning team, and keep its state in a note. Then build the inventory from `adb` output on a schedule instead of a hand-kept spreadsheet. This works the same for physical phones, emulators and cloud Android phones.

**Updated November 2026**

*This article was written by AI from a human brief. Every fact links to or names its source, and the script below was run against the sample output in Android's adb documentation.*

This is a documentation comparison, not a device-lab test. On 24 November 2026 I read Android's [adb documentation](https://developer.android.com/tools/adb) and its emulator and `avdmanager` pages. I also read AWS's private devices guide, the DeviceFarmer STF README and Multilogin's product and help pages.

Three dashboards appear as examples: DeviceFarmer STF, AWS Device Farm private devices, and Multilogin, a cloud Android phone platform for multi-account management. I judged each on device types covered, tagging, bulk actions and export, and access control.

I also read recent reviews and issues on G2, Capterra and GitHub. The script was tested with Python 3.12 against a stub `adb` replaying the documented `adb devices -l` sample, not a real fleet.

The short version: name by role, key by a stable ID, tag consistently, assign owners, track state, control access, and generate the inventory.

`emulator-5554`.` key:value` tags such as `api:34` or `purpose:smoke`. Free text forks fast: `smoke`, `Smoke` and `smoke-test` become three tags for one idea.
Encode only what never changes, in a fixed order and in lowercase. My format is `<kind>-<form>-<home>-<nnn>`:

`kind`: `phy` for physical, `emu` for emulator, `cld` for cloud Android phone`form`: `ph` phone, `tb` tablet, `fd` foldable`home`: the shelf, CI host or cloud region that holds it` nnn`: a three-digit number, retired with the device

```
phy-tb-shelf2-041    tablet on shelf 2, USB to lab host 1
emu-ph-ci03-012      phone AVD on CI host 3
cld-ph-eu1-118       cloud Android phone in an EU region
```

What's left out matters more. API level changes with every OS update, and ownership changes with every reorg. Both belong in tags, where a change is one edit rather than a rename everywhere.

For emulators, make the AVD name and the inventory name the same string. Android's `avdmanager` sets the name with `create avd -n` and renames in place with `move avd -n <old> -r <new>`.

Only two of the six identifiers I checked stay put on their own: a USB phone's hardware serial and an emulator's AVD name. The other four can change or vanish without anyone editing your records.

I traced each one through official documentation on 24 November 2026:

| Identifier | Example | Set by | What changes it | 
|---|---|---|---|
| USB serial | `0a388e93` | manufacturer | nothing, but it isn't always unique | 
| Emulator serial | `emulator-5554` | adb, from the console port | the port the emulator started on | 
| Network serial | `0.0.0.0:6520` | adb, from the address | any change of IP or port | 
| AVD name | `Pixel_8_API_35` | you | only a deliberate rename | 
| Device Farm instance ARN | one per device | AWS | hardware replacement | 
| Device Farm instance label | your text | you | lost on hardware replacement | 

The emulator serial, network serial and instance ARN all change without anyone touching the record. Per AWS's guide, a replacement instance also loses the old device's labels. Even the USB serial has a catch: STF's README describes a budget Android 4.4 device whose serial is `0123456789ABCDEF`.

Two habits follow. Key emulators by AVD name, which `adb -s <serial> emu avd name` returns per the emulator console docs. And if a provider can swap hardware, put each tag on several devices so a pool survives a replacement. That lesson comes from Device Farm's docs, but it fits any hosted device service.

They differ most on who owns the hardware and what happens when it's replaced. Here are three on the same four points.

|  | DeviceFarmer STF | AWS Device Farm (private) | Multilogin | 
|---|---|---|---|
| Devices | physical, on your hosts | physical, hosted by AWS | cloud Android phones | 
| Organizing | attribute search, groups with schedules | instance labels, device pools | colour tags, notes, custom columns | 
| Bulk and automation | bulk removal by filter, REST API | pools via console, CLI or API | bulk actions, data export, API, ADB | 
| Access | groups of users and devices | IAM identity-based policies | team seats and permissions | 

My take: if the hardware sits on your own shelves, STF is built for that. If you want AWS to own the devices and run test jobs, Device Farm fits. If your fleet mixes app testing with account-based work on cloud Android phones, Multilogin fits. None sees past its own boundary, hence the registry below.

Run one script per adb host on a schedule, merge its output with a registry kept in git, and alert on anything unregistered or missing.

`adb_inventory.py` v1.0.0 uses three documented commands: `adb devices -l`, `adb -s <serial> shell getprop` and `adb -s <serial> emu avd name`. Property names such as `ro.build.version.sdk` come from AOSP build files. The registry maps a key to a name, owner and tags, with `avd:<name>` keys for emulators:

```
{
  "0a388e93": {"name": "phy-tb-shelf2-041", "owner": "qa-payments", "tags": ["api:23", "form:tablet"]},
  "avd:Pixel_8_API_35": {"name": "emu-ph-ci03-012", "owner": "platform", "tags": ["api:35", "purpose:smoke"]}
}
```

The script:

``` bash
#!/usr/bin/env python3
"""adb_inventory.py: list adb-visible Android devices and check them against a registry.

Uses only adb commands from developer.android.com/tools/adb and the
emulator console docs. Python 3.8+, standard library only.
"""
import csv
import json
import os
import socket
import subprocess
import sys
from datetime import datetime, timezone

__version__ = "1.0.0"
ADB = os.environ.get("ADB_PATH", "adb")
PROPS = {
    "manufacturer": "ro.product.manufacturer",
    "model": "ro.product.model",
    "android": "ro.build.version.release",
    "api": "ro.build.version.sdk",
}
FIELDS = ["checked_at", "host", "status", "name", "owner", "tags", "key",
          "serial", "kind", "state", "avd"] + list(PROPS)

def adb(*args, timeout=15):
    try:
        res = subprocess.run([ADB, *args], capture_output=True,
                             text=True, timeout=timeout)
        return res.stdout.strip()
    except (OSError, subprocess.TimeoutExpired):
        return ""

def connected():
    """Parse `adb devices -l` into dicts."""
    listing = adb("devices", "-l")
    if "List of devices" not in listing:
        sys.exit("adb returned no device list: check ADB_PATH and the adb server")
    for line in listing.splitlines():
        if not line.strip() or line.startswith(("List of devices", "*")):
            continue
        parts = line.split()
        state = parts[1] if len(parts) > 1 else "unknown"
        yield {"serial": parts[0], "state": state}

def kind_of(serial):
    if serial.startswith("emulator-"):
        return "emulator"
    return "network" if ":" in serial else "usb"

def describe(dev):
    serial = dev["serial"]
    row = {"serial": serial, "state": dev["state"], "kind": kind_of(serial),
           "avd": "", **{k: "" for k in PROPS}}
    if dev["state"] == "device":
        for key, prop in PROPS.items():
            row[key] = adb("-s", serial, "shell", "getprop", prop)
        if row["kind"] == "emulator":
            lines = adb("-s", serial, "emu", "avd", "name").splitlines()
            row["avd"] = lines[0].strip() if lines else ""
    # Emulator serials follow the console port, so key emulators by AVD name.
    row["key"] = "avd:" + row["avd"] if row["avd"] else serial
    return row

def main(registry_path):
    with open(registry_path, encoding="utf-8") as fh:
        registry = json.load(fh)
    now = datetime.now(timezone.utc).isoformat(timespec="seconds")
    base = {"checked_at": now, "host": socket.gethostname()}
    devices = list(connected())
    out = csv.DictWriter(sys.stdout, fieldnames=FIELDS)
    out.writeheader()
    seen = set()
    for dev in devices:
        row = {**base, **describe(dev)}
        entry = registry.get(row["key"])
        seen.add(row["key"])
        row["status"] = "registered" if entry else "UNREGISTERED"
        entry = entry or {}
        row["name"] = entry.get("name", "")
        row["owner"] = entry.get("owner", "")
        row["tags"] = " ".join(entry.get("tags", []))
        out.writerow(row)
    for key, entry in registry.items():
        if key not in seen:
            out.writerow({**base, "status": "MISSING", "key": key,
                          "name": entry.get("name", ""),
                          "owner": entry.get("owner", ""),
                          "tags": " ".join(entry.get("tags", []))})

if __name__ == "__main__":
    if len(sys.argv) != 2 or sys.argv[1] in ("-h", "--help"):
        sys.exit(f"adb_inventory {__version__}\nusage: adb_inventory.py registry.json")
    main(sys.argv[1])
```

Run it from cron on each host, for example every weekday at 07:00:

```
0 7 * * 1-5 cd /opt/inventory && python3 adb_inventory.py registry.json > "out/$(hostname)-$(date +\%F).csv"
```

Against the stub, columns trimmed, the output looked like this:

```
status,name,owner,key,serial,kind,state
UNREGISTERED,,,avd:Tablet_API_35,emulator-5556,emulator,device
registered,emu-ph-ci03-012,platform,avd:Pixel_8_API_35,emulator-5554,emulator,device
registered,phy-tb-shelf2-041,qa-payments,0a388e93,0a388e93,usb,device
UNREGISTERED,,,0.0.0.0:6520,0.0.0.0:6520,network,offline
MISSING,phy-ph-shelf1-007,qa-growth,R58M00000000,,,
```

Design choices worth knowing before you adopt it:

`host` column matters.
Give each device a role-based name, a stable key, shared tags and one owner. Then generate the inventory from adb output on a schedule and diff it against a registry in git.

Yes. Use the same format with a different kind code, and make the AVD name match the inventory name. Don't key emulators by `emulator-5554`, because that serial follows the console port.

Remove them from the dashboard or device group first. Then revoke adb debugging authorizations on the device itself. Android's docs note that this unpairs every workstation, so CI hosts need approving again.

Multilogin documents full ADB access for its cloud phones, so the same adb commands apply once a phone is connected. Its desktop app adds colour tags, notes, bulk actions and data export. Cloud phones can't receive SMS or calls, so tests that need a one-time code need a separate number.
