Uncategorized

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

23

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?

Chris Chavez
I've been obsessed with consumer technology for about as long as I can remember, be it video games, photography, or mobile devices. If you can plug it in, I have to own it. Preparing for the day when Android finally becomes self-aware and I get to welcome our new robot overlords.

Official ASUS Nexus 7 Accessories Spotted With Date and Pricing – Dock, Travel and Premium Covers

Previous article

Android Overload: T-Mobile and Verizon Wireless Sign Spectrum Swap Agreement, Carbon Developer Provides Status Update on Twitter App, and More

Next article

You may also like

23 Comments

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

    1. 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.

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

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

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

  3. 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.

    1. 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.

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

  5. @ben, it’s never stopped them before

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

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

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

        1. it was a joke buddy no harm intended

          1. 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

        2. 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. :)

  7. 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.

  8. 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).

  9. “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.

  10. @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.

  11. 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!

    1. Well, it IS a Photoshopped image.

  12. 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.

Leave a reply

Your email address will not be published. Required fields are marked *