Android 4.2.2 - adb offline, even after SDK upgrade

30,969

Solution 1

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.

Solution 2

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...

Solution 3

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.

Solution 4

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

Solution 5

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.

Share:
30,969
warbi
Author by

warbi

Software/Android Developer

Updated on July 09, 2022

Comments

  • warbi
    warbi almost 2 years

    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.

  • warbi
    warbi over 11 years
    Hi @gammal, thanks for the reply. I saw about this problem somewhere, but in my case all the 4.2.2 devices I have to test with have only one account on them.
  • warbi
    warbi over 11 years
    That'd be great but the dialog on the devices has never popped up when it's plugged into this particular PC, so I don't even have the option to "always trust this computer".
  • warbi
    warbi over 11 years
    I can't even begin to count the number of times I've tried this :-(
  • warbi
    warbi over 11 years
    Seems promising. Looks like your issue is related to the one Win7 machine then? I can get adb to work on other Win7 PCs, just not my one... Please let me know if you get anywhere!
  • BlueVoodoo
    BlueVoodoo over 11 years
    What is adb nodeamon server suppose to do? There is no such command it seems.
  • severine
    severine over 11 years
    All I can say is the same from above. These are all of the steps that I did to get mine to work. 1. un-installing all drivers for this phone and other android phones previously used. 2. Also, if you have any tethering apps installed un-install them as well (pda-net etc). 3. Make sure 'all' updates are complete in Android SDK Manager. 4. Reboot computer and phone. 5. plug phone in and install the Google drivers from sdk folder. 6. reboot again 7. plugin phone. Mine finally worked after this whole process.
  • gelupa
    gelupa about 11 years
    Thanks a million for this. This was exactly my problem too. I had moved my SDK to another location but forgot to update the ANDROID_SDK_HOME environment variable. Updating the variable fixed the problem!
  • PP.
    PP. about 11 years
    Thank you - your answer was the only one that worked for me. It was a little tricky because I had to start "SDK Manager" many times, each time upgrading one step at a time, until I ended up with platform-tools rev 16.0.2. After that I had to disconnect and re-connect my USB cable - and then my phone displayed a pop up asking me to authorise my computer.
  • talel
    talel over 10 years
    Your solution worked for me after so many threads that did not solve my problem. In addition, you supplied a powerful tool to debug any future problems! Thank you so much for sharing!
  • dexxtr
    dexxtr almost 10 years
    I also restart the PC and this is work for me! Thanks :)