unwat First things first, thank you for your long reply.
I totally understand the fact that being able to read the source code is a great benefit.
And of course, even if its a big app, I am sure they are safe if they have over 10k stars on github and so.
I am also pretty happy about storage scopes and use practically everywhere. Thank you for bringing that one up too.

CoffeeTime03 If checking or blocking is not possible and it is not gonna be implemented, is there an alternative to GMS to handle app notifications?

I also forgot to mention that maybe there is a way to have microG and use that instead on a different work profile but I am not sure.

unwat That shouldn't be possible unless Google Play Services is somehow caching and serving those ads. Can you provide examples of apps that's happened with?

Please try "Photo resizer" from Seelye Engineering. An ad is displayed upon entering the app regardless of its network limitation.
While I couldnt get it to work with apps from other people (archero, WPS office), the same thing happened with other apps from the same company so I am assuming it has something to do with their implementation.
While a simple fix would be just using other apps, I would still like to know why something that shouldn't be possible is actually happening.
It is NOT hardcoded like "DroidEdit Free", where it shows you about its pro version regardless of network status.

    CoffeeTime03 microG and use that instead on a different work profile but I am not sure.

    Oh. I didn't think of that because even with MicroG, notifications still go through Google.

    CoffeeTime03 Please try "Photo resizer" from Seelye Engineering. An ad is displayed upon entering the app regardless of its network limitation.

    I checked with NetGuard, and you're right, the ad is coming from Google. Tracking with NetGuard, the Photo Resizer app doesn't access the internet, but Google Play Services does. I block ads via my VPN so I never see ads. I don't know how many apps do it this way. It's so gross Google enables this.

    unwat caching

    I just saw that I wrote this. That was the wrong word, my bad.

      unwat I checked with NetGuard, and you're right, the ad is coming from Google. Tracking with NetGuard, the Photo Resizer app doesn't access the internet, but Google Play Services does. I block ads via my VPN so I never see ads. I don't know how many apps do it this way. It's so gross Google enables this.

      This is exactly why I don't want the Play Store and Play Services on my phones. We simply cannot trust that Google isn't side-loading telemetry and other data through these channels.

      As you've mentioned before, it may seem unlikely for Google to do this, since most Android phones don't have the same fine-grained control as GrapheneOS, but they clearly are taking advantage of these back channels for whatever reason.

        unwat Oh. I didn't think of that because even with MicroG, notifications still go through Google.

        Yes, but being open source I doubt they would allow connections to display ads.

        unwat Anything is possible I guess, but not sure if it's practical or worth pursuing.

        I did not think that if performing IPC is part an AOSP api call, it should be quite easy to implement.
        Sure, maybe not read it but checking for sure.

          mythodical We simply cannot trust that Google isn't side-loading telemetry and other data through these channels.

          Agreed, kind of. In this case I'm not really surprised Google serves ads this way. Disgusted, sure, but not surprised. Pushing ads is good for the business side of things.

          However, I don't believe (but nobody but Google devs can really know) that Google will put so much effort into pulling data off our phones the same way. Nowadays, if they did something especially invasive, deceptive to spy on us, we'd find out about it, i.e. the incognito thing.

          Regardless, there's little we can do about app developers including other Google packages (here's a list of some) in their code. Many of these packages have fallbacks in case GMS isn't installed on a phone, according to GrapheneOS's lead developer. Google is being invited to the data party by every app dev who adds this stuff.

          Also, building off of what the lead dev said, it's totally possible other apps include libraries from other sources that aren't Google, but also share data to also serve ads, etc., including to circumvent network blocks. Those other libraries could also potentially be more invasive without needing GMS to do it. They just don't have the same "Big Tech" recognition as Google, so they could harvest data with less "restrictions" than Google because they're under the collective public's radar.

          Here's the lead dev quotes if you don't have Matrix (he wrote a lot, but I think it's worth recording here):

          strcat:

          Play services and the Play Store of course connect to their services, as do the Play SDK / Google libraries used by apps when Play services isn't present

          not having Play services doesn't mean Google apps / Google libraries can't connect to Google services....

          many of their libraries just choose not to implement fallback code for Play services being missing, but many of them do have fallback code, and there is no reason they can't do 100% of what can be done with sandboxed Google Play without it

          the whole point of sandboxed Google Play is that the Google Play apps are regular apps with absolutely zero special access or privileges and therefore there is absolutely nothing they can do which could not be done by the Play SDK / Google libraries in the apps using it

          that's the point of the approach

          this is a hard rule, not a simplification

          try Google Maps without Google Play

          it only uses Google Play as a way to integrate better with it

          for example Google Play supports compass calibration across apps, and Google Maps is the frontend to configure Play services compass calibration

          and without Google Play services, Google Maps doesn't bother supporting compass calibration, but it could, and their library for using the compass could fall back to using Google Maps if it's present but Google Play services isn't (it just doesn't in practice right now)

          same applies to everything else

          no reason the FCM library can't run a foreground service and ask for a battery optimization from each app using FCM

          no reason it couldn't detect other Google apps and reuse a shared connection via those apps without Play services

          they choose not to bother implementing fallback code for FCM

          of course, they obviously implemented fallback code for the Google Ads and analytics libraries

          they work fine in each app using them without Play services

          they aren't going to throw away ad income from people using apps using Google Ads SDK on devices without Google Play

          they don't care if you have push notifications though

          if they didn't use Google Play as a cudgel to force vendors to comply with compatibility / security standards as part of licensing it, they would probably implement support for sandboxed Google Play themselves without us needing to do anything

          it does not make business sense for them to not make it work to the extent possible on devices not integrating it other than as part of their licensing approach where [they] enforce rules on vendors through that

          Sorry for yet another super long post.

          CoffeeTime03 Yes, but being open source I doubt they would allow connections to display ads.

          Good point. I guess my only real issue with MicroG is that functionality could break at any moment if Google changes something. GrapheneOS's sandboxed Google Play paired with my VPN blocking ads limits Google's reach enough for me to be comfortable with it. I understand if others don't feel the same way.

          CoffeeTime03 I did not think that if performing IPC is part an AOSP api call, it should be quite easy to implement.
          Sure, maybe not read it but checking for sure.

          IPC is integral to Android in general. It's one way system services communicate while sandboxed.

            unwat IPC is integral to Android in general. It's one way system services communicate while sandboxed.

            What I mean is not removing IPC completely, that would be absurd indeed.
            I mean it would just be nice to have something similar to storage scopes but with IPC: Like being able to set that one app cannot communicate with another specific app or it can with only a small set of apps (system services + allowed)

              CoffeeTime03

              Maybe the devs can do that. I'm not as knowledgeable about Android source code as them, obviously, so only they can say whether it's possible or not.

              They have a scoped apps enhancement listed in the issue tracker that "is worth thinking about". Not sure if or how they'll do it, but presumably this would still enable Google to send ads via Play Services for people with sandboxed Google Play set up.

                mythodical This is exactly why I don't want the Play Store and Play Services on my phones. We simply cannot trust that Google isn't side-loading telemetry and other data through these channels.

                In general, you are right. But not everyone can do this. I would even say it is not practical. I almost gave up on using GrapheneOS or any Android for that matter as I was considering my next phone.
                If my old parents call me through one messenger App, I would better receive the call/notification in time. I never know when they need me urgently. With iPhones, I never had to worry about it, but Apple is for sure sucking up all Data behind my back (Ads is their next logical step to earn more money). A phone with Google Service would be even a bigger black hole for Data. So, not many choices left really...

                unwat They have a scoped apps enhancement listed in the issue tracker that "is worth thinking about". Not sure if or how they'll do it, but presumably this would still enable Google to send ads via Play Services for people with sandboxed Google Play set up.

                I quoted this post in the issue tracker as the last reply (11 days ago, I am not necroposting a thread from 2019) as that one reply was not really within what it has been talked about here.
                Let's see how it develops.

                CoffeeTime03 Please try "Photo resizer" from Seelye Engineering. An ad is displayed upon entering the app regardless of its network limitation.

                I managed to get the same beheavior with "Black Notes" after a minute of creating notes.

                6 days later

                unwat They have a scoped apps enhancement listed in the issue tracker that "is worth thinking about". Not sure if or how they'll do it, but presumably this would still enable Google to send ads via Play Services for people with sandboxed Google Play set up.

                I strongly believe this would have a bigger chance of being implemented if this thread made it to general instead of off topic.

                  CoffeeTime03

                  It's a big feature and it would require a smart solution.

                  I don't think they are ignoring this at all. It is just a super complicated thing to tackle. They'd want to do it right.