Ash
Ash

Reputation: 11472

Chrome DevTools Devices does not detect device when plugged in

I cannot seem to get the DevTools Devices feature to work on my Samsung Galaxy S4 even after following the steps outlined at https://developer.chrome.com/docs/devtools/remote-debugging/

My device has Chrome v32 and Chrome Beta v33, while my PC has Chrome v33 and Chrome Canary v35.

USB debugging is enabled on my device and device driver has been installed. I have never got the prompt as outline in step 3 from the above link to approve the RSA key fingerprint yet the device does connect to my PC to allow media transfer. I have even revoked all USB debugging authorizations as per the link above.

I don't have any thing extra installed on my PC for Android development which may perhaps be the issue. I wish to utilise this feature to inspect web pages from the devices point of view.

Upvotes: 361

Views: 490010

Answers (30)

g491
g491

Reputation: 381

One important note is that if you have a lot of tabs open in Chrome on your device, you might need to wait a while for it to show on the chrome://inspect page.

If you've installed the appropriate driver, ran adb devices, and approved the USB debugging request, try waiting for a minute or even longer and see if you have any luck.

Upvotes: 0

csga5000
csga5000

Reputation: 4141

Open chrome on the android device. Nothing else worked for me.

I was fiddling with getting my phone to connect to no avail for a long time, and this has been a recurring issue.

After I got disconnected and couldn't reconnect I finally gave up, and was going to test some things on the phone through the browser and see if chrome://inspect worked better with the browser than the debug ionic app.

But as soon as I opened the browser, I noticed that it no longer gave me the permissions error and chrome://inspect was behaving exactly as I expected.

If this doesn't fix it, you may need to try other solutions like unplug/replug or toggle debug mode or revoke authorizations first; however, I believe at present, chrome://inspect can't connect to webviews (at least in some cases) well if the chrome app hasn't been opened recently.

If it doesn't work for anyone else, it works for me.

Upvotes: 0

Studocwho
Studocwho

Reputation: 2478

On a Galaxy S7 and Windows 10 laptop, all I had to do whilst connected to the computer was change the USB connection mode to "Audio Source" (Phone Settings > Developer Options > USB Configuration).

This then immediately came up with the on-device prompt to allow the RSA key fingerprint. Then the dev tools on computer recognised my device.

Why this works I do not know, however it is by far the simplest of solutions, and without the need for installing unnecessary software.

I have also had some luck changing it to "MTP (Media Transfer Protocol)" mode too, but only on occasion.

Edit:

The MTP option no longer works for me.

In addition to Audio Source, setting the connection mode to MIDI also works. It is a lot easier to change the connection mode by accessing it straight from the device's notification bar - Tap the "Transferring media files via USB" or the equivalent notification.

Using MIDI is probably the easiest of the two since it doesn't require going into several setting screens to access it.

Upvotes: 152

Ash
Ash

Reputation: 11472

To get the functionality up and running:

Following the above steps I got the RSA key fingerprint prompt to accept then I saw my device in Chrome.

Definitely not as easy as I thought it would have been but at least it now works.

Update 24 February 2016

So I updated to Windows 10 and now have a Samsung Galaxy S5, devices running Chrome v48.0.2564.116 m and v48.0.2564.95 respectively. Followed the steps from the Google docs and...it didn't work again, no RSA key prompt. So I began to follow my steps as above and thought there had to be a faster way as the Android SDK was over 1GB download.

This time I tried:

Now, with Chrome open on my phone and chrome://inspect/ open on my desktop I can see the inspect options.

Next problem: I need to repeat the same steps each time I reboot Windows. To solve that issue:

  • Open a text editor and copy in "C:\Program Files (x86)\Minimal ADB and Fastboot\adb" devices
  • Save that file as adb.bat in the Windows Startup folder located at C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

Note that the file does NOT need to be called adb.bat as long as it is a .bat file. The command you copied into the file has the default install path which you may need to alter for your set up.

Now I have the Chrome Inspect feature working when I need it.

Bit thanks and shout out to all others who have contributed their answers to this question which helped guide me towards a useful update to my answer. Please give credit to other answers where you find they have helped you too.

Upvotes: 614

Alper AKPINAR
Alper AKPINAR

Reputation: 91

If you have android 9 in your mobile device you must update Android SDK in Android Studio.

  • Open Android studio and go to Settings.
  • System Settings\Android
  • Select Android SDK (You will see new version of SDK)
  • Click to apply
  • Your mobile phone will want to access now on MIDI mode.

