By Arye Rosenstein


2011-01-23 18:34:36 8 Comments

I'm getting this error from time to time and don't know what causing this:
When trying to run/debug an Android app on a real device (Galaxy Samsung S in my case) I'm getting the following error in the Console:

Failed to install *.apk on device *:

timeout Launch canceled!

This is all the Console is telling me. LogCat doesn't provide any information. Eclipse Problems view is not showing any issues.

I tried the following steps with no success:
1. Cleaning the project (Project->Clean)
2. Restarting device, Eclipse, laptop, all of the above...
3. Moving the project to a location without spaces, according to Failed to install apk on device 'emulator-5554': timeout

The app has been debugged in the past on that device many times (app is live on Market), but this problem happens every so often, and is VERY FRUSTRATING...

Any help would be greatly appreciated! Thanks.

8 comments

@Kraig 2011-01-24 19:39:04

Try changing the ADB connection timeout. I think it defaults that to 5000ms and I changed mine to 10000ms to get rid of that problem.

If you are in Eclipse, you can do this by going through

Window -> Preferences -> Android -> DDMS -> ADB Connection Timeout (ms)

@Jon Turner 2011-03-30 22:56:28

Ran in to this problem usually with my Galaxy Tab. Increasing the timeout to 10s seems to have fixed it for now. Thanks!

@DigiOz Multimedia 2011-12-29 08:11:21

Thanks for the hint, although I had to set it to a much higher value in my case since my environment seems to be running a lot slower.

@moraleida 2011-12-30 17:30:26

I actually had to raise mine to 60000ms, but it worked in the end. Might be something with the usb speed or i don't know what... Thanks!

@Chad Schultz 2012-01-24 17:16:36

This solution worked for me. Out of all my testing devices, this only occurred on the Samsung Galaxy S (Mac OS X, Eclipse Indigo). Maybe it's an issue with Samsung devices?

@user486646 2013-06-12 14:14:42

@KarenAnne No, on Mac the preferences menu is under the application's menu not under the Window menu as it is on other platforms. This is the standard location for Preferences on OSX.

@nous 2015-02-05 21:38:25

I changed it to 10000ms. It threw the same error. Restarting the device worked in my case.

@Pratik Butani AndroidDev 2015-05-12 06:05:07

After Best Experience, I am Just Plug-in Cable to another port.

@Tom 2015-05-27 22:33:27

For Android Wear, this fixed my issue - I increased it to 50 seconds just in case, as uploading and installing to my Moto 360 takes a while.

@Utsav Gupta 2016-08-27 11:31:58

upvote for referring eclipse instead of android studio

@Phi Tran 2012-03-03 17:44:34

don't use USB 3.0 ports for connection beetwen PC and Android phone!

USB 3.0 - Port with blue tongue

USB 2.0 - Port with black tongue

@Josh 2012-03-27 23:46:29

Thank you! This shouldn't be so far down here. This is the only thing that has fixed this problem for me. I tried all the other solutions in various different ways. I even tried all the fixes against 2 devices (N1 and Transformer) and 3 cables. I think there are multiple issues going on here depending on the device, It would be nice if we could fork a question or something like that. Either way, before you restart adb or change the timeout, first make sure you're plugged into a USB 2.x port.

@Sarge Borsch 2014-03-11 21:55:17

but I have no other options! but rebooting the problematic phone helped me.

@Adrian Ferreyra 2013-12-22 19:26:16

I know it sounds silly, but after trying everything recomended for this timeout issue on when running on a device, I decided to try changing the cable and it worked. It's a Coby Kyros MID7015.

Trying another cable is a good and simple option to take a chance on.

@Ovidiu Latcu 2011-07-26 11:57:27

What I usually do when I get this error is restarting the adb server by typing in the cmd:

adb kill-server

adb start-server

EDIT: With some never versions of the Platform Tools you can do this from the DDMS Perspective in the Devices Tab menu (near the Capture Button), click on Reset adb.

EDIT2: Also I found out that it is preferable to use the USB port in the back of your PC, since most of the front USB ports are low powered, and really seem to be slower when uploading apks on your devices.

@Zac Seth 2011-08-23 14:33:11

Changing the DDMS timeout didn't work for me but this seems to have solved the problem for me. Awesome, thanks!

@Alexander 2011-09-15 12:23:12

This solved the problem for me too, as opposed to the timeout solution.

@Hong 2012-03-07 15:12:09

For my case, this definitely points to the right direction. Timeout change has no effect. Rebooting the device always works, reset somehow puts the device in offline mode. It seems that the graceful exit of the app before uploading a new version is the key for my case.

@Shahzad Imam 2012-09-20 10:48:48

@Ovidiu Latcu I got this error * daemon not running. starting it now on port 5037 ADB server didn't ACK failed to start daemon *

@Hong 2013-04-30 12:04:03

