291

I've spent days trying to launch any Android program. Even "Hello World" gives me the same error:

"The connection to adb is down, and a severe error has occurred".

I'm running Eclipse v3.5 (Galileo), Google APIs 2.2.8, on a Windows XP machine.

I've used all the tricks I can find on the web: the command line "adb kill-server", the DDMS "reset ADB", I started the emulator both before and after Eclipse, and searched for ports being used by other programs.

What is going on here? Is there a magic combination of versions of Eclipse, Java, ADB, emulator, and whatever else that works?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ted Betz
  • 1,621
  • 3
  • 22
  • 29
  • 2
    Is your emulator showing up in the devices command? - `# adb devices` – Adam Harte Nov 01 '10 at 20:25
  • If all you are doing is android development you may just want to download Motodev for Android. Then all this is preconfigured for you. – Jim Nov 01 '10 at 20:49
  • I'm not familiar with the devices command. I do see Google APIs as a AVD in the "Android SDK & AVD Manager" window, and I can start it from there as well. – Ted Betz Nov 01 '10 at 21:04
  • I ran the adb devices command and received "error: write failure during connection". – Ted Betz Nov 01 '10 at 21:50
  • Thanks Jim for trhe heads-up on the Motodev site. They make it a lot easiler to install all of the packages. However, the same problem exists. I guess its the same Eclipse with the same unstable adb. Any help is much appreciated. Im on day 3 of this problem. – Ted Betz Nov 02 '10 at 19:58
  • Cleaning project did work for me. – MD SHAHIDUL ISLAM Dec 08 '13 at 05:44

39 Answers39

532

Try the below steps:

  1. Close Eclipse if running
  2. Go to the Android SDK platform-tools directory in the command prompt
  3. Type adb kill-server (Eclipse should be closed before issuing these commands)
  4. Then type adb start-server
  5. No error message is thrown while starting the ADB server, then ADB is started successfully.
  6. Now you can start Eclipse again.

It worked for me this way.