Upvotes: 0

Timar Ivo Batis
Timar Ivo Batis

Reputation: 1996

Samsung Note 8 User here - all i had to do was

  1. Enable USB Debugging on the phone.
  2. Install and run the "ADB and Fastboot" tool
  3. Input command adb devices in the adb prompt.
  4. Go to chrome://inspect/#devices and the device shows up.

After that i got a message on my phone and chrome recognized the phone.

Upvotes: 49

user161546
user161546

Reputation: 69

There is a necessary step which is not detailed:

ADB must be running (it is not because it is installed that it will run to establish the connection)

For an unknown reason to open "developer tools" on chrome (canary) will not necessarily launch the run of ADB with good parameters. Then you will not see on the smartphone the question "Confirm remote connection with 'your pc address' " while on PC you can see on the connection panel "pending unknown connection". Then necessarily if this not happens the connection will not be established. Note that some other tools launches ADB but what important is to launch ADB and establish the connection.

When you run ">ADB connect 'IPofYourSmartphone port' " or ADB is run by a soft to get right connection, ADB sends the request which show the panel confirmation on your Smartphone

This is too valid for USB or Wifi connection. If you use on android a tool like "ADB wireless by Henry" you will get a full guide to get a wifi debugging remote connection.

Upvotes: 0

backnext
backnext

Reputation: 393

This Worked for me:

Go to Developer Options on your device and disable the "USB Debugging" and after sometime enable it again.

Upvotes: -1

sledgeweight
sledgeweight

Reputation: 8095

Ubuntu Linux 20 update:

You may no longer have to do any of the commands below. sudo apt install -y adb is sufficient. Chromium 83 has that port forwarding rule enabled by default

Older answer:

For anyone using Ubuntu, I used the following:

https://github.com/M0Rf30/android-udev-rules

Take note of the add group name command needed for Ubuntu 16 users.

I also installed the ADB tools sudo apt install android-tools-adb and sudo apt install android-tools-fastboot and didnt need the whole Android SDK

Lastly, don't forget to add the port forwarding in the devtools settings next to device where your phone has finally connected, i.e. 8080 | localhost:8080

Upvotes: 12

Koralek M.
Koralek M.

Reputation: 3341

Samsung phone + PC with Windows

First of all you need to turn on USB debugging on your phone:

  1. Settings / About phone / Software information / Build number (tap it 7 times to turn on developer mode)
  2. Settings / Developer options / USB debugging (turn it on)

Then on your PC:

  1. Install Samsung USB driver https://developer.samsung.com/mobile/android-usb-driver.html
  2. Install ADB https://forum.xda-developers.com/showthread.php?t=2317790 (in the forum scroll down to the section "Downloads" to get the newest version of ADB)
  3. After ADB installation CMD should pop up -> start ADB with command "adb devices" (for example "C:\Program Files (x86)\Minimal ADB and Fastboot> adb devices")
  4. Connect your phone to your PC with USB cable
  5. Alert about the connection should pop up on your phone (allow it)
  6. In Chrome on your PC open Developer tools / More tools / Remote devices and you should finally see your phone being detected

Upvotes: 39

The Conspiracy
The Conspiracy

Reputation: 3953

If running on Huawei or Honor phones, make sure to install and run HiSuite on your computer. USB debugging only works when HiSuite is on.

Upvotes: 3

Chunky Chunk
Chunky Chunk

Reputation: 17217

I solved this problem without installing any Samsung or Android SDK drivers or having to select MIDI or Image transfer options, as detailed in the many answers above spanning several years.

For me, on Windows 10, the problem was caused by the Windows 10 built-in app called Your Phone. I only had to repair the app in its Advanced Settings. There might be an easier way to access the app's settings but I accessed them this way:

  1. System Settings
  2. Add or Remove Programs
  3. Click Your Phone from the list
  4. Select Advanced Options
  5. Select Repair under Reset options

After this, when I reconnected and toggled USB Debugging on my Android phone (Samsung A30), my phone prompted me for approval of the RSA key fingerprint, which allowed Chrome DevTools to finally recognize my phone.

Upvotes: 1

Gustavo Morais
Gustavo Morais

Reputation: 588

What I had to do was disable "Discover network targets" at chrome://inspect/#devices.

That's the only thing that solved it for good in my setup(chrome Version 78.0.3904.97 deepinOS/debian based).

