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.
Related
I've been troubleshooting this for hours and I'm so lost.
My Android Studio (Windows) has stopped being able to find devices, which I assumed was some kind of problem with adb. I navigated to the platform-tools folder and tried to run adb from there:
C:\Users\LeonardoPetrucci\AppData\Local\Android\platform-tools>adb devices
adb.exe: failed to check server version: protocol fault (couldn't read status): No error
To fix this, I tried every solution I could find:
Restarting
Stopping adb.exe from task manager
Reinstalling platform tools and Android Studio
None of this worked. So I went to check if there was something using port 5037 (the default Android Studio port):
C:\Users\LeonardoPetrucci\AppData\Local\Android\platform-tools>netstat -aon|findstr "5037"
TCP 0.0.0.0:5037 0.0.0.0:0 LISTENING 16420
C:\Users\LeonardoPetrucci\AppData\Local\Android\platform-tools>tasklist|findstr "16420"
svchost.exe 16420 Services 0 13,744 K
If I then go into Task Manager and stop process 16420 and try to run adb again:
C:\Users\LeonardoPetrucci\AppData\Local\Android\platform-tools>adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
The problem here is that svchost.exe will randomly start up again and take over the port and if I restart, I need to do this whole process again.
Any idea why this would be happening?
When I run ADB and type in "adb start-server" it says
*daemon not running. starting it now on port 5037 *
could not read ok from ADB Server, error = 109
*failed to start daemon *
error: cannot connect to daemon
what should I do? I've tried killing the server and restarting the pc but nothing seems to work. my pc recognizes the phone and the adb process only appears briefly when i try to start the server. also, it gets stuck on wating for device when i type "fastboot oem unlock"
Looks like windows is messing up the ports (reserving them). I have the same issue with docker containers and this worked for me:
Run this in the command line (as administrator)
net stop winnat
adb.exe start-server
net start winnat
Happened with me as well. Just check there might be an existing adb process running in your task manager. Just kill the process and run the 'adb start-server' command.
Hope it helps
Happened to me today.
I realized it happened when I started Android Studio after having my Genymotion emulator running, so I fixed it by closing everything (even check task manager for a running instance of adb).
After closing everything, I opened Android Studio first and then the emulator and everything was ok.
In my case the issue was in IntelliJ IDEA plugin - Aladdin Logcat. Turned it off and everything works now.
This happened to me because I had Oculus Developer Hub open.
Even if you're not using its adb features, it will constantly try to start its own version of adb and kill the one you're trying to launch.
I have installed adt bundle eclipse. However, I can't seems to run the AVD. I have the problem of
ADB server didn't ACK
failed to start daemon
I have search on how to solve it, I've read to type adb kill-server and adb start-server. when I typed that, it says
adb server is out of date. killing...
ADB server didn't ACK
* failed to start daemon *"
Please follow below steps:-
Go to run
open command prompt
get into your platform-tools under android sdk.
now type command: adb kill-server
then upon success type: adb start-server
Thats'it.
Let me know if you still facing any issue..
I had this exact problem on my Vista x64 system. I solved it by doing the following:
Ctrl-Alt-Del, start Task Manager, under Processes tab, check for "shuame_helper.exe". It was there from running RootGenius. I clicked End Process, then went back to the command prompt and entered adb start-server and it worked!
Try below step from DDMS in eclipse :
So I had the same problem and failed in all the same ways as above:
adb kill-server
followed by
adb start-server
still resulted in the ADB server didn't ACK error.
The other common suggestion of using the task manager to kill the process also
failed as it seemed that something restarted adb automatically? It would disappear for a second, then there were two adb processes ,then there was one again.
Exasperated.
I restarted Windows in safe mode.
This ensured that adb wasn't started.
Shut down and restart normally. Problem solved.
Just for good measure, I also updated eclipse and android at this point, but I think that the safe mode restart fixed it.
Give it a try when all else fails.
When this happens I open Activity Monitor (on mac) or Task Manager (on windows) and look for the ADB process and force close it (sometimes there are more than one, close those to) and then press the Run button again in Android Studio or Eclipse.
1)Open task manager first
2)close any instance of adb.exe(end task it)
3)open command prompt
4) type adb start-server(you may have to execute it twice)
5) try to run now.
I had this problem using the latest ADT, SDK and Eclipse on Windows 7. I had an old ASUS TF101 and an HTC HD connected with their respective docking software. When I looked in processor tab of the Windows task manager I could see two instances of the adb.exe, one loaded and another one looking like it is trying to load.
I killed the PC connecting software (process in task manager) for the ASUS, the HTC Sync wasn't running. There is now one adb.exe running and both devices are recognised in Eclipse and in the command prompt (adb devices). You may need to restart Eclipse.
I have spent around 5 hrs on this problem. I have read the same question on stackoverflow, but none of the solutions solved my problem...
First, it gives me:
[2013-02-28 14:48:21 - adb] ADB server didn't ACK
[2013-02-28 14:48:21 - adb] * failed to start daemon *
To solve that, I kill the adb.exe in task manager, restart eclipse. Then go to DDMS, reset adb. NO LUCK...
Then, I go to command line window, type adb kill-server and adb start-server, it gives me:
adb server is out of date. killing...
ADB server didn't ACK
fail to start deamon
Now I don't know what to do. I have a project to develop on eclipse, so really need to solve this problem soon. Someone please help!!
(As many solution indicated, I killed my adb.exe thousands of times, but it showed up immediately in task manager after 2 seconds. )
I had the same problem, here is what actually helped me:
Go to platform-tools in Android SDK directory.
Type:
adb nodaemon server
Output:
cannot bind 'tcp:5037'
Now I know the reason adb not responsive is because it can not bind to port 5037. Use following command to find out the process that occupies the port:
netstat -ano | findstr 5037
Output:
Note that process with PID 4888 is occupying port 5037.
Open Task Manager, click on Details tab, find the process and kill it, tfadb.exe in this case. it may vary for me it is sh.exe and port 4599 and delete all adb.exe
Retry adb kill-server and adb start-server, hopefully adb is up running fine.
Killing the process in the TASK MANAGER solves it in my case. After killing it run adb start-server or adb devices and you should be fine
solved the problem.
Because I have a small assistant plugin installed on my pc, it has an adb.exe running in the background all the time. So after I uninstalled the plugin, the error has gone!
I have an HTC device, whose driver software (HTC Sync) tried to run processes using adb at the same time that I was trying to run from Eclipse. If you have a program like HTC Sync for your device that might have been needed to install the driver, close this program to keep it from executing adb in parallel. So far for me, this has fixed it 100 percent.
Sometimes when we are running SnapPea, it is running a background process called "wandoujia_adb". when killing the process and running the command "adb start-server" in cmd promt, i get the following o/p text to cmd promt:
C:\Users**>adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Here Is your Solution
Kill ADB process
CLose Eclipse
Remove Lock File .metadata of workspace
Ensure Only one Java Whether JDK or JRE in installed
if found remove the previous version
Use Ccleaner to remove Temp files
Clean Registry too
Restart the system
Restart Eclipse
If you have your device connected and you are trying to test through an emulator, make sure that a device sync agent isnt running in the background. This relaunches the adb even after you kill it in task manager.
I have tried many approaches I've found here, but just one worked out perfectly:
UNINSTALL AVAST ANTIVIRUS!
I had a mobogenie plugin installed on my machine which was continuously running adb. Uninstalled it and got the problem solved.
In my case I was using the mobogeine universal driver, when I end task adb.exe from task manager, It restarts again in 1-2 seconds occupying another port number.
To get rid of this problem I have to disconnect my phone & 1st kill mobogeine driver, then adb.exe does not restarts agian. Now run adb start-server . If the success message shown then everything worked perfectly.
This question already has answers here:
Eclipse error "ADB server didn't ACK, failed to start daemon"
(23 answers)
Closed 4 years ago.
I am a Android newbie. I guess I might be doing something stupid here. I have started the Virtual Device and I see that adbd daemon is running from the Terminal Emulator. When I run adb devices I get the following error:
C:\Program Files\Android\android-sdk\tools>adb devices
* daemon not running. starting it now on port 5037 *
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
No other process is using port 5037. What am I doing wrong? Here are the packages I have installed -
1) Android SDK Tools, revision 10
2) Android SDK Platform-Tools, revision 3
3) SDK Platform Android 2.3.3, API 10, revision 1
This will occur normally,if abd is not able to launch properly and didn't exit when adb kill-server is executed.
So if in Windows
1. Go to Task Manager (CTRL+ALT+DEL)
2.look for adb.exe and end the process.
Now restart the emulator ,should work properly.
additionally you can close and launch the development environment also (eg: Eclipse or NetBeans).
I suspect the problem is cause of many adb instances (in windows) , i usually face this problem cause i don't turn off my system so the adb process may not end properly.
So open task manager choose Process tab just search for adb.exe, right click on it and choose End Process Tree rather than just End Process
Had the same problem, it seems that my security solution was blocking adb.exe
this is not the right folder for adb : lately adb has moved from /tools to /platform-tools in the sdk folder.
Seems like the security program is blocking adb.exe, so go to the adb file path and open adb's properties, then check the Run this program as administrator setting.
In my case the process adb.exe starts when i connect the phone, and then when I adb devices then I have your problem, and killing the process does not help it is resurrecting like a stubborn zombie, as long as the phone is connected.
so my solution was to disconnect the phone, then kill adb.exe process, then start it by adb devices and connect the phone
After that when i command adb devices i ma getting the same prompt about killing adb out of date, but this time on the second line is * daemon started sucessfully*
win xp
htc sensation
the new eclipse adt sdk bundle from google so i suppose up to date.
I found there was a process call "Tadb.exe" in Windows Task Manager.
I guess Tadb.exe is a similiar adb application of Tencent. Because I got an alert of "android device detected by QQ" after I install the last version of Tencent QQ2013 Beta5 (6970) yesterday.
After I killed the Tadb.exe, the original adb.exe of Android SDK works again.
You can see the detailed proecss to solve this problem here:
adb cannot run, adb server is out of date
I turned off the Windows Firewall and its working like magic. I am connected to the Internet through WiFi. If you are not behind a proxy and are still unable to access the Internet through a wireless link via the emulator, go to Device Manager and disable your LAN card.
As I have tried as follow by combining omni.present's method , and finally emulator works fine.
firstly I stop adb.exe process in the task manager
then I stop and start eclipse
The fundamental reason is because the 5037 port on your machine to be occupied by a process, not only Android devices can not use adb connection ios device not use iTunes.
Can query process and close it, netstat / a / o maybe can help you to take up to 5037 ports.
To windows7 the LogsAndAlerts service will occupy port 5037.