-1

I'm using CyanogenMod 12.1 (Rooted)

I want to set up a multi User system with me as the admin. I want all or some of my root apps to run in the background. I don't want the root apps to be shown to the normal user if posssible.

Note: I need to run some apps in the background for datalogging and security, and scanning purposes. For Example I want to run a Linux Distro and some other apps that run Python Scripts. I figured this feature might be available cos it is in Windows PC and Linux. These apps autostart without user inetraction in the admin account. They have a GUI however.

If this is not possible then please suggest me alternate ways like locking or hiding the apps.

Is this possible at all or does the User isolation system make it hard or impossible.

Any workarounds will be OK too.

Thanks.

4
  • Your query seems unclear to me. If you're setting multi-user system, then other users wouldn't be able to see the apps installed in your user account (user ID 0). What's the problem then? Why do you want to hide apps now? (Note that an app cannot be forcefully run in background.)
    – Firelord
    Commented Feb 21, 2016 at 0:42
  • Please comment on why this is downvoted? I made sure it wasn't a duplicate.
    – Wally
    Commented Feb 21, 2016 at 0:43
  • @Firelord I actually want to run some python scripts and some other services in the background of other users. If this is not possible I'd like to know about the workardound. One of the main conditions however is that other users should not get root.
    – Wally
    Commented Feb 21, 2016 at 0:51
  • @Firelord So in Android or CM User system the apps are completely isolated and Admin or Owner can't make processes run on the other user accounts? Unlike in Linux and Windows desktops?
    – Wally
    Commented Feb 21, 2016 at 0:57

1 Answer 1

2

I don't know what you mean by "for all users", but what you're describing is just how apps work on a multi-user system. Say you have two users A and B on a tablet. A unlocks the lock screen and starts an app, which has a service which runs in the background to do something. Now A locks the screen again: his app is still running in the background. Now B comes along and unlocks the lock screen into his home screen. A's app can keep running in the background, completely separated from whatever B is doing on the screen.

The only interaction between A's background app and what B is doing is if B uses enough system resources to cause Android to start shutting down background processes to. This acts much the same way as a background app on a single-user system: if the system needs to reclaim resources, it'll stop those background services and reclaim their processes first.

So it doesn't matter if you're the owner user, or if the app in question has root privileges: your app can run in the background just the same, regardless of whether you're using the screen or somebody else is.

4
  • Interesting! So there is neither control nor security. For example I switch users to connect to Tor or a VPN and keep accounts seperated. The other user apps will still be accessing the internet and sending all the data they want probably through the VPN session I setup or directly. Either way is bad.
    – Wally
    Commented Feb 21, 2016 at 10:08
  • What about the processes of programs that always run in the background. Like Daemons. Like System Apps. I mean apps like SuperSu with deep integration and are never shut off. Will such processes keep running?
    – Wally
    Commented Feb 21, 2016 at 10:10
  • BTW I am not talking about online accounts. I'm talking about System Users that seems to create a new empy page without all the other users apps installed. Also there is no sign of other users apps running.
    – Wally
    Commented Feb 21, 2016 at 10:16
  • @Wally System apps can choose whether to spawn another instance or not for each user. They could also choose to shut down when users are changed. I've written code doing multiple variations of this before. Commented Feb 25, 2016 at 8:29

You must log in to answer this question.

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