The Android system does not have the conventional /etc/passwd storage for users and groups. It contains a fixed set of user and groups
that is included in the system libraries. These user and groups are used to isolate processes and grant permissions. The Android system also creates a user per application when an application gets installed.
Just like conventional POSIX compliant system the libc provides and API to get user information. The Android
libc implementation is called bionic and calls like getpwuid (to get user name information ) and getgrent to get groups information get their information from somewhere else.
As you can read in bionic/libc/docs/OVERVIEW.TXT user and groups are hard coded. Next to the hard coded id’s every
application that gets installed will get it’s own id starting from 10000. It recognizes “app_1234” as the synthetic
name of the application that was installed with uid 10000 + 1234, which is 11234
system/core/include/private/android_filesystem_config.h contains the list of user user id’s mapped to numbers and this code gets included
when building bionic. A bit lower in the file you will find the DEFINE → group name mapping. This is a one to one mapping so AID_VPN(id 1016) is the group called “vpn”.