Android 4.2.2 – adb offline, even after SDK upgrade-ThrowExceptions

Exception or error:

Edit: Fixed! Looks like there are very many possible causes for this. Mine was one of the more unusual…


I updated SDK Tools to 21.1 and Platform-tools to 16.0.1. Verified with adb version that I am running v1.0.31. My development machine is running Windows 7, x64.

I have four 4.2.2 devices to test with, a Galaxy Nexus with unlocked bootloader but not rooted, and Nexuses One, 4, 7 & 10, all stock.

The Nexus One, being <4.2.2, works just fine with adb, but all the 4.2.2 devices show as ‘offline’ in adb, and I have NEVER seen the RSA security dialog pop up on the devices, even after several restarts of ADB (using kill-server), the PC and the devices themselves.

Have tried using different USB ports and cables. I’m using the standard ‘Android ADB Interface’ drivers from the SDK, but have also tried the ‘Android Composite ADB Interface’ and ‘Samsung Composite ADB Interface’ drivers too. I even completely re-installed the SDK from the ADT bundle.

Weird thing is, my colleague can get the popup to show on those same devices without any trouble. I even copied his adb.exe and dll’s and tried that and it still wouldn’t work on mine. He didn’t install from the bundle; he installed ADT into Eclipse, the old-fashioned way, but I doubt that would make a difference. What gives?!

Edit 26/02/2013, 16:41 GMT: An update to Platform-tools 16.0.2 was just released. Hasn’t updated ADB (still v1.0.31) and still seeing device as offline, and no RSA security popup in sight.

How to solve:

It turns out I had my ANDROID_SDK_HOME environment variable pointing to an old location which no longer existed. It hadn’t caused any other problems (strangely) but it appears to have been preventing the RSA authentication process from happening. Probably should’ve seen it when I was checking the PATH variable the other week, but never mind.

I found the strange location by running the following and checking the readout:

adb kill-server
set ADB_TRACE=all
adb nodaemon server

After updating the location and restarting my PC, it’s now working just fine. Thanks to all who responded.

###

Best solution I found ever is:

  1. Check your adb version by using the command: adb version for Windows and ./adb version for Linux.
  2. If it showing 1.0.29 please upgrade it to 1.0.31 because 1.0.29 will not respond for JB 4.2.X
  3. It will fix your device offline problem.
  4. If your system already have the new adb(1.0.31) and facing this problem, in that case open sdk and upgrade platform tools to 16.0.1
  5. Restart your device at least one time.. 🙂 it will work fine for all the devices…

###

I had the exact same problem, and this is what worked for me: if you’ve created multiple user accounts on your Nexus 7 device, then you won’t get the security popup unless you’re logged in to the same account that was used to enable USB debugging on the device. Do that, and when you see the popup make sure that you check the option that says “always trust this computer”, then it should work for other accounts as well.

###

ADB_TRACE revealed the answer to my problem (a permissions issue with the ~/.android folder on my Linux system was preventing the key being generated). Many thanks for this.

###

This will definitely work:
In platform-tools hold shift and right click.
Select open command prompt here.

adb kill-server

adb devices

Say yes to popup on phone.

Your device will be connected.

If still not working try reconnecting device and checking for adb devices again

###

I did this and it works on my windows 8:

  1. Open Computer — Manage in File manager
  2. On system Tools/Device manager, remove any existing android related items.
  3. Click “Scan for hardware changes”.
  4. The device showing up as a warning sign.
  5. right click the device, click “Update driver software”.
  6. choose ANDROID_SDK_HOME\sdk\extras as source of drivers.
  7. On device, turn off USB debugging off and on ( or for several times)

Wow, the popup shows up in the device!

###

Multiple adb.exe files ?

My problem was solved when deleted a copy of OLD adb.exe from C:/Windows/.
I don’t know how a copy of adb.exe got to the C:\Windows\ ?

