即使按照https://developer.chrome.com/docs/devtools/remote-debugging/上列出的步骤操作,我还是无法在我的三星Galaxy S4上使用DevTools Devices功能

我的设备有Chrome v32和Chrome Beta v33,而我的个人电脑有Chrome v33和Chrome Canary v35。

我的设备上已开启USB调试,并且已安装设备驱动程序。我从未从上面的链接中得到步骤3中概述的提示,以批准RSA密钥指纹,但设备确实连接到我的PC以允许媒体传输。我甚至根据上面的链接撤销了所有USB调试授权。

我的电脑上没有任何额外安装的东西用于Android开发,这可能是问题所在。我希望利用这个功能从设备的角度来检查网页。


当前回答

只是在这里添加这个供参考,我试图连接LG G5安卓手机,Chrome开发工具没有识别它,直到我下载了LG usb驱动程序在这里。

祝大家好运!

其他回答

我是应用程序编程的新手,这是我在尝试使用LG G3设备进行示例程序调试时遇到的第一个问题。上面有详细说明的职位应该适用于所有人。我补充了我的经验,以防它能帮助到其他人:

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.

这招对我很管用:

转到设备上的开发人员选项,禁用“USB调试”,过一段时间再启用它。

今天三星Galaxy Note 9和一台没有Android Studio的Windows 10笔记本电脑做了个噩梦。下面是进行调试的工作步骤。

1)正常开启手机开发者模式,打开“USB调试”。

2)在你的电脑上安装三星USB驱动程序的Windows https://developer.samsung.com/galaxy/others/android-usb-driver-for-windows

3)在你的电脑上打开Chrome浏览器-在开发控制台打开远程设备(目前它会说没有检测到设备)。

4)通过USB数据线连接你的手机和电脑。

5)接受任何授权提示,等待电脑提示“您的设备准备好了”。

6)在您的手机上,向下滑动顶部菜单,点击“P Android系统”-在“使用USB for”下选择“MIDI”。

7)各种设置通知将出现在您的PC上,当他们完成后,您将得到授权提示调试您的手机。接受它!再等几秒钟,你会发现手机现在出现在电脑上的Chrome开发工具中,几秒钟后就可以连接了。

不客气

Ubuntu Linux 20更新:

您可能不再需要执行下面的任何命令。Sudo apt install -y adb是足够的。Chromium 83默认启用了该端口转发规则

年长的回答:

对于任何使用Ubuntu的人,我使用了以下方法:

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

注意Ubuntu 16用户需要的add group name命令。

我还安装了ADB工具sudo apt install Android -tools- ADB和sudo apt install Android -tools-fastboot,不需要整个Android SDK

最后,不要忘记在devtools设置中添加端口转发,在您的手机最终连接的设备旁边,即8080 | localhost:8080

上面提到的答案对我都没用。然而,对我有用的是端口转发。步骤如下:

Ensure you have adb installed (steps here for windowd, mac, ubuntu) Ensure you have chrome running on your mobile device On your PC, run the following from command line: adb forward tcp:9222 localabstract:chrome_devtools_remote 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 * Now open your chrome and enter 'localhost:9222' and you shall see the active tab to inspect.

下面是该方法的源代码