Skip to content

Just curious about Termux user IDs. #9418

Closed Locked Answered by agnostic-apollo
macerg asked this question in Q&A
Discussion options

You must be logged in to vote

These are unique user ids assigned to each app per profile at install time by android so that apps run with their own specific capabilities/access and sandbox. Termux does not allocate them and you normally can't change them, other than possible root hacks.

# AID_USER_OFFSET 100000 /* offset for uid ranges for each user */
# AID_APP_START 10000 /* first app user */
# AID_APP_END 19999   /* last app user */
# (userid * AID_USER_OFFSET + AID_APP_START + appid)
# profile user 0: (0 * 100000 + 10000 + 400) -> 10400/u0_a400
# profile user 11: (11 * 100000 + 10000 + 400) -> 1110400/u11_a400

https://cs.android.com/android/platform/superproject/+/android-11.0.0_r40:system/core/libcutils/include/…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by agnostic-apollo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants