[HOWTO][4.2]Now there's an app for that. Enable Multiple Users in Android

Search This thread

TjPhysicist

Senior Member
Dec 23, 2007
453
48
Can still access pics, is there a specific folder that is hidden or something? Camera pics are there, pics in other folders are still there etc (access via gallery app). I can hide the galery app but camera can get to gallery and hiding camera is kinda stupid.
 

petedaddi

Senior Member
Aug 11, 2011
573
109
Leeds
Awesome, works on S2 using CM10 and switched to Apex Launcher so I can hide all the apps I don't want my 3 year old touching.

Sent from my GT-I9100 using Tapatalk 2
 

zanderman112

Senior Member
Oct 6, 2010
7,957
1,844
SouthEast USA
www.twitter.com
Quite nice, but it gave me system fc after installing our deinstalling apps so I deleted it again, but this will be nice once it's fully working!

Interesting. Seems there's more bugs that first easily noticeable!




Can still access pics, is there a specific folder that is hidden or something? Camera pics are there, pics in other folders are still there etc (access via gallery app). I can hide the galery app but camera can get to gallery and hiding camera is kinda stupid.

Well, to me this makes perfect sense. There's no reason to hide the sdcard from a 2nd user. If you want pics to be hidden, put them in a folder with a period at the beginning of it. They'll be hidden from the gallery all together. Google this for more info.

Awesome, works on S2 using CM10 and switched to Apex Launcher so I can hide all the apps I don't want my 3 year old touching.

Sent from my GT-I9100 using Tapatalk 2

Very nice. If I were you, I'd set up the home screen with stuff he/she can play with, hide the app drawer icon and such, and then "Lock Desktop" to prevent him/her from changing anything :)

Sent from Mr. Z's Galaxy S3.
 

trinode

Senior Member
Jul 13, 2007
356
2
The update broke it... I'm single user still, and it dies on mine

Same for me. After enable multiple users and the update for BBQlog this app failed to launch.
Remove and reinstall didn't resolve the issue.
BBQlog still doesn't work (or the update ff'd things up?)



Sent from my GT-I9100 using Tapatalk 2
 
  • Like
Reactions: RoadXY

EndlessDissent

Senior Member
Oct 18, 2010
3,373
958
Chicago
I wonder if this will be officially added in an upcoming Jelly Bean update or if we'll have to wait until Key Lime Pie. I also wonder what Apple's response might be. What if the next iPad has multi-user ability before Google gets it into Android? Will Apple magically conjure up a patent rendering all of Google's work useless? This feature would be a huge advantage for Android tablets. With lag and apps becoming steadily less of a concern for Android and all the people getting tablets as family devices, multi-user support may be the big differentiator Android needs.
 

Pnx

Senior Member
May 26, 2010
70
10
I have tested in a Rooted Stock 4.1.1 on a Nexus S.

It works, at first it go slower, in 2 mins go perfect. And you can use WhatsApp with 2 phone number... Once in each user account.

:cool:
 

cowsick

Senior Member
Oct 11, 2009
128
6
This will be very useful in schools with tabs

Sent from my GT-I9300 using Tapatalk 2
 

Napalm2

Member
Aug 7, 2007
12
34
If any android developer wants to start the HIDDEN user settings of any Jelly Bean ROM then you can use this function.

Code:
public void startUserSettingsActivity()
{
	Intent intent = new Intent();
	intent.setClassName("com.android.settings", "com.android.settings.Settings");
	intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT, "com.android.settings.users.UserSettings");
	try{
		Resources resources = getPackageManager().getResourcesForApplication("com.android.settings");
		int user_settings_title = resources.getIdentifier("com.android.settings:string/user_settings_title", null, null);
		if(user_settings_title != 0){
			intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT_TITLE, user_settings_title);
			intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT_SHORT_TITLE, user_settings_title);
		}else{
			Log.d("Settings Launcher", "Cannot find resource user_settings_title");
		}
	}
	catch(NameNotFoundException e){
		// ignore, default title if we can't find the resource.
	}
	startActivity(intent);
}

Napalm
 
Last edited:

VipSaran

Senior Member
Dec 11, 2007
85
16
Works great on Nexus 7 (rooted with stock JB), but the access to settings is full for the 2nd account -- see the attach.
 

Attachments

  • Screenshot_2012-08-04-10-59-58.jpg
    Screenshot_2012-08-04-10-59-58.jpg
    20.4 KB · Views: 202

Raghav Sood

Senior Member
Aug 4, 2012
63
100
New Delhi
www.appaholics.in
GUI App For Managing Users

Hi everyone,

First post on XDA.

I've written an app that essentially provides you with a GUI frontend for creating, viewing and removing users on Jellybean.

