-3

I need to use the INJECT_EVENTS permission in my app, which means that I need to sign the app with the platform keys, see previous SO answer.

However, going through the process does not grant me the permissions, e.g. app details on the phone does not show INJECT_EVENTS.

I use a Nexus 7 with Android 5.1 LMY47O. And thought that the Android stock version on Nexus devices would use the keys released in this Github repo.

Is that not the case, see link?

Or is the only way to build and install Android from source?

Community
  • 1
  • 1
toine
  • 1,946
  • 18
  • 24

1 Answers1

1

And thought that the Android stock version on Nexus devices would use the keys released in this Github repo

Assuming official release of firmware is signed with publicly available keys is naive as that would simply mean the whole protection is pretty much useless as anyone could sign own app with these keys too. In case you missed, quote from README from repo you linked to:

The test keys in this directory are used in development only and should NEVER be used to sign packages in publicly released images

So you either need to be on rooted device and elevate your rights that way, or have own build and own keys.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141