• General
  • disabling background data doesn't work in secondary profiles

Hi,

While disabling background data for an app works perfectly in the Owner profile, in secondary profiles this does not work as expected. Any app that you disable background data for is automatically granted the ability again upon restarting the device.

You can replicate it as follows:

  • start a secondary user session
  • go to any app under Settings / Apps / see all apps
  • go to the data usage section of the app and toggle "Background data" to off
  • end the secondary user session
  • restart the device
  • enter the secondary user again
  • go to the app and the "Background data" toggle will be back to on

I have the latest version 2024071600 installed and tested this on a variety of apps with the same result. I don't have stock OS Pixel to test to check if this is also an upstream problem.

notahuman literally any and all apps. Doesn't need to be FOSS. It's just in the settings under mobile data

notahuman My original description may not have been clear. In my list of steps, the second step entails the following:

  • Go to phone's System Settings, i.e. the gear icon for the OS, not a settings section from within an app
  • then go to the Apps section (third from the top within system settings)
  • then "See all XX apps", then pick any app

As @Graffiti7675 mentions, the issue is with any app, which includes both open and closed-source apps, and also includes GrapheneOS pre-installed apps too.

PixtTraveler Though "me too" postings in issues are not generally appropriate, in this case a clear statement of reproduction steps, similar to your first post in this thread, would probably be a positive contribution.

Also, if it is possible to state a motivation for wanting background data off for those apps, including it might be useful.

Please note that I do not speak for the GrapheneOS project, and what I have written is just my sense of what might be productive in the issue.

    de0u

    Hi, I'm not sure how to make the reproduction of steps more clear, apart from the clarification I made in my follow-up post (which led @Graffiti7675 to think I was talking about going inside a particular app). I can put them all together here:

    to replicate this behavior:

    • start a secondary user session
    • Go to phone's System Settings, i.e. the gear icon for the OS, not a settings section from within an app
    • then go to the Apps section (third from the top within system settings)
    • then "See all XX apps", then pick any app (could be third-party installed, OS-installed app, etc), or more than one app as you would like
    • go to the data usage section of the select app's system settings and toggle "Background data" to off
    • end the secondary user session
    • restart the device
    • after reboot, enter the owner profile, and then enter the secondary user profile again
    • go to the apps you had disabled "Background data" for, and you find that the toggle will be back to on

    As for the motivation for turning off background data for an app, I'm just describing a feature of Android that has been available for several years now. The reasons a user may want to disable background data are varied, but mostly to conserve data charges and increase battery life. One can find a number of articles describing this feature online (e.g. Tom's Guide, Android Authority, among others).

    As I mentioned above, this may be a general upstream issue of Android for secondary profiles -- I simply don't have another Pixel with stock OS to check whether it is a bug upstream or unique to GrapheneOS.

    • de0u replied to this.

      (We're talking about the same thing. You just described another way to get there from global settings, but it can be accessed from each app too.)

      And why one would want this off? Obviously, it's a data drain. In some countries we pay directly for data per month by use.

        Graffiti7675 I mistakenly referred to you in my post, but I meant the other poster that asked about the open-source app ( @notahuman ) -- my bad!

        de0u As for adding to github, I don't think that the aforementioned issue is the right one, since that's mainly talking about Google Play Services mirroring behavior with Google Services Framework and not about secondary profiles; so it would be better raised as a new issue. Also, I don't have a github account at the moment! :)

        But even before posting to Github, it would be good to confirm or deny if this is actually a GrapheneOS issue -- it may actually be an upstream bug in the Android code, in which case there is no "issue" with GrapheneOS at all. The only way to confirm this is for someone with the stock OS to try this on a secondary profile. Anyone in the community?

        8 months later

        I also noticed this behavior a couple of days/weeks ago. After a reboot in every secondary profile for every app background data usage is re-enabled while it was disabled before. It took some days to find out it happens whlie/after reboot.

        Regarding to this reddit-post it really seems to be an upstream problem, whether of AOSP in common or Pixel-specific. So I don't know if it makes sense to report this issue at the GrapheneOS github page? This reddit post was the only other report of this issue I could find except this thread here. I also searched for it at the Android Issuetracker without success. Or could it be helpful if the GrapheneOS-developers adress it to AOSP?

        rethinkdns provides per app wifi/cellular network access control basing on app bieng active, as well as basing on the screen lock. it doesnt solve the issue, but might acheeve the data saving goal others mentioned above.

        • harp replied to this.

          Onlyfun Thanks, but I already knew about RethinkDNS and other "workarounds" e.g. described in the reddit-thread. I'm rather interested in the best way to address this issue so it can be fixed as soon as possible. The fact, that this issue is neither listed at the AOSP issuetracker nor at the GrapheneOS issue-side and a web search only returns these two threads here and on reddit, let me think the Android- and also the GrapheneOS-developers are not yet aware of this - just like most users, I guess.

          On my pixel 8, the background data for apps is turned back on in both work profile and private space after a reboot. On 2025032500.