It requires root. It works even when not connected to a computer. New user's name's can contain spaces. Deletion of Primary user is disabled.

Free version: play.google.com /store/apps/details?id=com.appaholics.um
Donate version (no different from free, just in case you're feeling generous): play.google.com /store/apps/details?id=com.appaholics.umd

I'm not allowed to post URLs yet, so just remove the spaces.

As of posting, the apps hadn't been indexed yet, so you will get a Not Found error when going to the link. Please wait a bit and try again.

Any feature requests/suggestions are welcome.

Hit thanks if you like the app.

EDIT: Free version seems to have been indexed. Donate one, not so much.
EDIT2: Both version are available now
 
Last edited:
  • Like
Reactions: nkhs9412235

Top Liked Posts

  • There are no posts matching your filters.
  • 66
    For Android 4.2 Try this:

    FYI, since I stumbled across this looking for 4.2 and it came up because *not 4.2* is in the title, in case it's not here - 4.2 how to (possibly depending on build)

    adb shell
    su
    pm get-max-users (should show 1)
    setprop fw.max_users (some number above 2, I chose 7)
    pm create-user someusername here

    repeat the create-user as wanted.

    That popped up a "Users" tab for me after creating 1 that allowed me to create more.

    Your mileage may vary, and I did this on a different device so I may just be useless ;)

    Or this:
    For those who doesn't to worry to do it wrong I've coded a app of this procedure.

    Link: http://xdaforums.com/showthread.php?t=2187934

    See you!

    Sent from my GT-I9000 using Tapatalk 2

    Only bug I noticed was that in order to switch from any non primary user back to the primary(as far as using a visual UI), your lock screen *has* to be in landscape mode. Easy enough I guess so have at it!

    Thanks to everyone keeping the info flooding in on this subject. Hopefully KLP will have this baked in for phones as well.



    Original Method for 4.1 below:


    Been featured on the below sites!



    *Insert Disclaimer Here*
    Also, I have navigation bar mod on my 7/30 build of CM10, so ignore those.
    This should work on any Jellybean Android 4.1.x ROM built from AOSP, like CM10, AOKP, etc.
    Please read this entire post before doing any of this!
    This feature is now in AOSP fully as of Android 4.2!!



    After reading about the recent discovery of multiple user code being in JB, I decided to mess with it.

    Here's a video:
    http://www.youtube.com/watch?v=OfHWV_-X3a8&hd=1

    Manual method(fun, makes you feel like a hacker):
    First, we need to enable this.
    Go to Terminal Emulator and type these in:

    Code:
    su
    Code:
    pm create-user test
    Hint: "test" being the name of the 2nd user. You can change that to a name, or whatever.

    Now, we've created a 2nd User on your JB 4.1 device. Hold the Power/Lock button to bring up the power menu, and you should see this:
    42575122-4df4-e952.jpg


    From here, you can switch to the 2nd user, which will have a fresh homescreen, and show you the tutorial. Settings are limited to this user, as seen here:
    42575122-4f35-f7d4.jpg


    In case someone hasn´t figured out how to rename/change any usename, it's pretty easy.

    You only have to go to /data/system/users and edit the "userX.xml" file, where X is the user numer(0,1,2,...). The change the name between and to any other you like. For example, from guest to invitado. Save the file and reboot. It work well for me.

    P.S: If you don't know which user number has the one you wanna change, check out the userlist.xml file, which has the same path above.


    To remove this 2nd user from your phone, switch back to the primary user via the power menu, and go back to Terminal Emulator.

    Type this in:
    Code:
    su
    Hint: only if it isn't still running from before
    Code:
    pm remove-user 1
    Hint: primary user in this case is 0, 2nd is 1, so on and so on.

    Now you should only have one user, and your Power Menu should not have the ability to switch to a new user anymore.

    To double check, go back to the Terminal Emulator and type this:
    Code:
    su
    Code:
    pm list-users
    Should say:

    Code:
    Users:
            UserInfo{0:Primary:3}

    Easy Method:

    XDA member Raghav Sood has an app that does all of the above for you.
    http://xdaforums.com/showthread.php?t=1824066


    At the moment, this isn't extremely usable, ie texts from the primary user's still show in the 2nd test account. But, with the right launcher installed, and hiding the apps from the drawer on the 2nd account, this can still be usable in its current form.

    My suggestions:
    1.) Label the 2nd user Guest
    2.) Use Nova or Apex as the launcher for the Guest user, and hide all of the apps you want(texts, social media, email, etc) from the app drawer.
    3.) Setup a security lockscreen on the primary user to prevent Guests from gaining access(each user has different lockscreen settings)

    You can read more about this here:
    http://phandroid.com/2012/07/31/cod...oid/?utm_medium=referral&utm_source=pulsenews and on their source link.


    Feedback:
    http://goo.gl/AnXT7 ;)

    P.S. - This was done by modifying code in the Settings app, and i did submit the patch to CM Code-Review(http://goo.gl/PU4wQ), it ins't in yet as it's buggy.
    We've tested it pretty extensively, and it's insanely broken.

    I also submitted a patch to AOSP related to this(http://goo.gl/u0WbN), and it got rejected, due to what i said.
    The below line comes a developer at google, who's been working on this since more than a year:
    "Multi-user feature is not ready for deployment. Bad things will happen if you use it in its current state!"







    I have it working om my GSM GN.

    I found that in the second account there are apps that I don't have in the primary account, for example: Google Wallet, Play Magazines, Play Books and Play Films. (I'm from Belgium)
    Oh, they disappeared as soon as I signed in with my Google account. :(

    If you are on the second user, most of the data from the primary user is hidden (you can not acces it).
    For example:
    - photo's
    - unlocked levels in Angry Birds
    - music
    - contacts
    - google account
    - clipboard
    - home screen

    But there are a few exceptions:
    - all the apps are there, as if they were just installed
    - the recent apps menu
    - the use-app-as-default-setting (I don't know the official name). For example: if you set Apex as default in the Guest account, it will also be default in the primary account.
    - your messages (!)



    Ps: this was my first post on xda :)
    I hope you find it usefull.

    Sent from my Galaxy Nexus using xda app-developers app

    Sent from Mr. Z's Galaxy S3.
    6
    So since nobody else seems to have wanted to try it out, I have decided to take the plunge and try renaming and deleting the Primary user on my Nexus S. Wish me luck!! I'll post the results soon.

    ---------- Post added at 05:17 PM ---------- Previous post was at 04:44 PM ----------

    RESULTS:

    Renaming:

    No ill effects noticed. Phone worked fine.

    Deletion:

    Not possible. Turns out, you can't delete the currently active account, and root doesn't work across user accounts so I can't delete it from others. I even tried re rooting the device with the new accounts. Doesn't work.

    So I decided to make it as if I'd deleted the primary user. I went to userlist.xml in /data/system/users, and I deleted the 0, AKA Primary, user.

    Do not do this. Bad things happen. When I rebooted the device, it got stuck on the multi colored X boot animation. Checking the LogCat revealed that my deleting the user had caused multiple Null Pointer Exceptions. Either way, the system failed to boot.

    Fixing it turned out to be simple enough. I downloaded the stock image from Google, and even though the device couldn't boot, adb was still accessible.

    So type:
    Code:
    adb reboot boatloader
    to get your device out of the hung boot operation. Then use the flash-all.sh script given with the Stock image to flash it to your phone again. You'll now have a root-less factory condition phone.

    In light of the near brick condition of deleting the Primary user, I'll be disabling that option completely in my app in an upcoming upgrade. Renaming will still be permitted. If anyone wants anything else included in the upgrade, please reply to this post with a suggestion within the next 24 hours.
    6
    Uploading a video now of it.

    Edit: Video https://www.youtube.com/watch?v=OfHWV_-X3a8&feature=youtube_gdata_player
    Sent from Mr. Z's Galaxy S3.
    6
    FYI, since I stumbled across this looking for 4.2 and it came up because *not 4.2* is in the title, in case it's not here - 4.2 how to (possibly depending on build)

    adb shell
    su
    pm get-max-users (should show 1)
    setprop fw.max_users (some number above 2, I chose 7)
    pm create-user someusername here

    repeat the create-user as wanted.

    That popped up a "Users" tab for me after creating 1 that allowed me to create more.

    Your mileage may vary, and I did this on a different device so I may just be useless ;)
    4
    I have it working om my GSM GN.

    I found that in the second account there are apps that I don't have in the primary account, for example: Google Wallet, Play Magazines, Play Books and Play Films. (I'm from Belgium)
    Oh, they disappeared as soon as I signed in with my Google account. :(

    If you are on the second user, most of the data from the primary user is hidden (you can not acces it).
    For example:
    - photo's
    - unlocked levels in Angry Birds
    - music
    - contacts
    - google account
    - clipboard
    - home screen

    But there are a few exceptions:
    - all the apps are there, as if they were just installed
    - the recent apps menu
    - the use-app-as-default-setting (I don't know the official name). For example: if you set Apex as default in the Guest account, it will also be default in the primary account.
    - your messages (!)



    Ps: this was my first post on xda :)
    I hope you find it usefull.

    Sent from my Galaxy Nexus using xda app-developers app