Open MacroHard-Winux opened 6 months ago
scrcpy 1.25 <https://github.com/Genymobile/scrcpy>
Way too old. Install the latest version.
I'm also getting this. I can see the screen but can't click on any buttons. I checked in settings - I have no option USB debugging (Security Settings)
Thank you.
[server] INFO: Device: OnePlus CPH2415 (Android 14)
[server] ERROR: Could not invoke method
java.lang.NoSuchMethodException: android.content.IClipboard$Stub$Proxy.addPrimaryClipChangedListener [interface android.content.IOnPrimaryClipChangedListener, class java.lang.String, class java.lang.String, int]
at java.lang.Class.getMethod(Class.java:2937)
at java.lang.Class.getMethod(Class.java:2449)
at com.genymobile.scrcpy.wrappers.ClipboardManager.getAddPrimaryClipChangedListener(ClipboardManager.java:128)
at com.genymobile.scrcpy.wrappers.ClipboardManager.addPrimaryClipChangedListener(ClipboardManager.java:138)
at com.genymobile.scrcpy.Device.<init>(Device.java:100)
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:379)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 24.0.1-1
INFO: Trilinear filtering enabled
INFO: Initial texture: 1080x2408
[server] ERROR: Exception on thread Thread[Thread-2,5,main]
java.lang.AssertionError: java.lang.reflect.InvocationTargetException
at com.genymobile.scrcpy.wrappers.ServiceManager.getInputManager(ServiceManager.java:75)
at com.genymobile.scrcpy.Device.injectEvent(Device.java:192)
at com.genymobile.scrcpy.Device.injectEvent(Device.java:196)
at com.genymobile.scrcpy.Controller.injectTouch(Controller.java:231)
at com.genymobile.scrcpy.Controller.handleEvent(Controller.java:102)
at com.genymobile.scrcpy.Controller.control(Controller.java:79)
at com.genymobile.scrcpy.Server$3.run(Server.java:132)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.genymobile.scrcpy.wrappers.ServiceManager.getInputManager(ServiceManager.java:72)
... 7 more
Caused by: java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:207)
at android.hardware.input.InputManager.getInstance(InputManager.java:271)
... 9 more
[server] ERROR: Encoding error: java.lang.IllegalStateException: Pending dequeue output buffer request cancelled
Upgrade to the latest version of scrcpy.
Using adb logcat | grep scrcpy I curiously see
03-21 09:30:10.829 2172 2172 D Layer : reparent to null sequence=619, seq[1], name=Display 5 name="scrcpy"#619 03-21 09:30:10.832 23546 23546 W ziparchive: Unable to open '/data/local/tmp/scrcpy-server.dm': No such file or directory
I previously (today) ran an old version of scrcpy from snap using debian apt install potentially giving me this issue https://github.com/Genymobile/scrcpy/issues/1746
Thank you. I had previously ran install_release.sh
I have rebooted phone and cleared out the tmp directory.
Something is stuck.
SCRCPY_SERVER_PATH=scrcpy-server scrcpy
scrcpy 1.25 <https://github.com/Genymobile/scrcpy>
scrcpy-server: 1 file pushed, 0 skipped. 234.3 MB/s (69007 bytes in 0.000s)
[server] ERROR: The server version (2.4) does not match the client (1.25)
java.lang.IllegalArgumentException: The server version (2.4) does not match the client (1.25)
at com.genymobile.scrcpy.Options.parse(Options.java:237)
at com.genymobile.scrcpy.Server.internalMain(Server.java:231)
at com.genymobile.scrcpy.Server.main(Server.java:214)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:379)
ERROR: Server connection failed
During install_release it downloaded the scrcpy-server I understand this is an android application and is sideloaded onto the device automatically when running scrcpy (client)
Ok - problem solved.
I still had not properly apt remove scrcpy. apt remove -P scrcpy.
Everything now works perfectly with 1.25.
Sorry and thank you.
Environment
Describe the bug I have enabled "USB debugging (Security settings)" in devloper option but still cannot control the phone with keybaord and mouse
Things I have tried I did restart after enabling the setting Disable USB debugging and enable everything again Disable Developer option and enable everything again
Please do not post screenshots of your terminal, just post the content as text instead.![image](https://github.com/Genymobile/scrcpy/assets/129944538/371f9bc7-f876-4283-9164-deac2d43e67c)