Android - How many apps can be installed on an Android device?
In the source code of Android M that you can find here, is this statement:
/** * @hide Range of uids allocated for a user. */ public static final int PER_USER_RANGE = 100000;
In this line of code, it states that a user can have one hundred thousand UIDs.
However there is a conflicting information. You know that root UID is 0 and system UIDs start from 1000. Normal user apps start from 10000. This interval defined for user apps' UID numbers is also stated here as:
FIRST_APPLICATION_UIDhas the constant value of
LAST_APPLICATION_UIDhas the constant value of
Therefore, first UID that will be given to a user app will be 10000, and last one will be 19999. Therefore, it states that a user can have ten thousand apps.
So, which one is correct? I think this might explain. Before 4.1.1
LAST_APPLICATION_UID was 99999, allowing ninety thousand user apps as the limit. However, this is for user apps while
PER_USER_RANGE doesn't specifically say so and therefore probably includes all UIDs from 0 to 99999. After 4.1.1
LAST_APPLICATION_UID was reduced to 19999 but
PER_USER_RANGE was left untouched.
So for pre-4.1.1 versions, the limit is ninety thousand user apps and for 4.1.1 and after it is ten thousand user apps.
That is of course the limit that Android accepts. But in most cases, your storage will be full before you can reach such numbers.