0xAliHn
0xAliHn

Reputation: 19250

How many user can be created in a single android device?

As, we know that Android device support multiple user account from android version 4.2 for a single device.

My question is how many user can be created for a single device? Is there any limitation?

Upvotes: 0

Views: 4817

Answers (3)

Roman
Roman

Reputation: 11

Take a look at fw.max_users system property:

~$ adb shell pm get-max-users
Maximum supported users: 4
~$ adb shell setprop fw.max_users 999
Failed to set property 'fw.max_users' to '999'.
See dmesg for error reason.
~$ adb root
restarting adbd as root
~$ adb shell setprop fw.max_users 999
~$ adb shell pm get-max-users
Maximum supported users: 999

See also: fw.show_multiuserui=1, Is it possible to enable android multi-user from adb?, How to configure more than 5 multi-users.

Upvotes: 1

CMJO
CMJO

Reputation: 21

Yes there is a limitation: the maximum number of Android users that can be created on a device is defined at build time.

As mentioned by @vishal jangid, as of Android 5.0 the following configurations have been introduced (in frameworks/base/core/res/res/values/config.xml):

<!--  Maximum number of supported users -->
<integer name="config_multiuserMaximumUsers">1</integer>
<!--  Whether Multiuser UI should be shown -->
<bool name="config_enableMultiUserUI">false</bool>

It means that each device manufacturer can overlay them to choose to either support multi-user features or not and to define the maximum number of users that can be created on a device.

You can know the maximum number of users on your device either via:

  • the following shell command (at runtime):
~ $ adb shell pm get-max-users
Maximum supported users: 4
  • the UserManager of Android (only if your app is a system app as this API is annotated with @hide):
int maxUsers = UserManager.getMaxSupportedUsers();

Sources Supporting Multiple Users

Upvotes: 0

vishal jangid
vishal jangid

Reputation: 3025

As of Android 5.0, the multi-user feature is disabled by default. To enable it, device manufacturers must define a resource overlay that replaces the following values in frameworks/base/core/res/res/values/config.xml:

<!--  Maximum number of supported users -->
<integer name="config_multiuserMaximumUsers">1</integer>
<!--  Whether Multiuser UI should be shown -->
<bool name="config_enableMultiUserUI">false</bool>

To apply this overlay and enable guest and secondary users on the device, use the DEVICE_PACKAGE_OVERLAYS feature of the Android build system to:

Replace the value for config_multiuserMaximumUsers with one greater than 1 Replace the value of config_enableMultiUserUI with: true Device manufacturers may decide upon the maximum number of users. If device manufacturers or others have modified settings, they must ensure SMS and telephony work as defined in the Android Compatibility Definition Document (CDD).

Upvotes: 2

Related Questions