esedark
Multiple Android phones prepared for development and testing

android / adb / usb / device fleet

How to connect ADB to multiple Android devices

Stable multi-device control starts with explicit serials, healthy transport and isolated jobs.

ADB with multiple devices is simple at the command line and surprisingly demanding in production. Once two phones are connected, every command must identify its target. At fleet scale you also need power, USB topology, authorization, health checks, locking and logs.

Verify the transport first

Install a compatible Android Platform Tools release, enable USB debugging on authorized test devices and run adb devices -l. Each row exposes a serial and state. Fix unauthorized on the device and investigate offline before running jobs. Use powered hubs and short data cables; a charging-only cable cannot carry ADB traffic.

Target every command explicitly

Use adb -s SERIAL shell getprop ro.product.model rather than plain adb shell. Environment-specific aliases are convenient for humans, but automation should persist the real serial in a device inventory. Android emulators use values such as emulator-5554; physical USB serials vary by manufacturer.

USB and network ADB

USB is usually more predictable and keeps the control plane off the LAN. Wireless debugging can help where cables are impractical, but pairing, addressing, firewall rules and network changes add failure modes. Restrict network exposure to trusted segments and never expose ADB directly to the public internet. Rotate access and disable debugging when it is no longer required.

Design a small device coordinator

Store serial, model, OS version, connection path, status and current lease. A worker leases exactly one healthy device, sends every command with its serial, collects bounded artifacts and releases it. Quarantine devices after repeated transport or application failures. Correlate job ID, device serial, app version and timestamps for traceability.

Common mistakes

  • omitting -s when more than one device exists
  • assuming an offline device will recover during a job
  • using unpowered hubs or poor cables
  • restarting the global ADB server for one bad phone
  • letting two workers control the same device
  • using IP addresses as permanent identity
  • exposing network ADB outside a trusted segment
  • retaining screenshots, tokens or user data indefinitely

Practical checklist

  • inventory immutable serials and hardware labels
  • verify device state before leasing
  • target every command explicitly
  • map USB ports and power budget
  • isolate jobs with locks and timeouts
  • reset application state predictably
  • capture limited logs and failure screenshots
  • quarantine unhealthy devices
  • monitor disconnect and recovery rates
  • use only devices, apps and accounts you are authorized to test

When hiring a technical person makes sense

Specialist help pays off when the setup grows beyond a few phones, USB disconnects are frequent, parallel jobs collide or Appium must share the fleet. An engineer can separate host, transport, device and application failures and build safe leasing instead of fragile scripts. Continue with the Appium Android guide and the Android phone farm architecture.

Final takeaway

Multiple-device ADB is reliable when identity, ownership and health are explicit. Build observability before adding more phones. For a stable authorized mobile testing or automation system, explore my mobile automation services or contact me.