adb is usually used over USB. However, it is also possible to use over Wi-Fi, as described here.
- Connect Android device and adb host computer to a common Wi-Fi network accessible to both. We have found that not all access points are suitable; you may need to use an access point whose firewall is configured properly to support adb.
- Connect the device with USB cable to host.
- Make sure adb is running in USB mode on host.
-
$ adb usb restarting in USB mode - Connect to the device over USB.
$ adb devices List of devices attached ######## device - Restart host adb in tcpip mode.
$ adb tcpip 5555 restarting in TCP mode port:5555 - Find out the IP address of the Android device: Settings -> About tablet -> Status -> IP address. Remember the IP address, of the form
#.#.#.#. - Connect adb host to device:
$ adb connect #.#.#.# connected to #.#.#.#:5555 - Remove USB cable from device, and confirm you can still access device:
$ adb devices List of devices attached #.#.#.#:5555 device
注解与说明:
1. 调试的PC机和Android设备应连接同一个wifi路由器或者热点。
2. Android设备在设置时,应该一直是使用USB数据线与PC机进行连接;设置成功后,才将USB数据线移除。
3. 在Android设备上查看自动分配的IP地址,并在PC机的CMD中输入ping命令,判断是否连接成功。
4. 断开连接:在PC的CMD中输入:adb disconnect
本文介绍如何通过Wi-Fi实现Android设备与PC之间的ADB调试。主要内容包括:确保设备与PC连接到同一Wi-Fi网络;使用USB线完成初始配置;启动ADB进入TCP/IP模式;获取设备IP地址并建立无线连接;验证无线连接的有效性。
760

被折叠的 条评论
为什么被折叠?



