From http://developer.android.com/guide/topics/fundamentals.html:
It’s possible to arrange for two applications to share the same Linux
user ID, in which case they are able to access each other’s files. To
conserve system resources, applications with the same user ID can also
arrange to run in the same Linux process and share the same VM (the
applications must also be signed with the same certificate).
How can we achieve same user ID for two applications? Any example?
You can do this by setting the
sharedUserIdandsharedUserLabelin the AndroidManifest.xml file to the same value. As an example, if I have the following 2 manifest files (I only included the beginning):and
then they will both share the same user.