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

Mouse & Keyboard not working (the same thing all again) #5040

Open
Cr1Pie opened this issue Jun 29, 2024 · 4 comments
Open

Mouse & Keyboard not working (the same thing all again) #5040

Cr1Pie opened this issue Jun 29, 2024 · 4 comments

Comments

@Cr1Pie
Copy link

Cr1Pie commented Jun 29, 2024

Environment

  • OS: Windows
  • scrcpy version: 2.4
  • installation method: Windows Release
  • device model: POCO M4 5G
  • Android version: 14

Describe the bug
Basically the keyboard and the mouse doesn't work by all

[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
@rom1v
Copy link
Collaborator

rom1v commented Jun 29, 2024

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.

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

@Cr1Pie
Copy link
Author

Cr1Pie commented Jun 30, 2024

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.

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

I have already enabled all of this and still not working

When I get home, I'll test if it's not adb debugging

@rom1v
Copy link
Collaborator

rom1v commented Jul 1, 2024

I have already enabled all of this and still not working

And rebooted your phone?

@Cr1Pie
Copy link
Author

Cr1Pie commented Jul 1, 2024

I have already enabled all of this and still not working

And rebooted your phone?

Rebooted now and it works, thank you

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