Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adb stops detecting my phone after a while

I am developing for android on a linux machine and I have already created a udev rule for android and it works. After a while if I unplug the device and plug it back in again, adb doesn't recognize the device if I run lusb or dmesg to get information about the device. I tried reload the udev rules and it does not work, I even tried to kill the adb process but it still does not work.

Can someone help? Anyway, thank you.

like image 714
pharaoh Avatar asked Oct 05 '11 07:10

pharaoh


People also ask

Why is ADB not detecting my device?

It might be that the ADB issue is not with your computer but is with your Android device. In most cases, ADB cannot recognize your device because the USB debugging option is turned off on the device. Turning this option on can fix the issue for you and this is pretty easy to do.

How do I force ADB connection?

Enable adb debugging on your device To make it visible, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options at the bottom. On some devices, the Developer options screen might be located or named differently. You can now connect your device with USB.


2 Answers

This appears to be a real problem on linux, at some point in time a device will no longer be seen by the ADB. What I should really say is almost never be seen by the ADB. In my case I have a Samsung Galaxy Tab 10.1 that was given to attendees of Google I/O 2011. My Ubuntu 10.10 development system was working just fine with this device. Sometime near September 19th the ADB stopped seeing the device! In fact there have been breif moments in time when the device was detected by the ADB. What needs to be made clear about the problem that I and I believe pharaoh are having is not the permissions issue where executing

$adb devices

returns ?????????? for a device. The device simply does not show up in the list. One more important fact is that at no point in time has this device not been detected on my Windows based development machines.

It appears to me that the mechanism that the ADB uses to determine if a device on the USB is in fact a adb_device is fragile and some change in either our devices or our development systems has broken this detection.

like image 164
Rodney Lambert Avatar answered Sep 28 '22 10:09

Rodney Lambert


Due to some reason sometimes adb gets disconnected, so in that case you have to restart the adb.

Go to DDMS->Devices and you will see Reset adb option in View Menu besides Screen Capture option.

enter image description here

like image 23
Lalit Poptani Avatar answered Sep 28 '22 09:09

Lalit Poptani