Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
111.84k stars 10.7k forks source link

Scrcpy ERROR: Exception on thread Thread[Thread-1,5,main] #4259

Open DevBob10 opened 1 year ago

DevBob10 commented 1 year ago

Could you help me with this error please?

ERROR: Exception on thread Thread[Thread-1,5,main] java.lang.AssertionError: java.lang.reflect.InvocationTargetException at com.genymobile.scrcpy.wrappers.InputManager.injectInputEvent(InputManager.java:31) at com.genymobile.scrcpy.Device.injectInputEvent(Device.java:97) at com.genymobile.scrcpy.EventController.injectEvent(EventController.java:159) at com.genymobile.scrcpy.EventController.injectMouse(EventController.java:129) at com.genymobile.scrcpy.EventController.handleEvent(EventController.java:75) at com.genymobile.scrcpy.EventController.control(EventController.java:61) at com.genymobile.scrcpy.Server$1.run(Server.java:35) 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.InputManager.injectInputEvent(InputManager.java:29) ... 7 more 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:3011) at android.os.Parcel.createException(Parcel.java:2995) at android.os.Parcel.readException(Parcel.java:2978) at android.os.Parcel.readException(Parcel.java:2920) at android.hardware.input.IInputManager$Stub$Proxy.injectInputEvent(IInputManager.java:1271) ... 9 more Caused by: android.os.RemoteException: Remote stack trace: at com.android.server.input.InputManagerService.injectInputEventToTarget(InputManagerService.java:916) at com.android.server.input.InputManagerService.injectInputEvent(InputManagerService.java:904) at android.hardware.input.IInputManager$Stub.onTransact(IInputManager.java:603) at android.os.Binder.execTransactInternal(Binder.java:1285) at android.os.Binder.execTransact(Binder.java:1249)

pgatmaitan commented 1 year ago

experience the same thing after I updated my Android device software.

rom1v commented 1 year ago

https://github.com/Genymobile/scrcpy#prerequisites https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#mouse-and-keyboard-do-not-work