2

I have purchased an Samsung Galaxy I9000 Phone, knowing that it does not have either a trackball nor a touchpad/cursorkeys. I thought: simply write an application that reads gestures and sends/generates the appropriate cursor events. Checking the SDK documantation and found that this is possible after granting my application the permission 'INJECT_EVENTS': "Allows an application to inject user events (keys, touch, trackball) into the event stream and deliver them to ANY window. Without this permission, you can only deliver events to windows in your own process.".

This clearly states that this permission is available at application level, not only at system/firmware level.

After several hours of experimentation I did not find any way to get my program to inject cursor events to any other program than my own. How can this be achieved without having the permission 'INJECT_EVENTS'?

Carl Manaster
  • 39,912
  • 17
  • 102
  • 155
user388759
  • 93
  • 1
  • 1
  • 6
  • You want your app to do something with massive security implications without the required permission? I think if you find a way to do this you will have found a huge bug that needs fixing. :) – adamp Jul 11 '10 at 19:30
  • This would be true if this would pass security checks quietly -- but as I am requesting the permission 'INJECT_EVENTS' I do not mind the system asking me if I want to allow it during the installation procedure. I need this kind of app (because the Samsung Galaxy I9000 does not have a cursor pad or trackball). – user388759 Jul 12 '10 at 06:26

1 Answers1

0

As @adamp points out in the comments, there isn't a way to do this without the INJECT_EVENTS permission as that would be a huge security bug. Furthermore, this question and this bug seem to indicate that INJECT_EVENTS is a system-level permission and not available to non-system apps.

Community
  • 1
  • 1
Wesley Wiser
  • 9,491
  • 4
  • 50
  • 69