3

Disclaimer: this is not a duplicate to this SO question as the source of the question is different and the answers don't apply.* I hope, it is correctly placed in AE and that the note about not using Genymotion does not confuse the reader. The reason to include it in the title is that it is so dominantly present in other answers, but it does have nothing to do with this question, as I don't use any emulator including Genymotion.


So I'm trying to install LineageOS on my Fairphone FP3+ using Windows 10. But: This also applies to other products with other respective versions - in this case, the device uses Android 10 (with Build number 8901.3.A-0054.20200929). For the installation I need ADB - at first to access the fastboot mode. For that, I first installed the latest Android Studio from here but actually only needed the SDK Platform Tools, which you can find here (not to be mistaken with the Command line tools from the link before). I unlocked the bootloader and ran the following command which is displayed with it's output:

D:\Setups\XXXXX\Lineage FP3\platform-tools_30.0.5(ADB_1.0.41)>adb devices
adb server version (40) doesn't match this client (41); killing...
* daemon started successfully
List of devices attached

This SO question I mentioned in the disclaimer didn't help, as abd didn't even print any devices - so the setting is quite different. I also went through these linked questions: link 1, link 2, link 3 and link 4 among others. Genymotion is as said not used here, but referred to in almost any Q/A except here, but also no soulution for me to be found there. I already checked the PC for any software that could have installed another adb version, but neither me nor cmd's where could find any (4, 7, 8; 9, 11 or 10).


adb kill-server
adb start-server

Did also not change a thing as suggested here or here. I restarted all devices and software multiple times and tried getting rid of all adb processes too (6, 13 or 12). I also reinstalled Android Studio to try it without using the cache as suggested in this SO answer from a possibly related question that unfortunately also has no leads. I can imagine that some questions like that one or this SO one could also be helped here.

1

3 Answers 3

2

Since this adb server version (XX) doesn't match this client (YY); killing... seems to be a very prominent question, let me present the quite straight forward solution - I actually wonder why it wasn't answered anywhere else or at least, I couldn't find it. To find the version of ADB you are using, type adb version to get something like:

Android Debug Bridge version 1.0.41
Version 30.0.5-6877874
Installed as D:\Setups\XXXXX\Lineage FP3\platform-tools_30.0.5(ADB_1.0.41)\adb.exe

The Android version simply doesn't match the adb version. Android 11 for example uses the API 30 and ADB 41. Android 10 (API 29) and that phone needs ADB 40. You can check your Android version to find the corresponding ADB version to get or easily read the error message above to find XX (in this case 40).

I was able to find ADB version 1.0.40 from here and it works like a charm:

D:\Setups\XXXXX\Lineage FP3\platform-tools_28.0.1(ADB_1.0.40)>adb devices
List of devices attached
A2XXXXXXXXX1    unauthorized
6
  • 1
    There is one simple rule to avoid such problems: Do only use adb from installed Android SDK (and use SDK updater to get the latest version). Do delete all adb versions that come with other versions.
    – Robert
    Jan 14, 2021 at 8:41
  • The latest version was not suited in this case - can you also downgrade that way?
    – Cadoiz
    Jan 14, 2021 at 8:43
  • 1
    ADB server and client both are running on your PC and this had happen because you had more than one adb version installed. You had executed the version v40 client which started the v40 server on your PC and later you used v41 client which caused the error message you posted.
    – Robert
    Jan 14, 2021 at 8:55
  • 2
    I still believe that for this problem the Android version of your device is irrelevant. It is just the two versions of the adb serverthat is running (see adb.exe task in taskmanager) and the used adb.exe as client (usually adb server and client are provided by the same exe file they are just started in different modes). The error says that those two versions are incompatible. What device is attached (and it's Android version) is irrelevant for this error. The error can even occur if you don't have a device attached at all.
    – Robert
    Jan 14, 2021 at 12:47
  • 1
    @Robert exactly. furthermore it run two different instances of the same binary (multiple versions handler internally for compatibility reasons). no need to downgrade
    – alecxs
    Mar 8, 2021 at 9:54
1

I just encountered this error and this QA thread did help me, although it wasn't the exact answer for me. I had recently added a second copy of adb to my computer, so that was causing a conflict between the two copies of adb. I needed to update the Path in my Environment Variables to point to the newer platform-tools directory.

0

Having had this issue after an update and I wasn't able to solve this in the usual way. Through @Cadoiz's answer I was able to find another adb.exe instance running om my windows, which was the one used by SuperDisplay, which I use to run an Android Tablet as a secondary screen.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .