1

Hello I am trying to find out how is guid and UID assigned to a particular app in android. I know roughly what goes on in zygote and also that during package installation UID is assigned to that app, however I want to know where exactly this takes place and how ?

If anyone could point to the source files it would save a lot of my time.

nikhilelite
  • 301
  • 1
  • 4
  • 16

1 Answers1

1

I don't have a detailed answer for you, but you could start here:

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.3.5_r1/com/android/server/PackageManagerService.java#PackageManagerService.HandlerParams.startCopy%28%29

The PackageManagerService handles installation. I am guessing it delegates the task of setting the GUID, but it's a starting point.

tigeroctopus
  • 103
  • 1
  • 4
  • Yes I saw some of this sometime ago, UIDs are assigned serially to the apps, GIDs are assigned based on permission setting, although the actual code where GIDs are assigned eludes me, I am pretty sure it will be somewhere in packageManagerService.java – nikhilelite Dec 13 '11 at 18:45