Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
112.28k stars 10.74k forks source link

Xiaomi 10 , error on clic #5032

Closed Fr-Dae closed 4 months ago

Fr-Dae commented 4 months ago

Environment Xiaomi 10 1719459403706

dae@dae-rog-gl753vd 
------------------- 
OS: Lubuntu 22.04.4 LTS x86_64 
Host: GL552VW 1.0 
Kernel: 5.15.0-112-generic 

Resolution: 1920x1080 
DE: LXDE 
WM: Openbox 

CPU: Intel i7-6700HQ (8) @ 3.500GHz 
GPU: Intel HD Graphics 530 
Memory: 4159MiB / 15412MiB 
dae@dae-rog-gl753vd:~/scrcpy$ scrcpy -v
scrcpy 2.4 <https://github.com/Genymobile/scrcpy>

Dependencies (compiled / linked):
 - SDL: 2.0.20 / 2.0.20
 - libavcodec: 58.134.100 / 58.134.100
 - libavformat: 58.76.100 / 58.76.100
 - libavutil: 56.70.100 / 56.70.100
 - libavdevice: 58.13.100 / 58.13.100
 - libusb: - / 1.0.25
ark@rg351mp:~$ adb --version
Android Debug Bridge version 1.0.39
Version 1:8.1.0+r23-5
Installed as /usr/lib/android-sdk/platform-tools/adb
dae@dae-rog-gl753vd:~/scrcpy$ scrcpy 
scrcpy 2.4 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  bq79ssnbobnrzpvg                device  22041219NY
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 10.7 MB/s (69007 bytes in 0.006s)
[server] INFO: Device: [Xiaomi] Redmi 22041219NY (Android 14)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
INFO: Trilinear filtering enabled
INFO: Texture: 2408x1080
INFO: Texture: 1080x2408
[server] ERROR: Could not invoke method
java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at com.genymobile.scrcpy.wrappers.InputManager.injectInputEvent(InputManager.java:58)
    at com.genymobile.scrcpy.Device.injectEvent(Device.java:230)
    at com.genymobile.scrcpy.Device.injectEvent(Device.java:234)
    at com.genymobile.scrcpy.Controller.injectTouch(Controller.java:362)
    at com.genymobile.scrcpy.Controller.handleEvent(Controller.java:162)
    at com.genymobile.scrcpy.Controller.control(Controller.java:97)
    at com.genymobile.scrcpy.Controller.lambda$start$0$com-genymobile-scrcpy-Controller(Controller.java:105)
    at com.genymobile.scrcpy.Controller$$ExternalSyntheticLambda1.run(Unknown Source:4)
    at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.SecurityException: Injecting input events requires the caller (or the source of the instrumentation, if any) to have the INJECT_EVENTS permission.
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3057)
    at android.os.Parcel.createException(Parcel.java:3041)
    at android.os.Parcel.readException(Parcel.java:3024)
    at android.os.Parcel.readException(Parcel.java:2966)
    at android.hardware.input.IInputManager$Stub$Proxy.injectInputEventToTarget(IInputManager.java:1590)
    at android.hardware.input.InputManagerGlobal.injectInputEvent(InputManagerGlobal.java:1217)
    at android.hardware.input.InputManagerGlobal.injectInputEvent(InputManagerGlobal.java:1227)
    ... 10 more
Caused by: android.os.RemoteException: Remote stack trace:
    at com.android.server.input.InputManagerService.injectInputEventToTarget(InputManagerService.java:912)
    at android.hardware.input.IInputManager$Stub.onTransact(IInputManager.java:752)
    at android.os.Binder.execTransactInternal(Binder.java:1346)
    at android.os.Binder.execTransact(Binder.java:1282)

[server] ERROR: Could not invoke method
java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at com.genymobile.scrcpy.wrappers.InputManager.injectInputEvent(InputManager.java:58)
    at com.genymobile.scrcpy.Device.injectEvent(Device.java:230)
    at com.genymobile.scrcpy.Device.injectEvent(Device.java:234)
    at com.genymobile.scrcpy.Controller.injectTouch(Controller.java:362)
    at com.genymobile.scrcpy.Controller.handleEvent(Controller.java:162)
    at com.genymobile.scrcpy.Controller.control(Controller.java:97)
    at com.genymobile.scrcpy.Controller.lambda$start$0$com-genymobile-scrcpy-Controller(Controller.java:105)
    at com.genymobile.scrcpy.Controller$$ExternalSyntheticLambda1.run(Unknown Source:4)
    at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.SecurityException: Injecting input events requires the caller (or the source of the instrumentation, if any) to have the INJECT_EVENTS permission.
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3057)
    at android.os.Parcel.createException(Parcel.java:3041)
    at android.os.Parcel.readException(Parcel.java:3024)
    at android.os.Parcel.readException(Parcel.java:2966)
    at android.hardware.input.IInputManager$Stub$Proxy.injectInputEventToTarget(IInputManager.java:1590)
    at android.hardware.input.InputManagerGlobal.injectInputEvent(InputManagerGlobal.java:1217)
    at android.hardware.input.InputManagerGlobal.injectInputEvent(InputManagerGlobal.java:1227)
    ... 10 more

when i clic on windows with my phone screen what i did wrong ?

Fr-Dae commented 4 months ago
dae@dae-rog-gl753vd:~/scrcpy$ scrcpy -e
scrcpy 2.4 <https://github.com/Genymobile/scrcpy>
ERROR: Could not find any ADB device over TCP/IP:
ERROR:           (usb)  bq79ssnbobnrzpvg                device  22041219NY
ERROR: Server connection failed
dae@dae-rog-gl753vd:~/scrcpy$ scrcpy --tcpip=192.168.1.119:5555
scrcpy 2.4 <https://github.com/Genymobile/scrcpy>
INFO: Connecting to 192.168.1.119:5555...
failed to connect to '192.168.1.119:5555': Connection refused
ERROR: Could not connect to 192.168.1.119:5555
ERROR: Server connection failed
SevenR0se commented 4 months ago

me too. My cell phone is Redmi Note 11 Pro ,System is MIUI Global 14.0.7

Fr-Dae commented 4 months ago

me too. My cell phone is Redmi Note 11 Pro ,System is MIUI Global 14.0.7

same like me, could you add a neofetch of your distrib you try use scrcpy and more details about your android version ?

rom1v commented 4 months ago

SecurityException: Injecting input events requires the caller (or the source of the instrumentation, if any) to have the INJECT_EVENTS permission.

https://github.com/Genymobile/scrcpy#prerequisites

SevenR0se commented 4 months ago

SecurityException: Injecting input events requires the caller (or the source of the instrumentation, if any) to have the INJECT_EVENTS permission.SecurityException:注入输入事件要求调用方(或检测源,如果有)具有INJECT_EVENTS权限。

https://github.com/Genymobile/scrcpy#prerequisites

THK U

SevenR0se commented 4 months ago

me too. My cell phone is Redmi Note 11 Pro ,System is MIUI Global 14.0.7

same like me, could you add a neofetch of your distrib you try use scrcpy and more details about your android version ?

After reboot my phone ,it 's OK.

image