Q:

Android Keyevent injection requires system permissions

hi i am using key event injection using window manager
but when i tested this application it gives me error 
  04-12 18:19:35.794: WARN/WindowManager(58): Permission denied: injecting key event        
  from pid 6290 uid 10039 to window Window{45034880  
   com.android.launcher/com.android.launcher2.Launcher paused=false} owned by uid 10020

   04-12 18:19:35.794: WARN/System.err(6290): java.lang.SecurityException: Injecting to 
    another application requires INJECT_EVENTS permission

 04-12 18:19:35.854: DEBUG/PhoneData(6290):

  04-12 18:19:36.048: WARN/System.err(6290):     at  
 android.os.Parcel.readException(Parcel.java:1247)

  04-12 18:19:36.048: WARN/System.err(6290):     at 
  android.os.Parcel.readException(Parcel.java:1235)

I also give the inject event permission 
is there any way to give a application system permissions.

A:

Only applications that are part of the firmware (i.e., signed by the firmware signing key) can hold the INJECT_EVENTS permission. If you are making your own device or firmware, this will be relevant. If you are creating an ordinary SDK application, you cannot inject events.

