I created android application with service (mouse cursor),
I was able to move the cursor and click within the application by injecting using “Instrumentation.sendPointerSync(MotionEvent.obtai n(SystemClock.uptimeMillis(), SystemClock.uptimeMillis(), MotionEvent.ACTION_DOWN, x, y , 0)); “
, but when I click outside the application (try to open google chrome), the application crashed and give me this
“java.lang.SecurityException:Injecting to another application requires INJECT_EVENTS permission”
I Already add <uses-permission android:name="android.permission.INJECT_EVENTS"/> but still same error.
After googling and searching, I understand that I need to add root permission to my application, to do so I need to sign my application with private key form my android device and then install the application using this command “adb install YourApp-signed.apk “.
And to sign the application I need platform.x509.pem and platform.pk8, where can I find those files, and how to create the Keystore ?! and what is aligned apk ?! I feel LOST.
Thank you in advance