When running monkey with Xiaomi mobile phone, the following error occurs just after startup:
** Error: A RuntimeException occurred:
java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission
at android.os.Parcel.createException(Parcel.java:2074)
at android.os.Parcel.readException(Parcel.java:2042)
at android.os.Parcel.readException(Parcel.java:1990)
at android.hardware.input.IInputManager$Stub$Proxy.injectInputEvent(IInputManager.java:925)
at android.hardware.input.InputManager.injectInputEvent(InputManager.java:886)
at com.android.commands.monkey.MonkeyKeyEvent.injectEvent(MonkeyKeyEvent.java:133)
at com.android.commands.monkey.Monkey.runMonkeyCycles(Monkey.java:1324)
at com.android.commands.monkey.Monkey.run(Monkey.java:815)
at com.android.commands.monkey.Monkey.main(Monkey.java:675)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:380)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.input.InputManagerService.injectInputEventInternal(InputManagerService.java:740)
at com.android.server.input.InputManagerService.injectInputEvent(InputManagerService.java:714)
at android.hardware.input.IInputManager$Stub.onTransact(IInputManager.java:422)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)
** System appears to have crashed at event 1 of 1000000 using seed 200
**Solution**
Turn on USB debugging (security setting) and check the setting ☑️ “It is allowed to modify permissions or simulate clicking through USB debugging”, and it is OK to take off again.
Read More:
- [Android Error] java.lang.RuntimeException: An error occurred while executing doInBackground()
- [Solved] Adb Shell Monkey Warning: can‘t create log.txt, Read-only file system
- Win assembleDebug Downloading gradle.zip Error: Exception in thread “main” java.lang.RuntimeException: javax.net.ssl.SSLExce
- [Solved] elasticsearch.bat Running Flashback.: Error occurred during initialization of VM, Error occurred during initializatio
- [Solved] Android MediaRecorder.stop() Error: java.lang.RuntimeException: stop failed.
- Hive Error: FAILED: RuntimeException Error loading hooks(hive.exec.post.hooks): java.lang.ClassNotFoundException: org.apache.atlas.hive.hook.HiveHook
- Android Error: Consumer closed input channel or an error occurred. events=0x9
- [Solved] Execution failed for task ‘:app:processDebugResources‘. > A failure occurred while executing com.and
- Error occurred during initialization of VM Could not reserve enough space for 1572864KB object heap
- Error occurred when finalizing generatordataset iterator [How to Solve]
- Eclipse an error has occurred [How to Solve]
- [Solved] An error occurred while processing your request…enable the Development environment by setting …
- [Solved] ASP Website Error: An error occurred on the server when processing the URL.
- [Solved] Error occurred during connect to primary: exception 3000301: Connection could not be established
- [Solved] Neo4j Error: Error occurred during initialization of VM Incompatible minimum and maximum heap sizes spec
- Error: a JNI error has occurred, please check your installation and try again
- IIS 404 The page cannot be displayed because an internal server error has occurred
- EsgynDB Troubleshooting-ERROR[8837] Internal error occurred.
- [AWS] Solve Error: An error occurred (AccessDenied) when calling the CreateMultipartUpload operation: Access Denied
- [Solved] Faceswap Error: CRITICAL An unexpected crash has occurred.You MUST provide this file if seeking assistan