Scrcpy: adb: error: cannot stat 'scrcpy-server.jar': No such file or directory

Created on 8 Mar 2019  路  6Comments  路  Source: Genymobile/scrcpy

I'm using Windows 7. Downloaded the Windows 64 bit Version.
Added the Folder to C:Programsscrcpy.
Added the Path of the Folder to my Path Environment Variable.
Now when i try to execute it, it doesn't find the jar. Can you please help me?

That's the cmd output:

C:Usersbluekuen>scrcpy --serial ad0617232e52f2d9a9
adb: error: cannot stat 'scrcpy-server.jar': No such file or directory
ERROR: "adb push" returned with value 1
Press any key to continue...

All 6 comments

https://github.com/Genymobile/scrcpy/issues/278#issuecomment-429330345

The problem is that scrcpy pushes the scrcpy-server.jar that it finds in . (your current directory). If you start scrcpy from PATH, it expects scrcpy-server.jar to be in ., i.e. the current directory, the one from where you call (the Windows version is "portable", it overrides the server path).

If you want your scrcpy-server.jar to be in a directory other than ., you need to give its full path in the env variable SCRCPY_SERVER_PATH.

Thanks for the fast answer. Unfortunately i don't get it.
I don't have and don't want the scrcpy-server.jar in another directory. It's in the same directory as the other files. Or do i need to copy it in another directory and provide the SCRCPY_SERVER_PATH env variable?

I don't have and don't want the scrcpy-server.jar in another directory.

In a directory other than ., i.e. the directory you are currently in (C:\Users\bluekuen in your example).

Thank you so much @rom1v i accidentally named it SCRCPY_SERVER_JAR.
Now it's working! :+1:

SCRCPY_SERVER_PATH was needed in my case too.
Thanks! @bluekuen

Nice to hear, sometimes it's the small things ! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cordac1 picture cordac1  路  4Comments

fernandofreamunde picture fernandofreamunde  路  4Comments

qymspace picture qymspace  路  3Comments

behzadpooldar picture behzadpooldar  路  4Comments

YurieCo picture YurieCo  路  4Comments