GET THE APP:  CURRENTLY HOT:   Android Fire TV Fire TV Forums HTC One M8 Moto 360

Code Found In Jelly Bean Reveals Multiple User Accounts Coming Soon to Android

If Android ever hopes to be make the move towards becoming a real desktop OS (this has to be in the back of Google’s mind), it’s going to need one thing first: multiple user accounts. This has long been one of the items at the top of my “Things That Grind My Android Gears” list. Towards the wee hours of last night, we received a tip from our developer friends after a discovery they made, revealed some pretty interesting code hidden deep inside Android 4.1 Jelly Bean AOSP.

What they found were clues that Google has been doing more than just toying around with the idea multiple user accounts on Android, and they’ve actually been busy incorporating code all over the OS that makes its future all but certain. Our developer Steven put together a nice little walk through and if you’re handy with ADB, you can see it for yourself.

Exploring Jelly Bean’s Unfinished Multiple Profile Switching Discovery and Testing Performed by Kevin Barry of TeslaCoil Software.

Commands (using ADB Shell)

pm = PackageManager

am = ActivityManager

 

  • pm create-user test (creates a user, ‘test’ in this example)
  • am switch-user 1 (switches to user ‘1’, which is ‘test’)
  • am switch-user 0 (switches to user ‘0’, which is your original configuration)
  • pm list-users (lists all users on current device)
  • pm remove-user 1 (removes the user ‘1’,which is ‘test’ in this example.  Note that create-user takes a string name while remove-user takes an integer)


Things To Note:

  • App settings are in /data/user/0/ with /data/data symlinked to it for backwards compatibility
  • Some system settings are in /data/system/users/0/ rather than just /data/system/
  • You can view 2011 commit messages in AOSP for all of these commands
  • Visually you can not determine what user is currently active.
  • Notifications and recent apps do not clear (remember… unfinished) and causes confusion to what user you’re on and will switch to whatever user that is running that particular app you click on.
  • Static wallpapers do not switch per user (seems to be shared) but live wallpapers do switch with each user.
  • Encrypted apps, which is all paid apps from the Play Store in Jellybean, will FC between users.  For example: if you run a paid app from one user on a different user that did not originally install the app, you will get the following error: “E/AndroidRuntime( 8707): Caused by: java.lang.ClassNotFoundException: com.levelup.beautifulwidgets.BeautifulWidgets”
  • Apps all have different settings which allows you to login or have different settings per user.  (even gmail)

Example Shell (ADB):

shell@android:/ # pm list-users

Users:

UserInfo{0:Primary:3}

UserInfo{1:test:0}

Pretty amazing find, right? The boys at Android Police made a similar discovery, giving a timeline of commits pushed to AOSP dating as far back as April 14th, 2011, all the way to March 28th, 2012. This shows Google has been working on UA’s for awhile now. All the pieces are in place. Multiple user accounts are coming to Android. The question is no longer if — but when. Excited?




  • YellowSnow

    Lets hope they get a patent before you-know-who calls it their own.

    • Ben Kapferer

      Wouldn’t matter either way; Microsoft already does it with Windows (and the numerous Linux distros do it too, I believe), so I don’t think “you-know-who” would have much of a fighting chance.

      • Big_EZ

        Slap the word mobile on there and all that goes out the window.

        • spicymeatball

          Your absolutely right! Just because it’s mobile the whole game changes. Plain stupid, but they better patent it anyway.

  • dbest180

    Will make a larger size tablet and devices much easier to implement and distribute.

  • zedthegreat

    Brilliant. No need om my phone (it is MY phone), but tablets are social. Me and my girlfriend dont have one each – that would be mad.

    • jbo1018

      Still with your phone, someone on AP mentioned this, you could create a guest mode that only has WiFi and a couple things someone who wanted to use your phone real quick might want to use. That way all your personal stuff is locked up, your settings can’t be changed, and hopefully there would be a way to keep them from calling Abu Dhabi.

  • surethom

    Yes, Finally. Hopefully with slightly bigger tablets coming soon 11.6″ Android may? soon be able to replace you windows PC???????

  • GoogleIt!!!!

    @ben, it’s never stopped them before

  • NIGHTSCOUT

    FINALLY! I have been waiting for this since 2009! They finally realized that no one wants their wife or kids reading personal email……

    • onpoint G

      That’s right, how else are you going to hide your mistress lol

      • NIGHTSCOUT

        There’s other things that need to be kept secret besides the mistress.

        • onpoint G

          it was a joke buddy no harm intended

          • NIGHTSCOUT

            I know :) I just like the idea of having a secondary restricted account on my tablet, so that my kids can stop purchasing apps without my permission

        • https://plus.google.com/108596272537415356460/posts Jason Farrell

          Yeah… like the stuff I add to my Amazon orders at the last minute. “We don’t need that?! Why are you wasting money?!?! We only needed diapers!” A much more important secret. :)

  • http://claimid.com/155/ 155

    I’m going to have a profile called Garbage apps and install all the apps that harvest my personal information like facebook etc into that one so they don’t get anything.

  • Anthony Maciel

    Great find. And it looks like once you add a user, long pressing on the power button provides a UI for switching to the other users, so no command line is required after the initial setup. That’s at least the case on my stock JB Galaxy Nexus (customized ROMs very easily might take the code out unintentionally).

  • Vecdroid

    “Pretty cool right”? Sounds like that was typed from the hands of someone who has no clue of what the article referenced was talking about.

  • Matt Tanksley

    @Chris Chavez, this has been at THE TOP of my “Grinds My Tablet Gears” list since rumors started for the original Galaxy Tab. I thought this would be the perfect slap in the face of the $900 iPads, a cheap(under $250) tablet that supported multi-user. That’s what will get a tablet in my household. I’m not buying a tablet for my wife, son and myself at these prices. If I’m gonna drop 200 ducks on it, it better be able to be shared, cleanly.

  • http://www.facebook.com/profile.php?id=662287389 JB McDaniel

    LOL! I love that the face in the viewfinder is the exact same face as the account picture but it says “Sorry don’t recognize you”! Android, I love ya!

    • http://twitter.com/BIGELLOW Bob Bigellow

      Well, it IS a Photoshopped image.

  • http://www.facebook.com/profile.php?id=702065543 Michael Wand

    This is great to see built in, but for anybody wanting this NOW, there’s an app called SwitchMe. You have to be rooted, but it works great and does exactly this.