关于用adb通过wifi连接安卓设备的官网英文说明

由于安卓开发者官网被墙,这里截取部分英文原文,以飨读者。

http://developer.android.com/tools/help/adb.html里关于用adb通过wifi连接安卓设备的说明:

Stopping the adb Server

In some cases, you might need to terminate the adb server process and then restart it to resolve the problem (e.g., if adb does not respond to a command).

To stop the adb server, use the kill-server command. You can then restart the server by issuing any other adb command. 

Wireless usage

adb is usually used over USB. However, it is also possible to use over Wi-Fi, as described here.

  1. Connect your 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.

    Note: If you are attempting to connect to a Wear device, force it to connect to Wi-Fi by shutting off Bluetooth on the phone connected to it.

  2. Connect the device to the host computer with a USB cable.
  3. Set the target device to listen for a TCP/IP connection on port 5555.
    $ adb tcpip 5555
    
  4. Disconnect the USB cable from the target device.
  5. Find the IP address of the Android device. For example, on a Nexus device, you can find the IP address at Settings > About tablet (or About phone) > Status > IP address. Or, on an Android Wear device, you can find the IP address at Settings > Wi-Fi Settings > Advanced > IP address.
  6. Connect to the device, identifying it by IP address.
    $ adb connect <device-ip-address>
    
  7. Confirm that your host computer is connected to the target device:
    $ adb devices
    List of devices attached
    <device-ip-address>:5555 device
    

You're now good to go!

If the adb connection is ever lost:

  1. Make sure that your host is still connected to the same Wi-Fi network your Android device is.
  2. Reconnect by executing the "adb connect" step again.
  3. Or if that doesn't work, reset your adb host:
    adb kill-server
    
    and then start over from the beginning.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值