sdabet
sdabet

Reputation: 18670

INJECT_EVENTS permission not granted to privileged app

My app needs the INJECT_EVENTS permission to inject key events in other apps:

<uses-permission android:name="android.permission.INJECT_EVENTS" />

It is installed as a privilged app, in the system/priv-app folder of a rooted device, but it still doesn't have this permission.

Why? How can I get this permission?

Upvotes: 0

Views: 1488

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006984

At least in current versions of Android, INJECT_EVENTS is a signature-level permission:

<permission android:name="android.permission.INJECT_EVENTS"
    android:protectionLevel="signature" />

(from the current master branch of the framework manifest)

Your app would need to be signed by the signing key that signed the firmware. Mostly, this is for device manufacturers or custom ROM developers.

Upvotes: 3

Related Questions