Nexus 5 (Kitkat 4.4) won't authorize my Windows 8 computer

Jonathan McKay picture Jonathan McKay · Nov 10, 2013 · Viewed 20.2k times · Source

I'm trying to do some app development for Android with Eclipse and my Nexus 5.

However, after the first time loading MyFirstApp from Eclipse, I can't seem to get the authorization right.

When I run adb devices from the command prompt, I end up getting

0350b965215d9854               unauthorized

or

0350b965215d9854               offline

and even after restarting everything, I only sporadically get the authorization popup on my phone. Even if I select 'always allow from this computer' checkbox (pic below), my computer remains unauthorized. I have never had it remember authorizing my computer as the checkbox would suggest.

A few times, after killing the server and restarting the server multiple times, adb will recognize the device, as after typing "adb devices", I get

0350b965215d9854            device

But if I try running the app in eclipse I'll get the following error message.

[2013-11-09 18:10:16 - MyFirstApp] Failed to install MyFirstApp.apk on device '0350b965215d9854': timeout
[2013-11-09 18:10:16 - MyFirstApp] Launch canceled!

I'm also unable to run shell or other commands from adb.

I've verified I'm using the latest usb drivers, android sdk, and eclipse release and have tried the following fixes:

On Nexus 5:

  • Booting in Safe mode

    Toggling/untoggling USB Debugging

    Revoking USB debugging authorization and reauthorizing

    Restarting the phone

    Allowing permissions on a one-time basis

On Windows 8:

  • Restarting the computer

    Restarting Eclipse

    Killing/starting adb from cmd

    Killing adb from task manager

    Reinstalling Eclipse

    Reinstalling google's USB drivers

    Installing the nexus 5 line in google's drivers as per this question

    Reinstalling the Android SDK

    Changing USB Ports

I've seen very similar posts for the Nexus 4 and Nexus 7, but after trying everything contained in those solutions, I'm still not getting anywhere.

Answer

Nevin Chen picture Nevin Chen · Nov 12, 2013
Here's my solution
1. I re-download the latest ADT bundle
2. uninstall the old driver in "My Computer" -> "Device Manager" (delete the old driver also)
3. Right click on "Nexus 5" and update the driver using the one under "[New ADT Path]/sdk/extra/google/usb_driver"
4. Turn on debug mode (click on KRT16M multi-times)
5. Deploy my first app . And a popup on device appears. Click "Yes" to accept the key.

Good luck!