Adb server not responding [duplicate] - android

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.

Related

Android Studio error: cannot connect to daemon

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.

ddms: 'adb.exe,start-server' failed -- run manually if necessary, Android Studio

My adb is down, no matter I am using ADT or Android Studio.
And according to the second answer of this SO question, I did:
I type:
adb nodaemon server
Output:
cannot bind 'tcp:5037'
Then netstat -ano | findstr 5037
I did find a pid of 7416 who listen in 127.0.0.1:5037
I use taskkill /pid 7416 -f to kill it.
I type netstat -ano | findstr 5037 again, I found another pid listens at 127.0.0.1:5037 again!
I guess they are the same, but I have no idea who it is.
Can I simply have a easy way to release this port or change the adb port to another one?
In my case I was trying to use genymotion emulator device.
With genymotion opened and running, I've tried to run my app in this emulator but I it doesn't worth
In this part I had this error:
'C:\Users\Jose\AppData\Local\Android\sdk\platform-tools\adb.exe,start-server' failed -- run manually if necessary
Then I've tried Jaskey's solution but it doesn't works.
So I stopped genymotion emulator.
Then I restart ADB (Tools > Android > Unchecked Unable ADB Integration then I've checked again)
Next I've start genymotion emulator again
And now the app works on the emulator.
For Windows,
Close Android Studio and any of your Emulators you are using,
then goto->TaskManager and Kill the process(adb.exe)
After finishing all these First open Android studio followed by emulators.
Sometimes there are conflicts between ADB Genymotion and ADB SDK because both of them use the same port. So I recommend always set up ADB Genymotion to use the ADB SDK, in that way to avoid incompatible issues.
Genymotion-> Settings -> ADB -> Use custom Android SDK tools (here your set up your sdk android location).
I solve this problem at last! I finally found the program name of the pid and I kill it in the task manager.
The way to detect is described in the question:
adb nodaemon server
Output:
cannot bind 'tcp:5037'
2.and then netstat -ano | findstr 5037 to find who takes this port.
Get the pid and find it in the task manager. Please note that the process tab may not show the column of pid, we should include it by setting.
In my case, it is tfadb.exe who takes this port! This is a Chinese Video program client! Try to kill it in task manager.
Now I stop it starting from booting. The problem is solved.
The best and working solution is:
Close Android Studio
Open task manager
Kill the process adb.exe
Open android studio again
Problem solved
Close Android studio then go to Task Manager
End Task adb.exe
goto Details menu
End Task java.exe and jusched.exe
now open Android Studio it will work properly
I solved by End task "adb.exe" background process from task manager.
and Start adb thats it :)
Open the Genymotion emulator after opening The Android studio.
in my case one application on window use adb.exe.
that application name is mobogenie.
Fixed ::
Goto Window TaskManager select adb.exe and press End process
Just goto the task manager on your PC, and kill adb.exe, then back to your android studio. it should initialize and reconnect.
disconnect any usb connected android devices. I was tethering to my laptop via my cellphone for internet connection. I got the adb start server failed error with loopback error "port is only used for one socket connection".
I disconnected my cellphone usb connection from my laptop and now android studio recognizes my genymotion emulator and another android device I have connected via usb in the deployment target box.
if genymotion or emulator not working try to install pdanet+ in your system and mobile device choose your mobile type(motorola,sony,other)it will automatically install driver and run your application in mobile device.
Check the firewall of the system. May be the "allow app to communicate through windows firewall" may have blocked android studio.
I have tried all of the solutions proposed above, but no one of them solve my problem. I had some hour of hadaches trying to solve this problem on my laptop (Ubuntu 20.04). This is how I came to solve it finally.
The problem was that the adb default port 5037 was already taken by another, so the solution became simple :
kill the process running on that port (5037) then launch the adb manually
launch the adb on another port :
user~$ adb start-server -P xxxx
Where xxxx represent another port
There may be a problem with Windows 11. to solve that issue follow the steps
Go to the android studio app
Right-click the app
Go to Properties
Go to compatibility
Check the Run this program in compatibility mode
Select windows version 10 or 8 or 7 Then apply and ok
After these changes start the Android Studio App, This is works for me.

ADB server can't start android

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.

ADB not responding. You can wait more, or kill "adb.exe" ... windows 8

