ADB : unable to connect to 192.168.1.10:5555

后端 未结 14 942
天涯浪人
天涯浪人 2021-01-31 08:44

I cannot use adb connect to connect via wifi to my device (nexus 5, android 6), but since i\'m developping a cordova plugin using usb OTG, I really need to connect

14条回答
  •  说谎
    说谎 (楼主)
    2021-01-31 09:02

    I have tried everything but still, nothing worked for me. Then randomly, I used the following command:

    $ adb tcpip 5555

    error: no devices/emulators found

    $ adb connect 192.168.0.104:5555

    failed to connect to 192.168.0.104:5555

    $ adb connect 192.168.0.104:5555

    already connected to 192.168.0.104:5555

    It was connected at this point but my device was offline. I was always able to connect at the second attempt but my device was always offline. At this point, I connected my device to my PC with USB.

    $ adb tcpip 5555

    error: more than one device/emulator

    $ adb disconnect

    disconnected everything

    $ adb tcpip 5555

    restarting in TCP mode port: 5555

    $ adb connect 192.168.0.104:5555

    connected to 192.168.0.104:5555

    I disconnected my USB and voila! my device was still connected. I am sorry but I can't explain why it worked. I was randomly trying different things on internet. I had used the same commands several times but in different orders but they didn't work. I hope it will help someone.

提交回复
热议问题