なんとなく面倒なのでスクリプトで。 USBで接続のあと #5555 で待たせて再起動する。 「restart」なので、kill-server → start-server は不要。 adb tcpip 5555 IPアドレスをコマンドラインから取得。 ip="$(adb shell ip route | awk '{print $9}')" そのIPにWiFi接続。 adb connect $ip まとめ ついでに、開発時には邪魔なスリープもOFFに。 adb shell svc power stayon true How to prevent an android device from entering sleep (via adb command shell) – Stack Overflow connect_via_wifi.sh #!/bin/sh adb tcpip 5555