You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
See issue #3534 (comment) for further information.
While trying to connect using scrcpy, I get the following:
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
2022-10-14 14:33:40.022 scrcpy[12626:145516] ERROR: Could not find any ADB device
2022-10-14 14:33:40.415 scrcpy[12626:145515] ERROR: Server connection failed
As determined by @rom1v, this is due to my device serial number starting with a leading space:
Downloads|⇒ adb -s GS101200400611 shell echo ok
adb: device 'GS101200400611' not found
Downloads|⇒ adb -s ' GS101200400611' shell echo ok
ok
The text was updated successfully, but these errors were encountered:
I started to work on supporting serial with spaces. I thought it was easy: adb devices uses a tab separator between the serial and the state, but adb devices -l uses spaces, so a space in the serial is theoretically indistinguishable from a separator. We could make a special case for leading spaces, but it seems odd :/
If it helps anyone who happens to stumble upon this, as an interim fix, I have the following script that resolves issue. Have to run again after a power cycle though:
#!/bin/bash
adb root
adb shell 'echo -n "WhateverSerialNumberYouWantHere" > /sys/class/android_usb/android0/iSerial'
adb kill-server && adb start-server
# After Completing, you need to unplug and then re-plug in your USB cable to device.
Environment
Describe the bug
See issue #3534 (comment) for further information.
While trying to connect using scrcpy, I get the following:
As determined by @rom1v, this is due to my device serial number starting with a leading space:
The text was updated successfully, but these errors were encountered: