adb Verified current stable Not installed? System Operations

Adb / List Devices With System Info

List Devices With System Info

Use 'adb devices -l' to enumerate connected Android devices with system details, crucial for debugging or app development.

$
Terminal
adb devices -l

When To Use

Invoke 'adb devices -l' during a critical debug session when identifying device-specific configurations like architecture, product type, or transport ID is essential to isolate integration issues or compatibility discrepancies in CI/CD pipelines.

Pro Tip

Be aware that 'adb devices -l' output might not reflect real-time connection changes. Use 'adb kill-server' followed by 'adb start-server' to refresh the device list accurately.

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
List of devices attached

Model          Serial                Device               State      
-------------------------------
Pixel 4a      1234567890abcdef     device               device     
Samsung S21   efghijklmnop12345    device               device     

Total Devices: 2

Anatomy of Output

Understanding the result

List of devices attached Header

Indicates the beginning of the device list.

3200f2a6d19cf28a device usb:338883584X product:sargo model:Pixel_3a device:sargo transport_id:1 Device Entry

Includes unique device serial, device status, connection type, product ID, and transport ID.

xxxxxxxxxxxxxxxxxx device usb:2-1.4.4 product:sunny model:Nexus device:shamu transport_id:2 Device Entry

Another entry with similar identifiers for a different device.

Power User Variants

Optimized versions

adb devices -l -t

Lists devices filtering by transport type. Useful for distinguishing USB connections from emulated sessions, altering kernel transport decisions.

adb devices -l | grep "model"

Filters output to include only devices with the 'model' keyword, streamlining focus on physical devices for kernel driver testing.

Unix Pipeline

Shell combinations

adb devices -l | awk '{print $1}' | xargs -I {} adb -s {} shell getprop ro.build.version.release

Retrieves and prints the Android version for each connected device, supporting environment build comparisons.

Troubleshooting

Common pitfalls

adb server is out of date. killing...

Solution: Ensure you have the latest ADB version. Run 'adb kill-server' and then 'adb start-server' to restart the ADB server.

error: protocol fault (no status)

Solution: Check USB cable or port. Ensure device has 'USB Debugging' enabled.

list of devices is empty

Solution: Check connection and permissions. Verify that devices are authorized for ADB debugging.

Command Breakdown

What each part is doing

adb
Base Command
The executable that performs this operation. Here it runs Adb before the shell applies any redirect operators.
-l
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Run the command: adb devices -l

  2. Step 2

    Verify output includes expected devices with system info and state.

Alternative Approaches

Comparable commands in other tools

Alternative system operations tools for the same job.