adb-devices
List connected Android devices
TLDR
List devices
List devices and their system info
SYNOPSIS
adb devices [-l]
PARAMETERS
-l
Enable long listing format, showing additional details like USB serial, product, model, and device state.
DESCRIPTION
The adb devices command is part of the Android Debug Bridge (ADB), a versatile command-line tool included in the Android SDK Platform-Tools. It displays a list of all devices and emulators connected to the ADB server, showing each device's unique serial number and current connection state.
Common states include:
• device: Fully connected and ready.
• offline: Device connected but ADB daemon unresponsive.
• unauthorized: Debugging authorized required on device.
• no permissions: Insufficient host permissions.
This command is essential for Android developers to verify device connectivity before running other ADB operations like installing apps (adb install), shell access (adb shell), or logcat viewing. It restarts the ADB server if needed and refreshes the device list. Run it frequently during development workflows to troubleshoot connection issues.
CAVEATS
Requires ADB server running (adb start-server). Devices need USB debugging enabled in Developer Options and user authorization. Wireless devices require adb connect first. May not detect sideloaded or custom ROM devices without proper drivers.
DEVICE STATES
Key states: device (ready), offline (unresponsive), unauthorized (needs RSA key accept on device screen), no permissions (udev rules or drivers missing).
TROUBLESHOOTING
Kill/restart server with adb kill-server && adb start-server. Check USB cable/port. Revoke USB debugging authorizations on device if stuck.
HISTORY
Introduced with Android SDK in 2007 as part of early AOSP tools. Evolved in Platform-Tools releases; -l option added in later versions for enhanced diagnostics. Maintained by Google for Android development.


