New To The Forum? Click Here To Read The How To Guide. -- Developers Click Here.

ADB | Wireless | SCRCPY - adb device disappears on usb disconnect

EloDesignCoEloDesignCo Posts: 1
NerveGear
`reference git issue: https://github.com/Genymobile/scrcpy/issues/189`

I have been trying to get SCRCPY working over wireless with the Go, but haven't had much luck. It works fine over USB and I could go down the Vysor route but I'd prefer to stay OS at the moment.

Steps initially taken to go wireless
  1. Connect the device to the same Wi-Fi as computer
  2. Get device IP address: adb shell ip addr show wlan0
  3. Enable adb over TCP/IP on device: adb tcpip 5555
  4. Connect to device: adb connect DEVICE_IP:5555 (replace DEVICE_IP)
  5. adb devices: shows two connections, one usb and one to the ip
  6. Unplug device

At this point I'm expecting to be able to run;
7. Run scrcpy: scrcpy -s 192.168.1.185:5555

However, both devices are disconnected when pulling the usb cable out.
As an alternate permutation: If I leave the usb connected and run step #7, scrcpy loads and then if I pull the usb - it disconnects.

Upon further testing and after unplugging the USB, I can still use: adb connect DEVICE_IP:5555 and connect to the device. Can also ping the device also and get a response.

