Before I spoke this instruction, I started a mobile phone simulator called "galaxy_nexus_4.4.2" (sometimes called Android virtual device), and I connected my phone device to my PC via USB cable, then I applied "Android screen Monitor "tool captures the screen information to my physical phone, running after the phone simulator and physical phone screen display, shown in 3-7.
Usually when we are testing, the most likely to use is to view the information about the device, with what instructions can be used to understand our physical testing equipment or simulator related information?
I tell everyone that an instruction can be implemented, which is the "ADB devices" directive, through which the user can learn about the status of the currently connected device/emulator. You can enter "ADB devices" in the command line console, which displays information 3-8.
From Figure 3-8, we can see that its output information mainly includes 2 columns of content, the first column is the device's serial number information, and the second is the status of the device information.
The serial number of a device is a string of characters that uniquely represents a simulator or a physical device, usually the simulator is the "< device type >-< port number >" In the form of its serial number, figure 3-8 shows the "5554:galaxy_nexus_4.4.2", Indicates that the device is of type "galaxy_nexus_4.4.2" and is listening on a 5554-port emulator instance. and "4df7b6be03f2302b" means the serial number of the physical phone device connected to our PC.
Figure 3-7 Related display information after performing "ADB help"
Figure 3-8 Related display information after performing "ADB devices"
The status information may contain the following 3 different states.
(1) Device status: This status indicates that the device or emulator is connected to the ADB server. However, this status does not mean that the physical phone device or emulator has been started and can be operated on, as the Android system will be connected to the ADB server at startup, but the device or simulator is usually the state when the Android system is booted.
(2) Offline status: This status indicates that the device or emulator is not connected to the ADB server or is not responding.
(3) No device status: This status indicates that there is no physical device or simulator connection.
Example of ADB devices instruction