I connected my Redmi 5A using a USB cable, with developer and USB debugging enabled, but somehow android studio could not detect my device when I click the run icon.
I tried to troubleshoot the issue and the event log showed this:
What is the issue here?
Download and install USB Drivers for your device. Some devices don't work without driver ( like Samsung )
Download here
I am using Redmi 5A for testing purpose. I have faced this problem several time.I just unplugged the usb cables, turn off developer options. Then turn on the developer options again, connect with the USB. Surprisingly it works for me.
When you connect the Device, Android Studio shows a notification on the remote device (here Redmi 5A). If you select Allow Debugging From this computer: COMPUTER KEY, Android Studio will show the device in the list. If not selected, you have to disable USB Debugging and start it again and this is the main problem here in your question (as said in the log)!
Also see that you use USB for transferring files!
Also if you have done this correctly, try staring the adb sever again. Open the terminal window by clicking Terminal on the bottom of Android Studio.
Then type:
adb kill-server
Then type:
adb start-server
Related
I'm running Android Studio Arctic Fox 2020.3.1 Patch 2 on my Dell XPS 13-9370 running Linux Ubuntu Ubuntu 20.04.3 LTS and when I try to connect either of my two Pixel 2s via USB, Studio fails to see them. I have USB debugging enabled and have tried setting Default USB configuration to both File transfer and PTP, to no effect. I also tried swapping USB cables and all the other steps described in the Android Studio Troubleshoot Device Connections.
I should mention that I have no problem connecting Studio to my Samsung Tab A running Android 11, or to any of the emulated devices. They all connect just fine. When I plug the USB cable into the Pixel 2s, I don't even get the permission prompt, even after revoking USB permissions.
I've been knocking my head against a wall on this for a couple of days now, trying out every relevant suggestion I've found on Stack Overflow. I used to have no problem connecting my two Pixel 2 devices up until a few days ago. The problem also occurs on the previous version of Android Studio. I thought it might have something to do with several new third-party apps I installed, but I forced stop them, rebooted the device and still the problem remains.
You can hard reset your devices because in some cases that works.
Otherwise, You can use the developer options wirelessly on your phone.
Just read this article for a step by step guide for how to do this.
Use Android device for development wirelessly
are you using same usb cable for other devices in which it is working ?
try this once - open developer option and select 'Select USB Configuration' . make it mtp and also check if usb debugging is turned on.
Instead of doing it with a cable you could do it wireless just install the plugin adb wifi rest all the instructions are given when you will install that plugin.
Android WiFi ADB
Steps to do this(in short)
Connect your device to your computer using a USB cable.
Then press the button picture of a button to be pressed on the toolbar and disconnect your USB once the plugin connects your device over WiFi.
You can now deploy, run and debug your device using your WiFi connection.
NOTE: Remember that your device and your computer have to be in the same WiFi connection.
Sometimes it happens for the USB connector manager of your operating system. You can uninstall the USB connector manager from your OS Device manager and then restart your laptop. I faced this issue several times and this solution worked for me.
Try to install Genymotion Emulator and Launch it first before running your app. I did it and it helped me and i think it will be work
I have tried
Installing driver
The USB debugging enabled in Developer Options
Switched from MTP to PTP device selection
Check if adb devices command shows the devices
Edit Run Configurations.
But my physical device Lenovo K5a040 is still not shown.
The problem is because of not properly installed Android Debug Bridge (ADB) USB Driver on your system.
You can Check whether it is properly installed.
Connect your Device and enable the USB debugging in device.
Right click on My Computer and open the Manage.
Go to other Devices and check whether your device is showing warning icon.(if it shows warning it is clearly says, ADB is not properly installed)
Reinstall the Android Debug Bridge (ADB) USB Driver.
Please check this link it will be helpful.
https://software.intel.com/en-us/xdk/docs/installing-android-debug-bridge-adb-usb-driver-on-windows
Hope it will help. :-)
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 have a basic Hello World Cordova application working on an Android emulator (Nexus 4) on my Mac. I wanted to try deploying to a Samsung Galaxy S3 that I have (model SCH-R530M) but when I try running adb devices and empty list is returned.
I have already tried unplugging the device, killing adb using adb kill-server, running adb using adb start-server, and then plugging the device back in and it is still not being recognized.
The only other problem I can find is that my USB cable might be a "charge only" cable, but I don't know how I would go about determining if it is.
Does anyone have a potential fix for this issue?
Is it in developer mode?
Does it allow USB debugging?
https://developer.android.com/tools/device.html
These are the instructions for your device:
https://muffinresearch.co.uk/samsung-galaxy-s3-where-are-the-developer-options/
Go to Settings → More → About Device
Scroll down to Build Number
Tap it repeatedly (It'll show a message telling you how many more times you need to tap it to enable developer mode).
See the Developer options menu under Settings → More
Then make sure 'usb debugging' is selected in the developer options.
I would try a different USB cables too. I had to try a couple before it would register the device.
Kies can also sometimes kickstart it.
http://www.samsung.com/uk/support/usefulsoftware/KIES/
With the new update to 4.2.2 to my Galaxy Nexus and Nexus 7, I can't find both my devices under adb.
These are the steps I took:
Updated to 4.2.2
Updated ADT and SDK through the SDK Manager
Checked ADB version, it's at 1.0.31
Restarted PC and Tablet and Phone numerous times
When I run adb devices, it's just blank. I have the same issue on Windows 8 and on Ubuntu 12.10, but on Ubuntu it shows my device and it says offline.
Are there any other steps I can take?
From the adb docs
When you connect a device running Android 4.2.2 or higher to your
computer, the system shows a dialog asking whether to accept an RSA
key that allows debugging through this computer. This security
mechanism protects user devices because it ensures that USB debugging
and other adb commands cannot be executed unless you're able to unlock
the device and acknowledge the dialog. This requires that you have adb
version 1.0.31 (available with SDK Platform-tools r16.0.1 and higher)
in order to debug on a device running Android 4.2.2 or higher
So, unplug, wait, replug in the cable, and hit ok (on modal dialog that appears on your device)
If you hit cancel, the device will show up as offline via adb devices
Try pre-installing the drivers for your devices. Make sure, under Windows, that your device is recognized in the System control panel first.
I use Windows 7 and my Galaxy Nexus wouldn't be recognized by the system until I installed the device drivers before plugging them in. From the comments, this works on Windows 8 as well.
Galaxy Nexus drivers
http://www.samsung.com/us/support/owners/product/SCH-I515MSAVZW#
Goto Manual & Drivers > Software
Nexus 7
http://support.asus.com/Download.aspx?SLanguage=en&m=Nexus+7&p=28&s=2
Just though Id share my experience, I had -
Unplugged and re plugged in the device
Installed the correct platform tools
Installed the correct Android bridge Turned USB debugging on and off
and on and off an...
Tried WiFi but it said it was offline
etc. etc.
What fixed it for me was changing the device connection from Mass Storage to MTP. To do so, with the phone unplugged you go into -
"Settings" -> "Storage" -> Click the menu Button -> "USB computer
connection" -> "Media device (MTP)"
Hope this helps some one from going crazy!
Thanks,
Ash.
I tried everything mentioned here and in other posts. It wasn't the cable, the USB port, rebooting the PC or Nexus 7, killing and starting adb or enabling/disabling USB Debugging.
It was due to the 4.2.2 OTA update, I simply replaced the \platform-tools\ folder, as described here: Android ADB device offline, can't issue commands
Download the updated platform-tools: http://dl.google.com/android/repository/platform-tools_r16.0.1-windows.zip
adb wait-for-device
works for me. Just unplug your usb device, run this command, and while it's waiting, plug your device in, then it will just work. :)
Here is what I did (Galaxy S4 4.2.2):
go to Settings => about this device => click several times on "Version number", that is to say something like "JDQ39.I9505XXBHYTGKDD" (not android version or anything else) ; here you will see that Google or Samsung have a lot of humour as you have to click until multiple times until having a toast displaying "You are at few clicks from being a developer" ; after something like 10 clicks, you have a toast "You are a developer"
Go "Development options" (in the "More" tab (rigjt tab of settings menu)) ; be sure that "USB debugging" is checked.
And it works ! Eclipse can see your S4(or any other device) 4.2.2 !
I had this problem today and fixed it by rebooting the Tab2 while leaving it plugged into the laptop/eclipse
Check if you have installed android-adb-tools in Ubuntu. If you do, the adb tool may be old. Uninstall and make an alias to the latest adb tool you download with the ADB plugin. To check the adb version do "adb version" if it's 1.0.29 is the old, the latest and working for Android 4.2.2 is 1.0.31.
I made a lot of stuff until i realized this.
going to Developer Options and checking USB Debugging solved it for me
My solution used on cm10.1 nightly build on droid bionic, was after updating the newest usb drivers, using the Mass storage option (instead of the MTP option for USB computer connection), then unchecking and rechecking in developer options, "ADB over network" option. Then it did the RSA pop up dialog.
For me the best solution was:
Update the Android SDK via the SDK-Manager. Removing the '.android' folder in my usr directory ( Windows 7 ) and re-plugging the device back in. Worked flawlessly due to the ADB RSA key issue. I had an older version of ADB that I stashed into c:\windows\system32\ due to not wanting to install an entire freakin SDK when all I wanted was a command prompt. Good ol' Google, the new Microsoft.
You may use an old version of adb.exe. Update platform-tools.
You may have to set a new path to adb.exe as well.
In case it helps someone else arriving here, I had this problem with a ZTE phone.
I tried installing the driver based on the offical list here but in Device Manager the driver was marked as not installed correctly.
In the end I found the way to make this work was:
Press Menu Button
Choose "Connect to PC"
Choose "Default connect type"
Choose "Install Driver"
Plug in phone and on PC select option to install the driver
Then change "Default connect type" to "PC software"
After doing this I was able to do:
adb kill-server
adb start-server
adb devices
and view my device.
It's working on windows 8 using Android 4.4.2
Reset your phone,
go to setting->about phone-> seven time click on build number.
go to back and go to developer options check USB debugging.
go to windows 8 start menu click on profile picture and click change profile picture.
Select devices and on Download over metered connections.
Connect your phone via cable your PC and wait.