12

One of the nice features introduced in Android 4.2 Jelly Bean on tablet devices is the ability to create user accounts just like you do on desktop operating systems. However, as far as I can see, there doesn't seem to be a log-off option available anywhere that would result in e.g. stopping all processes initiated by a user.

The only standard option in the multi-user environments world I can see is switching between user accounts. In order to do that, all I need to do on my Google Nexus 7 tablet is lock the screen and then unlock it by hitting the hardware on/off button; on the screen that shows up you can select what user account you'd like to log in to.

This is quite important as I am worried the processes started by other users might have an impact on the performance of the device.

4
  • 4
    Actually you can "log off" a tad more easily than by hitting the hardware on/off button: swipe down from the upper-right corner, to expose the 3x3 panel of settings shortcuts; click the upper-left cell in the panel, which is a photo of you. That drops you to the "login" screen.
    – offby1
    Dec 20, 2012 at 20:24
  • Good point, offby1, I discovered that way of locking the screen AFTER I asked that question :-) Still, the issue remains about loging out and at the same time shutting apps and processes in an easy way. Dec 20, 2012 at 22:42
  • You are right about being worried. Other users' processes are indeed working in the background and hinder performance. I see it in the battery stats and in the list of active processes. Mar 17, 2014 at 7:26
  • Another point is that other users might have a lock protection which means whatever the solution might be, it needs to be independent of other users activities. Mar 17, 2014 at 7:32

2 Answers 2

4

The only way I found was to restart the device.

Be careful to not switch to other users after the restart. Once you switch to another user, his processes are initiated and continue working even if you switch back to your user - just like you said in the question.

Strange that Google haven't tackled this issue. Perhaps on a newer Android version 4.3+?

* This happens to me on my asus memo pad with Android 4.2.

7

In terminal emulator;

Become root

$ su

List users to get their ID. It's the first number listed, usually 11 for the first user. 0 is owner. Ie 11:user:10 & 0:owner:13

# pm list users

Stop the users execution instance (logoff)

# am stop-user <id>

Usually 'am stop-user 11'

You can't logoff the device owner, ID 0.

2
  • 2
    Requires root access :( Sep 1, 2015 at 4:51
  • Is there any relevant API exposed in ActivityManager class for system apps as well ? Jun 8, 2018 at 8:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .