Android studio on Mac cannot detect connected USB phone - android

Constant issue with being able to connect an Android device via USB to Android Studio running on a Mac.
Tried numerous things like:
Switching USB debugging mode on Android to MTP or PTP
Restarting the Android devices and Android Studio and/or Mac
trying adb kill-serverand then adb devices, which usually resulted in:
List of devices attached
daemon not running. starting it now on port 5037
adb E 655 23135 usb_osx.cpp:327] Could not open interface: e00002c5
adb E 655 23135 usb_osx.cpp:289] Could not find device interface
daemon started successfully
But not actually finding the connected device.

I just wanted to write it down in case someone else comes across this issue.
It took me more than a couple of days to solve this while I was banging my head trying to understand what seems to be the problem.
Note: For me it was a cable issue.
I have Nexus6P with 2 original cables:
Type-C to Type-C
Short Type-C to regular USB
The problem was I was trying to hook the cable 1 directly from the Nexus to the Mac Pro (which didn't work since I think the Mac has a thunderbolt protocol on the Type-C inputs)
Then I tried a Type-C to regular USB cable with an adapter from to make it Type-C to Type-C (bear in mind this wasn't the original cable I got with my phone)
Only when I used the original short cable (cable 2) with an adapter it worked.
Although the non-original cable I used was a high-end cable - it still didn't work
Hope it helps other people who struggle with this

There are some great responses that worked for others, like this one or this one which seemed to work for others.
In my case, the issue was Tizen Studio (I was working on a watch app for Samsung Gear). Through this poster's research, found that the adb error could not open interface: e00002c5 implies that the usb device is already in use by some other driver.
So it seems Tizen Studio takes up the usb driver resource even though it is not using it. Quitting the application will automatically allow adb devices to list your device and run the project on it.
Hope this helps other lost souls.

if Xcode runs please turn it off
then everything worked again

Related

adb emulator devices isn't showing up, restarting server doesn't fix

I am running an emulated Nexus 5 running Android 5.1.0 on Xamarin, and I cannot for the life of me get adb to recognize the emulator as a device. The only way I can get the device to connect is through TCP/IP, connecting to the emulator's given IP address manually.
I've tried reinstalling the Android SDK, Xamarin, and VirtualBox (which the Xamarin emulator uses), as well as tweaking several settings in each, all of which lead to nothing.
And no, running
adb kill-server
adb start-server
does NOT fix the issue, like every other thread I've seen has suggested as the only fix.
I look forward to your help, and thank you in advance!
EDIT: Additionally, I should add that adb devices DOES recognize my physical Android device when connected through USB, but still not the emulated device.
If you are using Xamarin Android Player. Try following steps
Shut down the emulated device.
Open Oracle VM virtual box manager
Identify emulated device and open settings.
Go to USB tab and Enable USB Controller.
Save settings. And start device from Xamarin Android Player
Try different sub options from Enable USB Controller. I enabled USB 1.1 and it worked for me. I am not sure it will work for all. Let me know your experience.

Trouble connecting to LG phone with adb (Mac OS X 10.7.5)

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.

ADB stucks on my Android smart phone

After connecting my device to my real device (Galaxy S / Android 2.3.3) and lauching the DDMS Heap tab, sometimes the device disconnects and is no longer available as vaild Android target for the Android Device Chooser dialog. Un- and re-plugging the USB cable have no effect, killing the adb server process or shut down eclipse does not either. As my last resort I've to reboot the device and re-connect USB, this seems to work but this approach has a lot wrinkles, if you know what i mean.
Is there a better solution available?!
Thank you!
There is nothing you can do about it. It's a known issue with all Android Phones based on the OMAP chipset.
It's not that the chipset is bad in any way, but it is fact that the USB-OTG device driver from OMAP is buggy. The driver works well until you stress it hard enough. Lots of logcat outputs cause this, as well as ADB debugging.
Disabling and re-enabling the usb-debug fixes the problem for a while. You can even see the USB-driver failing on the kernel-log by calling 'dmesg' on the shell.
As far as I know all OMAP3 and OMAP4 based devices suffer from this driver-bug.

Eclipse/adb frequently disconnects from my device

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).

OS X 10.6.6 and "adb devices" fails to list android devices

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.

Categories

Resources