Whenever I try to run adb devices
:
$ adb devices
* daemon not running. starting it now *
* daemon started su
Are you using Genymotion for a virtual device?
if yes this error probably came out because ADB from Genymotion conflicted with your ADB from Android SDK(using same port number), to fix this simply go to settings
=> choose ADB
tab => click on the option Use custom Android SDK Tools
and set your SDK folder
after you configure this, try to restart your adb by going into folder platform-tools
which adb
placed and do this command:
./adb kill-server
./adb start-server
*tips: You may close the process of Genymotion before running the command above
Hope this help.
I experienced a similar problem where my attempts to use adb
such as adb logcat
provided this error output:
adb server version (40) doesn't match this client (36); killing...
This solution worked for me in 2018 on Ubuntu 18.04 from Android Studio 3.2.1 using terminal.
The commands are as follows:
adb kill-server sudo cp ~/Android/Sdk/platform-tools/adb /usr/bin/adb sudo chmod +x /usr/bin/adb adb start-server
You may need to adjust the cp
command arguments based on the path to Android/
on your system.
2nd generation kudos to my source: https://stackoverflow.com/a/40991118/7015599
In my machine (Ubuntu 14.04 and Genymotion 2.5.2) the source of the problem was that, I had 2 adb files of different versions.
(Before, narrowing down this problem source, I already had Genymotion's Settings > "Use custom Android SDK tools" referring to my machine's installed Android SDK directory as advised by Aditya Kresna Permana. I also tried with killing and starting the adb server and few other solutions from around the web).
Then saw, that running adb version
from my Android SDK installation directory “~/Android/Sdk/platform-tools” produced - "Android Debug Bridge version 1.0.32"
But, adb version
command from “/usr/bin” directory produced- “Android Debug Bridge version 1.0.31"
So just followed - http://bernaerts.dyndns.org/linux/74-ubuntu/328-ubuntu-trusty-android-adb-fastboot-qtadb to update the adb in “/usr/bin”
# adb version
Android Debug Bridge version 1.0.31
# wget -O - https://skia.googlesource.com/skia/+archive/cd048d18e0b81338c1a04b9749a00444597df394/platform_tools/android/bin/linux.tar.gz | tar -zxvf - adb
# sudo mv adb /usr/bin/adb
# sudo chmod +x /usr/bin/adb
# adb version
Android Debug Bridge version 1.0.32
And now running adb devices
works perfectly as expected.
And it also solved the associated problem that, before my PhoneGap (Cordova) app was not getting integrated with the Genymotion's virtual device. Now obviously that problem solved as well.
I simply closed the htc sync application completely and tried again. It worked as it was supposed to.
This was caused in my case by running Visual Studio with an Android Xamarin project on the same machine as Android Studio - each IDE had a different adb server version running. I closed Visual Studio and the error went away.
I also had this problem today, turns out I disabled my network drivers because I had WIFI/LAN issues. re-enabling fixed the issue