How to resolve this ADB server version doesn’t match this client error in Android?

In this thread, we will resolve ADB server version doesn’t match this client error, you will face some time while installing and configuring the ADB. Here we will use the ADB command with the Genymotion.

Android Debug Bridge (ADB) is a command-line tool that let your computer device to communicate with an android device. ADB can be used in many tasks like installing and debugging apps in android. ADB will also provide access to a Unix shell that can be used to run a variety of commands on a device.

If you don’t have the ADB already installing in the system then you can install it using the following command in the Unix based OS.

$ sudo apt-get install adb

After installation, Just connect your android device with the computer. You can also use the Genymotion android emulator for the same. Here I’m going to use the Genymotion android emulator to work with ADB.

The following command will list all the connected devices with the system using the adb.

$ adb devices 

List of devices attached
adb server version (41) doesn't match this client (39); killing...
ADB server didn't ACK
Full server startup log: /tmp/adb.0.log
Server had pid: 8169
--- adb starting (pid 8169) ---
adb I 12-02 21:55:31 8169 8169 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 12-02 21:55:31 8169 8169 main.cpp:57] Version 1:8.1.0+r23-8
adb I 12-02 21:55:31 8169 8169 main.cpp:57] Installed as /usr/lib/android-sdk/platform-tools/adb
adb I 12-02 21:55:31 8169 8169 main.cpp:57]
adb I 12-02 21:55:31 8169 8169 adb_auth_host.cpp:416] adb_auth_init...
adb I 12-02 21:55:31 8169 8169 adb_auth_host.cpp:174] read_key_file '/root/.android/adbkey'...
adb I 12-02 21:55:31 8169 8169 adb_auth_host.cpp:391] adb_auth_inotify_init...
adb server killed by remote request

* failed to start daemon
error: cannot connect to daemon

Ops!! we got the error ADB server version doesn’t match this client. Here the issue is the client ADB version and our system’s ADB versions are not matching.

You can find the ADB version using following command.

$ adb version 

Android Debug Bridge version 1.0.39
Version 1:8.1.0+r23-8
Installed as /usr/bin/adb

Now, to resolve this ADB server version not matching with the client issue, just follow the below mentions steps,

Steps to Resolve the ADB server version doesn’t match this client Error

1. First of all kill the already running ADB server.

$ adb kill-server

2. Locate the already installed adb binary file. For that just run the following command.

$ which adb

/usr/bin/adb

So, we found the path of the already available adb binary that is “/usr/bin/adb“.

3. Now just remove the already available binary.

$ rm /usr/bin/adb

4. Finally, to match the adb version with the client, we will use the client’s ADB as our default ADB. Find the already running client’s adb binary file path by following the command.

$ ps ax | grep adb

8071 ? Ssl 0:00 adb -L tcp:5037 fork-server server --reply-fd 6
8080 ? Sl 0:00 /opt/genymobile/genymotion/tools/adb -s 192.168.56.101:5555 shell
8081 ? S 0:00 /opt/genymobile/genymotion/tools/adb -s 192.168.56.101:5555 logcat -v time
8085 pts/0 S+ 0:00 grep adb

We found the path of ADB, and that is in the Genymotion directory “/opt/genymobile/genymotion/tools/adb”.

5. Just navigate to that directory and copy this adb binary to the “/usr/bin/” directory to globally use it.

$ cd /opt/genymobile/genymotion/tools/
$ cp adb /usr/bin/

6. Use adb devices command.

$ adb devices 

List of devices attached
192.168.56.101:5555 device

We found that the command executed successfully without any type of error.

Now, we can use the other adb commands.

$ adb connect 192.168.56.101:5555
Connected to 192.168.56.101:5555

$ adb shell 
root@vbox86p:/ # id
uid=0(root) gid=0(root) groups=0(root),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats)
root@vbox86p:/ # 

Hope it resolved your issue!