Scrcpy not working

so i wanted to use scrcpy but it simply wont work heres the error . btw i also installed the latest platform tools and tried form there... i got the same error

* daemon not running; starting now at tcp:5037
ADB server didn't ACK
Full server startup log: /tmp/adb.1000.log
Server had pid: 37040
--- adb starting (pid 37040) ---
adb I 06-03 17:21:02 37040 37040 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 06-03 17:21:02 37040 37040 main.cpp:57] Version 1:8.1.0+r23-5ubuntu2
adb I 06-03 17:21:02 37040 37040 main.cpp:57] Installed as /usr/lib/android-sdk/platform-tools/adb
adb I 06-03 17:21:02 37040 37040 main.cpp:57] 
error: could not install *smartsocket* listener: Address already in use

* failed to start daemon
adb: error: failed to get feature set: cannot connect to daemon
ERROR: "adb push" returned with value 1

also heres the adb logcat

adb logcat               
* daemon not running; starting now at tcp:5037
ADB server didn't ACK
Full server startup log: /tmp/adb.1000.log
Server had pid: 37054
--- adb starting (pid 37054) ---
adb I 06-03 17:22:18 37054 37054 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 06-03 17:22:18 37054 37054 main.cpp:57] Version 1:8.1.0+r23-5ubuntu2
adb I 06-03 17:22:18 37054 37054 main.cpp:57] Installed as /usr/lib/android-sdk/platform-tools/adb
adb I 06-03 17:22:18 37054 37054 main.cpp:57] 
error: could not install *smartsocket* listener: Address already in use

* failed to start daemon
- waiting for device -
* daemon not running; starting now at tcp:5037
ADB server didn't ACK
Full server startup log: /tmp/adb.1000.log
Server had pid: 37070
--- adb starting (pid 37070) ---
adb I 06-03 17:24:29 37070 37070 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 06-03 17:24:29 37070 37070 main.cpp:57] Version 1:8.1.0+r23-5ubuntu2
adb I 06-03 17:24:29 37070 37070 main.cpp:57] Installed as /usr/lib/android-sdk/platform-tools/adb
adb I 06-03 17:24:29 37070 37070 main.cpp:57] 
error: could not install *smartsocket* listener: Address already in use

* failed to start daemon
error: cannot connect to daemon

How did you install scrcpy?
Please, post the outputs of

snap list
flatpak list

i installed it using apt... also tried the the snap version it had the same issue

anyways heres the snap list

Name               Version                     Rev    Tracking       Publisher    Notes
bare               1.0                         5      latest/stable  canonical**  base
core18             20230503                    2751   latest/stable  canonical**  base
core22             20230503                    634    latest/stable  canonical**  base
gnome-3-28-1804    3.28.0-19-g98f9e67.98f9e67  198    latest/stable  canonical**  -
gnome-42-2204      0+git.587e965               102    latest/stable  canonical**  -
gtk-common-themes  0.1-81-g442e511             1535   latest/stable  canonical**  -
snapd              2.59.4                      19361  latest/stable  canonical**  snapd

flatpak list