Upvotes: 8

ShortFuse
ShortFuse

Reputation: 6804

Chrome appears to have bug renegotiating the device authentication. You can try disabling USB Debugging and enabling it again. Sometimes you'll get a pop-up asking you to trust your computer key again.

Or you can go to your Android SDK and run adb devices which will force a renegotiation.

After either (or both), Chrome should start working.

Upvotes: 4

Mahdi Bashirpour
Mahdi Bashirpour

Reputation: 18803

run adb command line. like this

adb devices

Upvotes: 8

ViniH
ViniH

Reputation: 756

Had a nightmare with this today Samsung Galaxy Note 9 and a Windows 10 Laptop without Android Studio. Here are working steps to get debugging.

1) Enable developer mode on the phone in the usual manner and turn on "USB Debugging".

2) On your computer install the Samsung USB Drivers for Windows https://developer.samsung.com/galaxy/others/android-usb-driver-for-windows

3) Open Chrome on your Computer - bring up Remote Devices in dev console (at the moment it will say no devices detected).

4) Connect your phone to your computer via USB cable.

5) Accept any prompts for authorisation and wait until the computer says "your device is ready.." etc.

6) On your phone, swipe down the top menu and tap "P Android system" - select "MIDI" under "Use USB for".

7) Various setup notifications will appear on your PC, when they are finished you will get the authorisation prompt for debugging on your phone. Accept it! Wait a few more second and you will find the phone now appears in Chrome Dev tools on the computer, and will be connected in a few more seconds.

You're welcome.

Upvotes: 10

Brendan
Brendan

Reputation: 132

Using a Samsung Galaxy S9 running Android Pie. -- May 2019 Similar to the answer above, and NickW's post for that answer: Once your device is connected, instead of going to settings, go to the phone's notification bar > Android System and 'Tap for other USB options.' Select MIDI under the options and you're good to go!

Upvotes: 1

riad ghalloussi
riad ghalloussi

Reputation: 66

Chrome "Remote device" stop working after a few months when I didn't use it.

I resolved this issue : in "development option" of my device (samsung J3) I canceled usb debugging authorization then in my computer, I execute "adb devices" in "C:\Program Files (x86)\Android\android-sdk\platform-tools" folder a prompt appears in my device asking me weather I allow my computer to debug apps or not. I click yes then chrome has detected my device

Upvotes: 5

Punit S
Punit S

Reputation: 3247

None of the mentioned answers worked for me. However, what worked for me is port forwarding. Steps detailed here:

  1. Ensure you have adb installed (steps here for windowd, mac, ubuntu)
  2. Ensure you have chrome running on your mobile device
  3. On your PC, run the following from command line:

    adb forward tcp:9222 localabstract:chrome_devtools_remote

  4. On running the above command, accept the authorization on your mobile phone. Below is the kind of output I see on my laptop:

    $:/> adb forward tcp:9222 localabstract:chrome_devtools_remote

    * daemon not running. starting it now on port 5037 *

    * daemon started successfully *

  5. Now open your chrome and enter 'localhost:9222' and you shall see the active tab to inspect.

Here is the source for this approach

Upvotes: 2

Chris Halcrow
Chris Halcrow

Reputation: 31950

