Sample Header Ad - 728x90

Do AOSP users have "usernames"?

3 votes
1 answer
1036 views
As [this relevant Stack Overflow question revision](https://stackoverflow.com/revisions/23454000/2#:~:text=Actually%20I%20know%20the%20user%20names%20of%20them%20are%20u0_a22%2C%20u0_a11%2C%20system.) demonstrates, calling $USER inside a terminal (like [Termux](https://github.com/termux/termux-app/releases/tag/v0.118.1)) provides a username like u0_a272. However, every application developer I've spoken to about this who was able to discuss this informed me that [that value differs for each application](https://github.com/termux/termux-app/discussions/2696#discussioncomment-5623350:~:text=This%20name%20is%20generated%20on%20the%20fly%20by%20libc%20from%20number%20of%20parameters%20(device%20user%20id%2C%20runtime%20Linux%20user%20id)) , and the AOSP documentation appears to corroborate this. Consequently, should I consider the u0 section as the [user](https://android.googlesource.com/platform/frameworks/base/+/a48127f0276e1fb4e309776b4216160fd5b67e56/core/java/android/os/Users.md#user) identifier, and the _.* section as the identifier for the application, or is an entirely different method utilized to refer to a [user](https://android.googlesource.com/platform/frameworks/base/+/a48127f0276e1fb4e309776b4216160fd5b67e56/core/java/android/os/Users.md#user) ?
Asked by RokeJulianLockhart (556 rep)
Jun 17, 2024, 06:46 PM
Last activity: Jun 18, 2024, 12:52 PM