本文介绍了Chrome DevTools 设备在插入时未检测到设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使按照 https://developers.google.com/chrome-developer-tools/docs/remote-debugging

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

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

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

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.

我的 PC 上没有为 Android 开发安装任何额外的东西,这可能是问题所在.我希望利用此功能从设备的角度检查网页.

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.

推荐答案

启动并运行功能:

  • 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.

这篇关于Chrome DevTools 设备在插入时未检测到设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 14:49