I have to do it half a dozen times every day. Closing the emulator is also necessary, but this is not a big deal because I use Intel Android images that are fast to start. On my version of Eclipse (Juno)., "Reset ADB" is on the menu that shows up when the down arrow on the Devices Tab is clicked.

@Maciek 2014-02-03 21:44:25

Connecting phone to the back of the computer insead of front like EDIT2 suggested solved the problem for me. +1 :)

@Hawk 2011-10-24 01:02:30

Reboot the phone.

Seriously! Completely power down and power up. That fixed it for me.

@tal 2011-07-26 11:51:48

I have encountered the same problem and tried to change the ADB connection timeout. That did not work. I switched between my PC's USB ports (front -> back) and it fixed the problem!!!

@Josh 2012-03-27 23:51:04

Tal, you were on the right track with this. The reason switching ports fixed the issue for you, is that most likely your front ports are USB3 and your others are USB2. See my comment on another answer for more details.

@Jim Rhodes 2013-03-06 01:11:53

I was successfully using a front port. Did a Clean and tried to debug and it would not install. Tried increasing timeout, restarting adb, rebooting phone, restaring Eclipse to no avail. Switched to a back port and it started working again.

@Gu1234 2011-03-16 13:43:20

I used to have this problem sometimes, the solution was to change the USB cable to a new one

@Julien 2011-06-14 13:33:10

Maybe the bad connection can prevent from the connection to the device to succeed. It can make sense, but you'd better try with a friend's cable before buying a new one :) +1 because he doesn't deserve a bad point for that.

@Gu1234 2011-06-16 11:23:37

Thanks for the +1. I agree this doesn't make much sense but the second I changed my cable the timeout problem disappeared.

@Richard Taylor 2011-07-03 14:49:16

Confirmed. I can reproduce this problem when running through certain USB extension cables.

@Dalmas 2011-11-09 17:30:38

Removing my USB extension cable solved the problem for me. Thanks. +1

@fatfreddyscat 2012-03-08 18:02:37

I had like 6 devices, no problem. Then I tried this samsung galaxy s phone and it just wouldn't allow the install (even with changing the timeout, etc.). Tried a different cable and ta-da, it worked. Thanks!

@Marshal 2012-12-21 11:51:21

I got the same problem when I was using a USB extension cable. That cable must not be a general purpose one because after I changed to another extension cable or not using extension at all, it worked!

@Brade 2013-02-11 21:08:19

Grrr, why should this matter??? Talk about poor dev tools... I assume this is my problem since I've tried the top 2 answers already. So now it's just a USB cable crapshoot?

@asok Buzz 2014-05-10 09:18:55

I plugged out and plugged in the USB cable and BOOM, it worked!

@Brian White 2014-09-29 03:38:25

The USB 2.0 spec (and probably others, but that is the only one I've read) explicitly forbid "extension cables" on the grounds that it made it possible to exceed the maximum cable length and making for unreliable operation. In other words, extension cables were forbidden so USB wouldn't be a crap-shoot. My (short) cable seems to work fine when I changed to a different USB port.

@Pratik Butani AndroidDev 2015-05-12 06:05:58

After Best Experience, I am Just Plug-in Cable to another port. No Need Buy New Cable.

@Richard 2011-01-23 23:35:20

I get this a lot. I'm on a Galaxy S too. I unplug the cable from the phone, plug it back in and try launching the app again from Eclipse, and it usually does the trick. Eclipse seems to lose the connection to the phone occasionally but this seems to kick it back to life.

Related Questions

Sponsored Content

43 Answered Questions

[SOLVED] Is there a unique Android device ID?

21 Answered Questions

[SOLVED] Failed to install *.apk on device 'emulator-5554': EOF

5 Answered Questions

[SOLVED] android: Failed to install .apk on device "device": timeout

  • 2013-03-21 23:45:11
  • neonDion
  • 18392 View
  • 5 Score
  • 5 Answer
  • Tags:   android install adb

5 Answered Questions

[SOLVED] Android: install .apk programmatically

  • 2011-02-11 09:58:30
  • Uroš Podkrižnik
  • 310550 View
  • 324 Score
  • 5 Answer
  • Tags:   android install

30 Answered Questions

[SOLVED] How do you install an APK file in the Android emulator?

17 Answered Questions

[SOLVED] "Debug certificate expired" error in Eclipse Android plugins

6 Answered Questions

[SOLVED] Error: "Failed to install apk on device 'emulator-5554': timeout"

1 Answered Questions

[SOLVED] I can't install apk from eclipse

3 Answered Questions

[SOLVED] Android error : Failed to install : timeout

  • 2013-04-09 12:41:24
  • Riddhi Shah
  • 2755 View
  • 2 Score
  • 3 Answer
  • Tags:   android timeout apk

2 Answered Questions

[SOLVED] Failed to install apk on device

  • 2012-09-18 03:48:00
  • Msyma
  • 4063 View
  • 1 Score
  • 2 Answer
  • Tags:   android eclipse

Sponsored Content