Remove All Ads from XDA
Honor 9 Lite

[Q] How UID of an app determined during install in Android?

1 posts
Thanks Meter: 0
By, Junior Member on 8th January 2014, 01:24 AM
Post Reply Email Thread
The following link gives a brief description about package installation process in android.


I'm curious to know how the UID of an app is determined during its installation based on set the permissions present in its manifest file.

Also there is the platform.xml (in /frameworks/base/data/etc directory for 4.0 ICS Source code)file which contains list of permissions with gid associated with them. The description says

The following tags are associating low-level group IDs with permission names. By specifying such a mapping, you are saying that any application process granted the given permission will also be running with the given group ID attached to its process, so it can perform any filesystem (read, write, execute) operations allowed for that group.

In a similar way there is a list of high level permissions assigned to specific uid's as well.

My question is when an app is installed with permissions X,Y, Z how does its access specified is it from the mapping from this platform.xml

Also everytime the app is run does the mapping take place at every instant (that doesn't seem right from the initial design of android where the app permissions cannot be changed unless there is an update). So if that is the case where does it store saying this app should run with such and such access or such and such uid.

I hope I made my question clear, let me know if you need more information. I'm just trying to learn more on how the internals of the Android OS work.

Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes