This question already has answers here:
adb server version doesn't match this client
(41 answers)
Closed 4 years ago.
Update (11/10/14): Genymotion has released 2.3.1 which fixes this issue. https://cloud.genymotion.com/page/changelog/#231
Update (10/21/14): Genymotion replied to my support email and indicated the solution recommended by #plackemacher below is the suggested fix at the moment. They are aware of the issue.
Since upgrading to Lollipop, I'm having adb issues when using a Genymotion emulator. Devices don't show up in Android Studio, and I've also gotten the following error when trying to run adb devices:
$ adb devices
adb server is out of date. killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error:
I'm not sure if it's because of the Lollipop upgrade or coincidence.
Edit/update:
Per Chris Satton's comment, I investigated if multiple adb processes were running (ps aux | grep adb), and it looks like it's a Genymotion conflict(?). It looks to include its own version of adb.
greg 72550 0.0 0.0 611164 1508 ?? S 4:14PM
0:00.02
/Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS/tools/adb
-s 192.168.56.102:5555 shell
greg 72523 0.0 0.0 635956 2296 ?? S 4:14PM 0:00.02 adb -P 5037 fork-server server
Try running this:
killall -9 adb
That should remove all running traces of the daemon
Edit: Best solution below
This issue may be adb incompatibility with the newest version of the platform SDK. The best solution for this issue with Genymotion is to set the Android SDK within Genymotion to your location. This can be found within the Settings page.
In my case the problem was that I have installed adb tools and fastboot using this command
sudo apt-get install android-tools-adb android-tools-fastboot
From repository, so in this case this executables goes to the /usr/bin/ directory in order that you can use it system-wide ($PATH variable).
In addition, I am running android studio with genymotion configured like in the answer above.
So when I was trying to acces adb (adb shell in my case) it was trying to start another copy of adb process (server) and bind to default port, so the problem was here.
I have just uninstalled the android-tools-adb android-tools-fastboot and added the path to my Android SDK to the $PATH variable
Using genymotion on ubuntu.
My solution was to actually use the binary instead of the PATH'd adb.
~/genymotion/tools/abd reboot
Also I have the custom SDK in genymotion.
What worked for me finally and what I think is hastle free is that you simply run the adb commands directly from platform-tools folder. For example, use ./adb devices to view the devices.
I also changed genymotion's SDK to android's default SDK but I'm not sure if it won't work without doing that.
I think ,if you want to use adb its better to use android studio emulator and test what you want, after you can use Genymotion
None of solutions helped for Ubuntu.
Just drag .apk file onto Genymotion device's screen and app will be installed.
Ubuntu 15.04, Genymotion 2.5.2
The accepted answer did not work for me, although the idea did, just with a different command:
pkill adb
I'm running ubuntu MATE 1.8.2 and Genymotion 2.6.
Add the Android SDK to the $PATH variable.
I just used ./adb reboot on Android/Sdk/platform-tools/
Related
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
This question already has answers here:
adb server version doesn't match this client
(41 answers)
Closed 5 years ago.
I'm creating my first react-native project with this tutorial: http://facebook.github.io/react-native/
When it comes to executing code and running react-native run-android I am getting:
adb server is out of date. killing...
* daemon started successfully *
And the app on the android device is obviously not working.
I've reinstalled the SDK, tried to adb kill-server and adb start-server, but nothing seems to work
I'm using Android 4.4 and Ubuntu 14.04
Open Android Studio, and then update all your build tools, install the SDKs that you need for your device and ensure that have you set ANDROID_HOME env var to the same dir that you have in Android Studio (commonly in /home/you/Android/Sdk), also update react-native-cli node package. Run adb kill-server and adb start-server.
Probably you will have problems with adb version, just change your bin:
sudo cp ~/Android/Sdk/platform-tools/adb /usr/bin/adb
sudo chmod +x /usr/bin/adb
In the latest adb update the adb server is out of date. killing... message has been replaced with more informative adb server version (%d) doesn't match this client (%d)
So this solution is applicable to both.
The root cause of the error is that your system has multiple adb binaries of different versions) installed. These adb binaries may come from different sources - distributed together with some development tools or even installed from your linux distribution official repository. I would strongly advise against using any of those sources. The official source of the most recent version of adb is the platform-tools package from the Android SDK. The adb tag info page contains the direct links to the package.
So if you have Android SDK already installed - just update the platform-tools package to the latest version using SDK Manager. If not - download and unpack the contents of platform-tools.zip file for your platform to a folder. Add that folder to your $PATH. Now kill all running adb processes and make sure to find all other copies of adb and delete them. In rare cases some software might stop working. In that case you would need either change that application's internal setting telling it where to find the new binary or if the application uses hard-coded adb location - just create a symlink to the new location.
That's it. No more server/client version mismatches. Although you might need to repeat the procedure after installing another software which comes prepackaged with its own adb copy.
It might be that you installed the adb package in addition to the SDK's. In that case, a
sudo apt purge adb
might solve the problem.
I'm getting this error using ADB (1.0.32) and Genymotion (2.8.2). My solution was change the ADB of the VM, from my local Android SDK's ADB to Genymotion ADB (default).
This question already has answers here:
adb server version doesn't match this client
(41 answers)
Closed 4 years ago.
Update (11/10/14): Genymotion has released 2.3.1 which fixes this issue. https://cloud.genymotion.com/page/changelog/#231
Update (10/21/14): Genymotion replied to my support email and indicated the solution recommended by #plackemacher below is the suggested fix at the moment. They are aware of the issue.
Since upgrading to Lollipop, I'm having adb issues when using a Genymotion emulator. Devices don't show up in Android Studio, and I've also gotten the following error when trying to run adb devices:
$ adb devices
adb server is out of date. killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error:
I'm not sure if it's because of the Lollipop upgrade or coincidence.
Edit/update:
Per Chris Satton's comment, I investigated if multiple adb processes were running (ps aux | grep adb), and it looks like it's a Genymotion conflict(?). It looks to include its own version of adb.
greg 72550 0.0 0.0 611164 1508 ?? S 4:14PM
0:00.02
/Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS/tools/adb
-s 192.168.56.102:5555 shell
greg 72523 0.0 0.0 635956 2296 ?? S 4:14PM 0:00.02 adb -P 5037 fork-server server
Try running this:
killall -9 adb
That should remove all running traces of the daemon
Edit: Best solution below
This issue may be adb incompatibility with the newest version of the platform SDK. The best solution for this issue with Genymotion is to set the Android SDK within Genymotion to your location. This can be found within the Settings page.
In my case the problem was that I have installed adb tools and fastboot using this command
sudo apt-get install android-tools-adb android-tools-fastboot
From repository, so in this case this executables goes to the /usr/bin/ directory in order that you can use it system-wide ($PATH variable).
In addition, I am running android studio with genymotion configured like in the answer above.
So when I was trying to acces adb (adb shell in my case) it was trying to start another copy of adb process (server) and bind to default port, so the problem was here.
I have just uninstalled the android-tools-adb android-tools-fastboot and added the path to my Android SDK to the $PATH variable
Using genymotion on ubuntu.
My solution was to actually use the binary instead of the PATH'd adb.
~/genymotion/tools/abd reboot
Also I have the custom SDK in genymotion.
What worked for me finally and what I think is hastle free is that you simply run the adb commands directly from platform-tools folder. For example, use ./adb devices to view the devices.
I also changed genymotion's SDK to android's default SDK but I'm not sure if it won't work without doing that.
I think ,if you want to use adb its better to use android studio emulator and test what you want, after you can use Genymotion
None of solutions helped for Ubuntu.
Just drag .apk file onto Genymotion device's screen and app will be installed.
Ubuntu 15.04, Genymotion 2.5.2
The accepted answer did not work for me, although the idea did, just with a different command:
pkill adb
I'm running ubuntu MATE 1.8.2 and Genymotion 2.6.
Add the Android SDK to the $PATH variable.
I just used ./adb reboot on Android/Sdk/platform-tools/
I have installed Android Studio.
Then I have updated the Android SDK.
Now when I start Android Studio, this message pops up:
ADB not responding. You can wait more,or kill "adb.exe" process manually and click 'Restart'
The dialog has 3 options: Wait more, Restart and Cancel.
But all of them
gives me the same result, i.e. a message Waiting for ADB appears and I can't do anything with Android Studio.
I have to kill the program using windows task manager! I'm using windows 7.
Can anyone help me on this?
Go to
Tools > Android > (Uncheck) Enable ADB Integration
(if studio hangs/gets stuck end adb process manually)
then,
Tools > Android > (Check) Enable ADB Integration
On my macbook pro, i was occasionally getting this in Android Studio. The following resolved it for me:
Open up a Terminal and, instead of using 'adb kill-server', use this:
$ killall adb
wait a minute and it looks like Android Studio automatically restarts adb on it's own.
From the command prompt run the command adb kill-server. This will shutdown ADB and android studio or Eclipse if you were to use that, would show Waiting for ADB as you said.
Once ADB has shutdown down run adb start-server or run adb devices which will automatically start the adb service and show that your android emulator or development devices has successfully connected.
If you are suffering from "ADB not responding. If you’d like to retry, then please manually kill ‘adb’ and click ‘Restart’ or terminal appear Syntax error: “)” unexpected"
then perhaps you are using 32bit OS and platform-tools has updated up 23.1.
The solution is to go back to the platform-tools 23.0.1.
You can download the platform-tools 23.0.1 for Linux here , for windowns here and Mac here
After the download, go to your sdk location > platform-tools folder to delete old platform-tools in sdk and paste down into the downloaded one.
Woohooo ... it should work.
This is a bug with latest ADT.
For me, on Windows 7, killing the ADB server and restarting it via command line did not help. It would not start up successfully.
>adb kill-server
>adb start-server
* daemon not running. starting it now on port 5037 *
ADB server didn't ACK
* failed to start daemon *
So killing the adb.exe process via Task Manager was actually the easiest solution that case.
Check if any service is listening on port 5037, and kill it. You can use lsof for this:
$ lsof -i :5037
$ kill <PID Process>
Then try
$ adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
This solved my problem.
I ran into this problem and tried a number of solutions on my Mac without any success. I finally got to work with the commands below:
$ rm -rf ~/.android
$ killall adb
$ adb devices
Note that rm -rf ~/.android will remove any AVDs that you have configured, so don't take this step lightly. Personally I had to though and I'm not sure why. Hopefully this helps someone.
This issue could be because adb incompatibility with the newest version of the platform SDK.
Try the following:
If you are using Genymotion, manually set the Android SDK within Genymotion settings to your sdk path. Go to Genymotion -> settings -> ADB -> Use custom SDK Tools -> Browse and ender your local SDK path.
If you haverecently updated your platform-tools plugin version, revert back to 23.0.1.
Its a bug within ADB, one of the above must most likely be your solution.
I run netstat -nao | findstr 5037 in cmd.
As you see there is a process with id 3888. I kill it with taskkill /f /pid 3888
if you have more than one, kill all.
after that run adb with adb start-server, my adb run sucessfully.
1.if your phone system is over 4.2.2 , there will be
2.disconnect the USB and try again or restart your phone
3.After after all try , it didn't work. It may be a shortage power supply so try other usb interface on your computer.
I solved the problem doing the first step . anyway have try.
If you need to kill all adb processes on windows with one command, you can do it as follows:
taskkill /F /IM adb*
I had this problem and solved it by this way...
I had a app in my pc that used adb...
I tried to disable it but still my android studio's adb had problem
after unistall that application and problem solved.
I had the same problem. I have restarted ADB in any possible way, I have killed the process and restarted the PC with no results.
Then I found this plugin. Just download and install it in your Android Studio IDE. Under Tools -> Android you have a menu ADB Idea. Here you can kill, start, restart, clean ADB.
None of the above helped me completely. Although Oventoaster made me think. I had a couple of adb on my system. Removed them almost all.
I am running android studio on ubuntu 14.04 64 bit.
So I checked manually /home/xxxxx/Android/Sdk/platform-tools/adb
where xxxxx was my linux username
this gave
/home/xxxxx/Android/Sdk/platform-tools/adb: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
https://stackoverflow.com/a/27415749/4453157
solved it for me.
If the above CMD command option is not working and you cannot make it work in any other way then follow this below.
Click on below link
http://adbshell.com/downloads
and download the first link with name ADB Kits ( contains adb.exe and necessary .dll files).
After downloading replace these files with the ones in the path
Android/Sdk/platform-tools/
Now click on adb.exe and it will open cmd and will start the adb server.
Now it will detect the device and no problem. OOOOOllllaaaaa.....
If the Problem persists again then do the same... save the folder
somewhere.... just replace files... it will detect the device
automatically then
I had this problem on Windows 8, but I solved the problem by updating all of Android Studio's plugins with the SDK Manager, then restarting the computer.
An another one: you might want to avoid running Eclipse and Android Studio together, it helped me.
I had this problem on Windows 7. My situation is this through SDK Manager. I only download API 19 but I had not downloaded related Android SDK build-tools. So it occur this problem.
I went through SDK Manager download build-tools 19 to fix it. Hope to give you help.
Faced this issue on Mac:
I have tried different solution, But below works for me -
Uninstall "Vysor" plugin if you have installed for Chrome
Under Home folder > find .Android folder and move to trash
Goto, Android sdk > delete/move to trash platform-tools folder
Again install/download from Android SDK Manager
Open terminal -
adb kill-server
adb start-server
Check adb devices, It will work and display you all connected devices.
Hope it helps !
there seems to be about a million reasons this bug happens, but for me (running on ubuntu), it was openvpn running in the background that caused it.
I killed the openvpn service and no more issues.
adb port forwarding is not working for me and your insight is appreciated.
The following command is what I am trying
./adb forward tcp:5985 tcp:5984"
I don't see any errors(in logcat) but it just fails silently. When I try the following command
curl localhost:5985 after that, I get "curl: (56) Recv failure: Connection reset by peer"
When I try curl localhost:5984, I do see a message as I have a process running on port 5984 (Couchbase server).
I don't think this is an issue with adb itself as all other adb commands are working. Amongst other things I have tried are
a) kill-server followed by start-server (with sudo mode as well)
b) Restarting my machine.
Needless to say, neither of these have worked. I am working on x64 Ubuntu 11.10.
Please note that I am working with the emulator and my emulator device is running.
I do see other messages in logcat just not this one.
Thanks
-Venu
Have you read this document from Google?
https://developers.google.com/chrome/mobile/docs/debugging
It explains that you have to first make sure you can see your device with
adb devices
Then in Chrome on your Android device, go to Open Settings > Advanced > Developer tools and check the Enable USB Web debugging option as shown here:
Then enter the follow command:
adb forward tcp:9222 localabstract:chrome_devtools_remote
And go to this URL in Chrome on your desktop:
localhost:9222
Does that work?
On the original question , the answer is to make sure your device emulator is running. On Ubuntu you can use: netstat -tan to see the TCP ports that your development machine is listening on. Usually the port is 5554. When the emulator is not started, there will not be a process listening on this port.
Well, I finally got there. I'm not sure which one of these finally fixed the issue (but most are helpful):
ensuring that /etc/udev/rules.d/##-android.rules was chmod a+rw so that we don't need to sudo adb and can edit it again
On Ubuntu 12.04 the ATTRS{idVendor} is the simple 4 hex code (some pages will encourage you to take the full lsusb ####:#### code
I now do not have the SYMLINK+="android_adb" entry in udev
adb devices still shows ???????????? instead of my device code (but works now)
adb shell actually returns a # prompt
adb usb breaks it (it was not returning with curl which I thought was an improvement on the error, but no - it breaks it worse)
There is a bug in adb forward, such that small, fast data connections are simply dropped:
emulator> nc -lk 9998
host> adb forward tcp:9900 tcp:9998
host> date | nc localhost 9900 # Does not arrive at the emulator
host> ( date ; sleep 0.1 ) | nc localhost 9900 # Does arrive at the emulator
That said, when I try the above with curl, that data gets through - presumably because curl holds the socket open in the same way that (date ; sleep 0.1) does.
This issue started happening for me when I updated Android SDK Platform Tools from version 29.0.2 to 29.0.3
I followed this How to downgrade my SDK version?
Basically, you need to downgrade Android SDK Platform Tools to version 29.0.2:
Find your Android SDK folder
Rename platform-tools to platform-tools-29-0-3 (incase something goes wrong)
Download Android SDK Platform Tools 29.0.2 for your machine e.g. http://dl-ssl.google.com/android/repository/tools_r29.0.2-windows.zip
Extract it into your Android/SDK folder
And you are done