简体   繁体   English

Chrome远程调试三星Galaxy s4

[英]Chrome remote debug Samsung Galaxy s4

I tried to use the remote debugging tool of Google Chrome for my Samsung Galaxy S4 ( https://developers.google.com/chrome-developer-tools/docs/remote-debugging?hl=nl ). 我尝试使用谷歌浏览器的远程调试工具为我的三星Galaxy S4( https://developers.google.com/chrome-developer-tools/docs/remote-debugging?hl=nl )。 But my Chrome does not found my device after i used about:inspect. 但在我使用about:inspect后,我的Chrome没有找到我的设备。 The list stays empty. 该列表保持空白。

I already install the newest driver on my computer and both devices running Chrome version 32. On my phone the USB debugging checkbox is checked. 我已经在我的计算机上安装了最新的驱动程序,并且两台设备都运行了Chrome版本32.在我的手机上,我会检查USB调试复选框。

Does someone know what i can do to view my phone trough Chrome debugging? 有人知道我可以通过Chrome调试查看我的手机吗?

Do you have ADT (Android Development Toolkit) installed? 你有安装ADT(Android开发工具包)吗? If so, you may have to restart the ADB server. 如果是这样,您可能必须重新启动ADB服务器。 Follow these steps: (from this answer ). 请遵循以下步骤:(从此答案 )。

  1. Open a command prompt ( Win + R , " cmd.exe ", Enter ) 打开命令提示符( Win + R ,“ cmd.exe ”, 回车
  2. Go to the platform-tools directory of your locally installed ADT. 转到本地安装的ADT的platform-tools目录。 In my case: 就我而言:

     cd /d D:\\apps\\adt-bundle-windows-x86_64-20131030\\sdk\\platform-tools 
  3. Restart the ADT server by running the following commands: 运行以下命令重新启动ADT服务器:

     adb.exe kill-server adb.exe start-server 
  4. Now observe that your tablet will ask for remote debugging permission (by checking a fingerprint) upon connection. 现在观察您的平板电脑在连接时会要求远程调试权限(通过检查指纹)。

  5. The device should now be found if you open chrome://inspect . 如果打开chrome://inspect现在应该找到该设备。

workaround if you don't have ADT (Android Development Toolkit) installed: 解决方法如果您没有安装ADT(Android Development Toolkit):

Managed to detect android based Samsung Galaxy phone after downloading andorid SDK platform-tools.zip and running the following command: "adb devices". 在下载andorid SDK platform-tools.zip并运行以下命令后,管理检测基于Android的三星Galaxy手机:“adb devices”。 It started some deamon, found attached device, and I was also able to see it in chrome canary inspect tab. 它开始了一些deamon,发现连接设备,我也能够在chrome canary inspect标签中看到它。

previously I also installed "Universal ADB driver" but not sure if this was required 以前我也安装了“通用ADB驱动程序”,但不确定是否需要

I stumbled over this exact problem. 我偶然发现了这个确切的问题。 The solution above work's like a charm for me. 上面的解决方案对我来说就像是一种魅力。 But I'm lazy as hell, so I created a .bat file: 但是我很懒,所以我创建了一个.bat文件:

@ECHO OFF 
cmd.exe /K "cd C:\Users\YOUR_USERNAME\AppData\Local\Android\sdk\platform-tools && C: & adb.exe kill-server & adb.exe start-server"

The directory depends on your installation of your ADT. 该目录取决于您的ADT安装。

Save as killstart_adb.bat and run this. 保存为killstart_adb.bat并运行它。 Works for me. 适合我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM