Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find any ADB device #5747

Open
Unix-Kernel opened this issue Jan 9, 2025 · 6 comments
Open

Could not find any ADB device #5747

Unix-Kernel opened this issue Jan 9, 2025 · 6 comments

Comments

@Unix-Kernel
Copy link

Unix-Kernel commented Jan 9, 2025

How does scrcpy connect to a wireless streaming device from a windows PC?

USB debugging is enabled on the devices and I’m able to connect to those streaming boxes with vysor but not with scrcpy.

The only way that scrcpy will connect is if I first open vysor and connect to the streaming boxes and then I can exit vysor while adb remains running in the background; otherwise scrcpy will not detect any devices on the wireless network.

I tried this on another windows PC that doesn’t have vysor installed and scrcpy will not detect any devices even though adb is running.

What am I missing?

This is the error I get from the scrcpy console without using vysor to connect to any devices first:

scrcpy 3.1 https://github.com/Genymobile/scrcpy

  • daemon not running; starting now at tcp:5037
  • daemon started successfully
    ERROR: Could not find any ADB device
    ERROR: Server connection failed
@rom1v
Copy link
Collaborator

rom1v commented Jan 10, 2025

What is the result of adb devices once vysor has been started?

@Unix-Kernel
Copy link
Author

Unix-Kernel commented Jan 10, 2025

After I connect each device in vysor (not remote, just connect);
This is the output in scrcpy which I ‘m able to connect to each devise by IP address.

scrcpy 3.1 https://github.com/Genymobile/scrcpy
ERROR: Multiple (4) ADB devices:
ERROR: --> (tcpip) 192.168.1.108:5555 device AFTMM
ERROR: --> (tcpip) 192.168.1.109:5555 device AFTMM
ERROR: --> (tcpip) 192.168.1.110:5555 device AFTKM
ERROR: --> (tcpip) 192.168.1.112:5555 device onn__Streaming_Device_4K_pro
ERROR: Select a device via -s (--serial), -d (--select-usb) or -e (--select-tcpip)

As I stated, scrcpy will not work without vysor making a connection to the device first.
Since I’m able to exit vysor while adb continues to run in the background, it seems that the underlying issue is with adb.

@rom1v
Copy link
Collaborator

rom1v commented Jan 10, 2025

Scrcpy expects you to connect to the device with adb connect THE_DEVICE_IP first (then adb -s THE_DEVICE_IP:5555), or in a sinle command scrcpy --tcpip=THE_DEVICE_IP.

I guess vysor scans ports on the local network to automatically detects all devices and connect to all of them.

@Unix-Kernel
Copy link
Author

Unix-Kernel commented Jan 10, 2025

That doesn't work either; adb crashes every time I use any commands to call adb from the terminal.

scrcpy --tcpip=192.168.1.112

scrcpy 3.1 https://github.com/Genymobile/scrcpy

  • daemon not running; starting now at tcp:5037
  • daemon started successfully
    INFO: Connecting to 192.168.1.112:5555...
    error: protocol fault (couldn't read status length): Connection reset by peer
    ERROR: "adb connect" returned with value 1
    ERROR: Could not connect to 192.168.1.112:5555
    ERROR: Server connection failed

A window pops up showing: adb.exe has stopped working

This is why it seems that adb is the culprit in all this.

Edit Update:

Here is another method where I got it to work without vysor; the adb in the scrcpy folder is definetily the problem.

I copied all the files from the adblink (4.3) folder into the scrcpy folder replacing all three adb files in the scrcpy folder, I opened the adb gui, opened the terminal, ran the command and it works. So there is definitely an issue with adb in scrcpy or one of the associated files that were replaced. I also tried it directly from the terminal (no gui) and it works, no crashing.

I tried it again by replacing only the three adb files and it woks from the terminal.

scrcpy is now able to call adb without terminal commands.

I have added different parameters for the quality such as size and bit rate.
I'm going to create separate batch scripts for each device.

@rom1v
Copy link
Collaborator

rom1v commented Jan 11, 2025

Windows 7? #4391

@Unix-Kernel
Copy link
Author

Yes, thanks. That makes sense.

Both the adb from adblink and vysor are compatible with my OS version.

I even tried older versions of scrcpy (2.7), and it still didn't work. I should have tried v2.1.1 since that was the last version that was compatible with my OS.

Replacing the three adb files worked out better since I can still use the latest version of scrcpy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants