Detailed explanation of adb's principle and its total restart, and detailed explanation of adb's principle restart
1. adb (Android Debug Bridge) indicates the android debugging Bridge.
It is a command line tool in the android system that can communicate with android devices or simulators.
ADB is a C/S architecture application, which consists of three parts:
1) adb client, running on PC (for DDMS, that is, IDE)
2) adb daemon (daemon), running on Emulator (for VM interaction with Emulator );
3) The adb server (Service Process) runs on the PC (task manager) and manages the communication between the adb client and the adb daemon. The communication port between the server and the client is 5037, and the adb server interacts with emulator. The two ports are used, and the other is 5554, which is used to connect to the Emulator instance, then the data can be forwarded from the Emulator to the IDE console, and the other is 5555. The connection is dedicated to adb daemon for later debugging.
PS: Emulator/Device occupies two (A group) ports, one of which is an even number of 5554 and the other is an odd number of 5555.
If other Emulator is enabled, the other port group used is 5556,5557 until 5585.
When the adb server is enabled, the connection to the simulator is established by finding the port between 5555-5585. After the connection is established, the adb commands can be used.
2. DDMS
When developing in Eclipse development tools, you can open the DDMS panel in the upper right corner. Debugging and monitoring services for Dalvik virtual machines on devices in the Android development environment. It provides us with a screenshot for the test device, for example, view running threads and heap information, Logcat, broadcast status information, analog call, receive SMS, virtual geographic coordinates, and other services for specific processes. After the DDMS is started, the ADB service is automatically called to start the ADB service, instead of manually starting the ADB tool. Because adb starts when a data cable is used to connect the device to the computer (provided that the "USB debugging" mode is enabled on the android device first ). Software such as mobile assistant is mainly used to obtain and operate apps on mobile phones by calling adb or ddms. I personally feel that due to the many things involved, the problem of data lines, the problem of hardware interfaces, and the problem of whether adb and ddms can be started smoothly, sometimes the adb will start up, or always restart.
3. Problem
Because adb starts when a data cable is used to connect the device to the computer (provided that the "USB debugging" mode is enabled on the android device first ). Software such as mobile assistant is mainly used to obtain and operate apps on mobile phones by calling adb or ddms. I personally feel that due to the many things involved, the problem of data lines, the problem of hardware interfaces, and the problem of whether adb and ddms can be started smoothly, sometimes the adb will start up, or always restart.
4. Solution
A foreigner summarized the following comprehensively:
Try below steps:
1. Close the Eclipse if running
2. Go to the Android SDK tools directory in Command Prompt
3. type adb kill-server
4. then type adb start-server
5. No error message is thrown while starting ADB server, then adb is started successfully.
6. Now you can start Eclipse again.
7. I need to add another one and restart my computer.
It worked for me this way, Eclipse shoshould be closed before issuing these commands.
The premise is that your adb has been configured. If it is still didn 'tack' at this time, you can turn it off when the task manager is started, and then repeat the above actions.
This problem is an old and difficult problem in development. Using the above method, it is too difficult to solve the problem similar to "ADB server didn't ACK * failed to start daemon" several times.
Connection to adb is reduced and a serious error has occurred. You must restart adb with Eclipse to ensure that the correct adb is located
Run adb.exe from the command line to see if it can be used. It cannot be executed. Such problems are rare. Unless the OS version is incorrect.
How can this problem be solved? Adb cannot be started, adb cannot be found in task manager, and adb cannot be restarted in ddms.
Restart eclipse. If not, press adb kill-server and press ENTER adb start-server in cmd.