Lollipop has put an emphasis on multiple users, which is just irksome on a personal phone. I don't need a guest account and I don't need a bright blue user icon reminding me I could be someone else.

I've disabled adding a guest from the lock screen (really a sensible default?!), and I've logged in as guest, pulled down and clicked "Remove Guest". But back in my normal account I still see the guest account icon when I pull down the top bar and click the blue user thing.

Is there a way to completely disable the guest feature?

up vote 40 down vote accepted
+50

Edit: Firstly, please follow the answer here. It offers an easier approach and is tested with Android 7.1.1.


Some users have reported that the following solution didn't work for Android Marshmallow and above. That may be so since I tested this with Android Lollipop and worked well on it.


Yes and No! It depends upon how you want to use this answer.

I still see the guest account icon when I pull down the top bar and click the blue user thing.

You don't need to go that far by completely disabling the guest user to avoid that guest account icon when you pull down the top bar and click your profile image. All you've to do is remove all other users from Settings → Users and change the value of a key.

The key is guest_user_enabled under the table global found at /data/data/com.android.providers.settings/databases/settings.db. This database belongs to Settings Storage app. Its current value would be 1. Change it to 0 using with the command:

adb shell settings put global guest_user_enabled 0

Changes should take place immediately, otherwise, simply restart the phone.

Now, whenever you would tap your profile image in the top bar you would see the profile contact (if already created) or a toast saying "The contact doesn't exist". That icon wouldn't show itself as long as you don't create any more users.

Note: As noted above, it is important to remove all other users since the said method wouldn't work as long as any secondary user remains in the system.


The aforesaid technique simply deals with the nuisance that icon is to some users. It doesn't restrict the primary user (owner) to switch or create new user from Settings → Users.

What if I'm happy with having a single user (me) and don't want to see that User in the Settings?

That would require root access. There are devices under the banner Android One which are now running Android Lollipop yet do not have multi-user functionality. It turned out that the [multi-user] feature is disabled (the feature is disabled using framework as noted here) [can be enabled] using few entries in build.prop. Why not use that technique for our advantage?

Hide Users from Settings

  1. Install a file manager with root explorer feature or a build prop editor app.
  2. The location of build.prop is /system/build.prop. Open the file, go to the end, create a new line and enter fw.show_multiuserui=0.
  3. Reboot the device.

Go to Settings and you would notice that Users entry is missing. As a side-effect, the result in first section i.e. the removal of the guest icon is also covered by this solution.

The good part is that while guest/secondary user is nowhere to be found which you can switch to using GUI, you can still use that multi-user feature. adb shell am switch-user USER_ID can switch the user easily provided that you know the USER_ID of the guest/secondary user which you can obtain from /data/system/users/.

On the other hand, adb shell pm create-user USER_NAME can create a new user too. All good here.


What if I don't feel the need to have my device being used by a secondary user at all? I don't want multi-user functionality in my device?

That can be done. Thanks to Android One technique.

Remove multi-user feature

We're not removing the feature from the system but simply restricting the system to a single user. As mentioned in the last section, we need to edit build.prop which requires root access.

Add fw.max_users=1 in build.prop and restart the device. This would restrict the system from creating any new user since the maximum user is set to one. It would also hide the entry Users from Settings as well as the guest user icon aka the nuisance.

Note that you can always switch to the guest/secondary accounts using adb shell am switch-user USER_ID even after restricting the maximum users to one since the restriction is set to curb further creation of the users. If you feel the need to remove those users but find it bit problematic that there is no option now to remove them from GUI, then simply do adb shell pm remove-user USER_ID.

  • 2
    Superb answer. fw.max_users=1 worked for me. I was looking for this after accidentally logging in as a guest while the phone was in my pocket, and having a moment of extreme panic while I thought I had accidentally done a hard reset on my device! – Mark Ch Oct 9 '15 at 6:06
  • 1
    Followed every step here on Cyanogenmod 13 (Android 6.0), still get the little blue user switch icon in the top right of the lock screen. Except now it prompts me to add a new contact. – detly Jun 5 '16 at 12:41
  • 1
    @Firelord I figured it was something like that, so I didn't downvote. If I find out how to do it on M, I'll add something to your answer. – detly Jun 5 '16 at 23:16
  • 1
    The first option with ADB shell does not seems to work on Nougat. – Charles Milette Jul 20 '17 at 3:24
  • 2
    @arnuschky When I wrote this answer I had Lollipop only, and Nougat or Marshmallow were not released, so I don't think the answer is incorrect, it just doesn't apply on newer versions of Android. – Firelord Aug 21 '17 at 12:42

To remove guest user from android device follow this link

This simply says that you have to enter into guest account then from settings -> users -> remove guest user you can remove guest user.

  • 2
    This was down voted, but this is the most cleanest solution. The other two answers suggest a ton of unneeded steps. Note you have to be the guest user, to disable guest functionality. You cannot do this as a admin user. – MeowMeow Mar 8 '17 at 16:25
  • 6
    This does not remove the Guest account, it just removes the data for the last Guest login. – Kai Carver Oct 12 '17 at 1:40
  • 1
    For me it seemed to remove the option to switch to Guest. – nafg Mar 5 at 17:43
  • I used adb shell settings put global guest_user_enabled 0 command from above and THEN I had switched to guest account and removed it, as described user205426 and ONLY AFTER THAT the guest account feature was disabled. – Igor Bljahhin Nov 16 at 18:32

After much effort, I tried this simple method and it worked to solve the problem of being able to create a new user or logon as a guest with zero prompts for a password from the lock screen. Note that you actually have to log on using the guest account for this to work:

