ADB Concepts : How to use commands ‘adb devices’ & ‘adb devices –l ‘ (with examples)
Command:- adb devices & adb devices -l

Please go through the below video for complete details:
Case-1:- List attached/connected android devices:
Code:
adb devices
Explanation:
adb: This is the core command of the Android Debug Bridge.
devices: This indicates that you want to list the devices attached to the ADB server.
Output:

Case-2:- List attached/connected devices with their system info
To print adb devices with status information for each device:
Code:
adb devices -l
Explanation:
adb: This is the core command of the Android Debug Bridge.
devices: This indicates that you want to list the devices attached to the ADB server.
-l: This flag requests more detailed output, which includes additional information about each device, such as the product, model, and id.
Output:

Generated response:
Serial number: — adb creates a string to uniquely identify the device by its port number.
•emulator-5554: Represents an Android emulator connected.
•1234567890ABCDEF: Represents a physical Android device.
State:(connection state of the device ) — offline, device, no device
offline: The device is not connected to adb or is not responding.
device: The device is connected to the adb server.
no device: There is no device connected.
Unauthorized: The device needs to authorize your computer to enable debugging.1.
GitHub Link:
No comments:
Post a Comment