adb connection by wifi getting killed when a new USB attached/detached

后端 未结 2 1482
别跟我提以往
别跟我提以往 2020-11-27 08:31

I develop on my tablet using android studio. The tablet is connected to the computer by wifi using

adb connect :5555

相关标签:
2条回答
  • 2020-11-27 09:03

    I was never able to connect my cellphone with my computar through wi-fi.

    I had already given up. I followed all the instructions and tips, and nothing worked.

    Finally, I did what no one said to do.

    I've connected the phone to the WiFi network provided by the cable modem itself and not to some (not all) additional networks that are included in the router.

    At home I use one of these networks, because I use a Deco Tp-Link router, which propagates the signal to my entire house, but this network is NOT compatible with ADB. It does not identify it as belonging to the same network.

    After this, I use the normal procedure described here.

    a) Connect cellphone with a USB cable

    b) Find the IP_Phone depends on system in the cell phone. Here I use Settings, About Phone, Status and IP address.

    c) Run the following adb commands in Command Prompt (Windows) or Terminal (Linux), where IP_Phone is the IP above mentioned. Normally adb.exe is an executable stored in computer path. adb is already included in Android Studio package.

    adb tcpip 5555
    adb connect IP_Phone 
    

    d) Now disconnect USB cable and it's ready. The cellphone model continues to appear in the status line in the top of Android Studio.

    -/-

    The best wifi is that defined in Cable Modem. It, unlike an any account defined in my router, answers to a ping command.

    ping IP_Phone
    
    0 讨论(0)
  • 2020-11-27 09:27

    It is not a adb-connection-by-wifi what gets killed. It is just that USB enumerations affect the sys.usb.* system properties which on many devices is causing restart of adbd regardless whether it's being used over USB or tcpip.

    Do grep "stop adbd" /init*rc to see what I mean.

    You could either comment out those stop adbd lines or just disconnect the USB cable before running your adb connect command.

    0 讨论(0)
提交回复
热议问题