Log onto the guest account, and then from settings -> users -> remove guest user. After a reboot, the option to create a new user or logon as a guest is no longer available from the lock screen.

  • What is "this simple method"? – Andrew T. Mar 26 '17 at 5:55
  • With apologies, Andrew. My original post was truncated somehow. I've updated it to add the following: "Log onto the guest account, and then from settings -> users -> remove guest user. After a reboot, the option to create a new user or logon as a guest is no longer available from the lock screen." It seems crazy that this step would resolve the problem, but TouchWiz is such a pile of dung, I suppose it's not really surprising that this weird step would have such an affect. – Darryl Gittins Mar 27 '17 at 14:09
  • This worked for me. Thank you, sir! – Drew Chapin Oct 24 '17 at 12:42

without rooting the device and still be able to change build.prop, no need for adb nor developer tools (after 7 hours trying and finally getting there, I won't care for my bad english)

in short: I found the right twrp for my device, then use latest odin to flash twrp on it. then from twrp advanced file manager copied build.prop from system to sdcard, restart, modify the copied build.prop, restart into twrp, rename original file (basically make backup), and copy back the modified file into system. then select it and use the button chmod 755 (or go in terminal and chmod 744 build.prop, note that only root can have write permissions or your device wont boot).

specific: (tested on samsung tab a t550 9.7" with marshmallow 6.0.1)

-google and download latest odin, unzip it.

-google twrp and your device, download it, I don't know if the latest twrp works for every device but at worst it won't but it wont harm your device.

-search how to restart your device in download mode, mine was pressing power+home+downvol for aprox 4 sec (while the device was powered off, obviously?).

-when the download screen appears, connect to pc and open odin, the device detected under com should be blue

-press the ap button and browse to select the twrp file you downloaded

-verify that re-partiotion is not checked under the options tab

-press start

-the device reboots normally, you need to power it off and start in twrp mode. in my case it was done by pressing power+home+upvol for aprox 4 sec

-in twrp, don't start in read mode (the first time it asks), you wont root but you will change a system file.

-in my case while using twrp, the touch detection was a bit off to the left and I needed to press harder so beware the annoying and damaging fat fingers

-press the mount button, select system so it's checked, and uncheck read mode if it's selected.

-go back (press home) and press the advanced button, then file manager.

-go to system, then select build.prop file

-press copy file, select a destination folder where any user can read it, I used sdcard (you can use the terminal to chmod the file copied but it is faster from windows)

-go back and press reboot, then system. it will reboot normally.

-conect the device to the pc and open the copied build.prop (notepad won't work use notepad++) and edit what you want, in my case I only added fw.max_users=1 below the last line. save it.

-if you could't open it because of permissions, first copy the file into desktop and then modify that file then copy it back and replace it.

-disconnect the device and restart into twrp

-again go to mount and check system, then go to advanced and then use the file manager to go to system and select build.prop

-rename it (add .bak at the end or whatever) so it's backed up

-browse to the modified build.prop and copy or move it to the system directory

-browse to the system directory and select the newly copied build.prop, then press the chmod 755 button and confim, as i said, even if you don't modify the original file, just changing permissions to grant write access to anyone besides root, will make your device hang on boot if that happens, restart by pressing power + downvol for some time. then immediately after it powers off press either power+home+upvol(twrp to change back whatever you did) or power+home+downvol(download mode, if all fails you can still flash the official image from odin, you just have to google your device and the android version then official image, make sure it's the right one)

-restart and it's done, no more guest or add user, and no rooting, altough from download you can flash a root image (if there is one for your device) or from twrp you can install supersu to become root, you can say this method is as difficult as rooting but I prefer to avoid rotting. twrp will be there but it won't get in the way of anything.

There is a now a better solution available named Single User Mod (tested on stock Android 7.1.1 but should work for earlier Android versions too).

Pre-requisites: Magisk (framework) and Magisk Manager (app) installed.

Open Magisk Manager app → go to Downloads → search for Single User Modinstall it → reboot the device.

That's it.

(Click an image to enlarge it)

IMG: IMG:

As you can see, that blue icon for user account at the top is no more visible. The Settings app also hides the Users settings option.

How does the mod works?

There is a fantastic binary made available on-the-fly by Magisk framework named resetprop (under /sbin) which does the magic. It is instructed to change fw.show_multiuserui and fw.max_users in memory before SystemUI app is loaded.

The script solution worked for me: adb shell settings put global guest_user_enabled 0

Make sure developer mode is enabled on the Doid: Settings -> About Device and then tap the Build number 7 times (and hop on one foot while rubbing tummy !!)

HOWEVER worked for me ONLY after I installed the Samsung developer USB driver for Windows available here: https://developer.samsung.com/galaxy/others/android-usb-driver-for-windows

Then the USB dialog box come up on the Droid. Then the script works.

Use this script as a test of the whole "system" adb devices It should find a device and output a MAC address or something. When you have that working then go for the script at the top.

You do not need to download the whole SDK environment. You can get the guts of ADB here: https://drive.google.com/file/d/0B-G0j-y4ew7ZOFJMNFI3cEJBUDg/view

Then simply unzip it into a directory (Get Winzip or similar). Run CMD (the DOS command window) and use the CD command to get into that directory where the adb.exe is (from the zip file). Then test with adb devices. Then go for it.

Dana Keen

New contributor
user281599 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • I did a second Samsung tablet with the above procedure and it did not immediately work. Rebooted and still no work. But then switched to guest. Then in the swipe down from top notifications I deleted the guest account (puts you back to owner user). Then ran the script again and wala! : The guest option was gone from the lock screen. Curious on this tablet the script results in no user icon at all on the lock screen (like a phone) but the other tablet (newer) still had the user icon on the lock screen but when tapped did not present the guest option. Both worked but just in different ways. – user281599 21 hours ago

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.