Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADB device stuck in "connecting" state

Tags:

android

adb

I'm trying to connect my phone to Android Studio to follow up with some app development. I am currently struggling with connecting my phone to the computer properly, as ADB never seems to connect to the device.

When attempting to boot the app on the device, this is what Android Studio tells me in the run console

com.android.ddmlib.AdbCommandRejectedException: device still connecting
Error while Installing APK

Which leads me to think that this is a problem with ADB. So when I run adb devices I get this log:

List of devices attached
5210a780f48b44c5        connecting

It stays in the "connecting" state no matter how long I wait. I accepted USB debugging and file transfer.

When in Android studio, the device is listed as enter image description here

I'm out of ideas as to how to fix this. I recently updated my phone (Samsung A5) to Android 8.0. This phone connects and debugs fine on my work computer. I tried updating Android Studio, rebooting my computer, installing Samsung drivers, rebooting my phone, revoking debug access, to no avail. I was able to work on this computer a while back but I don't know what changed.

How can I fix this problem so I can debug on my device?

[EDIT] adb version shows this

Android Debug Bridge version 1.0.40
Version 4797878
Installed as C:\Users\Frederic\AppData\Local\Android\sdk\platform-tools\adb.exe
like image 922
Ferdz Avatar asked Jul 21 '18 16:07

Ferdz


People also ask

Why ADB shell not working?

Make sure USB debugging is enabled and USB is physically plugged in. Make sure everything is ok with the ADB drivers, double-check the device manager. Check if the device appears in "adb devices", make sure its authorized on the device. Try actual adb shell and other relevant adb stuff.


1 Answers

A friend told me to try to swap ports to a USB 2.0 instead of USB 3.0. After doing so it worked instantly as expected.

[EDIT] It appears that this has more to do with the capabilities of the motherboard than the version of USB the port is. The opposite might be true for you, or just any other port.

like image 128
Ferdz Avatar answered Sep 23 '22 12:09

Ferdz