This question already has answers here:
adb server version doesn't match this client
(41 answers)
Closed 4 years ago.
When I click "run" on the top right corner to launch my basic "Hello World" application, my device isn't recognized, and if I set the configurations to give a popup to select either an AVD or a connected device, I get the following errors:
7:34 PM adb server version (39) doesn't match this client (40); killing...
7:34 PM could not read ok from ADB Server
7:34 PM * failed to start daemon
7:34 PM error: cannot connect to daemon
7:34 PM 'C:\Users\<MyName>\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server' failed -- run manually if necessary
Developer mode and USB debugging is enabled on my phone, and I have the latest Gradle installed. I believe my Path variables are set correctly and the android SDK, Gradle, and JVM paths are all correctly set in IntelliJ.
Try using command line to connect device.Firstly plug in usb cable,then run below commands:
adb kill-server
adb devices
And check whether usb cable line work normally.
This is because you are running 2 different versions of ADB.
Run adb kill-server and then C:\Users\<MyName>\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server
Add C:\Users\<MyName>\AppData\Local\Android\Sdk\platform-tools\ to the beginning of your environment path.
Also, there is already a discussion here: adb server version doesn't match this client
This question already has answers here:
adb server version doesn't match this client
(41 answers)
Closed 4 years ago.
I'm on debian buster.
I have genymotion installed and running, and a CRNA app that I'm trying to run. I have Android SDK installed, and set properly in my path.
I have changed the genymotion settings to point to my Android SDK folder.
When I do yarn run android I see
error: could not install *smartsocket* listener: Address already in use
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
When I do adb start-server I see
adb server version (39) doesn't match this client (36); killing...
error: could not install *smartsocket* listener: Address already in use
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
I have run adb kill-server, and manually killed and restarted the ADB process many times. Every fix I've found to this issue does not work.
Is there something I'm missing? Is there some comprehensive guide on setting all of this up? I'm willing to do a fresh install if I have to.
Glad that I was able to help you. :)
As suspected, the machine contains two different versions of adb installed, one by the Android SDK, and another installed probably with another tool or program which contains adb packaged with it (maybe the fastboot tools). With two versions being executed at different times, the adb server would complain with errors as posted in your question.
Although you were able to solve this by setting genymotion to use the installed tool's adb, it is advised to actually uninstall the tool and configure the environment variables (PATH and ANDROID_HOME) to include the adb that came with the Android SDK. This modification would be needed if you would be considering to use more tools that depend on adbsuch as Android Studio or others.
I'm using genymotion 2.8.1 and android studio 2.3.1 and my OS is OSX 10.12.3. I have my Android SDK setup in ~/Library/Android/sdk. I've pointed genymotion to the same and my Android studio local.properties also to the same.
But when I start up genymotion device and try to run adb I just get an error saying the socket "5037" is already in use. When I run ps -ef | grep adb I get the following
505 2532 1 0 2:08PM ?? 0:00.70 adb -L tcp:5037 fork-server server --reply-fd 5
So I'm assuming this process was started by genymotion when trying to connect to the device. But when I run adb devices from the same path (I checked what path the adb process was running was from using the activity monitor) it throws this error
List of devices attached
* daemon not running. starting it now at tcp:5037 *
error: could not install *smartsocket* listener: Address already in use
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
So can someone clarify what is happening here ? Is this a issue with this version of Genymotion and should I try downgrading it ?
So finally after lot of mix and match I found out that the issue was with the latest ADB version. Download this older version of the platform tools for mac - platform-tools_r25.0.3
Then goto where your sdk folder is and replace the platform-tools with the extracted platform-tools from the above mentioned package. Hope this helps others facing the same issue
This question already has answers here:
adb server version doesn't match this client
(41 answers)
Closed 5 years ago.
After installing the Android O preview on a test device my ADB stopped working and started giving me this error.
adb server version (36) doesn't match this client (39); killing...
adb E 03-27 08:01:55 2925 147690 usb_osx.cpp:333] Could not open interface: e00002c5
adb E 03-27 08:01:55 2925 147690 usb_osx.cpp:294] Could not find device interface
error: could not install *smartsocket* listener: Address already in use
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
The only answers I have come across on this issue referred to Genymotion being out of sync with ADB but I don’t use Genymotion. Any help would be greatly appreciated. I have already wiped and reinstalled Android Studio as well as all of its tools and settings yet seem to still have this issue.
This works for me...
go to GenyMotion settings -> ADB tab
instead of Use Genymotion Android tools, choose custom Android SDK Tools and then browse your installed SDK.
In my case this error occured when I set up my environment adb path as ~/.android-sdk/platform-tools (which happens when e.g. android-platform-tools is installed via homebrew), which version was 36, but Android Studio project has Android SDK next path ~/Library/Android/sdk which adb version was 39.
I have changed my PATH to platform-tools to ~/Library/Android/sdk/platform-tools and error was solved
The main point that all the others have missed, is that you will get this error when you have a running adb process in the background. So the first step is to find it and kill it:
ps aux | grep adb
user 46803 0.0 0.0 2442020 816 s023 S+ 5:07AM 0:00.00 grep adb
user 46636 0.0 0.0 651740 3084 ?? S 5:07AM 0:00.02 adb -P 5037 fork-server server
When you find it, you can kill it using kill -9 46636.
In my case, the problem was an old version of adb coming from GapDebug. If you got this with GapDebug, get out of it and then do
adb kill-server
adb start-server
because with GapDebug in the background, when you kill the adb server, GapDebug will start its own copy immediately, causing the start-server to be ignored
I had the same problem with Android Studio - adb server version (37) doesn't match this client (39). I fixed by the following solution :
In Android Studio go to Tools -> Android -> SDK Manager
In the SDK Tools tab untick Android SDK Platform-Tools, click Apply to uninstall.
I then renamed the folder Platform-Tools to Platform-ToolsOld
Then back in the SDK Manager re-tick the Platform-Tools to re-install.
As mentioned by others here, that you could have two adb's running ... And to add to these answers from a Linux box perspective ( for the next newbie who is working from Linux );
Uninstall your distro's android-tools ( use zypper or yum etc )
# zypper -v rm android-tools
Find where your other adb is
# find /home -iname "*adb"|grep -i android
Say it was at ;
/home/developer/Android/Sdk/platform-tools/adb
Then Make a softlink to it in the /usr/bin folder
ln -s /home/developer/Android/Sdk/platform-tools/adb /usr/bin/adb
Then;
# adb start-server
I had the same error. In my case, using Appium, I had two versions of ADB
$ /usr/local/bin/adb version 36
and
$ /Users/user/Library/Android/sdk/platform-tools/adb version 39
The solution was:
be sure that your $PATH in bash_profile is pointing to: /Users/user/Library/Android/sdk/platform-tools/
stop the adb server: adb kill-server and check Appium is stopped.
delete the adb version 36 (or you can rename it to have a backup): rm /usr/local/bin/adb
start adb server: adb start-server or just starting Appium
You have two versions of ADB
$ /usr/local/bin/adb version
Android Debug Bridge version 1.0.36
Revision 0e9850346394-android
and
$ /Users/user/Library/Android/sdk/platform-tools/adb version
Android Debug Bridge version 1.0.39
Revision 3db08f2c6889-android
You could see which one your PATH is pointing to (echo $PATH) but I fixed it with a adb stop-server on one version and a adb start-server on the other.
To add yet another potential solution, Helium by Clockworkmod has it's own version of ADB built in that kept being started. Exiting the Helium Desktop application resolves the issue.
I think you have multiple adb server running, genymotion could be one of them, but also Xamarin - Visual studio for mac OS could be running an adb server, closing Visual studio worked for me
I was developing a “hello world” android application using intellij IDE 11.0.01 and android SDK 4.0.3.
I ran the application using intellij, emulator was launched but it was not showing my application. Android logcat was also empty.
I closed the emulator. Killed the process adb.exe from task manager.
Then I followed the following steps:
1.Copied the .apk file to android \platform-tools folder.
2.Started the emulator from SDK manager.
3.Open the command prompt and changed the path till \platform-tools folder
4.Execute the commands:
adb kill-server
adb start-server
adb install my_app.apk
I am getting following error:
** daemon not running. starting it now on port 5037 * * daemon started successfully * ** daemon still not runningerror: cannot connect to daemon
I am using Windows XP Professional Version 2002 Service Pack 3.I am working from my personal laptop and I do not have any antivirus or firewall started.
Could anyone please provide me information how to proceed from here?
If all fails, you could try installing the apk using adb:
adb install <path_to_apk>
Execute that commmand in a command window in the same folder as adb.