Restart your phone as well!

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Guna
  • 1,756
  • 1
  • 11
  • 2
  • 19
    in mac it was a bit more simple,i went to the directory tools inside Android sdk. Then i click on adb file and start the eclipse again. – Adeem Maqsood Basraa Mar 19 '11 at 14:21
  • 27
    Adb has been moved from /tools/ to /platform-tools/ – Gabriël Jun 16 '11 at 10:45
  • 18
    This didn't help me. I've got the 'ADB server didn't ACK'. The computer reboot helped ;) – lomza Dec 08 '11 at 08:40
  • 15
    When I did adb start-server, I got an error: ADB server didn't ACK. Failed to start daemon. – IgorGanapolsky Dec 22 '11 at 17:48
  • 4
    For 64 bit Ubuntu users ensure that *ia32-libs* package is installed. `apt-get install ia32-libs` – dianovich Jan 08 '12 at 17:25
  • 2
    I also got the same error as Igor G. * daemon not running. starting it now on port 5037 * ADB server didn't ACK * failed to start daemon * – Nishant Apr 09 '12 at 10:08
  • 52
    Ok I solved my issue. I go to Task Manager in windows7 -> processes -> selected the adb.exe -> End Process. After that I go to cmd prompt and type adb start-server. This time adb statred succefully. I run eclipe and it was showing no error. – Nishant Apr 09 '12 at 10:14
  • 1
    I can't begin to explain how many times `adb kill-server` and `adb start-server` have fixed my problem! – WOUNDEDStevenJones Dec 04 '12 at 20:18
  • If not solved, check for any other processes you have running that have adb in their title. For me it was SnapPea. – Nik Mar 16 '13 at 14:42
  • I found you don't need to navigate to the directory to launch the command prompt, you can launch it and run the adb commands from anywhere. – Ciaran Gallagher Apr 22 '13 at 22:07
  • However, there is one problem: there is a 50-50 chance for this solution. Even if the adb is fixed, still disconnects suddenly. Overall, adb sudden disconnection is highly questionable. I tried your solution but still no work. – David Dimalanta Apr 25 '13 at 02:28
  • Can someone explain why this happens in the first place? – DDD Sep 05 '13 at 20:05
  • recently i found this problem many time I start working my pc. what is the problem and how can solve to do not need to I try commands? to day this wont work and i get the message say that "faild to start deamon" :( – Mahdi Feb 26 '14 at 08:34
  • my problem is solved! it because of port confilict with another app – Mahdi Mar 01 '14 at 12:21
  • if you are using genymotion this [link](http://codetheory.in/adb-genymotion-upgrade-issue-devices-not-showing-up/) is very helpful – 0xFK Nov 25 '14 at 08:44
  • This was handy, I got "adb server is out of date. killing..." so I updated and problem solved! – tkelly Mar 02 '15 at 15:13
106

Use:

Open Task Manager → Processes → adb.exe → End Process → restart Eclipse

This worked for me.

And:

Open Task Manager → Processes → eclipse.exe → End Process → restart Eclipse

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Usama Sarwar
  • 8,922
  • 7
  • 54
  • 80
24

Open up the Windows task manager, kill the process named adb.exe, and re-launch your program.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
joseph_morris
  • 705
  • 6
  • 13
  • I see you're a new user here. Answers with big green checks by them mean the person has accepted them. When adding answers to a question with an accepted answer be certain that your answer has some substantial difference, be it the clarity of the explanation, detail or approach taken. I hope you enjoy your stay here! – Jason D May 07 '11 at 22:59
  • 4
    Thanks. My approach here does not involve re-starting Eclipse (faster), locating the ADB SDK tools directory at a command prompt and typing two commands (also faster). In other words, it is one step instead of the original six. Despite the original poster's acceptance of an answer, I thought this approach was a substantial enough addition (for those using Windows, at least) to warrant posting. – joseph_morris May 09 '11 at 22:09
  • 1
    The accepted answer didn't work, this did, thanks - Eclipse "Indigo" win7 – Mikey G Apr 05 '12 at 02:31
  • By "relaunch your program", do you mean restart Eclipse, or run the Android application I am writing in Eclipse, again? – Solace Dec 04 '15 at 17:49
12

[2012-07-04 11:24:25 - The connection to adb is down, and a severe error has occurred.
[2012-07-04 11:24:25 - You must restart adb and Eclipse.
[2012-07-04 11:24:25 - Please ensure that adb is correctly located at '/home/ASDK/platform-tools/adb' and can be executed

I realized the folder of the project in Eclipse was closed. I expanded the directory and the project launched. I know this may sound like a "no-brainer". I had the .java files open on the workspace, and that was enough to make me think the project was open.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ty Harlacker
  • 111
  • 1
  • 4
10

I tried this using Eclipse Juno and it worked fine:

  • From the dropdown of the Run icon, select option Run Configuration.
  • Make sure your project is selected
  • Go to tab Android
  • Under section Launch Action, select Launch Select the package name and voila! try running your application.

UPDATE: It also helps to kill the process adb.exe from the task manager and restart it. adb.exe can be found here: Android\android-sdk\platform-tools.

Good luck

Norwin
  • 51
  • 1
  • 5
7

Update your Eclipse Android development tools. It worked for me.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
jwanga
  • 4,166
  • 4
  • 26
  • 27
6

Make sure it's not running in the task-manager processes. If so, end the process and then start it from a command prompt as in a previous answer. This worked for me.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Mina
  • 61
  • 1
  • 1
  • 1
    Please pay attention to the date of the original question. This question was answered over a year ago with an accepted answer. – AJ. May 23 '11 at 16:33
4

I know this question has already been answered, but thought I might add that I found the problem to be folder permissions on my android-sdk directory.

I tested it out by granting Full Control to Everyone (dodgy, I know...), and the problem went away. I am not sure yet what the specific mix of permissions might be that it was looking for, but I assume some or other service in Eclipse didn't have execute permissions on adb.exe. That said, I'm a complete noob to this - just wanted to put it out there in case someone else had some insights into this.

I am running Windows 7, 64-bit, 4.2.0 Eclipse, and 20.0.0v201206242043 ADT.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
4
  1. Go to the folder platform-tools in cmd folder platform tools available in the Android folder where you have Android backup files.

  2. Type the following

    adb kill-server
    

    and

    adb start-server
    

    then type

    adb devices
    
    adb kill-server
    

You can now see your device.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Mohammed Yasin
  • 739
  • 6
  • 14
4

In my situation: I have the same warning: The connection to adb is down, and a severe error has occured

I have found the solution:

The adb.exe was moved from: android-sdk-windows\tools\adb.exe to android-sdk-windows\platform-tool\adb.exe.

Only thing. Move file adb.exe to \tools. And restart Eclipse.

Community
  • 1
  • 1
LTEHUB
  • 1,638
  • 1
  • 14
  • 17
3

This problem has been plaguing me for days until I finally figured out what was causing it. It got so bad I couldn't even update my apps even after trying all the above suggestions.

HTC Sync also runs a process called adb.exe. HTC Sync is an optional program available when installing the HTC USB driver. I had recently updated my installation of the HTC bundle and apparently hadn't installed HTC Sync before. Checking properties on adb.exe in the Task Manager showed it to belong to HTC Sync, not Android.

As soon as I uninstalled HTC Sync from the control panel the problem disappeared! (It's listed separately from the USB driver so that can stay.) I never saw more than one instance of adb.exe running. I'm curious to know if people having to kill the process from Task Manager, check to see if it's actually the Android process you are killing?

Please read user comments (I too have a HTC Thunderbolt): http://www.file.net/process/adb.exe.html

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
midiwriter
  • 426
  • 5
  • 12
2

I had the same problems, and it turned out that my antivirus program (Comodo) sandboxed the adb.exe, and that is why it didn't work. I closed the antivirus, and it worked just fine. Consider that.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
2

Simply go in Task Manager (windows users) and kill the abd.exe (it is remaining active somehow). After that start Eclipse.

The error

"The connection to adb is down, and a severe error has occured"

happened after installing plugin for Android of Netbeans. After closing Netbeans the process abd.exe remained active. When you want to start again Eclipse ... you will get the error.

You have to manually kill the adb.exe and then start Eclipse.

It worked for me.

ManuPK
  • 11,623
  • 10
  • 57
  • 76
marisxanis
  • 109
  • 8
1

The killing of the mysteriously running abd.exe worked. This sudden roadblock stopped me for a long time. I was doing all sorts of command line stuff and removed the lock icon from my user folder, but nothing worked until your simple suggestion of looking for the abd in the running processes of the task manager and killing it.

Another newbie roadblock I discovered an answer to: don't run Eclipse when any file other than the main .java file is active. If you run it when, for example, the main.xml file is active, you will get unhelpful error messages, an odd file created like main.xml.out, and it wont run.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
michael
  • 11
  • 1
1

I had the same problem

  1. I entered Task manager -> find adb.exe -> end process
  2. Go to the Android SDK tools directory in Command Prompt double click adb.exe

That's all

Peter Lang
  • 54,264
  • 27
  • 148
  • 161
1

I found the path of the SDK (Preferences* → AndroidSDK Location) was the cause. My SDK path was the following:

C:\Program Files (x86)\Android\android-sdk

The spaces in the path is the problem. To get it to work, you must change Program Files (x86) to Progra~2

The complete right path is C:\Progra~2\Android\android-sdk.

Now it should work.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
1

The previous solutions will probably work. I solved it downloading the latest ADT (Android Developer Tools) and overwriting all files in the SDK folder.

http://developer.android.com/sdk/index.html

Once you overwrite it, Eclipse may give a warning saying that the path for SDK hasn't been found, go to Preferences and change the path to another folder (C:), click Apply, and then change it again and set the SDK path and click Apply again.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
xtrm
  • 966
  • 9
  • 22
1

Close Eclipse

Use this in the terminal:

sudo killall -9 adb

Run Eclipse.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
jpmaster
  • 77
  • 1
  • 7
1

If you are using the Genymotion emulator:

Make sure that the SDK path used for Genymotion is also the same path used for the Eclipse.

This error also occurs if those two paths are different.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Hamreen Ahmad
  • 522
  • 5
  • 21
1
  1. Go to the tools folder of your Android SDK
  2. Run emulator.exe -avd <your avd>. It will take some time for the emulator to run.
  3. Once you see the homescreen on your emulator, open Eclipse and run your program again...
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Aakash
  • 11
  • 1
1

I am running Eclipse Neon2. on Mac OS 10.12.4 and I experienced this issue after recently upgrading my Android SDK to the latest "SDK Tools" (v 25.2.5), "Platform tools" (v 26) and "Build Tools" (v 26) and moving one of my development projects to Android Studio.

Unfortunately none of the many answers here worked for me.

What did work was to create a separate copy of the Android SDK in a different folder and then point Eclipse to it via "Preferences --> Android". You will have to use an older version of the SDK as indicated in this SO answer.

Once you've downloaded the separate version of the SDK and put it in a different folder than your main Android SDK, launch the SDK Manager (via <separate-sdk>/tools/android) and install the required "Platform tools", "Build-tools" and Android versions. There are two important things to observe here though:

  1. Make sure that you do not upgrade your "SDK Tools" beyond the version that's already installed!

  2. Make sure that you install a version of the "Build tools" that is less than 26!

Otherwise you may run into this issue.

rsp1984
  • 1,877
  • 21
  • 23
1

My problem was that my firewall was preventing ADB from binding to the port it wanted to.

Sean Fujiwara
  • 4,506
  • 22
  • 34
1

I had a similar problem. I found out that there was another adb.exe running which was started from BirdieSync (Sync Tool for Thunderbird). I found out with Process Explorer from Sysinternals, that Windows was running another incompatible adb.exe. Just put the mouse cursor above the process (in Process Explorer), and you'll see which adb.exe is started.

I had to kill the BirdieSync process as well, because it started the wrong adb.exe again.

Then I could start the right adb.exe, and it worked fine.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
JohnBoy
  • 11
  • 1
  • I now got the point about stackoverflow: i am really too late und the question ist already marked "solved". But it helped me to find my error and i wanted to help too. Better Luck next Time! – JohnBoy Nov 17 '11 at 21:26
0

maydenec is correct (in my case...). The file was moved.

I even found this file:

C:\Program Files (x86)\Android\android-sdk\tools\adb_has_moved.txt

Which explained this issue.

Suggestions in this file:

  1. Install "Android SDK Platform-tools".
  2. Please also update your PATH environment variable to include the "platform-tools/" directory.
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Guy Cohen
  • 689
  • 1
  • 9
  • 25
0

It worked for me to start my AVD emulator first (from the AVD manager), and then to run my program. The other stuff mentioned here.

(Restarting the ADB server didn't work though.)

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
user929404
  • 2,153
  • 1
  • 22
  • 27
0

Eclipse → preferencesAndroidNDK

Check the "NDK Location" path is set correctly, and use the browse button to set it.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Gavin Thornton
  • 1,897
  • 1
  • 12
  • 11
0

AndroidSDK → Platform ToolsKill did not work.

But after restarting my computer, it worked.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
gnganapath
  • 917
  • 12
  • 16
0

Nothing worked for me, even restarting a computer. I couldn't install an app on my device. But I solved this problem by myself:

Go to DDMS and choose connected device. Now try again!

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Nolesh
  • 6,848
  • 12
  • 75
  • 112
0

I got the same error. My resolution is to set the directory platform-tools to the system path and then restart the OS.

Or in a DOS cmd prompt:

set path=%path%;c:\xxx\platform-tools

It works for me.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
blode
  • 1
0

Add android-sdks/platform-tools to the Windows PATH environment variable.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
GOsha
  • 689
  • 5
  • 13
0

I've tried the above methods, end the adb process through task manager and all, it didn't work. But when I ran the adb.exe file as admin it worked fine.

Anshu Dwibhashi
  • 4,617
  • 3
  • 28
  • 59
Sai Rohan
  • 3
  • 4
0

Check if your firewall didn't add a rule and blocked the connection to adb server. It uses newdev.dll and your network. It just happened here, I removed the blocking rule from the firewall, and now it is fine.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sergio Abreu
  • 2,686
  • 25
  • 20
0

I've deleted all my tasks from HTC task manager and now it's working.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Petre
  • 1
0

For Ubuntu users, you can run the following command:

sudo apt-get install ia32-libs
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Mustafa Magdi
  • 313
  • 4
  • 13
0

Here is a script I run to restart adb (Android Debug Bridge) server:

#!/usr/bin/env bash

## Summary: restart adb (Android Debug Brdige) server.

## adb binary full path
ADB_BIN=./adb


if pgrep adb >/dev/null 2>&1
then
    echo "adb is running"
    echo "terminating adb ..."
    $ADB_BIN kill-server
    if pgrep adb >/dev/null 2>&1
    then
        echo "did not work"
        echo "kill adb processes by killall"
        killall -9 adb
    else
        echo "terminated"
    fi
else
    echo "adb is not running"
fi

echo "starting adb ..."

$ADB_BIN start-server

echo "adb process:"

echo `pgrep adb`

echo "done"

# END
Meng Lu
  • 13,726
  • 12
  • 39
  • 47
0

Devices window → toolbar more menu → Reset adb

For displaying the devices window: Menu WindowShow viewOtherAndroidDevices

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Fedir Tsapana
  • 1,283
  • 16
  • 19
0

Another error cause would be the fact you might have set up adb.exe to run with administrator privileges.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
younes0
  • 2,288
  • 1
  • 25
  • 34
0

Last time I faced this problem, was solved with adb restart. If you have tried adb kill-server and adb start-server with no luck you might want to try this. When again I faced the same issue I tried all the above answers, with no luck, and this was the last option to try. It did work like a charm.

Goto Android SDK Manager >> Install the essential packages.

AnonymousCoder
  • 582
  • 2
  • 5
  • 18
0

I have tried "adb kill-server" and restarted Eclipse too many times. I even rebooted my computer. They don't work.

Finally, I turned off test mode of my phone and turned on again. Then everything looked fine.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
ToyAuthor X
  • 315
  • 4
  • 5