Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
113.11k stars 10.79k forks source link

Hello World Guidance #5549

Open baqwas opened 4 hours ago

baqwas commented 4 hours ago

Hello!

This is NOT an issue but merely a plea for guidance. I've read some of the documentation but obviously, as a newbie, I may have missed something.

How do I specify which Android device's screen I would like scrcpy to record?

Here is some terminal console output for your review:

$ adb connect 192.168.43.1:5555
connected to 192.168.43.1:5555
$ scrcpy
scrcpy 1.25 <https://github.com/Genymobile/scrcpy>
/usr/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 0.5 MB/s (41652 bytes in 0.082s)
adb: error: more than one device/emulator
ERROR: "adb reverse" returned with value 1
WARN: 'adb reverse' failed, fallback to 'adb forward'
[server] INFO: Device: REV Robotics Control Hub v1.0 (Android 7.1.2)
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.IncompatibleClassChangeError: The method 'java.lang.Class java.lang.Object.getClass()' was expected to be of type interface but instead was found to be of type virtual (declaration of 'com.genymobile.scrcpy.wrappers.WindowManager' appears in /data/local/tmp/scrcpy-server.jar)
    at com.genymobile.scrcpy.wrappers.WindowManager.registerRotationWatcher(WindowManager.java:98)
    at com.genymobile.scrcpy.Device.<init>(Device.java:82)
    at com.genymobile.scrcpy.Server.scrcpy(Server.java:64)
    at com.genymobile.scrcpy.Server.main(Server.java:334)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:262)
ERROR: Server connection failed
$ adb devices
List of devices attached
192.168.43.1:5555   device

I need scrcpy to connect to 192.168.43.1 where the device is shown above as REV Robotics Control Hub v1.0.

It has been two years since I used scrcpy in a similar environment (i.e. same IP address and device) and perhaps I need to re-learn the basic steps. Thanks for your understanding.

Regards.

rom1v commented 4 hours ago

scrcpy 1.25

That's completely outdated. Upgrade to the latest version (currently 3.0).