(Note - this worked for me using a Samsung S6. I'd appreciate any comments on the phone version used, for anyone these instruction work for)

If your phone is connecting to your computer and being recognised on the computer, and you've enabled USB debugging on your phone, but the phone doesn't appear under 'Remote devices' in the Chrome developer tools, then you can first try restarting the automatic discovery process by selecting the following on your phone - 'Settings > Developer Options > Revoke USB Debugging Authorizations'.

If this doesn't work, then the problem is likely that the Android Debug Bridge Daemon is either missing or not running on your computer (info about ADB - https://developer.android.com/studio/command-line/adb.html)

You don't need the full Android SDK to use ADB, you can download the standalone Android SDK Platform Tools from here:

https://developer.android.com/studio/releases/platform-tools.html

First, install the tools for your platform. I'm using Windows, and the steps for me were:

-Unzip the download into c:\platform-tools (I just put it here for convenience, you can choose a different location).

-Open command prompt (run as administrator) in folder, and run the following command:

adb devices

(The adb.exe is in our folder). This will start the daemon and show you a list of attached Android devices.

If you see 'unauthorized' next to a device, it means you have to unlock your phone and choose 'allow access to device data', then 'always allow access from this computer'. You should then see your phone connected in the developer console:

enter image description here

You'll need to have the Daemon running every time your computer restarts. Put a .bat file in your startup folder, to run the daemon every time your computer starts (if you've been following my instructions exactly, the content of the .bat file you'll need to create will be c:\platform-tools\adb devices).

If you now have difficult accessing a URL (e.g. 'localhost') that you're sending to Chrome on your Android device (via the Chrome dev tools on your computer), that's a different issue. See this question for advice How can I access my localhost from my Android device?

(in brief, you need to make sure your computer and phone are connected on the same network, so connect both onto the same wi-fi network or tether your computer to your phone's hotspot, then run ipconfig to get your wireless IPv4 IP address, and use that IP in the URL you want to view on your phone)


Note: For the initial debugging connectivity to work, you need to be using MTP mode (Media Transfer Protocol) on your Android, for USB transfer (MTP is the default). There's a fix mentioned in one of the answers that involves switching this mode to something else, however that probably just triggers some type of re-recognition, and you're likely to be automatically switched back to MTP mode anyway if you disconnect then reconnect the phone.

Upvotes: 85

Adorjan Princz
Adorjan Princz

Reputation: 11834

I have been using this tool for years on different computers and with different devices. I often found that chrome / ADT does not see my device.

In this case only thing that works for me is to reset ADB deamon:

adb kill-server

or / and

adb usb

After you re-plug your device a message will be shown on your device asking you to allow USB debugging from the computer connected. It's really important that this request be allowed.

Upvotes: 31

Robin Chow
Robin Chow

Reputation: 69

Using an LG G7 and Windows 10 at the moment. For me, once the phone is physically connected, changed the USB connection mode to Photo transfer (I was originally using File transfer) and Chrome's Remote Devices detected my phone. As far as I know, I have only the mobile driver installed, no ADT etc.

Upvotes: 0

Tobo
Tobo

Reputation: 186

ADB must be running. Just go to

C:\Users\yourUserName\AppData\Local\Android\Sdk\platform-tools and run adb devices, daemon should start and then show all connected devices.

Upvotes: 13

Simon_Weaver
Simon_Weaver

Reputation: 145950

Toggling 'Discover USB devices' seemed to kickstart something after I'd toggled the enable debugging feature on and off on the phone.

Also a different cable may have been the issue. My case may have been interfering with the connection for data, but not sure.

enter image description here

Upvotes: 1

Noman
Noman

Reputation: 887

On the phone make sure that the debugging mode is turned on.

Upvotes: -1

Stepan Yakovenko
Stepan Yakovenko

Reputation: 9206

I've worked with six different Android devices and multiple cables and I have to say that debugger works unstably. Sometimes it can see the device, sometimes it doesn't. Sometimes restarting Chrome helps. Here is a related bug https://bugs.chromium.org/p/chromium/issues/detail?id=788161, may be you can contribute with your evidence.

Upvotes: 1

mcheah
mcheah

Reputation: 1326

Just adding this here for reference, I was trying to connect an LG G5 Android phone and Chrome dev tools did not recognize it until I downloaded the LG usb driver here.

Good luck, all!

Upvotes: 0

billy_comic
billy_comic

Reputation: 899

I tried @maurice cruz answer and was unable to get the actual drivers. Then I found this post which had a download for global LG driver (not sure if it covers all, but many) for their devices. After installing, then toggling usb debugging off then back on, I was prompted with RSA acceptance.

Upvotes: 2

Sushil Kumar
Sushil Kumar

Reputation: 11

I am new to app programming and this was the first problem I ran into when I tried to get a sample program debug using my LG G3 device. The post above with detailed instructions should work for all. I am adding my experience in case it helps other:

I had followed instructions step by step but one. That is, installing the USB driver from my OEM. My phone kept notifying that the debugging is on (in the notification area) and I could transfer data as well as charge. That made me think that appropriate USB drivers are installed. But it wasn't. Finally I went to LG site and downloaded the USB driver for my LG G3. Right after I installed the driver and reconnected the phone to the computer via the cable, I got the RSA key prompt. My Chrome now detects it and I was able to get my app run on my phone via Android studio as well.

Upvotes: 1

maurice cruz
maurice cruz

Reputation: 156

If you're on windows, you need to install the drivers for your phone. You can get them here.

If it still doesn't work, I've had luck connecting by manually restarting the Android Debug Bridge manually. More info is here.

Upvotes: 7

Related Questions