ADB over Wi-Fi

 ADB over Wi-Fi

1.root

$adb root

2.设置tcp端口并重启tcpip服务

$adb shell setprop persist.adb.tcp.port 5555 && adb tcpip

3.连接

$adb connect <the target ip>

注意电脑与手机在同一网络下。

4.官方教程

  https://developer.android.com/guide/topics/connectivity/usb/index.html

  When debugging applications that use USB accessory or host features, you most likely will have USB hardware connected to your Android-powered device. This will prevent you from having an adb connection to the Android-powered device via USB. You can still access adb over a network connection. To enable adb over a network connection:

  1. Connect the Android-powered device via USB to your computer.
  2. From your SDK platform-tools/ directory, enter adb tcpip 5555 at the command prompt.
  3. Enter adb connect <device-ip-address>:5555 You should now be connected to the Android-powered device and can issue the usual adbcommands like adb logcat.
  4. To set your device to listen on USB, enter adb usb.
 

 

posted @ 2017-01-15 15:13  f9q  阅读(258)  评论(0编辑  收藏  举报