While debugging, my device frequently disconnects from my PC, usually after every debug session. The device still appears in the DDMS list but the status is "offline". The only way to fix it is to reconnect the USB cord, which becomes a pain after doing it 10 times every hour. There are no visible error messages when it happens.
I thought it was a physical connectivity problem with my USB cord or my device, but I recently upgraded to a brand-new Galaxy Nexus with a brand-new USB cord and it still happens. Now I'm convinced it's a software issue.
Is there any reason why my devices goes offline frequently? Are there any programs that are known to interfere with the Android/ADB connection?
Yup, you are right. It seems to be a software issue.I have faced this annoying thing many times, it happens now and then. I think what happens is that the adb's connection with the device/emulator breaks or becomes faulty, so android starts showing the device as offline. To correct this problem. Go to DDMS-->Devices Tab-->Click the option "Reset adb" (which is the last option, on clicking the dropdown arrow) . You will then see some error report in the console, but after a minute your emulator would be ready to be used without problems. I do it all the time and it works. Try this instead of manually plugging/unplugging the device.
Please check this answer https://stackoverflow.com/a/26425489/1200583 that is for mac but maybe is the same for other OSs
I find it faster to just plug/unplug, but doing the following in command-line should do the same thing:
adb kill-server
adb start-server
We feel your pain. In case you're using the command-line, you can do the same thing by typing "adb kill-server".
I was able to fix this problem for good by updating Samsung Kies, which installed an updated driver for my phone. I suggest you try reinstalling any device drivers.
Patiently, try fixing the USB cord by massaging it and reconnect it to the USB hub securly but not to tight. Also, do not connect with too many USB extended cables or hub or the connection between the device and Eclipse IDE will interfere the duration.
And one thing, do tried putting your device and the USB cord to any flat surface (e.g. table) to support the long cable?
I had the same problem with Galaxy Nexus running CM 10.1.
Updating KIES with latest version seems to have fixed the issue.
Connect your device through a powered USB hub. Some machines, including new apple macbooks, do not have enough power in the USB ports causing ADB to constantly disconnect.
If your device is rooted, you can connect it to adb via wifi. This is very comfortable, much more than wired USB. Of course you don't always have a rooted device.
I also faced this issue. Adb disconnect my Android device each time just after installing the app in android device from eclipse. The issue was with my USB Cable. I was using the USB cable of Blackberry Phone. To resolve this issue i just changed the USB Cable with Android's USB cable(The cable that comes with new Android Phone) and every thing started working fine.
If you are running on Mac OS Sierra and Android Studio 2.1.2 or 2.2.0 then just upgrade your SDK-Platform Tools to 24.0.4 and Restart Android Studio. This will fix it.
The following two solutions worked for me.
You can try either of the two or both of them.
Restart device.
Free some internal storage space (Works in most of the cases).
Related
When I run adb devices there are no devices showing as connected. My device is a LG Optimus Exceed 2 running 4.4.2
There are many of these posts around, so here's what I've done:
I'm using the cord that came with the phone. It charges and tries to sync photos, so it isn't an issue here. Switching usb ports and trying a powered usb hub doesn't affect it either.
I've added the vendor id (0x1004) to ~/.android/adb_usb.ini
Restarted and unplugged any combination of things you can think of
USB Debugging is on. And has been restarted. Same with Unknown sources.
I have never used EasyTether, nor is it installed anywhere on my computer.
Updated adb, updated my sdk.
Restarted adb server
Tried installing LG's drivers: http://www.lg.com/us/support-mobile/lg-VS450PP (They say they don't support Mac S/W upgrade, yet they have a package to install. No help there)
I have a Nexus S running 4.1 that works, and an old LG phone running Gingerbread that connect.
Any wizards out there who've already struggled with this who have advice?
I tried all of the connection types (charge, MTP, PTP) but perhaps not "Internet Connnection, modem"? You can change it by pulling down the system-wide drop down menu and touching "USB connection".
This is how I fixed it, but I thought I'd tried this already, so I can't guarantee it wasn't this in conjunction with one of the things done above.
PTP seemed to do the trick. Never had to do that on any other device...
I had the exact same problem. Selectin Internet Connection and then Ethernet as the USB connection type fixed it and everything is working as expected now.
I know this sounds like a stupid answer, but the same thing happened to me. It turns out the micro USB cord was just bad - which is weird, because it still charged the phone perfectly fine. After testing the bad cable unsuccessfully on a phone that had been recognized on my mac before, I switched to a different micro USB cable, and that made all the difference.
This is late in the game but I had an additional step to all the other suggestions. The phone was showing up in the System Profiler after I switched the usb mode to 'MTP' mode, but I didn't see any usb tethering options. After adding the phone's vendor ID to the usb ini file, enabling the developer and usb debugging, killing and restarting adb, I still didn't see my device in adb devices.
I finally had to download the Mac driver for the phone directly from LG.com. After installing and rebooting on the computer, the device showed up in adb devices.
So I've read nearly every stack overflow answer about this issue, but still no solution. My device keeps getting disconnected. I've switched through 12 wires, I've tried every USB port; nothing. Eclipse keeps dropping the connection. It happens most often when I enter debug mode. Has anyone found a solution to this? Is this a bug in the new update? Seriously, this makes debugging and testing so painful. It slows down my testing by at least 3 times. There has to be a better solution.
First thing I tend to try is the following commands in cmd/terminal
adb kill-server
adb start-server
And lastly,
adb devices
To check the device is connected.
Following that I'd try restarting the device, and perhaps as a last resort uninstall/reinstall it's drivers.
Edit: also, do you have access to another device? In the past I've had issues with specific devices constantly dropping out.
I experience that when my nexus7 2012 kept disconnecting; root cause was the USB3 connection.
Changing to a USB2 port fixed my issues; can you try switching to a lower speed port?
I was having a very similar problem but using Android Studio on OS X. By default Android Studio points to an SDK inside it's application bundle so I changed the SDK location setting to point to another version of the Android SDK I had downloaded manually and this seems to have fixed the disconnection issues I was having.
Instructions for changing the SDK location setting can be found in this answer.
My connected device (an Acer) was working a treat until I rebooted my mac. After the reboot, Eclipse dropped the connection every single time I ran the app. I tried two cables and every port in my iMac but nothing worked. I had to disconnect and reconnect the device for every run (a real pain when debugging!).
What worked for me was to run the app. When the window appeared to choose the device to run on (which was empty), I disconnected then reconnected the device, but before clicking to run, I checked the box (bottom left) to use this device for each run. It now runs every time directly on the device.
a unpowered usb hub did fix the problem for me. it was happening on both my samsung s6 and my sony z5 premium.and both on my pc and my mac. (using android studio).
Use short usb cable. The shorter the length of cable, the more stable the adb connection. I had the same problem for long time. I changed the cable to shorter one and I haven't got that problem anymore.
As title, I can't able to find my phone device into Eclipse.
I activated on the my phone, either Application/Unknown Source and Application/Development/Debug USB.
But into Eclipse not appear any device phone, why?
Thanks'
Go to the cmd prompt, and then take it to the platform-tools.
Then type the commands
adb kill-server
and then
adb start-server
Then to list the connected devices,
adb devices
you will see the list of active devices including the emulator. If the device is not present, continue the steps for some time..
After you get the device listed among the active ones, you can run it in debug mode.
Think, this will help you..! :)
I just had the same problem on 2 of my phones (Nexus 1 and Amaze 4G). After some research I found that people try to overcome this by restarting Eclipse and ADB (only Eclipse won't do) but it took me rebooting the system and phone to make it work again. If you can go to Eclipse->Window->Open Perspective->DDMS and see if your phone shows there with red bug icon next to your app. If so then try what I described above. If you don't see your device in DDMS perspective then it's your USB driver that is not working and needs to be reinstalled
Had a similar problem with my LG P520. In my case, the problem was as a result of me setting the minimum Android level to Android 2.3(9) while the phone was a Froyo/Android 2.2(8) phone. Hence, it was not a compatible device and would hence not be shown in list of compatible devices.
connect your PC with internet may be it will install some software to connect it with the phone debugger and make sure you enable the usb debugging on your phone.
I'm having an issue with my Galaxy S2. I typically leave it in Debug mode, up until a few days ago it has worked great. I've successfully loaded APK's for testing through eclipse previously.
I tried to load a prototype of a new app im working on and when I plugged in the S2 nothing happened, Windows didn't beep like usual and when I tried to view running devices it did not show up.
When I look at the device manager under universal serial bus controllers, it doesn't show any 'unknown devices'
I've tried reinstalling drivers through kies, and third party sources (as well as removing all drivers and letting windows install them again for me.
I've tried connecting as Mass Storage Device, with debug mode on and off.
I've restarted both my computer and phone many times.
When my phone is off and plugged in Windows will beep and say that a device was connected but not recognized (which is more then what I get when the phone is on)
And sometimes when I "troubleshoot connection issues" in Kies it will reinstall the drivers and after the process is complete windows will report "Drivers were not successfully installed"
I've tried plugging it into my Windows XP laptop and it will show up as "Unrecognized device" even after I installed Kies on the laptop, and tried the driver installation it with the same results.
Posting here is my last resort as I've spent close to 5 hours troubleshooting this issue, and searching for answers. My biggest concern is that when I do plug my phone in it will beep to say that it is charging, but windows 7 doesnt even see it!
I appreciate all suggestions & help!
EDIT: Also I installed the Samsung Android USB Driver for Windows and windows reports that the drivers were not successfully installed
Thanks
Jon
Try to key in dialer:
*#7284#
It has 4 options:
UART
MODEM
PDA
USB
MODEM
PDA
In USB section, select the PDA. If it already selected to PDA then reselect it by selecting MODEM and then PDA again.
Only change the USB setting and then press back and try reconnect to kies again.
Hope it helps..
I had the same problem and JUST as i was about to give up, i realized that I had replaced my usb cord with a generic one from the store. I happened to still have the old one around still and that ended up being my issue -.-; Hope this helps someone else!
This really sucks, I know I've had this happen a few times and it's really annoying to have to deal with. I had luck with this post where they suggest:
... they suggested removing battery from hero with usb pluged in and
then putting battery back in, so i did this thinking it wouldn't work
and hey presto, mounting option became available. I was then able to
follow your first set of intructions to install the drivers through
devices and sync is now working!
If that doesn't work there are a few suggestions and helpful driver websites on there for you to follow :-D
I know I would:
Uninstall all drivers related to your device
Restart Computer without connected
Pull battery on device, plug it in, and once detected put battery back in.
If driver doesn't install correctly, or "unknown device", go to the website on that forum to get the CORRECT driver for your device and Windows OS
Go to Control Panel->Device Manager->(unknown device)->Update Driver
Locate downloaded driver, install
Make sure that when connected, the device says "USB Connected" in it's notification area
Click "Turn on USB storage", or "USB Debugging -> USB debugging"
.. this will at least show you that you have the right drivers.
IF you did all of this and you still can't get it to debug through eclipse, you either have conflicting drivers somehow, or your eclipse IDE isn't setup properly. Maybe update Eclipse, and Android SDK and try again?
Sorry can't give you exact details but this problem could be ANYTHING lol
I had the same problem while using a generic cord.
Don't use for usb transfert
I think they are made only for charging.
Solve by using a stock cord not a generic one.
Okay, so after talking to Samsung they informed me that there is a small defect with the female usb connection, and that it can sometimes be loose.
Only solution, mail it to them...
This fix works on all my computers that "don't recognize" my rooted Samsung Android. Plug the phone into the computer and restart phone. When it comes up again, the computer recognizes it.
My method is KIES AIR.
Open Kies Air
Go to settings > Bluetooth off set.
More settings > Tethering and portable hot spot > Bluetooth tethering check true and portable Wi-Fi hotspot check true.
Now KIES air open on your device and start button click. copy IP address to browser
Your s2 is connected your computer.
Open browser, and copied ip then click paste.
I have two Win XP SP3 workstations that would not connect to my Galaxy. Finally fixed it by installing this particular Intel driver and installing Windows Media Player 11.
if you are running a custom kernel on your phone, you may want to check too if you have "force fast charge" turned on or not. I thought my phone and computer would never talk to each other again but it turned out I had fast charge enabled. Turning that off solved the problem for me.
It might be an issue with USB 3.0 ports. I was tormented by this issue too and I was at the point where I was so ready to burn this device to kingdom come. Before I did that, I decided to use my never-used 2.0 port and guess what, IT WORKED! If your PC doesn't have a 2.0, good luck with that.
punch in code *#7284#, (UART set to PDA) and (USB set to PDA)
solved my problem
adb devices was working fine last year, but after upgrades and new software installs,
adb devices no longer recognizes USB attached Android devices.
Here is what I have tried:
adb kill-server
adb devices
adb usb
error: Device not found
If you have installed EasyTether on OS X, the EasyTetherUSBEthernet.kext can prevent adb from communicating with your mobile device.
If you use Easy Tether, BEFORE you plug in your phone run:
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
(or unplug/plug your phone in after)
If you are done debugging and want to use EasyTether again, either restart or:
sudo kextload /System/Library/Extensions/EasyTetherUSBEthernet.kext
If you want to remove the EasyTether kext so it never hassels you again:
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
sudo rm -rf /System/Library/Extensions/EasyTetherUSBEthernet.kext
Reference/Credit: http://www.intohand.com/post.php?s=2011-02-17-android-debug-bridge-not-just-working-on-mac
Having just connected a brand new Motorola Atrix 2 to my Mac running 10.6.8, I had to pull down the menu from the top of the screen, tap on "USB Connection", and change it from "Motorola Phone Portal" to "Charge Only" before it would show up in my list of devices from adb. Hope this helps!
Following the google bug submission... I set usb mode to Charge Only, and it detected the phone immediately. Pretty silly.
Another alternative: on modern Apple iMac's, the USB port closest to the outside edge of the machine never works with ADB, whereas all others work fine. I've seen this on two different iMacs, possibly those are USB 1.0 ports (or something equally stupid) - or it's a general manufacturing defect.
Plugging USB cables (new, old, high quality or cheap) into all other USB ports works fine, but plugging into that one fails ADB
NB: plugging into that port works for file-transfer, etc - it's only ADB that breaks.
If none of the above works for you just as it didn't for me, just try using a different cable. The cable I was using was my friend's cable but it was only meant to charge over USB, not to pass data over USB. I don't know how to tell the difference between micro USB cables that do or don't support data over USB but it's worth a try! Good luck!
I too am having this problem. However, it isn't just a problem with ADB, it's a problem with android devices in general on Mac OSX 10.6.6 Snow Leopard. Devices that used to work in 10.6.4 will no longer even mount the device as a USB drive. Googling to see if I can find the answers.
Change the USB connection type to 'Charge Only'. That was the only change I made it showed up on my device list. Weird.;)
I have seen another report of this bug. I have not been able to reproduce it myself yet.
The bug is:
MacOS X 10.6.6 [on some hardware] breaks adb [for some phones].
If anyone is able to reproduce the bug, feel free to add details of the exact hardware, build numbers and so on. I've asked the person who can reproduce the bug, to report it to google using the form at http://code.google.com/p/android/issues/entry
When he does that, I will add the bug report URL here, and people can add their hw/sw details to the bug report.
In the meantime, to be safe, I would recommend Apple users should NOT accept the snow leopard upgrade to 10.6.6, which was pushed on Jan 6 2011 (so it may already be too late for most).
Peter
I was having the same issue and tried connecting as charge only, but that didn't solve the problem, then unchecked the "Unknown sources" option to allow installation of non-market applications, tried it again and it recognized the device. I'm running android 2.2.3.
The bug report to Google is
http://code.google.com/p/android/issues/detail?id=15583
If you have encountered this bug (upgrade to MacOS 10.6.6 and adb no longer sees some phones on USB) please add a comment with any useful relevant info (like your exact hardware type).
I just ran into this problem using my HTC Inspire (Android 2.3.3) and Mac OS 10.6.8. The phone did not enter USB debugging mode when I connected it to my USB hub, but it did start USB debugging mode when I connected it directly to my MacBook Pro.
... and then, of course, it showed up in the list of devices attached.
The EasyTether fix worked for me, although first I had to load the kext file, then unload it. My Droidx popped up right away!
By the way, I'm running Snow Leopard 10.6.8 on my MacBookPro, so those who are having trouble with adb and connecting devices should check any USB applications, like EasyTether, for conflicts. Also be sure to follow all the above rules for
1. Application debugging (Settings->Applications->Development)
USB debugging: ON
2. USB connection (on notification bar).
Choose USB Mass Storage (altho Charge Only also works with my droidx and MacBookPro)
3. Unknown Sources (Settings->Applications->Unknown Sources = ON)
I have the same problem, I solved using an alternate install method.
First I put an sd card in my device.
Then I use a File Manager to transfer the .apk to the device, and I install it from the device
You can see a tutorial in
http://www.youtube.com/watch?v=7UOAw124y1s
I had this problem today with my HTC mytouch phone and OS 10.6.8. At the same time, the phone reported a damaged SD card. The solution was to remove the Micro SD card and erase/format it using disk utility as FAT 32. The name I gave the SD card volume appeared in the Finder when I tried connecting again (charge only). For some reason, Android reported the card as damaged but could not format it. I used a Micro SD USB adapter. My Macbook didn't see the card until I carefully slid it out and back into the adapter slot. This is a known problem with HTC android phones.
The last time I updated my tablet, it turned off "allow USB debugging", and I spent a half hour or so spinning my wheels. Double check that that is turned on in settings.
This thread is old but perhaps my answer will help somebody. Using a Motorola MB865 with OSX, ADB would recognize my phone only after I performed a factory reset.
I got the idea from this thread.
This was after I tried all the other tricks listed in other threads:
adb kill-server followed by adb start-server
Make sure USB Debugging is enabled
Make sure vendor USB ID listed in adb_usb.ini
Switching USB cables. For what it's worth, I did have to switch cables in order for the Mac to see the device. But this had no effect on ADB.
In the end, the factory reset did the trick.
in my case what worked:
disconnect device
exit android studio
run 'Activity Monitor' and kill adb
start android
studio reconnect device
For some devices running Android 4.4.2, you must enable tethering. You can do this in "Tethering and Mobile hotspot" and then check "USB tethering".
Try restarting the Mac in "Safe Mode". It worked for me (macos X.9.5)
Make sure that USB Debugging is enabled in Settings -> Application -> Developemnt, and also that the selected USB method is PTP and not MTP (not supported in OSX).
After connecting the device and enabling the USB debugging please go to the path of adb, which is now inside the android-sdk-->platform-tools and type the following command ./adb devices. I think this will list the devices connected.