Name     Application ID       Version          Branch      Origin  Installation
Google … com.google.Chrome    113.0.5672.126-1 stable      flathub system
Whatsie  com.ktechpit.whatsie 4.14             stable      flathub system
Extensi… …an.ExtensionManager 0.4.0            stable      flathub system
Freedes… …reedesktop.Platform 22.08.12.1       22.08       flathub system
Mesa     …Platform.GL.default 23.1.1           22.08       flathub system
Mesa (E… …Platform.GL.default 23.1.1           22.08-extra flathub system
nvidia-… …L.nvidia-470-182-03                  1.4         flathub system
openh264 …p.Platform.openh264 2.1.0            2.2.0       flathub system
GNOME A… org.gnome.Platform                    43          flathub system
ZorinBl… …heme.ZorinBlue-Dark                  3.22        zorinos system
ZorinBl… …eme.ZorinBlue-Light                  3.22        zorinos system
ZorinGr… …eme.ZorinGreen-Dark                  3.22        zorinos system
ZorinGr… …me.ZorinGreen-Light                  3.22        zorinos system
ZorinGr… …heme.ZorinGrey-Dark                  3.22        zorinos system
ZorinGr… …eme.ZorinGrey-Light                  3.22        zorinos system
ZorinOr… …me.ZorinOrange-Dark                  3.22        zorinos system
ZorinOr… …e.ZorinOrange-Light                  3.22        zorinos system
ZorinPu… …me.ZorinPurple-Dark                  3.22        zorinos system
ZorinPu… …e.ZorinPurple-Light                  3.22        zorinos system
ZorinRe… …theme.ZorinRed-Dark                  3.22        zorinos system
ZorinRe… …heme.ZorinRed-Light                  3.22        zorinos system
KDE App… org.kde.Platform                      5.15-22.08  flathub system
QGnomeP… …heme.QGnomePlatform                  5.15-22.08  flathub system
QGnomeP… …Platform-decoration                  5.15-22.08  flathub system
ONLYOFF… …fic.desktopeditors 7.3.3            stable      flathub system

that happen when u r trying to connect using usb??
u have tried to restart adb server by :

adb kill-server
adb start-server
1 Like

Is the developer a Bloom County fan?

I second @eid 's suggestion.
You may also need to set your sdk path manually. Do you have a ~/.android directory?

okay sorry for the late reply heres the error im gettin doin that the adb daemon is running

scrcpy
INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 fil...shed. 6.3 MB/s (24773 bytes in 0.004s)
INFO: Initial texture: 1080x2400
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.AssertionError: java.lang.reflect.InvocationTargetException
	at com.genymobile.scrcpy.wrappers.SurfaceControl.setDisplaySurface(SurfaceControl.java:75)
	at com.genymobile.scrcpy.ScreenEncoder.setDisplaySurface(ScreenEncoder.java:178)
WARN: Device disconnected

yes i have the .android directory.... also i tried the wireless way but i get this

/adb connect 192.168.0.102
adb server version (39) doesn't match this client (41); killing...
* daemon started successfully
connected to 192.168.0.102:5555
platform-tools|⇒ scrcpy                     
INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
adb server version (41) doesn't match this client (39); killing...
* daemon started successfully
/usr/share/scrcpy/scrcpy-server: 1 fil...shed. 2.8 MB/s (24773 bytes in 0.008s)
INFO: Initial texture: 1080x2400
[server] ERROR: Exception on thread Thread[main,5,main]WARN: Device disconnected

are there any good alternatives to this? for the time being atleast i could do some progress in my work.

As mentioned above, you may need to manually set your path. Please see here for more detail.

You may need to remove the ~/.Android directory in order to reset it to all defaults.

so i deleted the .android folder rebooted and tried scrcpy i get this

INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 fil...shed. 1.3 MB/s (24773 bytes in 0.018s)
INFO: Initial texture: 1080x2400
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.AssertionError: java.lang.reflect.InvocationTargetException
	at com.genymobile.scrcpy.wrappers.SurfaceControl.setDisplaySurface(SurfaceControl.java:75)
	at com.genymobile.scrcpy.ScreenEncoder.setDisplaySurface(ScreenEncoder.java:178)
	at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:70)
WARN: Device disconnected

also why doesnt zorin come with the latest adb version? and how can i replace the default platform tools with the latest one i downloaded
appreciate your help guys <3

Have you followed the steps in the Link I posted or manually set your path?

um im sorry but i did not quite understand it can you please explain the steps in simple words?

i don't know u r trying to use scrcpy by using usb cable or u r trying wireless connection?
I think there is no problem when using usb cable that support transfer data, u just need to enable debug mode in ur phone.

if the problem in using scrcpy in wireless mode, u need to pair ur pc with ur phone using the command adb pair.
adb pair command not supported in the version used by zorin and scrcpy.
so the steps will be:
1- install the last adb version that support pair command
2-go to ur phone and enable wirless dubg
3-open terminal in the folder that has adb that u downloaded, and type that in terminal:
./adb pair ip address phone
4-go to ur phone and in wirless dubg u will see ur pc is paring with ur phone, get the port from the info in that filed and use it in the following commands
./adb connect 192.168.1.5:port(note: ur will use ip of ur phone and the port that u will find it in wireless debug field)
./adb tcpip port
adb connect 192.168.1.5:port(note:u will use the old version here)
scrcpy

1 Like

I am sorry, I cannot explain the steps because the steps are dependent on your setup.
I do not know the path without having access to your computer. But you can look for and identify the path.
Check GenyMotion settings -> ADB tab and check if you need to set a custom path that directs to Scrcpy

Or try emulating what this poster did:

In my case this error occured when I set up my environment adb path as ~/.android-sdk/platform-tools (which happens when e.g. android-platform-tools is installed via homebrew), which version was 36, but Android Studio project has Android SDK next path ~/Library/Android/sdk which adb version was 39.

I have changed my PATH to platform-tools to ~/Library/Android/sdk/platform-tools and error was solved

Look in the relevant folders in your Home Directory and see what paths are being directed in your settings.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.