ケーブルをつないで、IPアドレスを調べる。
$ adb shell ipconfig
* daemon not running; starting now at tcp:5037
* daemon started successfully
/system/bin/sh: ipconfig: not found
RC211v-mbp:~ yuta$ adb shell ifconfig
lo Link encap:UNSPEC
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope: Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1235 errors:0 dropped:0 overruns:0 frame:0
TX packets:1235 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:111363 TX bytes:111363
wlan0 Link encap:UNSPEC
inet addr:172.16.20.19 Bcast:172.16.255.255 Mask:255.255.0.0
tcpip <任意のポート>
$ adb tcpip 12345
restarting in TCP mode port: 12345
connect <上記の任意のポート>
$ adb connect 172.16.20.19:12345
connected to 172.16.20.19:12345
USBケーブル、Wifiそれぞれで接続ができている。
$ adb devices
List of devices attached
172.16.20.19:12345 device
P3P7N17500000000 device