Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9160851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:50:07+00:00 2026-06-17T13:50:07+00:00

I know that this is not the first Thread about this permission, however the

  • 0

I know that this is not the first Thread about this permission, however the other ones aren’t finished or don’t help me.

What I need is to inflate KeyEvents using Instrumentation. That works great and is insanely faster than the shell (“input keyevent “) method. But if I want to inject to other apps I catch a SecurityException. That didn’t surprise me to much so I added <uses-permission android:name="android.permission.INJECT_EVENTS" /> to my manifest. Eclipse stops to debug this telling me that only system apps can use this permission. So I compiled using the signed apk tool and pushed that apk to /system/app. Rebooted, and guess what

W/PackageManager( 3499): Not granting permission android.permission.INJECT_EVENTS to package com.<....> (protectionLevel=2 flags=0x8be45) 

The app is targeted for only one special device. So I know all the specs and it is rooted. But su injection-commands take to long and SuperUser is required. I would love to do that with Instrumentation or maybe there is something else I should try?

The firmware is not written by me, so I don’t have the platform key.

Thanks for your help!

EDIT: Got the platform keys (The dev used the normal Google ones), signed and aligned, then pushed the apk to /system/app. Also added android:sharedUserId="android.uid.system" to my manifest. On Boot there is no longer the logcat message. However when I want to send the keysync I still catche the SecurityException. Any ideas?

EDIT2: Here is an excerpt from ps. Seems like the package ist not listed as system

u0_a108   5241  2399  492044 48968 ffffffff 40113ab0 S com.mypackage
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:50:08+00:00Added an answer on June 17, 2026 at 1:50 pm

    Update

    Use the signtool located here, then go ahead and read on in my blog.


    Ok, I got the right platform-keys and it works like a charm now! I signed using http://forum.xda-developers.com/showthread.php?t=1125626
    and replaced (renamed the sign…. to testkey….) the testkeys inside signare folder with

    signapk-key.platform.x509.pem
    signapk-key.platform.pk8
    

    (Google for them)

    Also make sure to zipalign and then to copy to /system/app. Installing the .apk the normal way is NOT possible as it is flagged as System app.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that this is not the first thread on this topic,but I have
this is my first question here :) I know that I should not check
First of all, I know there are a few other StackOverflow questions about this
Okay, I know that 1) this is probably not possible with CSS alone and
I know this is a recurrent/classical topic but I did not found anything that
Obviously it's early days, I do not know whether this is information that is
In Oracle, this returns 03/01/2010. That does not make sense to me. Anybody know
Note first of all that this question is not tagged winforms or wpf or
First of all, I know there are already questions and answers about it, this
I know that there are a lot of questions about this topic, but unfortunately

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.