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

start scrcpy-server.jar error #9

Open
bzqyzzld opened this issue Sep 22, 2020 · 3 comments
Open

start scrcpy-server.jar error #9

bzqyzzld opened this issue Sep 22, 2020 · 3 comments

Comments

@bzqyzzld
Copy link

bzqyzzld commented Sep 22, 2020

cmd

adb shell CLASSPATH=/data/local/tmp/scrcpy-server.jar app_process /com.genymobile.scrcpy.Server 0 8000000 true

error info

[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.IllegalArgumentException: The server version (0) does not match the client (1.12.1)
        at com.genymobile.scrcpy.Server.createOptions(Server.java:78)
        at com.genymobile.scrcpy.Server.main(Server.java:162)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:388)
@razumeiko
Copy link
Owner

Hey @bzqyzzld
If you check the code you will see how script is running the server

[self.adb_path, 'shell',
                 'CLASSPATH=/data/local/tmp/scrcpy-server.jar',
                 'app_process', '/', 'com.genymobile.scrcpy.Server 1.12.1 {} {} {} true - false true'.format(
                    max_width, bitrate, max_fps)]

So the right way is: CLASSPATH=/data/local/tmp/scrcpy-server.jar app_process / com.genymobile.scrcpy.Server 1.12.1 1024 8000000 25 true - false true

@bzqyzzld bzqyzzld reopened this Sep 24, 2020
@bzqyzzld
Copy link
Author

I tried to download scrcpy-server with the version 1.16 and renamed scrcpy-server.jar
when i run the commands:adb shell CLASSPATH=/data/local/tmp/scrcpy-server.jar app_process / com.genymobile.scrcpy.Server 1.16 1024 8000000 25 true - false true
error infos:

D:\soft\scrcpy>adb shell CLASSPATH=/data/local/tmp/scrcpy-server.jar app_process
 / com.genymobile.scrcpy.Server 1.16 1024 8000000 25 true - false true
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.IllegalArgumentException: Expecting 14 parameters
        at com.genymobile.scrcpy.Server.createOptions(Server.java:125)
        at com.genymobile.scrcpy.Server.main(Server.java:221)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:251)

@razumeiko
Copy link
Owner

@bzqyzzld why do you need to change server? Server arguments can change from version to version and i am not author of this Java server, i took this server from https://github.com/Genymobile/scrcpy as i mention in project description. So you could use the server which is presented in this repo or you can try to read original server code and see what should be changed. Your error saying that it's expecting 14 parameters, so i guess something wrong with order or number of params.

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