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 3211712
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:45:45+00:00 2026-05-17T14:45:45+00:00

I’m developing on an application at the moment which contains quite a lot of

  • 0

I’m developing on an application at the moment which contains quite a lot of personal user information – things like Facebook contacts, etc … Now, one of the things I want to be able to do (and have done, quite effectively) is open up parts of the application to “3rd Party” applications, using Android’s build-in inter-process communication protocol (AIDL). So far so good.

Here’s the catch: because we’re involved in handling quite a lot of personal information, we have to be quite careful about who can and can’t access it; specifically, only “Trusted” applications should be able to do so. So the natural way to do this is to use a custom permission within the AndroidManifest.xml file where we declare the services. My problem is this: I want to be able to enact signature-level protection (similar to the normal “signature” permission level), but with a bit of a catch:

I don’t only want application signed with our internal signature to be able to access the services. I’d like to be able to build a list of “trusted signatures” & at runtime (or if there’s a better way, then maybe some other time?) be able to check incoming requests against this list of trusted keys.

This would satisfy the security constraints in the same way as the normal “signature” permission level I think – only programs on the “trusted keys list” would be able to access the services, and keys are hard to spoof (if possible at all?) – but with the added bonus that we wouldn’t have to sign every application making use of the APIs with our internal team’s key.

Is this possible at the moment in Android? And if so, are there any special requirements?

Thanks

  • 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-05-17T14:45:46+00:00Added an answer on May 17, 2026 at 2:45 pm

    I’ve now found the answer to this question, but I’ll leave it for the sake of anyone looking in the future.

    I opened up a discussion on android-security-discuss where it was answered. Link: http://groups.google.com/group/android-security-discuss/browse_thread/thread/e01f63c2c024a767

    Short answer:

        private boolean checkAuthorised(){
            PackageManager pm = getPackageManager();
            try {
                for (Signature sig :
                    pm.getPackageInfo(pm.getNameForUid(getCallingUid()),
                            PackageManager.GET_SIGNATURES).signatures){
                    LogUtils.logD("Signature: " + sig.toCharsString());
                    if (Security.trustedSignatures.get(sig.toCharsString()) != null) {
                        return true;
                    }
                }
            } catch (NameNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
    
            LogUtils.logD("Couldn't find signature in list of trusted keys! Possibilities:");
            for(String sigString : Security.trustedSignatures.keySet()){
                LogUtils.logD(sigString);
            }
    
            /* Crash the calling application if it doesn't catch */
            throw new SecurityException();
    
        }
    

    Where Security.trustedSignatures is a Map of the form:

    Map<String,String>().put("public key","some description eg. name");
    

    Put this method inside any code that is being called by the external process (ie. within your interface). Note that this will not have the desired effect inside the onBind() method of your RemoteService.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a French site that I want to parse, but am running into

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.