When I launch adb.exe from android-sdk/platform-tools/ I had no problem with detection.

###

I had the same problem and setup. Windows 7, x64, Eclipse Indigo, one user on the device etc.

I tried adb devices using v1.0.31 and under no circumstances did I see a pop up on the device. I tried all sorts of combinations of turning on/off debugging, plugging the USB back and forth, restarting the device etc. Nothing worked. I also tried rooting the device in order to manually copy over the finger print file. However, the device went down beyond repair (not to recommend to anyone). I have more than one Nexus 10 so kept on trying with the other ones.

I am using bootcamp though (using Windows on a Mac laptop) so one last attempt was to try the same thing under OSX. On the first attempt doing ./adb devices from the terminal, the popup showed up. I accepted the fingerprint and now it’s working in OSX.

I prefer Windows over OSX so this is not an ideal workaround as I still can’t get it to work in Windows. I’ll keep an eye open for solutions to this but in the meantime, I hope this helps other people with bootcamp issues.

###

Flip Android debugging on the device off and back on. That gave me the device popup.

###

I am running Windows 7, one account on Nexus7. I had to actually check the box “always trust this computer” for it to work. It didn’t matter how many times I got the acceptance to pop up and select ok. It didn’t work until I finally checked the box. Now it’s fine and is recognized by adb.

###

Switching from the Samsung USB drivers (that shipped with the Nexus Root Toolkit) to the USB drivers provided by Google (through their SDK) did the trick for me.

###

I had this very problem, and found an answer: Either I fat fingered the phone or was not paying attention or it simply did not pop up saying here is the RSA pubkey check to allow for computer, I kept getting offline status. I followed every direction on the map, from having a LONG list in my rules file to reinstalling ADB 50 times. Yes it does need to be version 1.0.31, which I have. If this is you then read on….

Disconnect your device.
Use these commands in the terminal, assuming you are using BASH.

adb kill-server
sudo bash
cd ~
mv .android BAK.android

Now that you have effectively removed the initial RSA key, make sure USB Debugging is enabled on the device. Re-connect the device and pay attention to the screen. Make sure to check the ‘remember this computer’ box. Press OK. Problem solved.

###

I had same issue. Not sure if it applies but are you using adb as a root?

For me killing adb server and doing:

sudo ./adb devices list

resulted in security prompt. After accepting it pernamently and running above command I’ve finally got it to connect.

###

I had the same problem as OP but originating from an adb.exe copy in C:\Windows, much like user1269737 appeared t have. This had precedence in Windows PATH, so no matter how much I updated he SDK, it wouldn’t help as the updated ADB wasn’t being used.

Someone told me it might have been a version of the Android Studio bundle that installed it there (go figure…). I can’t confirm it because:
1. Current AS bundles don’t appear to be doing this and…
2. I install a lot of ROM flashers/tools that bundle ADB (XDA Developers stuff).

So I can’t confirm it was Android Studio.

Protip: use adb version and where adb commands in cmd to check what version you’re using and which executable you are running

###

I tried all the these things and still couldn’t get Windows to display the RSA prompt on my Android device. After hours, this is how I got it working:

  1. Connect device to PC via USB
  2. [Windows Key] + [R] > [type] devmgmt.msc
  3. Locate your device in the list
  4. [Right Click] > Uninstall
  5. Download Google USB Driver package: http://developer.android.com/sdk/win-usb.html#top
  6. Extract the zip to your desktop
  7. Back to devmgmt.msc > [Right Click] root of the tree > Scan for Hardware Changes
  8. Locate your device in the list
  9. [Right Click] your device > Install > Choose/Browse files
  10. Browse to the usb_driver folder you extracted to your desktop
  11. Windows will use the Google USB driver instead of the driver for your phone.

My problem was that the LG driver was installed on Windows. Once I deleted that and installed the google driver, it works perfectly. The RSA prompted displayed right away.

Leave a Reply

Your email address will not be published. Required fields are marked *