1

I have been trying to use my Nexus 5 as a debuggable device when working with Android Studio. I have used several different resources to get the device to display the RSA fingerprint (which I have accepted), but the device remains "unauthorized". I am currently running ubuntu 12.04 on a Dell XPS-13.

My desktop computer running Windows 7 has had no issues is instantly recognized and a valid debuggable device.

One issue I had just recognized after weeks of trying to get this to work is that in the AVD manager, under the Compatible column for this device when UNAUTHORIZED it says: No,minSDK(API8) > deviceSDK(API 1). I wonder if this could be related as the device is currently up to date.

Here are some of the things I have tried:

  1. Updated 51-android.rules document with the following line, made executable: SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0666", GROUP="john"

  2. Series of adb kill/start-server commands

  3. Accepted the RSA fingerprint in one single instance and permanently, deleted the key/re-accepted it.

  4. Checked permissions of usb slot.

  5. Changed device from media device to camera and back (this actually sometimes lets the "adb devices" command return a value of device for the phone, but then the abd process locks and crashes).

I haven't really seen anyone with the issue where they were able to accept the RSA fingerprint but the device remains unauthorized, or that the AVD manager reports deviceSDK(API 1).

Any help is greatly appreciated, thanks!

Edit: It should be noted that I'm a bit of a linux noob so keep that in mind.

Unihedron
  • 10,902
  • 13
  • 62
  • 72
jcgrec
  • 11
  • 1
  • 3

1 Answers1

4

I have also experienced this problem after upgrading from an earlier version of Android Studio to the latest 1.0 release.

My phone was in the "Unauthorized" state and the compatible column said

"No, minSdk(API18) > deviceSdk(API1)"

enter image description here

I fixed my issue with the following steps:

Firstly, when I upgraded Android Studio I inadvertently moved the SDK directory.

To make sure your SDK folder and environment variables match up, open the command prompt and run the following command:

echo %ANDROID_SDK_HOME%

enter image description here

If your SDK is in a different location correct the environment variable using the command:

setx ANDROID_SDK_HOME "C:\Android\sdk"

enter image description here

Now we know the SDK is pointing to the correct place at the command prompt navigate to the "sdk\platform-tools" directory and issue the commands

adb devices
adb kill-server

enter image description here

Notice in the image my device in the "unauthorized" state.

Now on the phone itself navigate to the developer options page and select "Revoke USB debugging authorization".

Now head back over to Android Studio and select "Run -> Run app" menu option.

Now, when you attempt to run your application your phone should pop up with the following dialog:

enter image description here

When you see this you should be home and dry. Now when you start adb it should be authorized.

enter image description here

Finally, if you are upgrading Android Studio from a beta make sure that your target SDK and minimum SDK are set correctly. Right-click on the app folder and select "Open Module Settings".

enter image description here

Hope this helps..

Ocean Airdrop
  • 2,793
  • 1
  • 26
  • 31