Android device is not connected to USB for debugging (Android studio)

AndroidAndroid StudioDebuggingAdb

Android Problem Overview


I am trying to debug my application using a real device instead on the emulator. When I try to connect, it gives me the message:

> USB device not found

I tried to unplug and plug it again, but it did not work. And I have also enabled USB debugging and unknown sources options in my device.

Any help is appreciated!

Thanks!

Android Solutions


Solution 1 - Android

I had this problem with a Nexus 7 - it appeared in Device Manager fine but wasn't recognised by Android Studio. The device had USB debugging turned on. Eventually I noticed an icon in the top left hand corner that said "Connected as a media device. Touch for other USB options." When I selected this I was able to change from Media Device (MTP) to Camera (PTP) and then it started working.

Solution 2 - Android

If you are on windows, many times it will not recognize the device fully and because of driver issues, the device won't show up.

  • go to settings
  • control panel
  • hardware and sound
  • device manager

And look for any devices showing an error. Many androids will show as an unknown USB device. Select that device and try to update the drivers for it.

Solution 3 - Android

This solution works for every unrecognized android device... mostly general brands don´t come with usb debugging drivers...

  • go to settings
  • control panel
  • hardware and sound
  • device manager
  • And look for any devices showing an error. Many androids will show as an unknown USB device or just Android

First thing you need will be your device IDs. You can get them opening up the device manager and finding the "Unknown Device" with a yellow exclamation point. Right click on it and select 'Properties', and then go to the 'Details' tab. Under the 'Property' drop down menu, select hardware IDs. There should be two strings:

USB\VID_2207&PID_0011&REV_0222&MI_01
USB\VID_2207&PID_0011&MI_01

Copy those strings somewhere and then navigate to where you downloaded the Google USB driver. Then you need to open up the file 'android_winusb.inf' in a text editor. I would recommend using Notepad++.

android_winusb.inf

First, create a sub-section for your device. I called mine ';RCA 6378W2' but it doesn't really matter what you call it. Then, under the sub-section you created paste the Device ID strings you copied from the Device Manager, preceded by '%SingleAdbInterface%'. If you need help, look at this screenshot.

NOTE:

If you are using Windows 8 or 8.1, you will need to disable device driver signature checks before you'll be able to install the modified driver. Here's a quick video on how to disable device driver checks http://www.youtube.com/watch?v=NM1MN8QZhnk. Ignore the part at the beginning about 64 bit, your computer architecture doesn't matter.

Please look at this article, for more information and MacOS instructions.

Solution 4 - Android

Try a different cable, ideally an official Samsung one.

I had tried a crappy USB cable I had lying around and then tried another which was Samsung and works perfectly now.

Not sure why they would be different though but worked for me.

Solution 5 - Android

Found out for Samsung, Installing Kies also update the usb driver which solve my problem with connecting my Samsung Galaxy S Advance with Android 4.1.2 to Android Studio on Windows 7 64bit. In this case the devise manager shows device driver is updated and working, but when I connect my phone Android Studio does not recognize my device.

Solution 6 - Android

I had the same problem with connecting my Galaxy Nexus to win7 x64. I solved it by getting drivers, they can be downloaded from here or also via Android SDK manager.

Solution 7 - Android

After you put your phone on developer mode, restart it. That worked for me, maybe it will work for you also. After restarting it, the phone was recognized, drivers were automatically installed. Note - I'm running on Windows 7.

Solution 8 - Android

I've been having this issue on Mac OSX Mavericks using Android Studio, using my Samsung Galaxy Express , I did a little trick, Run -> Edit Configurations - > Run -> Show chooser dialog. When I "play" and the dialog appeared, I connected my device and it did appear. ;)

Solution 9 - Android

You need to install the driver first. Follow the instructions on the Android's developers website:

http://developer.android.com/tools/extras/oem-usb.html

Solution 10 - Android

I had the same problem with a Samsung galaxy note 2. It was recognized on one pc but not on another one (both running windows 7 64b). After hours of struggling, I installed Kies (from the Samsung website) on the pc where Android Studio was unable to detect the smartphone (Kies was installed on the other one).

Like magic, Android Studio detected the phone !!! I noticed that the Kies installer installed some driver for the phone.

Consequently, for those meeting the same detection problem, I would strongly advise to first install Kies.

Solution 11 - Android

