Genymobile / Genymobile/scrcpy

Enabled USB Debug Security settings and restarted but Poco F5 but still cannot interact with POCO F5 Phone

Open
#4,690 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
150k
Forks
13.7k
Avg merge
4d 13h
Merged PRs (30d)
2

Description

- [ ] I have read the [FAQ](https://github.com/Genymobile/scrcpy/blob/master/FAQ.md).
- [ ] I have searched in existing [issues](https://github.com/Genymobile/scrcpy/issues).

**Environment**
- OS: Ubuntu 22.04 LTS
- scrcpy version: [e.g. 1.12.1]
- installation method: apt
- device model: Poco F5
- Android version: Xiaomi HyperOS 1.0.1.0.UMRTWXM - Android 14 UKQ1.230804.001

**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

```
qt.qpa.xcb: QXcbConnection: XCB error: 14 (BadIDChoice), sequence: 381, resource id: 1, major code: 53 (CreatePixmap), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 382, resource id: 1, major code: 55 (CreateGC), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 383, resource id: 1, major code: 72 (PutImage), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 384, resource id: 106954761, major code: 60 (FreeGC), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 385, resource id: 1, major code: 139 (Unknown), minor code: 4
qt.qpa.xcb: QXcbConnection: XCB error: 4 (BadPixmap), sequence: 386, resource id: 1, major code: 54 (FreePixmap), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 143 (Unknown), sequence: 387, resource id: 106954762, major code: 139 (Unknown), minor code: 27
qt.qpa.xcb: QXcbConnection: XCB error: 6 (BadCursor), sequence: 391, resource id: 106954763, major code: 138 (Unknown), minor code: 23
qt.qpa.xcb: QXcbConnection: XCB error: 6 (BadCursor), sequence: 392, resource id: 106954763, major code: 138 (Unknown), minor code: 23
qt.qpa.xcb: QXcbConnection: XCB error: 6 (BadCursor), sequence: 393, resource id: 106954763, major code: 2 (ChangeWindowAttributes), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 6 (BadCursor), sequence: 394, resource id: 106954763, major code: 2 (ChangeWindowAttributes), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 6 (BadCursor), sequence: 457, resource id: 106954763, major code: 2 (ChangeWindowAttributes), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 6 (BadCursor), sequence: 458, resource id: 106954763, major code: 2 (ChangeWindowAttributes), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 6 (BadCursor), sequence: 544, resource id: 106954763, major code: 2 (ChangeWindowAttributes), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 6 (BadCursor), sequence: 566, resource id: 106954763, major code: 2 (ChangeWindowAttributes), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 6 (BadCursor), sequence: 575, resource id: 106954763, major code: 2 (ChangeWindowAttributes), minor code: 0
WARNING:guiscrcpy.adb:Command '['/tmp/.mount_guiscrVGUgS2/scrcpy/usr/bin/adb', '-s', '192.168.31.89:5555', 'shell', 'wm', 'size']' exited with '1'
E: guiscrcpy has crashed because of a failure in the execution of `adb shell wm size`. This might be because of an improper connection of adb. Please reconnect your device (disconnect from WiFi / Reconnect USB) or try

guiscrcpy --killserver

as a command line to restart adb server
qt.qpa.xcb: QXcbConnection: XCB error: 6 (BadCursor), sequence: 683, resource id: 106954763, major code: 2 (ChangeWindowAttributes), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 6 (BadCursor), sequence: 684, resource id: 106954763, major code: 2 (ChangeWindowAttributes), minor code: 0
scrcpy 1.25
/tmp/.mount_guiscrVGUgS2/scrcpy/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 55.8 MB/s (42151 bytes in 0.001s)
[server] INFO: Device: Xiaomi 23049PCD8G (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.(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:368)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 23.0.4-0ubuntu1~22.04.1
INFO: Trilinear filtering enabled
ERROR: Could not open image codec: /usr/local/share/icons/hicolor/256x256/apps/scrcpy.png
WARN: Could not load icon
INFO: Initial texture: 1080x2400
[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
qt.qpa.xcb: QXcbConnection: XCB error: 6 (BadCursor), sequence: 797, resource id: 106954763, major code: 2 (ChangeWindowAttributes), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 6 (BadCursor), sequence: 892, resource id: 106954763, major code: 2 (ChangeWindowAttributes), minor code: 0
WARN: Killing the server...
```

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)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with the reported Poco F5, Android 14, and scrcpy 1.25 setup, then read wrappers/ClipboardManager.java and wrappers/ServiceManager.java alongside Device.java and Controller.java. Check the reported reflection and input-injection stack traces first. Done means keyboard and mouse control works without the server crashing on this device configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, linux
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.