Song Zhihui
Android Debug brideg (ADB) is a multi-purpose command-line tool. You can communicate with an Android virtual machine or connect to a real machine. It also provides access to advanced command-line operations on the device shell. It is a client-server program that contains the following three parts:
- A client that runs on your development device. You can invoke a client from the shell with the ADB command. or create ADB clients via ADT plug-ins and Ddms.
- A server that runs as a background process on your development device. The server is responsible for communication between the client and the ADB daemon in the virtual machine or device.
- A daemon that runs a background process on a virtual machine and a device.
You can find the ADB tool in/platform-tools/.
When you start an ADB client, the client first checks to see if there is already a service-side process running. If not, the server-side process is started. When the server-side process runs, with the local TCP 5037 port, and listens for commands originating from the client-all ADB clients communicate with the ADB server through 5037 ports.
Next, the server establishes a connection to all running virtual machines and devices. It identifies an instance of a running virtual machine or device by scanning an odd port of 5555 to 5585 ports. When the server discovers an ADB daemon, the connection is established through this port. It is important to note that each virtual machine or device requires two ports: an even port for console connection, and an odd port for ADB connections.
Like what:
Song Zhihui Virtual machine, console port: 5554
Song Zhihui virtual machine, adb port: 5555
Android Official commands Android Debug Bridge (ADB) (not finished)