Galaxy S7, I had to go to Settings, Developer Options and allow USB Debugging. This asked to approve computer it was attached to and it showed up instantly.

Solution 12 - Android

I had tried restart the device, and it's work, popup and ask want to trust the mac for debug mode.

Solution 13 - Android

I am using Samung S8, I tried to install:

  1. Intel Android Driver
  2. Samsung USB driver

But the adb bridge driver was still missing. I finally got it to work by installing the Samsung Smart Switch application which is a media manager application.

Updated at 2018-04-20: If you are struggle with the driver, just use http://adbdriver.com/downloads/

Solution 14 - Android

If you're using a USB Type-C cable, check if it has the charging and data transfer capability. Many USB Type-C cables are for charging only, and are not recognized by Android Studio.

Solution 15 - Android

Check installed drivers. If drivers ok, check device usb-port it could be damaged.

Solution 16 - Android

I have a Samsung Galaxy S4. Although visible from Devices, my phone was not listed as connected from Android Studio. I tried a few things independently, and then together, and found that only a combination of steps fixed the issue, so this is for you if measures listed above or on another site did not work on their own.

  1. Enable USB debugging from "Developer Options"
  2. Download Kies from Samsung. I believe Samsung US has replaced Kies with a new software called Smart Switch, but this did not resolve anything for me. I found a Samsung UK download of Kies that worked fine.
  3. After connecting your phone to your PC via USB, go to your phone notifications and click on USB settings at the top. Switch it to Camera mode.

I repeat, only all 3 of these together fixed the issue, so if some fixes you have tried haven't worked, use these 3 and it could fix the problem for you. Best of luck.

Solution 17 - Android

Restart Android Studio Worked in my case

Solution 18 - Android

For me, this simple trick worked:

I actually enabled and disabled the listed USB Adapter for android in the device manager (Control Panel -> Hardware & Sound -> Device Manager). And holy moly it's working! :D

Solution 19 - Android

The solution for me was following the instructions at https://developer.android.com/studio/run/oem-usb.html#InstallingDriver. Specifically, the key part from that link that helped me to find the solution was this: "Install a USB Driver. First, find the appropriate driver for your device from the OEM drivers table below." This means that you cannot find a single link that applies to everyone as the solution. It will depend on your device! "So I visited the page to get OEM Drivers at https://developer.android.com/studio/run/oem-usb.html#Drivers. In my case, the device I was using was an LG K8 LTE. I had to go to http://www.lg.com/us/support/software-firmware-drivers#, Browse by product and I found the driver I needed under the Model Number "LGAS375 KG K8 ACG - AS375", Cell Phone Product. From http://www.lg.com/us/support-mobile/lg-LGAS375 I used the "Install the USB DRIVER" for Windows (http://tool.lime.gdms.lge.com/dn/downloader.dev?fileKey=UW00120120425).

Depending on the device model you are using, you will need to find the specific drivers that work for your phone, and that should work.

Solution 20 - Android

How to get connection to device working using adb command line:

USB debugging enabled on phone and phone connected.

I am exercising these commands on linux(redhat and ubuntu) but same commands work under the hood on windows. The device manager runs adb commands. You can find a console in your device manager or regular command-line works if you set up your paths to SDK.

If you can run adb and see something like ???????? in devices list ..

$ android-studio/sdk/platform-tools/adb devices
List of devices attached 
????????????	no permissions

You might be running the adb server as a regular user. You might have to run the adb server as root. So kill the server as regular user and start it as root.

$ adb kill-server
$ which adb
$ sudo <fullpath>/android-studio/sdk/platform-tools/adb start-server

Now look at adb devices list, if it is first time this machine connects to this phone you will see "unauthorized".

$ adb devices
List of devices attached 
MWS0216A31xxxxxx	unauthorized

At this point on phone you should have dialog popped up and you can tap ok to authorize. Then you should see "device" in the devices list and commands like shell/push/pull/sync/backup... should work.

$ adb devices
List of devices attached 
MWS0216A31xxxxxx	device

