I've been using AS for months, but since two days I get an error when I try to run my app:
Unable to run 'adb': null
'C:\Users\lapof\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server' failed -- run manually if necessary
* daemon not running; starting now at tcp:5037
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon
I've read about a lot of people having this problem, but the solutions provided don't work for me. I read these questions in particular:
Daemon not running. Starting it now on port 5037
Android ADB - Daemon still not running
How to resolve the "ADB server didn't ACK" error?
Eclipse error "ADB server didn't ACK, failed to start daemon"
Adb won't start
How to resolve the "ADB server didn't ACK" error?
Daemon not running. starting it now on port 5037 * Cannot open 'nul': The system cannot find the file specified
A lot of answers to these questions say to close adb.exe from task manager, the problem is that adb.exe is not running and if I try to restart it by typing .\adb start-server on a PowerShell window I get the same error.
I also try to restart my PC but it didn't work.
On the Android device I'm trying to connect to (Samsung Galaxy S8) I enabled USB debugging. I even tried to eliminate all the authorized devices, but nothing worked.
I checked if the 5037 port was used by other processes, but it is used by adb.exe (and the firewall state on that port is allowed and not limited). By the way, as I said, in the task manager adb.exe is not present.
Last I tried to follow the instructions provided in the last question I linked (basically I re-downloaded adb.exe).
Initially I ran .\adb start-server and this strange error occurs:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
** daemon still not running
error: cannot connect to daemon
and then when I try to run my app on Android Studio it occurs this new error when it tries to start adb:
Unable to run 'adb': null
'C:\Users\lapof\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server' failed -- run manually if necessary
ADB server didn't ACK
* failed to start daemon *
and then if I try to .\adb kill-server and then .\adb start-server or .\adb devices or .\adb usb the same error occurs again.
Moreover when I connect my device now it asks me to authorize my PC to connect.
I don't know if this can help, but lately I deactivated a lot of Windows services (but I don't think I deactivated something related to Android Studio).
Details
PC: Compaq
PC OS: Windows 10 Home
Device: Samsung Galaxy S8 (Exynos)
Device OS: Android 8.0
AS version: 3.0.1
The solution which worked for me -
Open Command Prompt as administrator and type
adb start-server
That's it
I had same problem a moment ago. I solved it:
Run CMD as Administrator
Enter adb devices to CMD.
The output for me is :
C:\WINDOWS\system32>adb devices
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
P9BCS87ABS9SCD5 device
Usually that's caused by the WinNAT service, restarting which solves the issue.
Just open the Command Prompt or PowerShell as Administrator, and type the following commands there:
net stop winnat
net start winnat
And wait a bit for the Android Studio to reconnect to the ADB.
P.S. If it doesn't reconnect, just type the following commands to restart the ADB:
adb kill-server
adb start-server
I solved the problem on my own.
Out of frustration I opened Control Panel > System and security > Windows defender firewall > Allowed applications and I added adb.exe (both private and public networks).
I came back to Android Studio, ran the app and magically it managed to initialize ADB and my phone connected via USB was there.
I don't really know why this worked, since when I checked in Start > All Programs > Accessories > System Tools > Resource Monitor > Network > Listening Port it said that on port 5037 the firewall was allowed.
Moreover I don't know why up to a week ago all worked fine and now I had to do this process to make it work.
If someone more experienced manages to explain this behaviour better I'll update this answer (or accepts his as best answer)
Run CMD or PowerShell as administrator
Then run the following commands:
net stop winnat
In correct folder run:
adb start-server
net stop winnat
Below solution solved my problem:
Go to your task manager
see if adb is running
right click & end the task
Go to command prompt
run adb devices
it will work fine
For my situation
The latest platform is version 30.0.3. I also have the same problem as this:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
My solving:
Step 1: downloading platform-tool version 28.0.1: https://developer.android.com/studio/releases/platform-tools#2801_september_2018
Step 2: remove platform-tool: go to SDK Manager -> SDK tools
Uncheck "Android SDK Platform - Tool"
Click Apply
Step 3: Going to folder android -> SDK and pass new platform-tool
Step 4: ADB devices.
Then It's working for me.
SDK Manager -> SDK tools
Uncheck "Android SDK Platform - Tool"
Click Apply
After using Android Studio and Emulator without any problems, suddenly it stop to connect to the Emulator, even adb server was running (killing and starting), firewalls raised for all the programs (adb.exe, qemu-system-x86_64.exe, studio64.exe, etc), port 5037 freed, uninstalled and installed again the programs, even the whole Android Studio from scratch. I got verything running OK, but no connection between AS and Emulator.
The solution to my problem was to run Android Studio AS ADMINISTRATOR, it seems that when I updated the program to 3.5.2 somehow the status changed, causing me the problem.
What worked for me in all adb unresolved cases:
adb kill-server
or
adb disconnect
I would just try them both and one will do the trick.
I had this issue several times. It seems if when system is starting, device is connected by USB cable, daemon will connect correctly and no problem will occur. Of course I want a better solution, because it is very hard for me to shut down and start again every time.
Had same issue after upgrading to Android Studio Bumblebee | 2021.1.1
To solve it, go to Settings -> Build, Excecution, Deployment -> Debugger
Then uncheck the option Enable adb mDNS for wierless debugger
I had the same error.
Error on android studio
i use easytether, which was causing the error when is connected.
http://www.mobile-stream.com/easytether/android_faq.html#adbmacosx
After u disconnect it, everything should work fine.
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.
This question already has answers here:
adb server is out of date. killing [duplicate]
(4 answers)
Closed 5 years ago.
I'm currently experiencing a few issues using ADB with Debian Stretch. Whenever I issue an ADB command, I get the following message:
$ adb root
adb server version (39) doesn't match this client (36); killing...
* daemon started successfully *
Normally this doesn't cause any issues other than a 2 second delay while the ADB server restarts, but when I'm using adb shell the connection will occasionally drop, which is annoying. Note that this is different to other questions such as this one as the server version is greater than the client version.
This problem was caused by me having ADB installed twice on my machine. Once in my home directory (used by Android Studio), and again in /usr/bin/adb as I had the android-sdk package installed from aptitude. As Debian tends to be a bit slow with package updates, adb from the command line was calling the older version at /usr/bin/adb rather than the newer version in my home folder. This issue was solved by running:
sudo apt-get remove adb
This question already has answers here:
unable to execute adb in Ubuntu. Downloaded file is meant for x86-64 while I have i686 [duplicate]
(2 answers)
Closed 7 years ago.
I'm using Ubuntu 15.10 32bit on a 32bit machine and the latest version of Android Studio with all packages downloaded from SDK manager (without the Intel atom, TV, Wear).
When I try to run or debug the App (the default simplest hello world) the console show these errors and prompt a pop-up with:
ADB not responding. If you'd like to retry, then please manually kill "adb" and click 'Restart':
Console:
13.31.35 Unable to detect adb version, adb output:
/home/user/Android/Sdk/platform-tools/adb: 1:
/home/user/Android/Sdk/platform-tools/adb: Syntax error: ")"unexpected
13.31.37 Error running app: Unable to obtain debug bridge
I already tried:
killall adb
adb: no such process
and
adb kill-server
adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
But the error still occurs.
The problem was that the platform-tools were for a 64bit machine, after replacing those with this version:
https://dl.google.com/android/repository/platform-tools_r23.0.1-linux.zip
Android Studio recognizes the adb.
But after AVD chosen, another error occurs:
Cannot launch AVD in emulator.
Output:
ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them
you will have to do at least one of the following:
- Use the '-force-32bit' option when invoking 'emulator'.
- Set ANDROID_EMULATOR_FORCE_32BIT to 'true' in your environment.
Either one will allow you to use the 32-bit binaries, but please be
aware that these will disappear in a future Android SDK release.
Consider moving to a 64-bit Linux system before that happens.
This question already has answers here:
Adb won't start
(21 answers)
Eclipse error "ADB server didn't ACK, failed to start daemon"
(23 answers)
Closed 6 years ago.
I'm running Eclipse: Helios. Here's the issue. When I leave my Android Emulator running for about 20 minutes while I'm programming, if I try to install and run my application, I receive this error in the console:
[2011-07-12 12:27:55 - DatePrinter] Failed to install DatePrinter.apk
on device 'emulator-5554': Connection refused: connect
[2011-07-12 12:27:55 - DatePrinter] java.net.ConnectException:
Connection refused: connect
[2011-07-12 12:27:55 - DatePrinter] Launch canceled!
If I close the emulator and run the project again, a new emulator launches and the console shows the emulator starting but the app does not install and the emulator does not show up in DDMS.
If I go to the terminal and type in adb devices, I get this error message
ADB Server didn't ACK
*failed to start daemon*
error cannot connect to daemon
The only way I can fix it that I've found is to close eclipse, kill the adb.exe process and restart eclipse.
Any ideas what could be causing this error/how to debug it?
Edit: Starting the emulator through SDK manager does not yield any positive results either.
Edit 2: Running adb kill-server and adb start-server yields the same message "ADB Server didn't ACK" although it prints a "daemon not started, starting it now on port 5037" right before that.
Though I did not have the same problem as you did. In case of connectivity problems with emulator and Eclipse I use the following:
In the DEVICES window of Eclipse (DDMS perspective) drop down menu (in the upper right corner of the window) select "Reset ADB".
This solves most of connectivity problems, which otherwise will require restart.
Try this
adb kill-server
adb start-server
Check whether adb path has been added to environment variable, otherwise try to re-install the SDK itself.
I had the same problem. In the folder C:/../android-sdk/platform-tools, the following commands didn't work.
adb kill-server
Did nothing, and
adb start-server
resulted in an error.
So I killed the adb process with the task manager and used adb start-server again. And it works.
Here is a way to do it:
Open Task Manager
Select adb and end the process
Go to Eclipse and reset adb
Run your app
Check your Anti virus program control dialogs e.g Norton Antivirus and ZoneAlarm 2010.
Make sure that
eclipse.exe
emulator.exe
emulator-arm.exe
have input and outbound and network connections!