且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Chrome DevTools 设备在插入时未检测到设备

更新时间:2023-12-04 18:46:28

启动并运行功能:

  • Follow steps at https://developers.google.com/chrome-developer-tools/docs/remote-debugging
  • Install Windows USB driver http://developer.samsung.com/android/tools-sdks/Samsung-Android-USB-Driver-for-Windows
  • Install Android SDK http://developer.android.com/sdk/index.html
  • Install Android SDK Platform-tools http://developer.android.com/sdk/installing/adding-packages.html (this step was blocked on corporate wifi so I installed the single ADB package it required https://forum.xda-developers.com/showthread.php?t=2317790)
  • Use command prompt to run ADB, in cmd go to the install directory of the ADB tools and type:
  • adb.exe (might need to start and stop ADB using adb kill-server and adb start-server)
  • Connect phone and browse to about:inspect in Chrome on desktop, ensuring a Chrome browser is open on your device

按照上述步骤,我收到 RSA 密钥指纹提示以接受,然后我在 Chrome 中看到了我的设备.

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.

2016 年 2 月 24 日更新

所以我更新到了 Windows 10,现在有了三星 Galaxy S5,设备分别运行 Chrome v48.0.2564.116 m 和 v48.0.2564.95.按照 Google 文档中的步骤进行操作……它再次不起作用,没有 RSA 密钥提示.所以我开始按照上面的步骤操作,并认为必须有更快的方法,因为 Android SDK 下载量超过 1GB.

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.

这次我尝试了:

  • Follow steps at https://developers.google.com/chrome-developer-tools/docs/remote-debugging
  • Install Windows USB driver http://developer.samsung.com/android/tools-sdks/Samsung-Andorid-USB-Driver-for-Windows (the PC alerted me saying it was already installed but I still did it anyway)
  • Install the single ADB package required https://forum.xda-developers.com/showthread.php?t=2317790)
  • Go to the ADB install folder which for me was C:Program Files (x86)Minimal ADB and Fastboot
  • Open command prompt and run adb devices (alternatively I could have run adb start-server but the prior gives a more informational response)

现在,在我的手机上打开 Chrome 并在我的桌面上打开 chrome://inspect/,我可以看到检查选项.

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

下一个问题:我每次重新启动 Windows 时都需要重复相同的步骤.要解决该问题:

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

  • 打开文本编辑器并复制到"C:Program Files (x86)Minimal ADB and Fastbootadb" devices
  • 在位于 C:ProgramDataMicrosoftWindowsStart MenuProgramsStartUp
  • 的 Windows 启动文件夹中将该文件另存为 adb.bat

请注意,该文件不需要称为 adb.bat,只要它是 .bat 文件即可.您复制到文件中的命令具有默认安装路径,您可能需要为设置更改该路径.

现在我可以在需要时使用 Chrome Inspect 功能.

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.