Adb over wifi killed off after usb disconnect?

前端 未结 6 1831
小鲜肉
小鲜肉 2021-02-13 06:28

So with my nexus 5 im easily able to do something like this to connect adb over wifi:

adb tcpip 5555
adb connect 192.xxx.x.xx

and then disconne

6条回答
  •  佛祖请我去吃肉
    2021-02-13 06:49

    Try to connect to it without the usb cable.

    • Step 1. Use wifi adb on your phone to get the ip (needs rooted phone, but because your on stackoverflow I guess you have one).
    • step 2. Type in your console adb connect (ip shown in wifi adb)

    If this dosnt work please post the exact message you get in your console when trying to connect.

    Non-Rooted Solution:

    • Enable USB-debugging in the developer setting and connect your phone to your computer via USB.
    • Run the adb command, adb tcpip 5555 (Make sure port 5555 is not blocked by any firewall programs)
    • Get your Wi-Fi IP address assigned to your device and run the adb command

      adb connect .For example, adb connect 192.168.1.133

    • Now you can disconnect the usb cable and run adb shell, adb install, or adb push commands via your Wi-Fi.

    • Inorder to switch back to USB mode and disable the Wireless mode, run the following adb command.

      adb usb

    • You can also simply reboot your phone to switch back to the USB mode.

提交回复
热议问题