ADB : unable to connect to 192.168.1.10:5555

后端 未结 14 920
天涯浪人
天涯浪人 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.

    0 讨论(0)
  • 2021-01-31 09:03

    I had the same problem. The solution was as follows.

    In Developer Options. + Activate "Allow ADB debugging in load only mode." + In Spanish, "Permitir depuración ADB en modo solo carga."

    Explanation My problem was as follows: I was doing all the steps:

    • adb kill-server
    • adb start-server
    • adb tcpip 5555
    • adb connect (your ip).

    After completing these steps, I disconnected the phone from the USB cable, and the connection was lost, I could not make the wireless connection.

    However, this worked for me on a Huawei ALE-23 cell phone, but it did not work for me on the Huawei Y9S cell phone (Android 10), it failed.

    I solved it only by activating the option "Allow ADB debugging in load only mode" in the cell Huawei Y9S.

    Cheers!!!.

    0 讨论(0)
  • 2021-01-31 09:04

    I ran into this same issue on not being able to connect via Wi-Fi but was using the snap version of scrcpy. I kept seeing messages like adb server version (40) doesn't match this client (39); killing... when I would run adb or scrcpy commands but it still worked, until I tried to connect over Wi-Fi.

    $ scrcpy 
    INFO: scrcpy 1.16 <https://github.com/Genymobile/scrcpy>
    adb server version (40) doesn't match this client (39); killing...
    * daemon started successfully
    adb: error: failed to get feature set: no devices/emulators found
    ERROR: "adb push" returned with value 1
    

    I believe this means it was unable to push the server app to the device.

    Running the commands to setup Wi-Fi using the adb built into the snap, scrpy.adb solved this for me.

    $ scrcpy.adb tcpip 5555
    $ scrcpy.adb connect 192.168.1.25:5555
    connected to 192.168.1.25:5555
    $ scrcpy
    INFO: scrcpy 1.16 <https://github.com/Genymobile/scrcpy>
    /usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 0.6 MB/s (33622 bytes in 0.051s)
    [server] INFO: Device: XXXXX XXXXXXX (Android 9)
    INFO: Renderer: opengl
    INFO: OpenGL version: 4.6.0 NVIDIA 390.25
    INFO: Trilinear filtering enabled
    INFO: Initial texture: 1440x2560
    
    0 讨论(0)
  • 2021-01-31 09:08

    Make sure you are not connected to a VPN. I was able to connect to adb as soon as I disconnected from the VPN. For a sure way to connect do this:

    1. Unplug USB
    2. Restart Android device
    3. Shutdown Android Studio or any other IDE using ADB
    4. adb kill-server
    5. Plug back in USB after restart
    6. adb devices This automatically starts the server. You sould see the device plugged in via USB
    7. adb shell ip addr show wlan0 to get your devices IP address
    8. adb tcpip 5555 Set the port to 5555 that you want to connect through
    9. adb connect 192.168.0.6:5555 Replace IP address with one from step 6.
    10. Disconnect the USB
    0 讨论(0)
  • 2021-01-31 09:09

    I solved this problem by disabling USB debugging and enabling it again

    0 讨论(0)
  • 2021-01-31 09:10

    The critical step in getting this to work is disconnecting the usb cable after issuing the adb connect xx.x.x.xx:5555 command. At this point you are connected but unauthorized. Execute adb kill-server and re-issue the connect command. Verify with execution of adb shell date.

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