1

I've installed Android Studio 2.0 on my Windows 7 PC. This included the Android SDK. I've done Android development on this PC before and was able to connect to the actual Android device (my Samsung Galaxy S6) but that was with Eclipse + ADT and with an older version of Android Studio.

Now, with the new installation, adb devices shows: List of devices attached 05157df55345931c unauthorized

On the phone, I have Developer options turned on and USB debugging turned on. Also, under USB Configuration, I have it set to MTP. When I plug the phone into the USB port, I get the PC's auto play dialog and am able to see files/folder on the phone.

I've run adb kill-server and then adb devices. I see it starting the server, but no prompt on the phone to allow USB connections and it shows my device as unauthorized.

I've been searching everywhere for an answer to this, but all the articles I find simply talk about enabling the developer options on the phone and/or restarting the adb server - both of which I've already done.

adb version shows: Android Debug Bridge version 1.0.32 Revision 09a0d98bebce-android

I think there must be a configuration on my PC somewhere which is preventing adb from connecting to my phone, but I don't know what it is. I've uninstalled Android Studio (and the sdk) and re-installed, but still the same problem persists.

Thanks,

Levon
  • 1,681
  • 2
  • 18
  • 40
Mark Hansen
  • 349
  • 1
  • 3
  • 10
  • Have you tried to disconnect the cable, then Developer Options / Revoke USB debugging authorisations, restart both the computer and the phone, then connect the cable to your phone and see if it solves the issue? – Levon Apr 23 '16 at 21:20
  • Yes, I've done all that several times (except restarting the phone - I just did that but still no help). After restarting the phone, the USB Configuration was back to "Charging". I changed it to MTP and I get the auto-play prompt on the PC, but still no "Allow USB" prompt on the phone. – Mark Hansen Apr 23 '16 at 22:16
  • I've tried different USB cables and different USB ports. No different. As I said, I'm able to connect the phone and can see the files/folders on the PC. – Mark Hansen Apr 23 '16 at 22:18
  • Maybe re-install drivers? http://developer.android.com/tools/extras/oem-usb.html and https://software.intel.com/en-us/xdk/docs/installing-android-debug-bridge-adb-usb-driver-on-windows – Levon Apr 23 '16 at 23:13
  • Yes, I had uninstalled the OEM drivers for my device and reinstalled them. I checked the OEM driver site and verified I had the current drivers. This was done before I re-booted my PC. – Mark Hansen Apr 23 '16 at 23:25
  • Also, under Developer options on the phone, I had issued the "Revoke USB debugging authorization" and turned USB debugging off and on many, many times. Still, when I connect the device and run adb devices, it does not prompt on the phone to allow USB debugging. – Mark Hansen Apr 24 '16 at 00:23
  • Do you by any chance have ADB installed in more than one place, and had this device authorized before with ADB from a different location? See: http://stackoverflow.com/questions/23081263/adb-android-device-unauthorized?rq=1 – Levon Apr 24 '16 at 07:55
  • @Levon: I checked out the link you provided. It was about having ANDROID_SDK_HOME pointing to the wrong place. I do have it set and it is pointing to the correct location. I did a search of the computer for 'adb.exe' and found only one instance - in the correct location. – Mark Hansen Apr 24 '16 at 13:09
  • I've tried installing Android Studio 2.x (and the SDK) on a Windows 7 PC at work, and am able to connect my phone via USB there. I was even able to create and deploy/run a simple application to the phone. It seems something on my PC is stuck. How can I debug this? – Mark Hansen Apr 30 '16 at 01:59
  • @Levon: Followed your advice and it fixed my issue. My ANDROID_SDK_HOME was pointing to a dead path. I removed ANDROID_SDK_HOME and that fixed the problem. – Ian Jul 16 '16 at 19:41
  • Holy Cow! I have ANDROID_SDK_HOME set as well, to the Android/sdk directory, which is what I thought it was supposed to be set to. I unset it and tried adb again and now it works! Why adb doesn't want this set, I'm not sure. If it is supposed to be set, what should it be set to? I'm going to try playing with it (perhaps it needs to be set in a very specific way, etc.) - but for now, this problem I've been fighting with for months is resolved. Thanks! – Mark Hansen Jul 17 '16 at 22:21

0 Answers0