// The user is calculated from the uid in android.os.UserHandle#getUserId(int uid) as "uid / 100000", so we do the same:
uid_t current_uid = getuid();
int android_user_id = current_uid / 100000;
// The user is calculated from the uid in android.os.UserHandle#getUserId(int uid) as "uid / 100000", so we do the same:
uid_t current_uid = getuid();
int android_user_id = current_uid / 100000;