It is well known that Android uses the Linux user system as simple sandbox system to separate the apps form each other.
The Android user id like u0_a272
(UID possibly 10272) can be interpreted this way:
u0
means it belongs to the first user-account on the device (this time to the Linux user account but human user).a
is may be the identifier that the user account belongs to an app (not 100% sure)272
is the Linux UID moduloUserHandle.PER_USER_RANGE
.
The UID is computed as:
UID =
UserHandle.PER_USER_RANGE
× user + app +Process.FIRST_APPLICATION_UID
Constants in Process
specify range of UIDs allowed for use by the applications. On Android M, the range is from 10000 to 19999.
The user accounts are created dynamically on app installation and then saved to a XML file where this and many more details if all installed apps are recorded. This way Android can lookup which app belongs to which uid and the other way round.
For more details on this topic see the related questions and their answers: