As stated in the official document, it is possible to enable android multiple user feature at build time, but there is no document about enabling it on an exiting android image. Is there a way to enable multi-user on an existing device (e.g. using adb) considering that root access is available?
CodePudding user response:
One can edit /system/build.prop
on a rooted device and add multi-user support, then reboot:
fw.max_users=3
fw.show_multiuserui=1
CodePudding user response:
Set the property fw.max_users to your desired value
/** * Returns the maximum number of users that can be created on this device. A return value of 1 means that it is a single user device. * @hide * @return a value greater than or equal to 1 */
@UnsupportedAppUsage
public static int getMaxSupportedUsers() {
// Don't allow multiple users on certain builds
if (android.os.Build.ID.startsWith("JVP")) return 1;
return SystemProperties.getInt("fw.max_users",
Resources.getSystem().getInteger(R.integer.config_multiuserMaximumUsers));
}