22

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
  • 2,725
  • 2
  • 20
  • 26
  • 1
    Are you sure you're using the updated adb binary? on my system I had the same problem even after updating, and found out that my PATH pointed to another eclipse install with an older binary. Try using `cd` to navigate to the folder with adb and running it locally from there. – Raghav Sood Feb 25 '13 at 17:53
  • Thanks @RaghavSood, but my PATH is pointing to the sdk's platform-tools folder. Running 'adb version' confirms it is the latest version of adb. – warbi Feb 26 '13 at 09:37
  • 1
    I have the same problem and same set up as you. My adb.exe is also up to date, only using one account. Have you gotten any further? A colleague of mine had this device before me and it worked for him. He is on OSX though and I am on Win 7. – BlueVoodoo Feb 27 '13 at 11:50
  • 'Fraid not @BlueVoodoo. I can't justify spending a ton of work time trying to fix it when I have plenty of pre-Jellybean devices to debug on, but will need to fix it eventually and hopefully someone can figure out a solution...! – warbi Mar 13 '13 at 21:06

15 Answers15

19

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.

warbi
  • 2,725
  • 2
  • 20
  • 26
  • What is adb nodeamon server suppose to do? There is no such command it seems. – BlueVoodoo Mar 15 '13 at 07:55
  • 1
    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! – gelupa Mar 26 '13 at 14:51
  • 1
    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! – talel Feb 08 '14 at 10:26
8

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...
Flame
  • 2,166
  • 2
  • 20
  • 40
  • 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. – PP. May 18 '13 at 13:22
6

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.

gammal
  • 606
  • 5
  • 4
  • 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 Feb 27 '13 at 08:24
3

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.

JohnG
  • 71
  • 2
3

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

gndps
  • 461
  • 3
  • 13
2

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!

Quande
  • 21
  • 1
2

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.

StepanM
  • 4,222
  • 1
  • 21
  • 25
1

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.

BlueVoodoo
  • 3,626
  • 5
  • 29
  • 37
  • 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! – warbi Mar 13 '13 at 21:02
0

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

0

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.

severine
  • 117
  • 1
  • 9
  • 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 Mar 13 '13 at 20:58
  • 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. – severine Mar 15 '13 at 16:59
0

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.

rsp1984
  • 1,877
  • 21
  • 23
0

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.

0

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.

Marcin Raczkowski
  • 1,500
  • 1
  • 18
  • 26
0

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

leRobot
  • 1,497
  • 1
  • 18
  • 30
0

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.

fix
  • 1,425
  • 16
  • 27