Hacker News new | ask | show | jobs
by JulienSchmidt 3415 days ago
Time to mention https://microg.org/ / https://news.ycombinator.com/item?id=12864429 again. It's a FLOSS re-implementation of Google Play Services. It offers e.g.:

* Optional completely offline geo location service via an on-phone database which often preserves battery and even works when no internet access is available. Online backends using e.g. Mozilla Location Service are also available

* The often unavoidable Push notifications via Google Cloud Messaging while only sending minimal identifying data

* The Analytics (tracking) and Ad parts are simple stubs which avoid app crashes but do nothing else

3 comments

Anybody have the lowdown on what currently does/doesn't work with this? Specifically, which sort of apps work and which don't?

Does this clone the google services framework or just google play services?

https://github.com/microg/android_packages_apps_GmsCore/wiki...

Wearable and Cast are often missed APIs. Contacts and Calendar sync is also not implemented yet. I can't think of any app that I personally used that doesn't work. That includes Google Maps and the Play Store. There were some crashes in the past, but microG became a lot more stable since then. However, I completely rely on my own infrastructure for mail and contacts / calendar sync (using DAVdroid).

HERE WeGo (https://play.google.com/store/apps/details?id=com.here.app.m...) is a good alternative to Google Maps. Does not need Google Services installed and you can download the maps to your device, even to an external sd card.
Second this. I used it on my iPhone.
it sure needs LOTS of permission, gonna go try it anyway :D
A lot less then Google Maps actually ;-) Just compare permissions view details under https://play.google.com/store/apps/details?id=com.google.and... and https://play.google.com/store/apps/details?id=com.here.app.m....

Permission Google Maps has in addition to HERE WeGo:

[Device & app history] retrieve running apps

[Identity] add or remove accounts

[Contacts] modify your contacts

[Phone] directly call phone numbers [Phone] write call log

[Microphone] record audio

[Other] download files without notification

[Other] view configured accounts*

[Other] send sticky broadcast

[Other] disable your screen lock

[Other] measure app storage space

[Other] control Near Field Communication

[Other] read sync settings

[Other] run at startup

[Other] use accounts on the device

[Other] toggle sync on and off

[Other] read Google service configuration

Permission HERE WeGo has in addition to Google Maps:

[Identity] read your own contact card

[SMS] send SMS messages

[Other] pair with Bluetooth devices

[Other] access Bluetooth settings

[Other] change network connectivity

[Other] uninstall shortcuts

> * Optional completely offline geo location service via an on-phone database which often preserves battery and even works when no internet access is available. Online backends using e.g. Mozilla Location Service are also available

Sounds really cool!

> * The often unavoidable Push notifications via Google Cloud Messaging while only sending minimal identifying data

Can you elaborate, please?

> Can you elaborate, please?

Are you asking how it is unavoidable or how it is sending only minimal identifying data?

I'm asking more about what "Push notifications via Google Cloud Messaging" are and why they are unavoidable. I think I will be able to infer what minimal identifying data is required from that.
You can probably find a more accurate description somewhere else, but here is a TL;DR version:

In order to receive notifications without a push notification service like Google Cloud Messaging (GCM), every app would have to

a) poll for updates, meaning that the app establishes a connection repeatedly and asks a server for update. In the worst case, there is a delivery delay as big as the period between two polls. That also means that the app has to be running and thus the phone "awake" every time an app tries to get updates

or

b) keep a connection to the server open. That also requires that the app is running and sending something like keep-alive commands to avoid timeouts

In both cases it means that it doesn't scale at all. The phone would be awake a lot just to fetch updates, it would drain the battery and cause unnecessary much network traffic. Unnecessary, since there is a better solution: register with a 3rd-party service that handles the updates instead, in the case of Android mostly GCM. It basically works as follows: GCM keeps one connection to the Google servers open the whole time. Apps on the phone can register with the GCM client. Instead of sending the updates directly to the app on the phone, the app backends send the data to google instead, which then sends it with very little delay and overhead to the GCM client on the phone, which then in turn wakes up the respective app and passes the payload data.

If all these services just use GCM instead of handling notifications on their own, using WhatsApp, FB Messenger, Telegram, Signal, Skype, WeChat, Line and Viber at the same time is suddenly not such a bad idea anymore.

GCM it often unavoidable, since very little apps support alternatives to it. E.g. in China several alternatives exist, since connections to Google are blocked. I think also Amazon runs its own push notifications service.

I bet it's not TL;DR. :) Because if I asked something and got a reply, not reading it would be disrespectful to the author, no matter how long the reply is.

> In order to receive notifications

Your answer would be absolutely perfect if you added "from a remote server". I was slightly confused, wondering what kind of notifications an app is supposed to receive.

Thanks for answering. Your answer is great.

Also, now I'm curious how they do it while sending only minimal identifying data. I was wrong thinking that it would be immediately clear. I wonder if TheCoreh is correct about proxying.

Oh, and you don't need to answer if you don't want to. I can do my own research.

Didn't some early Android apps poll? I remember complaints about Android phones using up people's monthly data allowance in the first week or so...

I had to turn data off completely just to run the phone.

Google offers a push notification system like Apple's, with centralized servers, to efficiently deliver notifications to all users without having apps constantly running in the background killing battery life.

It is unavoidable, I assume, because otherwise you won't get notifications, which defeats the purpose of several apps, and they can't provide a fully independent alternative server because it would require integration on each app developer's backend side. "Sending minimal information", probably means they proxy the requests to avoid giving geoip info to Google about you.

Can I use Signal under this setup?
Copperhead maintains a fork called Noise available in their F-Droid repository

https://fdroid.copperhead.co/repo

The repo's signing key fingerprint (sha256) is

    F0 D4 EB 11 93 AD 82 FE B2 24 BD 11 74 B6 FB
    D8 9A 39 D8 ED 98 8C 9F FF 2A DD 0D CD 1C 4E
    27 1B