blog/source/_posts/microg-google-play-replacem...

6.7 KiB

title date lastUpdated tags
microG, a replacement for the proprietary Google Play Services 2019-01-12 00:00:00 2019-01-13 00:00:00

microG is an open source re-implementation of Google Play Service/Services Framework. While the core of the Android OS is still open source, much of the core apps, libraries and APIs are proprietary. Refer to this article for more info.

Adding to this issue is having all the APIs packaged into a single monolithic Play Services APK. So, all the APIs are loaded at all time, even though some APIs like Cast is not going to be used 24/7. This leads to memory bloat. Despite effort to split it into separate APKs, subsequent updates are seldom smaller. The current version (as of writing) is 40+ MB, while microG's implementation is merely 2.6 MB.

Despite the minimal size of microG, it's actually usable if you can shift away from the Google Apps (which is the goal of microG anyway). Most of us have grown to rely on services offered by Google and moving away from them is not easy. The good news is, there are pretty good alternatives out there.

microG requires Signature Spoofing to function on behalf of Google Play Services APK (com.google.android.gms). As summarised by lee.wp14 in this XDA thread, there are 3 options to install microG:

  1. FakeGApps Xposed Module (Xposed Repo, GitHub)
  2. /system Patch (NanoDroid, Haystack, Tingle)
  3. Custom ROMs. See the thread for a list of supported ROMs and more info on the above options.

Personally I use microG-bundled LineageOS as I'm already using LineageOS. It basically mirrors all the upstream ROMs, so you can get similar updates as upstream's.

microG is not 100% replacement of Google Play Services, possibly will never be—it hasn't implement all the APIs. Following are the problematic apps and their alternatives. (Edit: I wrote a {% post_link recommended-android-apps 'list of alternative apps' %} including the apps below plus some others which are not necessarily incompatible with microG.)

App: Play Store Issue: No app or in-app purchase (NanoDroid claimed to support). Alternative: F-Droid + Yalp Store Info: F-Droid is an app store for open source apps. Many of the apps I'm going to recommend can be installed through it. With privileged extension (usually installed alongside with microG), it can auto update installed apps. For proprietary apps, use Yalp Store. You can use built-in credential to install free apps or use your credential to install purchased apps. Purchase apps through Play Store's website. I recommend installing it as a system app (flash the OTA.zip in recovery) to automatically install once an APK is downloaded. Root is required for auto-download updates. Go to the Yalp setting, set "Only the chosen apps will be checked for updates" and whitelist any apps you installed via F-Droid.


App: Google Maps Issue: No location, possibly due to absence of incomplete/outdated Maps API. Alternative: Waze, HERE WeGo, OsmAnd, MAPS.ME Info: HERE WeGo supports public transit and offline maps, while Waze doesn't. Despite being funded by the Germany big 3 autos, the app looks dated and not as smooth as Google and iOS Maps. OsmAnd and MAPS.ME are open source and utilise OpenStreetMap, but doesn't support public transit (AFAIK).


App: Google Calendar Issue: Crash on boot. Depends on proprietary GoogleCalendarSyncAdapter.apk. Possibly due to incomplete Account Authentication API. Alternative: Simple Calendar + DAVx⁵ Info: It's still problematic even with GoogleCalendarSyncAdapter.apk installed. Google Account is not well-supported in microG. While you can use DAVx⁵ to sync calendar events in Google Account, it's a hit-or-miss and reminders are not supported. This is due to the lack of OAuth 2.0 support in DAVx⁵. Alternatively, you can migrate your data to free email providers that supports CalDAV/CardDav, i.e. Disroot (using Nextcloud), GMX and Yandex.


App. Google Contacts Issue: Depends on proprietary GoogleContactsSyncAdapter.apk Alternative: Simple Contacts + DAVx⁵ Info: Email providers mentioned in Google Calendar section can sync contacts using CardDAV.


App. Google Pay Issue: Failed SafetyNet Alternative: Loyalty Card Keychain (for loyalty cards only) Info: SafetyNet can be bypassed through 1) DroidGuard Helper (available from microG's F-Droid repo, install as a system app) or 2) Magisk Module.


App. Whatsapp, Facebook Messenger and other chatting apps Issue: A delay in receiving message Info: Enable "Google Cloud Messaging" in microG Settings and allow relevant apps to register.