Android Studio: "Device is currently in the unknown state"

10.8k Views Asked by At

I have an Android tablet and an old Linux notebook where I developed a program for months, no glitches.

Then I got a new Linux notebook, installed Android Studio, and tried to plug in the Android tablet. The tablet never shows up in the target list; it just says, "Unknown Device." When I select "Troubleshoot device connections," the wizard displays the ID of the tablet, with the cryptic message "Device is currently in the unknown state."

Turning the tablet's "USB debugging" option off and on again does not fix the problem. When I unplug and replug the USB, the tablet chimes, but does not put up a requestor asking if I accept this debugging connection.

Running adb devices returns:

$ adb devices
List of devices attached
adb server version (41) doesn't match this client (39); killing...
* daemon started successfully
B007904026445   no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html]

Any tips?


Unplugging and plugging in the USB just one more time finally gave me the requestor on the tablet asking for permission to be debugged by this notebook. End of crisis.

An actual answer how to get that requestor without USB cable abuse would be nice...

8

There are 8 best solutions below

0
On

This can happen if you have Chrome inspect or other similar software hanging

1
On

I ran into this issue when connecting a Pixel 2 XL running Android 11 via USB (with USB debugging on). The solution here worked for me:

Run

sudo adb kill-server

and then

sudo adb start-server

then connect your device turn Debugging on and type

adb devices

again. After doing this, the Pixel 2 showed up in the list of devices in Android Studio.

0
On

https://developer.android.com/studio/run/device

  • add yourself to the plugdev group: sudo usermod -aG plugdev $LOGNAME
  • install sudo apt-get install android-sdk-platform-tools-common
  • log out and log in again for the group changes to take effect

If it's still not working, try to:

  • disable and enable "USB-Debugging" on your developer settings of your Android phone

If it's still not working a not so great workaround is restarting the adb server. Not so great, because adb should not run as sudo:

  • cd / && sudo find -name "adb" # ADB_PATH
  • sudo ADB_PATH/adb kill-server
  • sudo ADB_PATH/adb start-server
  • sudo ADB_PATH/adb devices
5
On

while connecting Android phone to computer Select 'File transfer' option in 'Use USB for ' Dialog. this will solve the issue.Tested.

2
On

It also happened to me, when I tried to connect my Android Phone in Android Studio.

On my Phone i got the message "USB debugging connected" but the pop-up Window that asks for "allow USB debugging" never showed up. Also in Android Studio the code wasn't uploadable to my Phone. I also got "Device is currently in the unknown state" in Troubleshoot Device Connections.

The Problem was: my Settings (Connected Devices > USB Preferences) on my Phone were set to "No data Transfer".

I had to enable "File Transfer"

0
On

Select Revoke USB debugging authorizations to revoke access to all computers you've previously authorized (Settings > System > Developer Options > Debugging).

See more in this post

0
On

in my case I had this error because I was connecting to a HUB USB.

1
On

I came across the same issue. By scanning for devices in troubleshooting connections after installing adb, it showed me directly the request for pairing the device. I have similar set up and One Plus 3