When I try to test my Android application with an android emulator as always I now suddenly get an error message. I'm working with Windows 8. So far I tried the following things which unfortunately could not solve the problem:
reinstalling eclipse with android adt
reinstalling java
installing "android studios" first solved the problem but after one day mysteriously also here adb, stopped working with the error message given in the title " ADB not responding ...
furthermore I unsuccessfully tried out some advice from Mr. Google:
Stopping adb.exe via task-manager and restarting eclipse / android studios
"adb kill-server" then "start-server" via command prompt
setting the path to adb.exe as an environment variable
switching off any antivirus or firewall
starting the IDEs as an administrator
updating the IDEs
The only thing I can remember doing which may have destroyed adb on my computer for all times: I connected my motorola smartphone to my laptop and installed the motorola usb drivers but as I said the adb also won't work with the emulator.
Any help would be kindly appreciated. The issue bothers me for more than an entire day now. Maybe someone had similar problems on Windows 8 ?
On OSX helped:
Close Android Studio
Kill all processess using 5037 port
sudo lsof -i |grep 5037
sudo kill PID_NUMBER
Run adb devices from console
adb devices
Meanwhile the emulator is working again. I cannot definetly say what solved the problem. What It could be a combination of two things:
Deleting the hidden ".android" folder under C:\Users...
(Probably there was some malfunctioning automatically created code)
Deleting and recreating the Path variable to the folder with adb.exe ( ...\sdk\platform-tools\;)
Finally it could be a Windows 8 issue which I don't understand.
Try this,
Open a command prompt with administration permission and type
netsh interface tcp set global autotuninglevel=disabled
This worked for me
Edit: Windows only
Kill the adb.exe with a command prompt. Open a command prompt were your adb.exe is located and type
adb kill-server
Maybe HTTP Proxy blocked the localhost 127.0.0.1:5037
If you have config the HTTP Proxy, make sure to exclude the localhost like picture below
Also, port can also be blocked by the firewall and anti-virus firewall, please notice as well.
Try this,
at the prompt try adb kill-server
Start one of your AVDs
at the prompt try adb root
The prompt should say adbd is already running as root.
That should fix it.
In case it helps anyone else, for me the problem was related with the USB hub that the tablet was plugged into on the computer (unplugging the webcam which was in use fixed it).
I got the same error. Don't worry. I have an solution. Go to Task Manager. Kill the process called adb.exe. You will find 2 or 3 processes. Kill all of them. You are done. It will work.
I have the same problems. Verify port 5037 is free and ports 5555 to 5585 are available and never used by another process.
"ADB server sets up connections to all running emulator/device instances. It locates emulator/device instances by scanning odd-numbered ports in the range 5555 to 5585"
FROM: http://developer.android.com/tools/help/adb.html
To find out which process is listening on a port on Windows yo can use:
C:> netstat -an -o
FROM: How can you find out which process is listening on a port on Windows?
I had the same problem, here is my simple fix:
-Go to task manager in windows, look for adb.exe, and kill it
-Go to command prompt, and tap adb devices ==> it will automaticaly start adb daemon
I finally just restarted the computer, and that solved the issue for me.
Uninstall HTC Sync. Or disable it somehow.
Try to open adb from command prompt from directory location as <sdk>\platform-tools,
If adb file is missing try to re-install Android SDK with latest version,
And try to run again..
I think issues will solved, by this procedure.
I saw this on a Mac OS X.
I shut down Android Studio and ran adb get-state in the terminal. When I started Android Studio back up, the warning had gone away.
BTW, I did just try restarting Android Studio without any luck. I am sure a restart of OS would have fixed it too.
The same thing with the Asus Sync utility (with the both our Transformer's 700 and 701).
I think there is a USB-port conflict between ABD driver and Sync utility.
Exit from Sync utility resolve the problem.
Looks like this could be caused by a bunch of different issues. This just happened to me because I had my android phone device plugged in for USB debugging, then after a few hours (and multiple android studio/phpstorm restarts) I had to do unplug the device manually. Things started working again after unplugging.
I have faced this problem few days ago. When I opened my task manager it showing me two adb runnig. It may be because of I am using mobogenie for connecting my android phone for debugging application. This problem is because of moboginie and adt port conflict. then I have followed following procedure to sort out this issue.
!) close eclipse
2) Go to task manager and kill all adb processes.
3) Now go to platform-tools in android sdk
4)press shift+right click mouse and select "open command window here" option
5) type
adb kill-server
adb start-server
6)if server sucessfully started then start eclipse and then connect your phone
(Remember dont connect your phone before starting eclipse)
Following works for me every time:
go to File->Invalidate Caches/Restart
select Invalidate and Restart
And, You are good to go.

Android ADB didn't ack issue in 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.

Categories

Resources