Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve this adb server version doesn't match this client error in android?

adb server version (39) doesn't match this client (40); killing...
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon
adb: error: failed to get feature set: protocol fault (couldn't read status): Connection reset by peer
* daemon not running; starting now at tcp:5037
* daemon started successfully
- waiting for device -
error: protocol fault (couldn't read status): Connection reset by peer
like image 821
vijay kumar Avatar asked Sep 21 '18 12:09

vijay kumar


People also ask

How do I fix an adb connection error?

In tools menu,Android-> untick enable adb Integration and Then OPEN widows task manager n manually end process adb.exe This also solved my issue as der were multiple adb.exe running. Show activity on this post. Restart the computer. Now, disconnect the device, connect it, Make sure USB debugging Option is enabled.

What is adb server and client?

Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. It is a client-server program that includes three components: A client, which runs on your development machine.

How do I install the latest version of adb?

adb is included in the Android SDK Platform-Tools package. You can download this package with the SDK Manager, which installs it at android_sdk /platform-tools/ . Or if you want the standalone Android SDK Platform-Tools package, you can download it here.


1 Answers

I have the same issue when running adb devices command.

adb devices
List of devices attached
adb server version (36) doesn't match this client (40); killing...
* daemon started successfully
2322dc3d    device

I ran command which adbwhich gave me the location of the adb that the previous command was using, in my case output was:

which adb
/usr/bin/adb

Then i ran whereis adb command which gave me the location of adb's:

whereis adb
adb: /usr/bin/adb /home/arefin/Android/Sdk/platform-tools/adb 
/usr/share/man/man1/adb.1.gz

I get rid of this problem by moving the adb from /usr/bin directory with mv command: (meaning this is of no use thus instead of deleting just put in desktop),

/usr/bin$ `sudo mv adb /home/arefin/Desktop/`

After this i executed this command adb kill-server then ran adb devices. I found everything is fine this time.

My Android development related path in in $HOME/.profile file is, as below:

export ANDROID_HOME=/home/arefin/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$JAVA_HOME/bin
like image 57
Md. Sultanul Arefin Avatar answered Sep 20 '22 17:09

Md. Sultanul Arefin