adb shell prompt "adb server is out of date." Solution

【Problem Description】

1, open the run: window + R, type cmd Enter

2, use the command adb shell can not log on Android devices, suggest the following:

adb server is out of date.  killing...

* daemon started successfully *

** daemon still not running

error: cannot connect to daemon

3, use the netstat command discovery process occupied port 5037 is adb.exe, after killing the process with taskkill command, the process will restart automatically and immediately to seize the port.

[Premise] problem

AndroidSDK configured kit adb, configuration: http://jingyan.baidu.com/article/17bd8e52f514d985ab2bb800.html ;

【Solution】

:( first try a method to turn off 91,360 other mobile phone assistant)

1, View adb tool to be used in console port number command adb nodaemon server

It found that the port number is 5037, as follows:

 
 

2, find the process of occupying the port command netstat -ano | find "5037"

PID is found that the process takes up to 6580 ports 5037, as follows:

 
 

(Supplement: cmd more content can not view the previous page, you can export oriented file format: XXX >> test.txt

Such as: netstat -ano | find "5037" >> adbtest.txt, and then began to search for adbtest.txt, see detailed documentation)

3, under normal circumstances this time using taskkill / pid 6580 / f command to release the port can kill the process, but the beginning of this article said that this move did not work. So we introduce a more prudent approach here:

First open the Task Manager, find the process with PID 6580's (if not see the PID column this information, you need to click on "View -> Select Columns -> PID process identifier"), right-click on the process name to bring up the menu, then a single click "open file location." as follows:

 
 

Then will jump to the file to start the process executable file folder (path if you are familiar with cmd command, you can also use the wmic process command to view the process), is found to account for 91 assistant adb window, I really just used and not closed. Because he has the presence of a daemon, so I use the taskkill command to kill her adb.exe process started after the daemon immediately detected and restart the process.

After closing the program, you can log in normal use adb tool equipment in the console. as follows:

 
 

Similarly, the port occupancy is also possible that some of the phone's software you install helper classes caused, such as Baidu xx, Tencent xx, 360xx and so on. Also, turn off the main program corresponding to deactivate port occupied.

Method 2 (without verification):

Modify the port adb tool. Create a new environment variable named ANDROID_ADB_SERVER_PORT, her value is the adb port to port she was not assigned a value used by other programs, such as 12345.



Author: Small-triazine triazine
link: https: //www.jianshu.com/p/c76255fdaf5a
Source: Jane book
Jane book copyright reserved by the authors, are reproduced in any form, please contact the author to obtain authorization and indicate the source.

Guess you like

Origin www.cnblogs.com/bugua/p/10949242.html