$ adb shell "uname -a; df; ls /storage/sdcard0/Download"
Linux localhost 3.10.90-g2ff1b22 #1 SMP PREEMPT Tue Dec 27 17:12:50 CST 2016 aarch64
Filesystem               Size     Used     Free   Blksize
/dev                     1.3G   108.0K     1.3G   4096
/sys/fs/cgroup           1.3G    12.0K     1.3G   4096
/mnt                     1.3G     0.0K     1.3G   4096
/sys/fs/cgroup/pids: Permission denied
/system                  2.4G     2.3G   106.8M   4096
/cust                  492.0M   327.7M   164.3M   4096
/cache                 248.0M   160.0K   247.8M   4096
/splash2: Permission denied
/3rdmodem               59.0M     4.9M    54.1M   1024
/3rdmodemnvm: Permission denied
. .
/storage                 1.3G     0.0K     1.3G   4096
/data                   25.1G    10.9G    14.2G   4096
/mnt/runtime/default/emulated: Permission denied
/storage/emulated       25.1G    11.2G    13.8G   4096
/mnt/runtime/read/emulated: Permission denied
/mnt/runtime/write/emulated: Permission denied
.
.

Lovely jubly. Hopefully.

Solution 21 - Android

For example:

My file path:

C:\...\sdk\extras\google\usb_driver\android_winusb.inf

My data to paste:

;Tablet PC

%SingleAdbInterface%		= USB_Install, USB\VID_18D1&PID_0003&MI_01

%CompositeADBInterface%		= USB_Install, USB\VID_18D1&PID_0003&REV_0230&MI_01

Solution 22 - Android

Well, in my case updating drivers, restarting Android Studio, restarting my phone, changing the USB mode or unplugging USB did not help.

Then I went to the dev settings in my phone, toggled the Dev. Mode off and back on, and it worked. AS was open and phone was plugged at the moment.

Solution 23 - Android

I had this problem occurring suddenly in Dell Ubuntu linux machine with Android Developer Studio. I did the following steps

    1. I opened "System Settings"
    2. Select the listed item "Software and Updates"
    3. Click on the tab "Additional Drivers"
    4. There was a mention about "Dell Inc: Unknown" and the option "Do not use use the device" selected. I selected the alternate driver mentioned and did an "Apply the Changes".

It started working.

Solution 24 - Android

I just ran adb command prompt and hit 'adb devices' and it showed daemon was not running. It installed itself and now i can able to see android devices there.

C:\...\...\source\repos\ABC\ABC\Ex.Android>adb devices
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
ZF22Q3T      unauthorized

and Reload the project

Solution 25 - Android

Windows, many times it will not recognize the device fully and because of driver issues, the device won't show up.

  • 1).go to settings

    2).control panel

    3).hardware and sound

    4).device manager

enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser1438823View Question on Stackoverflow
Solution 1 - Androidparsley72View Answer on Stackoverflow
Solution 2 - AndroidHalRView Answer on Stackoverflow
Solution 3 - AndroidGuilherme ViebigView Answer on Stackoverflow
Solution 4 - AndroidCarltonView Answer on Stackoverflow
Solution 5 - Androiduser3129467View Answer on Stackoverflow
Solution 6 - AndroidMicerView Answer on Stackoverflow
Solution 7 - Androidalmost a beginnerView Answer on Stackoverflow
Solution 8 - AndroidFelipe FMMobileView Answer on Stackoverflow
Solution 9 - AndroidRafidView Answer on Stackoverflow
Solution 10 - AndroidDominiqueView Answer on Stackoverflow
Solution 11 - AndroidTrent RamseyerView Answer on Stackoverflow
Solution 12 - AndroidEdward ChiangView Answer on Stackoverflow
Solution 13 - Androidcode4jView Answer on Stackoverflow
Solution 14 - AndroidLucas BustamanteView Answer on Stackoverflow
Solution 15 - AndroidAleksandrView Answer on Stackoverflow
Solution 16 - AndroidKartik ChughView Answer on Stackoverflow
Solution 17 - AndroidHitesh SahuView Answer on Stackoverflow
Solution 18 - AndroidSahirView Answer on Stackoverflow
Solution 19 - AndroidJaime MontoyaView Answer on Stackoverflow
Solution 20 - AndroidgaoitheView Answer on Stackoverflow
Solution 21 - Androiduser3627268View Answer on Stackoverflow
Solution 22 - AndroidP_95View Answer on Stackoverflow
Solution 23 - AndroidDeepak DanielView Answer on Stackoverflow
Solution 24 - AndroidsummerGhostView Answer on Stackoverflow
Solution 25 - AndroidKeshav GeraView Answer on Stackoverflow