It appears to just disappear from the list of devices within ADB (causing SCRCPY to fail to launch as there's no device present in ADB).

I think it has something to do with MAC USB enumeration killing ADB, not the device disconnect itself killing the ADB.

Is anyone chasing a similar issue and resolved by chance?

[disconnect USB]

$ adb connect 192.168.1.185:5555
connected to 192.168.1.185:5555

$ ping 192.168.1.185
PING 192.168.1.185 (192.168.1.185): 56 data bytes
64 bytes from 192.168.1.185: icmp_seq=0 ttl=64 time=757.020 ms
64 bytes from 192.168.1.185: icmp_seq=1 ttl=64 time=210.854 ms
64 bytes from 192.168.1.185: icmp_seq=2 ttl=64 time=768.758 ms

$ scrcpy
adb: error: failed to get feature set: no devices/emulators found
2018-07-03 16:40:33.600 scrcpy[37756:4675145] ERROR: "adb push" returned with value 1

$ adb devices -l
List of devices attached

[reconnect USB]

$ adb devices -l
List of devices attached
1KWPH813818187         device usb:336592896X product:vr_pacific model:Pacific device:pacific transport_id:5
192.168.1.185:5555     device product:vr_pacific model:Pacific device:pacific transport_id:6

Comments

  • CoolGamesNetCoolGamesNet Posts: 21
    NerveGear
    edited July 6
    I was able to get it working on Ubuntu Studio by building from source at github
    Thanks, I need that...



    System 76 Lemur | 14.1 ′′ Matte 1080p IPS LED | laptop w/ factory mods
    Intel Core i7-6500U CPU @ 2.50GHz | 8 GB DDR3 at 1600 MHz 
    250 GB M.2 SSD | WiFi 867 Mbps 
    Favoring Open Source -> Ubuntu Studio 18.04 for
     Nikon Keymission 360 & Web VR to Oculus Go
  • CrimsonSky3000CrimsonSky3000 Posts: 8
    NerveGear
    Getting the same error. Any fix for windows?
  • Patrice_VRPatrice_VR Posts: 1
    NerveGear
    Hey guys, it might be  just the version of adb in the scrcpy's package folder which is old. Replace abd.exe, abWinApi.dll and adbWinUsbApi.dll with the 1.0.40 and you should be ok.
  • FailrunnerFailrunner Posts: 160
    Art3mis
    Hey guys, it might be  just the version of adb in the scrcpy's package folder which is old. Replace abd.exe, abWinApi.dll and adbWinUsbApi.dll with the 1.0.40 and you should be ok.
    Thanks. Can't find that version though. :(
  • CrimsonSky3000CrimsonSky3000 Posts: 8
    NerveGear
    `reference git issue: https://github.com/Genymobile/scrcpy/issues/189`

    I have been trying to get SCRCPY working over wireless with the Go, but haven't had much luck. It works fine over USB and I could go down the Vysor route but I'd prefer to stay OS at the moment.

    Steps initially taken to go wireless
    1. Connect the device to the same Wi-Fi as computer
    2. Get device IP address: adb shell ip addr show wlan0
    3. Enable adb over TCP/IP on device: adb tcpip 5555
    4. Connect to device: adb connect DEVICE_IP:5555 (replace DEVICE_IP)
    5. adb devices: shows two connections, one usb and one to the ip
    6. Unplug device

    At this point I'm expecting to be able to run;
    7. Run scrcpy: scrcpy -s 192.168.1.185:5555

    However, both devices are disconnected when pulling the usb cable out.
    As an alternate permutation: If I leave the usb connected and run step #7, scrcpy loads and then if I pull the usb - it disconnects.

    Upon further testing and after unplugging the USB, I can still use: adb connect DEVICE_IP:5555 and connect to the device. Can also ping the device also and get a response.

    It appears to just disappear from the list of devices within ADB (causing SCRCPY to fail to launch as there's no device present in ADB).

    I think it has something to do with MAC USB enumeration killing ADB, not the device disconnect itself killing the ADB.

    Is anyone chasing a similar issue and resolved by chance?

    [disconnect USB]
    
    $ adb connect 192.168.1.185:5555
    connected to 192.168.1.185:5555
    
    $ ping 192.168.1.185
    PING 192.168.1.185 (192.168.1.185): 56 data bytes
    64 bytes from 192.168.1.185: icmp_seq=0 ttl=64 time=757.020 ms
    64 bytes from 192.168.1.185: icmp_seq=1 ttl=64 time=210.854 ms
    64 bytes from 192.168.1.185: icmp_seq=2 ttl=64 time=768.758 ms
    
    $ scrcpy
    adb: error: failed to get feature set: no devices/emulators found
    2018-07-03 16:40:33.600 scrcpy[37756:4675145] ERROR: "adb push" returned with value 1
    
    $ adb devices -l
    List of devices attached
    
    [reconnect USB]
    
    $ adb devices -l
    List of devices attached
    1KWPH813818187         device usb:336592896X product:vr_pacific model:Pacific device:pacific transport_id:5
    192.168.1.185:5555     device product:vr_pacific model:Pacific device:pacific transport_i

    You have to remove usb cable before connecting go wirelessly. Follow these steps.

    1. Plug in go.
    2. Check go is detected using "adb devices"
    3. Run "ADB tcpip 5555"
    4. Remove usb cable
    5. Run "ADB connect goIPaddress:5555
    6. Run "ADB devices" again ensure it shows go ip connected.
    7. If doesn't show anything. Run steps 3 & 5 again the goip should show connected under adb devices.
    8. Scrcpy should now run wirelessly

    Hope this helps
  • Danzig8Danzig8 Posts: 1
    NerveGear

    You have to remove usb cable before connecting go wirelessly. Follow these steps.

    1. Plug in go.
    2. Check go is detected using "adb devices"
    3. Run "ADB tcpip 5555"
    4. Remove usb cable
    5. Run "ADB connect goIPaddress:5555
    6. Run "ADB devices" again ensure it shows go ip connected.
    7. If doesn't show anything. Run steps 3 & 5 again the goip should show connected under adb devices.
    8. Scrcpy should now run wirelessly

    Hope this helps
    Hello CrimsonSky3000,

    I'm following the above steps and I am also getting no results when I unplug the device. I am less technically proficient than the originator of this post. Any other advice?

    One thing I do notice is that when I plug the device in via usb my laptop chirps to say 'connection' and then immediately chirps the sound that usually indicates 'disconnected' but when i check the status of the device via Control Panel > Devices and Printers it says 'This device is working properly.
Sign In or Register to comment.