Graphs

Conclusion

  • On my Pixel 8, stock seems to offer better battery life compared to GrapheneOS, with a mean SOT of 06:51 on stock, versus a mean SOT of 06:03 on GOS.
  • I can't be sure where the difference in battery life is coming from, but it may be due to stock's adaptive battery function that is not available on GOS.
  • However, the slight increase in battery life on stock is not worth the amazing privacy and security benefits that GOS provides over stock, so I will be sticking to GOS.

Context

  • I wrote a similar post to this one based on the tracking and analysis I did while I tested out stock Android before switching to GrapheneOS (Lemmy), and I wanted to complete my battery tracking by also seeing how GOS battery life compares to stock Android.
  • Similar to my testing while on stock, I used my phone as normal on GOS, with the below configurations:
    • LTE only (I don't have a 5G plan)
    • 120hz refresh rate
    • Owner user, with separate work profile managed by Shelter
    • Sandboxed Google Play Services enabled for both main profile and work profile on the owner account
    • Dark mode
    • Bluetooth on, always connected to my Galaxy Watch 6 Classic and very often connected to other BT audio devices
  • With the above configurations, I used the phone normally, then took screenshots once I got the low battery warning notification at 20%. I started including the screenshots for the per-systems screen after seeing that the SYSTEM (IDLE) stats would be useful to track, but since I only have these datapoints for 11 charging cycles on GOS, I've excluded them from the analysis, although I am including the per-systems battery usage screen for reference.

Personal usage patterns & use-case

  • I try to achieve a balance between privacy and convenience, so I am using Sandboxed Google Play Services and only use one user. However, I minimize unnecessary permissions and try to install only FOSS apps on my main profile while installing as many proprietary apps into my work profile as possible.
  • The way I used my phone across stock Android and GOS was quite similar, although I did try to take advantage of GOS features whenever possible, such as enabling memory tagging, toggling off network permissions for apps that don't need them, etc.
  • Depending on your privacy threat model, you can use a more strict setup without sandboxed Google Play Services, which may actually decrease battery life due to constantly active web sockets, or you may use multiple users to compartmentalize different apps into different profiles, which may save more battery versus my compartmentalization via Shelter.

Notable observations

  • Although I got less SOT in general using GOS, I was still able to push the SOT past 9 hours with an idle time of 26:58 on my heaviest day (link), which is amazing battery life.
  • Streaming music on Spotify seems to be a huge battery hog, and other Pixel users have noticed the same (link). The worst SOT I got, which was 02:13, seems to be largely due to at least an hour of music streaming on Spotify.
  • On a related note, the background time tracking of Spotify is unreliable, as there were days when I was streaming music for about an hour (link), which led to a 10% battery decrease, but the battery usage screen says Spotify was active in the background for less than a minute (link).

Data & screenshots

| date | OS | SOT (h) | main | full_apps | full_systems |
| ---------- | ------------- | ----------- | --------------------------------- | ------------------------------------ | --------------------------------- |
| 2024-02-21 | Stock Android | 07:26 | link | link | - |
| 2024-02-24 | Stock Android | 06:59 | link | - | - |
| 2024-02-26 | Stock Android | 05:07 | link | - | - |
| 2024-02-28 | Stock Android | 05:22 | link | link | - |
| 2024-03-02 | Stock Android | 03:56 | link | - | - |
| 2024-03-04 | Stock Android | 05:10 | link | - | - |
| 2024-03-05 | Stock Android | 07:16 | link | link | - |
| 2024-03-06 | Stock Android | 04:56 | link | link | - |
| 2024-03-08 | Stock Android | 04:31 | link | link | - |
| 2024-03-09 | Stock Android | 05:26 | link | link | - |
| 2024-03-11 | Stock Android | 08:06 | link | link | - |
| 2024-03-12 | Stock Android | 10:24 | link | album | - |
| 2024-03-14 | Stock Android | 02:33 | link | link | - |
| 2024-03-16 | Stock Android | 04:28 | link | link | - |
| 2024-03-18 | Stock Android | 03:55 | link | link | - |
| 2024-03-20 | Stock Android | 06:34 | link | link | - |
| 2024-03-22 | Stock Android | 05:41 | link | link | - |
| 2024-03-23 | Stock Android | 07:35 | link | link | - |
| 2024-04-16 | GrapheneOS | 04:16 | link | link | - |
| 2024-04-18 | GrapheneOS | 05:29 | link | link | - |
| 2024-04-19 | GrapheneOS | 04:20 | link | link | - |
| 2024-04-21 | GrapheneOS | 03:04 | link | link | - |
| 2024-04-23 | GrapheneOS | 05:12 | link | link | - |
| 2024-04-24 | GrapheneOS | 02:13 | link | link | - |
| 2024-04-26 | GrapheneOS | 04:56 | link | link | link |
| 2024-04-27 | GrapheneOS | 09:03 | link | link | link |
| 2024-04-29 | GrapheneOS | 05:56 | link | link | link |
| 2024-05-01 | GrapheneOS | 04:03 | link | link | link |
| 2024-05-03 | GrapheneOS | 07:13 | link | link | link |
| 2024-05-05 | GrapheneOS | 03:20 | link | link | link |
| 2024-05-08 | GrapheneOS | 08:45 | link | link | link |
| 2024-05-11 | GrapheneOS | 04:27 | link | link | link |
| 2024-05-13 | GrapheneOS | 06:09 | link | link | link |
| 2024-05-15 | GrapheneOS | 02:56 | link | link | link |
| 2024-05-16 | GrapheneOS | 04:45 | link | link | link |

SOT = screen on time, or something else? It's not explained in the OP.

Sandboxed Google Play Services enabled for both main profile and work profile on the owner account

You have two instances of sandboxed Google Play running at all times. That's likely your culprit. If you weren't using that work profile and just used the owner profile as is, with sandboxed Google Play, I think your results would be substantially different.

@Foggy @Graphene1

Apologies, I assumed that it would be clear that SOT would mean "Screen-On Time" within the context of battery consumption analysis. I should've clarified.

@matchboxbananasynergy

Thank you for your insight. That is true, I always have two instances of GmsCompat running at all times. I settled on my current setup since it allows for maximum compatibility by using sandboxed Google Play on both the main and work profile, while giving me added privacy by allowing me to use Shelter to compartmentalize my proprietary apps separately and being able to freeze them while not in use.

But as stated in my conclusion, although my current setup may result in slightly lower SOT compared to stock, the slight decrease of battery life is completely worth the additional protection features offered by Graphene.

I also settled on compartmentalization via Shelter in one owner profile versus compartmentalization via different user profiles, because although this setup results in increase of attack surface, I often need to be able to selectively share data from a trusted app to a proprietary app.

Some examples would be sharing a photo via a proprietary messaging app to contacts that are not on Signal, or copy-pasting banking account information received from Signal to a proprietary banking app.

    Vagabond8630 Google Play services uses a significant amount of resources and running 2 instances of it will reduce battery life significantly compared to running 1 instance. GrapheneOS out-of-the-box will have much better battery life and it should still be better if you're comparing a single instance of sandboxed Google Play to the stock OS. This fully explains why you have lower battery life.

    @Vagabond8630 If you post about this elsewhere, please make sure to clearly explain you're running 2 instances of Google Play services on GrapheneOS and that doing that will clearly reduce battery life particularly since you have 2 connections to FCM which could mean that FCM is using nearly 2x as much battery life if their checks aren't getting close to synchronized in practice.

      I can't be sure where the difference in battery life is coming from, but it may be due to stock's adaptive battery function that is not available on GOS.

      Not really, GrapheneOS essentially has the adaptive battery functionality without the branding. We have the standard power usage restrictions fully enabled, unlike AOSP where they aren't enabled. It simply means things work the same as the stock OS and they need to be properly written to handle the battery restrictions including requesting unrestricted battery mode if they require it to do their own push without Google Play, etc.

      GrapheneOS Google Play services uses a significant amount of resources and running 2 instances of it will reduce battery life significantly compared to running 1 instance. GrapheneOS out-of-the-box will have much better battery life and it should still be better if you're comparing a single instance of sandboxed Google Play to the stock OS. This fully explains why you have lower battery life.

      This does not explain the lower battery life if he also used the work profile on stock OS, because he would also have 2 running instances of Google Play Services.

        balance3767 That is incorrect. On Stock, Google Play Services is a highly privileged application that oversees everything on the device. If you use multiple profiles on GrapheneOS, you're not using multiple instances of it, it's one instance. The reason it's 2 on GrapheneOS is because they're sandboxed in the same way as other apps, so you have to run multiple instances of the app just like with any other app.

        GrapheneOS

        Google Play services uses a significant amount of resources and running 2 instances of it will reduce battery life significantly compared to running 1 instance. GrapheneOS out-of-the-box will have much better battery life and it should still be better if you're comparing a single instance of sandboxed Google Play to the stock OS. This fully explains why you have lower battery life.

        Thank you very much for your insight. That seems to make sense on an intuitive level. I may try testing out the hypothesis by separating the proprietary apps via another profile that fully shuts off.

        It seems that the compartmentalization options are:

        1. None - Keep everything on the owner profile, with 1 instance of GmsCompat running at all times
        2. Via work profile - Compartmentalize with the work profile, with 2 instances of GmsCompat running at all times
        3. Via user profiles - Compartmentalize with the work profile, with 1 instances of GmsCompat running per profile, assuming notification relay is deactivated for non-user profiles

        Are there any other possible compartmentalization options?