After I upgraded my nexus 4 to 4.2.2 I noticed that my adb stopped working (Mac). I quickly googled for the issue and I saw that many people are facing the same problem. But none of the solutions specified worked for me. After spending a lot of time trying to fix it, I finally managed to figure it out. I had almost decided to load a custom rom to make adb work, but thankfully it worked without that.

<Assuming you are running these commands in Mac/Linux>

  1. Goto your android sdk dir > platform-tools , and then run ./adb devices. It should show your device as offline. Only if this is the case, proceed with the next set of steps
  2. Run ./adb version
    Android Debug Bridge version 1.0.31. If it does not show this, you might need to upgrade your adb. In my case it did show the right version, but even then adb devices shows my device as offline.
  3. Next, try ./adb kill-server and then ./adb devices, this did not help me, but in some forum posts I read it helped a few other people.
  4. Now go to your SDK manager by going to your tools directory in android sdk and then type ./android.
  5. Click Package > reload. Now you should see an update available for Android SDK Platform-tools. This update will take you to 16.0.1 of platform-tools. (mine was at 16, and it didnt work)
  6. If you get a lot of errors like Failed to fetch URL , File not found, the reason could be root permissions. run sudo ./android and then you should be able to see an update. This was a lifesaver for me.
  7. After the update, your SDK manager will look like this :

    Screen Shot 2013-02-17 at 12.14.22 PM

  8. Now, when you connect your phone in USB debugging mode, you will see a popup like this :
    nexusae0_Screenshot_2013-02-12-11-47-41
  9. Have fun

Incoming search terms: