How to enable multiple user mode on CyanogenMOD 10.1 (and some other Android 4.2.2 ROMs)

While I didn't get excessively creative in naming the accounts, one is my Gmail and the other is my work's Google account showing off multiple user mode in an AOKP ROM.One of the neat things that Android 4.2.x brought about was support for multiple users on a device. Unfortunately, it appears that multiple user support has been confined primarily to the tablet world, even though support is built into most Android 4.2.2 AOSP code bases.

Update 11/19/13: how to make it stick added

My guess on the lack of support for multiple users is that there are simply fewer reasons to want it on a phone than there are on a tablet. But if you’re dealing with children wanting your phone to entertain themselves, or a device that’s been relegated to being a media server, you’ll discover soon enough how it would be a nice feature to have available.

Since multiple user mode and multiple profile support came out at roughly the same time, here’s a quick rundown on these so there’s no confusion:

Multiple Profile Support

This is the ability to set volume level, turn on and off radios, and adjust screen brightness based on the time of day, your location, the power situation, or just your preference.

An example of this would be turning off data, setting the brightness to 30%, and turning off system sounds and notifications after 10:oo p.m. every night, and then setting it back to normal at 6:00 a.m.

Multiple User Mode

Multiple User Mode is the ability to give the phone to another person, let them log in with their own account information, and any changes they make are done under their account. They give the phone back to you, and you’ll have none of their clutter, photos, emails, or apps on your account.

This enables you to give your phone to a relative to play with at a picnic and not get it back with 10,000 pay apps downloaded via Google Play, and all your email and icons deleted.

Preparations before proceeding

Since your ROM may not properly support multiple users, and all your data might be lost, make a nandroid backup of your phone before proceeding.

You’ll either need a functioning ADB client, or a terminal emulation application installed.

Onward

In a terminal window or ADB, you’ll need to obtain SuperUser/root access. This is generally done by typing in su. After obtaining SuperUser access, type in:

  • pm get-max-users

This should return the numeric result of “1,” which is the maximum number that the current OS is set up accept. If it returns an error, then your ROM is most likely unable to handle multiple users.

Next, you’ll need to change that number to something higher. In the following, I chose to set it to eight users because I felt like it.

Now type in:

  • setprop fw.max_users 8
  • pm create-user usernameyouwanthere

You may notice the shell reboot, and if you’re on a ROM build that supports multiple users properly, you’ll either get a login request, or a users section will appear under device in system settings. Depending on your ROM, you might even see an option in the developer’s menu to enable user selection in the power menu.

Keep in mind that this may not work completely or be supported by your ROM, but in some instances it’s quite useful. The worst that should happen is that you have to restore a nandroid, or that the max_users changes back to single-user after a reboot.

How to make it stick

Inspired by a comment from konnor below, this is how I got the multiple user mode to stick:

  • adb shell (if you’re not already, you can use terminal emulator if you want)
  • su
  • mount -o rw,remount /system
  • echo fw.max_users=4 >> /system/build.prop
  • exit
  • exit
  • adb reboot (or reboot the device however you want)

From now on out the max_users will always be there when you boot.

After a reboot, swiping down and pressing my face brings me to the lock screen where all users are displayed. Your results may vary so make sure to have a nandroid backup.

Pocketables does not accept targeted advertising, phony guest posts, paid reviews, etc. Help us keep this way with support on Patreon!
become a patron button - for some reason we don't have an alt tag here

Paul E King

Paul King started with GoodAndEVO in 2011, which merged with Pocketables, and as of 2018 he's evidently the owner. He lives in Nashville, works at a film production company, is married with two kids. Facebook | Twitter | Donate | More posts by Paul | Subscribe to Paul's posts

Avatar of Paul E King

42 thoughts on “How to enable multiple user mode on CyanogenMOD 10.1 (and some other Android 4.2.2 ROMs)

  • Avatar of Hum0nx
    April 16, 2013 at 1:39 am
    Permalink

    Hey great article! This worked perfect for me although I would note that you should change the SU to su because I sat there in the terminal for quite a while trying to figure out why I couldn’t gain super user because I kept typing in SU instead of su. Still this helped me out a ton! Confirmed working on AOKP Build 6 for nexus 4.

    Reply
  • Avatar of Lero
    April 24, 2013 at 11:12 pm
    Permalink

    Works on Samsung Galaxy Wonder? but not properly! Accoun is created by a separate paragraph in setting. There’s no chance to get back to my main profile. The phone stays on the one “newly created’. Thanks for effortrs and great job! =)

    Reply
  • Avatar of Gavin
    May 1, 2013 at 5:48 am
    Permalink

    Thanks for this Paul

    Got it all working creating accounts, switching accounts etc
    but for 1 problem
    When i turn the pad off i loose the users menu and only have the one account.
    If i check max users its back to 1 :(
    If i set it all back up, then the old accounts i created are still there.
    Any ideas ?

    gavin

    Reply
    • Avatar of Henry
      July 15, 2013 at 4:10 pm
      Permalink

      You have a two options here depending on your comfort level and bank account.

      1. You could modify the boot script and add the multiple user setting. I did not do this, and cannot provide instructions other than it requires modifying system files.

      2. You could use an app to run the script for you at boot. I use Tasker. There are some other cheaper apps that can do the same thing.

      Reply
  • Avatar of chuck
    July 14, 2013 at 9:22 am
    Permalink

    It worked on my HOX, I change to “2”, then I make a new user “Guest”, but I can only switch to “Guest”, then I can not switch back to my Owner user, what should I do?

    Reply
    • Avatar of Henry
      July 15, 2013 at 4:07 pm
      Permalink

      This hacked version of multiple users doesn’t seem to include a user switcher for the secondary user. What you need to do is first enable root for the secondary user. This is done via your superuser app or in CM’s superuser settings. Then, run a terminal from the secondary user and type:

      am switch-user 0

      The primary user is userid 0. If you know the ID of the secondary user, you can use this method from primary, but the user switcher is probably easier. I researched for about a day and this is the best solution I’ve found.

      Reply
  • Avatar of Bryan
    July 31, 2013 at 6:16 pm
    Permalink

    Does not work on gs4 running cm 10.1 as the newest nightly. Just so people dont have to fuss with it if they are smart enough to read the comments

    Reply
  • Avatar of Y Hyun
    October 9, 2013 at 5:40 pm
    Permalink

    If you dont mind, please let me know to use Tasker for making a multi-user script or send me your script?

    Reply
  • Avatar of ps j
    October 15, 2013 at 2:11 pm
    Permalink

    Can this be accomplished from source?

    I am working on my own version of CyanogenMod that will mount other directories to blend Linux and Android into one, multi-user with auth is a must have, this saves me a hell of a lot of work if I can incorporate it into the phone.

    Reply
    • Avatar of Paul E King
      October 15, 2013 at 6:09 pm
      Permalink

      might want to check Dirty Unicorn’s AOKP github – they wrote something to accomplish that as far as I know.

      Reply
  • Avatar of shavir afroz
    October 26, 2013 at 4:58 am
    Permalink

    working on my rooted 4.2.2 official samsung rom on tab2 p3100. but after I reboot, the user options in settings disappear. but thanks.

    Reply
  • Avatar of BRodriguez
    October 26, 2013 at 9:37 pm
    Permalink

    Great. Thanks for the directions I now have multi users on my Note 8. Amazing now my boys can have their own setting and apps.

    Reply
  • Avatar of Name
    November 12, 2013 at 2:34 pm
    Permalink

    I tried the following terminal commands on both my Android 4.3 phones, one crashed, one just returned back to the terminal. All commands were successful except the last one.

    My HTC One X is running CynogenMod 10.2 nightly from 10 Nov 2013. It rebooted on the last command with no change.
    My Samsung Galaxy Nexus is running ASOP 4.3. It just returned to the terminal after the last command with no change.

    I was using this terminal app on the device itself. “Android Terminal Emulator Jack Palevich”

    Here are the commands
    su
    pm get-max-users (results = 1)
    setprop fw.max_users 3
    pm create-user Guest

    I hope that helps.

    Reply
  • Avatar of konnor
    November 18, 2013 at 12:32 pm
    Permalink

    It may help some of you:
    On my Galaxy S3 (CM 10.2) I had to modify the /system/build.prop file, adding the “fw.max_users 4” at the end of it. Without this, the max_users value always has been changed back to 1 after every reset.
    To switch between users: if you lock your screen, rotate it to landscape! For me, in portrait mode there were no possibility to change between the users. Simple rotating the lock screen solved the problem, the icons of the users just arrived!

    Reply
    • Avatar of Paul E King
      November 18, 2013 at 10:17 pm
      Permalink

      little change to that, it’s “fw.max_users=4” – without the = it doesn’t stick… at least on mine, which I believe is standard

      Reply
    • Avatar of Leandro
      March 15, 2014 at 10:47 am
      Permalink

      O man!! It worked haha. Thanks

      Reply
  • Avatar of zor
    November 19, 2013 at 5:35 pm
    Permalink

    GalaxyTab2 10.1 (GT-P5100) CM10.1.3
    Only OWNER can Bluetooth turn on. GPS, WiFi and GSM switches working properly. How to fix BT switch for others users?

    Reply
    • Avatar of Svisso
      January 19, 2014 at 8:48 am
      Permalink

      Hi. Thank you folks, this worked on my LG g pad (of course, the cd /system was necessary, too).
      There remains the problem with BT for all additional users, as first mentioned by zor. Any idea regarding this? Supposedly a permission issue.

      Reply
  • Avatar of PeterE
    December 4, 2013 at 5:05 am
    Permalink

    This article is excellent and I’ve set up two phones with it. One phone has separate users for work and personal life and the other has separate user profiles for my kids.

    I was never able to get the user switcher in the Quick Settings Panel to work in Cyanogenmod (SGS 2 snd SGS3, CM10.1 and CM10.2) except by including the User Switcher option in the Power Menu. When I upgraded to KitKat (CM11), I lost the ability to switch back to the main user via the power menu for some reason. But thanks to the comments above, I was able to make a shortcut on the home screen to get back. Here’s what I did:

    1. Create the user accounts as the article states above in the Terminal Emulator.
    2. Edit the build,prop file to include the “fw.max_users=4 >> build.prop” line. I used the Build Prop Editor from here: http://goo.gl/kFoMdc
    3. Go to System Settings -> #Superuser. In the menu, select Settings and set the MultiUser policy to All Users.
    4. Install SManager from the Play Store http://goo.gl/41XQAk
    5. Run SManager and select the Root option.
    6. Browse to a folder on your SD card or external SD card. (mine was at /storage/sdcard1).
    7. Use the menu key and select New Script. Select SM Editor from the list and call the script “SwitchUser” or something like that.
    8. Enter “am switch-user 0” on the second line.
    9. Save the script and exit the SM Editor and SManager.
    10. From your home screen, go back to System Settings -> Buttons -> Power Menu and make sure User Switcher is checked.
    11. Hold in the power button and you should see your list of users that you created in step 1. Switch to one of those users.
    12. In the second user account, after going through the setup of the user, install SManager again and run it as Root.
    13. Find the script you created and tap it, on the next screen, turn on “Fav”, turn on “Su” and select “Is Executable”. Then click “Save” and exit from SManager.
    14. Select an SManager widget for your homescreen in the usual way and select SwitchUser.

    You now have a shortcut on your homescreen that will switch you back to your main user. You can repeat this step for other user accounts. As well, you can create multiple scripts to switch between the secondary accounts by selecting the correct user number (my second user was 10 and the third was 11).

    Reply
    • Avatar of Abhay
      December 4, 2013 at 3:36 pm
      Permalink

      Hi Peter,

      I am trying to use telephony services on the Second (guest) user but the android.com process crashes consistently. Have you been successfully in using the second user for telephony services? ( SMS & Voice call )

      I am using CM 10.1 on SGS3.

      -Abhay

      Reply
      • Avatar of PeterE
        December 5, 2013 at 9:33 pm
        Permalink

        I haven’t figured out how to get that to work. If I find out, I’ll post it here.

        Reply
  • Avatar of Darryl Taylor
    December 12, 2013 at 10:19 am
    Permalink

    After putting in echo fw.max_users=4 >> build.prop it tells me its a read only fle system

    Reply
    • Avatar of Paul E King
      December 12, 2013 at 11:26 am
      Permalink

      what did it say after you did the line “mount -o rw,remount /system”?

      Reply
      • Avatar of Darryl Taylor
        December 12, 2013 at 6:35 pm
        Permalink

        There was nothing said it just rewrote what I wrote

        Reply
        • Avatar of Paul E King
          December 13, 2013 at 8:59 pm
          Permalink

          that mount command sets it to read/write, if afterward you’re not able to write the mount command wasn’t working.

          So something is up – what phone, version of CM?

          Reply
          • Avatar of Darryl Taylor
            December 14, 2013 at 4:41 am
            Permalink

            I have a galaxy nexus cm version 10.2-2013 toro

          • Avatar of Darryl Taylor
            December 14, 2013 at 10:53 am
            Permalink

            I put my version and phone type how do I get my terminal to change the file system from read only

  • Avatar of Darryl Taylor
    December 12, 2013 at 1:21 pm
    Permalink

    sh: can’t create build.prop: Read-only file system

    Reply
    • Avatar of thuri
      January 4, 2014 at 7:40 am
      Permalink

      See that you write echo fw.max_users=4 >> /system/build.prop

      Reply
  • Avatar of Robert Bateman
    December 26, 2013 at 1:34 pm
    Permalink

    Just a quick FYI. The instructions, as given, don’t totally work. If you insert

    cd /system

    between the mount and echo commands, this insures the correct build.prop file is edited. (this one change allowed by Onda Tablet to retain the change – where it wasn’t retained before this change.)

    Reply
  • Avatar of Johannes
    December 27, 2013 at 5:36 am
    Permalink

    You forgot a “cd system” not everybody knows that the build.prop is located in /system.

    Reply
  • Avatar of graceperiod
    December 30, 2013 at 7:05 am
    Permalink

    I’m using the temasek cm11 on sgs3. It allows the creation of additional users (max 8) but I wasn’t able to switch between them. A trick that I used is to allow the landscape rotation of the lock screen (from the terminal “setprop lockscreen.rot_override true”). When the lock screen is in landscape mode, almost magically the icons of the multiple users appear on the bottom (like on the tablet) and you can switch between them. Hope this helps somebody.

    Reply
  • Avatar of Svisso
    January 24, 2014 at 5:24 am
    Permalink

    Hi there
    Does anyone have the clue to enable all users subsequent to the master for control of Bluetooth and other permission criticle services?
    Michael

    Reply
    • Avatar of Paul E King
      February 3, 2014 at 2:28 am
      Permalink

      I’m running CM 11 on the Nook Color, user switcher is built in as far as I can tell. Guess it could just be my maintainer though.

      Reply
    • Avatar of PeterE
      February 22, 2014 at 2:23 pm
      Permalink

      This is a great tip! It saves me a ton of effort so that I don’t need to mess around with smanager and scripts

      Reply
  • Avatar of Goran Filipovic
    March 2, 2014 at 7:14 am
    Permalink

    With your advice I finaly got multiuser mini pc. I have added user switch on software power button. What I can’t figure out is how to have second (guest) user to boot first. I want that this mini pc mainly use my kids, and to keep me as admin and primary user from time to time.. Any suggestions?

    Reply
    • Avatar of Paul E King
      March 2, 2014 at 7:42 am
      Permalink

      I’ve never given advice on a “multiuser mini pc”. May have been one of the other authors on the site. Do they run CM?

      So you just want to have it default to a different account leaving you the ability to switch to admin access?

      I’ll see if I can find how to do this, probably just a build.prop mod

      Reply
  • Avatar of technikola
    December 16, 2017 at 3:37 am
    Permalink

    very well described and also work as said thank you for sharing this great information to us. Great work keep it up..!!!!

    Reply

Leave a Reply

Your email address will not be published.