Hello,

I currently trie to redirect the reading of the contacts to another
contact list - in the end this should be some kind of new security
feature :)

Since I want this to be transparent to any app reading contact data I
probably have to change something in the framework itself. What I
thought that I could do is to write a new content provider, that is
nearly the same as the contacts content provider (same tables), and to
change the uri to the one of my new provider if necessary.

So now my questions:

- Generally, is this a somehow reasonable method to do what I want

- I currently want to do this for the deprecated Contacts content
provider (ContactsContract is the next step). Is it correct that the
source for the content provider used in this case is
/frameworks/base/core/java/android/provider/Contacts.java ?
If yes why does it not extends ContentProvider ? If no - where do I
find the correct source.

- I tried to trace manually the place where the actual access to the
data stored in the contacts.db happens but I got stuck at
frameworks/base/core/java/android/app/
ActivityManagerNative.java:getContentProvider(IApplicationThread
caller, String name).
I'd really like to know where this access to the data happens (I spent
quite a lot of time trying to figure it out :) ).

Btw: During this tracing the, previously mentioned, Contacts
ContentProvider (Contacts.java) never appeared - thats why I am a
little bit confused.

Thank you very much

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-platform@googlegroups.com.
To unsubscribe from this group, send email to android-platform+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

Search Discussions

  • Tez at Feb 28, 2012 at 9:12 am
    look at the following research papers

    1. Yaase: Yet another android security extension
    2. AppFence

    -Earlence
    On Feb 27, 11:26 am, Pinas wrote:
    Hello,

    I currently trie to redirect the reading of the contacts to another
    contact list - in the end this should be some kind of new security
    feature :)

    Since I want this to be transparent to any app reading contact data I
    probably have to change something in the framework itself. What I
    thought that I could do is to write a new content provider, that is
    nearly the same as the contacts content provider (same tables), and to
    change the uri to the one of my new provider if necessary.

    So now my questions:

    - Generally, is this a somehow reasonable method to do what I want

    - I currently want to do this for the deprecated Contacts content
    provider (ContactsContract is the next step). Is it correct that the
    source for the content provider used in this case is
    /frameworks/base/core/java/android/provider/Contacts.java ?
    If yes why does it not extends ContentProvider ? If no - where do I
    find the correct source.

    - I tried to trace manually the place where the actual access to the
    data stored in the contacts.db happens but I got stuck  at
    frameworks/base/core/java/android/app/
    ActivityManagerNative.java:getContentProvider(IApplicationThread
    caller, String name).
    I'd really like to know where this access to the data happens (I spent
    quite a lot of time trying to figure it out :) ).

    Btw: During this tracing the, previously mentioned, Contacts
    ContentProvider (Contacts.java) never appeared - thats why I am a
    little bit confused.

    Thank you very much
    --
    You received this message because you are subscribed to the Google Groups "android-platform" group.
    To post to this group, send email to android-platform@googlegroups.com.
    To unsubscribe from this group, send email to android-platform+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
  • David Herges at Feb 29, 2012 at 10:15 am
    Hi,

    - Generally, is this a somehow reasonable method to do what I want

    In general, yeah.
    - I currently want to do this for the deprecated Contacts content
    provider (ContactsContract is the next step). Is it correct that the
    source for the content provider used in this case is
    /frameworks/base/core/java/android/provider/Contacts.java ?
    If yes why does it not extends ContentProvider ? If no - where do I
    find the correct source.

    Basically, two strategies:
    a) packages/provider/ContactsProvider: here you find the implementation.
    The actual provider is ContactsProvider2.java; you could modify it
    b) write your very own provider, register that provider with the URI that
    the current ContactProvider is associated to; obviously, you have to
    de-associate the current provider, add your provider to the packages folder
    and include it in the build system

    I'd do a) but keep a copy of the current provider, so you have a cheat
    sheet at a glance (which is probably more convenient than git
    revert/reseting all the time).

    - I tried to trace manually the place where the actual access to the
    data stored in the contacts.db happens but I got stuck at
    frameworks/base/core/java/android/app/
    ActivityManagerNative.java:getContentProvider(IApplicationThread
    caller, String name).
    I'd really like to know where this access to the data happens (I spent
    quite a lot of time trying to figure it out :) ).

    That trace is from the client application? Such a trace will "end" where
    the IPC call to the provider happens. However, that shouldn't be in
    ActivityManagerNative rather than somewhere in IContentProvider, resp.
    ContentProviderNative.


    cheers,
    David

    --
    You received this message because you are subscribed to the Google Groups "android-platform" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/android-platform/-/RTOE0UYs4C0J.
    To post to this group, send email to android-platform@googlegroups.com.
    To unsubscribe from this group, send email to android-platform+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupandroid-platform @
categoriesandroid
postedFeb 27, '12 at 3:44p
activeFeb 29, '12 at 10:15a
posts3
users3
websiteandroid.com

3 users in discussion

Tez: 1 post David Herges: 1 post Pinas: 1 post

People

Translate

site design / logo © 2022 Grokbase