Following a recent software update including Android Studio (3.5 - 4.0.1) on my Ubuntu 18.04.5 LTS (Linux 5.4.0-42-generic x86_64) system the adb doesn't detect a USB device namely my Phone I use for testing Apps.
I had no problem with this on Android Studio v3.5. My Phone is automatically recognised by Ubuntu and I can see my device is loaded in my Files manager, hence there is no problem with the USB device or cable. I have set all the required Developer options on my Phone including USB debugging and Unknown Sources and tried using the Connection Assistant but it says "No devices detected". In the Connection Assistant I have also tried the Restart ADB Server option, but the problem persists. Also the user I am logged in with has the required privileges including "plugdev" and the ADB is running correctly since I created an AVD and my app run on the virtual device without any issues.
Additional. On my Phone changed "Use USB connection" from File Transfer to Photo Transfer, received a dialog on my phone asking whether to accept an RSA key that allows debugging through this computer and checked the "Always allow this computer" option. In Android Studio I reran the Connection Assistant and Restarted the ADB Server, then my device was detected, however Its clear that my apk will be unable to install as Android Studio will require it to be in File transfer mode. So I switched it back over to that, but then my USB device disappears in Android Studio, but at least its ruled out a lot of potential causes.
I've been debugging for months with a physical Samsung pad connected via USB and now I can't load the app on the device for debugging. I rebooted everything yesterday and it worked until this afternoon! I get the same error all the time. The ADB appears to be running on port 5037.
I'm disappointed in how buggy the development environment is and feel like I'm spinning my wheels like back in the Win3 days fighting the environment instead of the app. Any suggestions would be appreciated...
3:11 PM Gradle build finished in 2s 40ms
3:11 PM Error during Sync: An existing connection was forcibly closed by the remote host
3:11 PM Session 'app': Error Installing APK
I'm using USB debugging. I've tried everything I can find on SO and nothing works:
1) Rebooted both laptop and device many times
2) Deleted app from device
3) Manually updated the SDK to 8.1.0 (auto update fails with file size error)
4) Unplugged and tried a different USB port
5) Updated the Samsung Android ADB interface from Win7 device manager
6) Killed adb via task manager and SDK kill-server and start-server
7) Turned USB / Developer mode off and on again
8) Deleted the device from Win Device Manager; re-scanned; updated driver software
I had this error.
There is low RAM in the system. I just closed some programs (Chrome used 1GB) and restart Android Studio.
Try also delete folder "build" and "app/build".
I can make this happen at will now and it seems like it happens when the device goes into sleep mode. So I'm debugging and all is working well and the problem occurs. I stop the app via Android Studio and reboot the Samsung pad. After that I get the funky temp device showing up and the ADB won't install. The fix is to unplug the USB cable. Wait about 1 minuet and plug back in. The temp device is gone and the pad shows up. All works well.
I've installed Android Studio 2.0 on my Windows 7 PC. This included the Android SDK. I've done Android development on this PC before and was able to connect to the actual Android device (my Samsung Galaxy S6) but that was with Eclipse + ADT and with an older version of Android Studio.
Now, with the new installation, adb devices shows:
List of devices attached
05157df55345931c unauthorized
On the phone, I have Developer options turned on and USB debugging turned on. Also, under USB Configuration, I have it set to MTP. When I plug the phone into the USB port, I get the PC's auto play dialog and am able to see files/folder on the phone.
I've run adb kill-server and then adb devices. I see it starting the server, but no prompt on the phone to allow USB connections and it shows my device as unauthorized.
I've been searching everywhere for an answer to this, but all the articles I find simply talk about enabling the developer options on the phone and/or restarting the adb server - both of which I've already done.
adb version shows:
Android Debug Bridge version 1.0.32
Revision 09a0d98bebce-android
I think there must be a configuration on my PC somewhere which is preventing adb from connecting to my phone, but I don't know what it is. I've uninstalled Android Studio (and the sdk) and re-installed, but still the same problem persists.
Thanks,
I am encountering a problem with Android ADB debugging through USB.
Using Macbook Air 2013 and trying to connect Nexus 6 dev phone.
On the MAC Android Studio, android latest sdk is installed.
When I do
adb kill-server
adb devices
I get:
adb I 661 9881 usb_osx.cpp:259] Found vid=18d1 pid=**** serial=*****
adb I 661 9881 usb_osx.cpp:259]
adb E 661 9881 usb_osx.cpp:331] Could not open interface: e00002c5
adb E 661 9881 usb_osx.cpp:265] Could not find device interface
So it found the device, vendor id, product id and serial match what I find in the system information for the Nexus 6.
Following suggestions found online I tried - but no success - the following to resolve:
dis- and reenabling debugging mode on the phone, also switching between USB configs for charging, MTP, PTP, RNDIS, Audio Source, MIDI, always making sure the authoriztation for the Mac's RSA fingerprint is given
closing Android Studio / DDMS, killing adb through 'kill-server' command as well as killing process through Apple activity monitor
run adb as root
reboot the Mac several times
reboot the Nexus 6
reinstall Android SDK completely
tried with another debugging enabled Android Device (Samsung Galaxy Tab, also here adb found correct device info but cannot access interface with same error)
tried with 3 different USB cables, all cables which were originally shipped with Android devices
Through google I learned that error code e00002c5 means the device is already in use by another driver.
I had recently installed Sophos Home Antivir. Thinking that this might prevent ADB from opening the device interface, I uninstalled Sophos completely with the provided uninstaller and rebooted the Mac.
Any hint is appreciated:
which steps to resolve?
as e00002c5 seems to be a clear indicator that another driver has the device in use, how to find out which process that is and how to stop it from doing that
I ran into this error as well, and it turned out that the problem for me was that a Stetho tab was open in Chrome (i.e. a tab at URL chrome://inspect/#devices ), which I guess was causing the device to be in use. Closing that tab, then running adb kill-server, made adb devices work again.
Same symptoms with a Galaxy S7 attached to Mac via USB. In my case, I had the Tizen IDE for Samsung Gear Development open. That also prevented adb working properly. Closing the Tizen IDE immediately helped.
In case you connect the mobile phone the first time, you may already have acknowledged the authorization for the computer on the phone. You have to delete the authorization on the phone and re-connect / re-auth it. Otherwise, the device will show in the device list, but is unauthorized. (I.e. you can't debug...)
If you are using VirtualBox and have a virtual machine opened, you are probably trying to use adb from your host while it is plugged on your virtual machine. The problem is that you cannot have your device plugged on both at the same time.
Solution : Uncheck your device on the bottom right panel if it is detected by your Virtual Machine.
If you have been accessing your device on virtual box and now trying to access it from your host OS, first you have to disconnect your device from the virtual box. To do that go to setting> USB > unchecked the device from list
Then unplug your phone first and replug it. Or kill and start the server using >adb kill-server
>adb start-server. It works for me.
I encountered this issue with the message "Could not open interface: e00002c5". e00002c5 indicates that another app is using the device. Tizen studio was the app causing this issue.
Closed Tizen IDE and connected devices were available in the adb devices list.
I was debugging my Mobillyo app with a LG K4 phone. I closed Android Studio then enabled USB Debugging in the phone settings,left the settings open, reopened Android Studio did RUN, a dialog opend with the phone info and Unauthorized, was asked to approve on the phone, touched Ok and it worked.
I am unable to debug over wifi.
I have followed below steps.
Go to Android Sdk-> Platform-tools and type cmd
run adb tcpip 5555
adb connect and MY IP ADDRESS
Now i got the result show in below Image.
After my device is connected. I removed my USB cable then i got device list empty.
I have no idea why this is happening.
I have motorola X play Mobile Phone Android 6.0 and having Windows 10 operating System.
Need Help.
For simple one click connection of ADB over wifi - You can try using the Android ADB Plugin from JetBrains. The plugin will internally handle all the setup and you can click-away and connect to adb over wifi without worrying about anything else. Steps to install and use can be found on its GitHub repo page.
Provides an action which allow you quickly connect your Android device
over WiFi to install, run and debug your applications without a USB
connected by pressing one button. Connect your device using a USB
cable and press the Android WiFi ADB button. Once the device be
connected over WiFi you'll see an IntelliJ/Android Studio
notification. Now you can disconnect your USB cable and enjoy
deploying, running and debugging your applications over WiFi. The
version 2.0 enables a window to check which of your devices are
connected or not and connect/disconnect it manually if needed.
Screenshots from the plugin page: