Android Studio connection issue - android

Am having a problem in connecting my huawei Y7 2018 phone with android studio,each time i try connecting it via the usb option it still doesnt appear on my android studio even after allowing the usb debugging option on and the weird part of it, it connects to other phones.Kindly help to solve this problem.

check for ADB drivers are properly installed n are compatible with your device. Connect your phone to pc n open terminal n-type adb devices check whether your device shows up or not, if not you have to install your device compatible drivers(optional try universal ADB drivers or google ADB drivers).

Related

ADB device stuck in "connecting" state

I'm trying to connect my phone to Android Studio to follow up with some app development. I am currently struggling with connecting my phone to the computer properly, as ADB never seems to connect to the device.
When attempting to boot the app on the device, this is what Android Studio tells me in the run console
com.android.ddmlib.AdbCommandRejectedException: device still connecting
Error while Installing APK
Which leads me to think that this is a problem with ADB. So when I run adb devices I get this log:
List of devices attached
5210a780f48b44c5 connecting
It stays in the "connecting" state no matter how long I wait. I accepted USB debugging and file transfer.
When in Android studio, the device is listed as
I'm out of ideas as to how to fix this. I recently updated my phone (Samsung A5) to Android 8.0. This phone connects and debugs fine on my work computer. I tried updating Android Studio, rebooting my computer, installing Samsung drivers, rebooting my phone, revoking debug access, to no avail. I was able to work on this computer a while back but I don't know what changed.
How can I fix this problem so I can debug on my device?
[EDIT]
adb version shows this
Android Debug Bridge version 1.0.40
Version 4797878
Installed as C:\Users\Frederic\AppData\Local\Android\sdk\platform-tools\adb.exe
A friend told me to try to swap ports to a USB 2.0 instead of USB 3.0. After doing so it worked instantly as expected.
[EDIT]
It appears that this has more to do with the capabilities of the motherboard than the version of USB the port is. The opposite might be true for you, or just any other port.
I had the same problem and found that the issue was solved by switching off USB debugging on the device, then switching it on again.

Android device not showing on adb anymore

Hello stackoverflow mighty community,
Please help !
I have a Datalogic DL-AXIST (http://www.datalogic.com/eng/products/automatic-data-capture/mobile-computers/dl-axist-pd-702.html) which is an android device but i guess the company fiddled a bit with its core. Also I have a windows 7 toshiba pc.
Anyway my concern is that it is not showing on the adb devices chooser.
Here is what i've tried so far:
I'm using Eclipse IDE, my SDK is up to date and i can test my application on all the other devices i tried so far.
The datalogic device has Android 4.1.1, driver is correctly installed on my pc i'm sure, enabled developer options.
I tried connecting it as MTP and PTP but will not work, there is also a CD-ROM installer connection which i tried as well, followed through the installation on my pc but still does not work.
It gets even stranger, when i used the third pc connection type and installed the device with its own adb on pc, i even copied those adb files in that folder and pasted them my eclipse's own adb. This worked ! my device was recognized but it changed for a reason i do not know.
I tried uninstalling the device driver and re-installing it from windows device manager, tried rebooting device and restarting eclipse and pc.
I really need some help because making this device work will greatly benefit my work.
Thanks !
This is genuine issue which may come frequently,but the soln is simple you may try these steps:
step 1;
try swictching developer options on and off
if the above dont works then go to device manager in your pc check portables devices select device and update driver software-->browse my comp-->let me pick list of device drivers-->select android as in option or MTP
if your device dont show in portable devices just update the device which comes in portable devices list trust me it works all time
try to do this once
1. Check if authorized:
\platform-tools>adb devices List of devices attached 4df798d76f98cf6d unauthorized
2. Revoke USB Debugging on phone
If the device is shown as unauthorized, go to the developer options on the phone and click "Revoke USB debugging authorization" (tested with JellyBean & Samsung GalaxyIII).
Restart ADB Server:
Then restarted adb server
adb kill-server adb start-server
4. Reconnect the device
The device will ask if you are agree to connect the computer id. You need to confirm it.
Now Check the device
It is now authorized!
adb devices \platform-tools>adb devices List of devices attached 4df798d76f98cf6d device

Why does 'adb devices' show 'unauthorized' with no 'allow' prompt on the device?

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,

macbook adb cannot open interface

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.

ADB shows Motorola Xoom as offline when connected

I have a Wi-Fi Motorola Xoom that I am connecting via ADB for development. I am seeing an intermittent problem where the device (with ID number) shows up in the adb devices list, but will present as being offline.
The device and computer both show the tablet as being connected. I've tried a combination of rebooting each device and swapping USB ports, but the only thing that solves the issue is switching out the cable. Furthermore, a cable that I used yesterday doesn't work today -- I am having to use a previously non-functioning cable to connect.
Is this a driver issue? Device port issue? I have seen this issue with several versions of the Motorola drivers as well as the PdaNet drivers. I am currently using Motorola Mobile Drivers 4.7.1.
WARNING: this question referred to an older device and as such the answers may no longer be relevant to current ADB connection issues.
I met the same problems like yours, and I found out that the USB cable has mal-functions in the PIN of head USB. So I switch to the new USB cable, it just works fine and detect device as online.
I had the same problem, and switching from the USB port on the front of my machine to the port on the back made things work. It could be related to a difference in port power or USB type.
From XDA: nouvelle_adr http://forum.xda-developers.com/showthread.php?t=2247471
I downloaded the adb version and it worked.
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.
If you haven't this pop-up mesage in your device, there is the solution :
1) Install SDK in your PC
It may asks you to install JAVA, if so, do it.
2) make sure that your adb is 1.0.31 or upper, to know the version, tape : adb version in your commande window"

Categories

Resources