1

I am trying to use my Nexus 4 to run a hello world app. I'm using the Java ADT with Eclipse.

I cannot detect the device.

  • Nexus 4: Android 4.4.2
  • Java ADT: build v22.3.0-887826
  • Windows 7 Professional x64
  • Java JDK: jdk-7u51-windows-x64
  • ADB v1.0.31

Project build target is 4.4.2 (API 19). Minimum required version is API 8.

./adb devices shows no devices.

I am in USB debugging mode on the device. I have allowed installation of non-play-store apps.

My computer detects the phone as a media device (MTP), not as a camera (PTP).

I do not get a prompt asking me if I accept an RSA key.

Things I have tried:

Download USB drivers from here: http://developer.android.com/sdk/win-usb.html#top then: Start > Properties > Device Manager > Portable Devices > Nexus 4 > Properties > Update Driver > Browse > {Download Folder}

I get a popup telling me that the drivers are up to date.

  • Changing the cable
  • Changing the USB port
  • Restarting Eclipse
  • Restarting the adb server (kill-server > start-server > devices)
  • Restarting the phone
  • Restarting the computer
  • Editing android_winusb.inf, as described here: USB driving on Android - new devices

I have tried everything I've seen on these pages:

http://developer.android.com/tools/device.html

http://androidsecurity.wordpress.com/2013/06/05/install-google-nexus-4-adb-usb-drivers-on-windows-android-studio/

Android Device Chooser -- device not showing up

How do I deploy HelloWorld app to HTC Eris Droid?

EDIT: I tried to enable ADB over wifi. So I installed ADB WiFi off the play store. It needs root permission, so I tried to root my phone using Kingo Root. Kingo Root does not work. It's giving me the message "No Device Connected!". I can transfer files from the device, and it gets detected when I plug it in, so I don't know it what capacity it "is not connected".

EDIT2: I tried to enable ADB over wifi as described here: How can I connect to Android with ADB over TCP?

adb tcpip 5555 gives me "error: device not found". Looks like inability to detect the device is a common failure mode. I suspect that fixing that will let everything else work as intended.

Community
  • 1
  • 1
Zaaier
  • 685
  • 8
  • 22
  • Check my answer here: You should install the correct drivers http://stackoverflow.com/questions/22422412/eclipse-doesnt-see-my-android-device/22424377#22424377 – noobProgrammer Mar 16 '14 at 19:16

3 Answers3

1

Android debugging via usb can be a bit hit-and-miss. I have one phone that never connects, one that rarely connects, and one that seems to work pretty much every time (I still have to do the 'unplug/replug/restart' shuffle from time to time)

I would suggest investigating WiFi ADB. If it works with your device (not all devices support it) then it'll save you a lot of time in the long term:

  1. Install one of the various WiFi debug apps from the market
  2. Run it and note the IP address and port it gives you
  3. Navigate to where your android sdk platfrom tools are installed (a default Windows install should be C:\Android\sdk\platform-tools
  4. Type adb connect [ipaddress]:[portno] (ex adb connect 192.168.1.100:5555)

If your device supports wifi debugging, it should show up in Eclipse within a couple of seconds, and you never need to do the plug in/unplug/restart shuffle again!

LairdPleng
  • 948
  • 3
  • 9
  • 28
  • A good idea. Looks like I can't do it though, because I can't root my phone, because I can't detect the device from my computer. – Zaaier Mar 16 '14 at 05:45
1

You don't need any third-party application. See this answer and set-up WiFi debugging with ADB.

EDIT:

You don't need root also.

Community
  • 1
  • 1
Behnam
  • 6,510
  • 6
  • 35
  • 65
  • ./adb tcpip 5555 throws "error: device not found". Looks like the inability to detect the device is a common failure mode. – Zaaier Mar 16 '14 at 18:58
  • @Zaaier: Sorry to hear that. This method works for me and my nexus 4. – Behnam Mar 17 '14 at 05:31
1

Check my answer here: You should install the correct drivers its really easy by following the steps from the video

Hope that helps! :)

Community
  • 1
  • 1
noobProgrammer
  • 1,443
  • 4
  • 14
  • 33