17

Using the following command, I managed to enable multi-user mode in an Android device that doesn't officicially support it: adb shell setprop fw.max_users 5. For good measure I also added the following entry to the build.prop file:

fw.max_users=5

There's now a Settings menu for creating additional users in my device. Upon creating a new user, I would be switched to the multi-user lock screen with icons at the bottom showing the user accounts available in the device. From there I can choose my user log-in.

Moreover, the account data of the new user survives a reboot. From this, I can conclude that multi-user mode is working.

The problem is my Android device, a media player running some version of Jellybean 4.2, normally doesn't display the lock screen. No lock screen appears when I start up the device nor after I suspend or put the device to sleep.

In fact, the only time I see the lockscreen is immediately after creating a new user. Once I've logged in as the new user, I can't switch back to the lock screen because the device is configured to show only the bottom panel and therefore I have no way to click the User icon in the Quick Settings menu of the missing top panel.

It seems a bit overkill to do some low-level system hacks just to achieve the desktop Linux equivalent of Control-Alt-F8, etc. Is there a command, perhaps using some intent or activity available via the Android activity manager tool (am) that would allow me to switch between different user log-ins or at least to switch to the lock screen that would allow me to log in as a different user?

1
  • Just a raw idea: could it help to toggle keyguard for that (which is responsible for "locking" the device)? If so, that could be done using e.g. Tasker, and you could create a shortcut to that task on your homescreen: touch that, switch screen off, then on again, and you should be presented with a lock screen – where you hopefully could switch users, and then use the shortcut to toggle keyguard off again. If that works for you, and you consider it a "valid answer", let me know and I will make it one :)
    – Izzy
    Commented Dec 12, 2013 at 8:09

1 Answer 1

31

Yes there is. When the community discovered this feature in android 4.1 (the code was exist but has not been declared yet so Google did not open the feature in Settings), I remember playing with this in my Nexus 4.

So, here are some commands that I remember for the android Terminal:

  • Create new user: pm create-user User_Name
  • To switch between users: am switch-user User_ID
  • To get the list of all the users: pm list users
  • To delete a user: pm remove-user User_ID

Hope this helps.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .