[OnePlus 6 Guides, News, & Discussion] Tomatot-:
Updated and tested for Android 10 (with Omnirom)

Why MicroG?

Here is a great explanation from the official wiki itself: https://github.com/microg/android_packages_apps_GmsCore/wiki

There are different and good reasons to move away from Google services and get microG services:

1) More privacy: all Marvin's work is open source and focused on privacy. The "Google Play Services" app is probably the worst app you can have on Android when it comes to telemetry, spying, etc. It's always running tons of services to know all your comings and goings. As a side note, it's also good to not rely on Google too much.

2) More RAM available: Google Play Services use a lot of RAM when GMScore uses almost nothing.

3) More battery life, especially while idling: you'll avoid all the wakelocks related to Play Services (whether they are intentional or not)

CREDITS / Thank you:

[MENTION=3999488]MaR-V-iN[/MENTION], for his wonderful and amazing work to free us from Google. One of the most underrated dev in the Android world.

[MENTION=4187311]Setialpha[/MENTION] , for his nanodroid module and his availability to help.

[MENTION=4470081]topjohnwu[/MENTION] for Magisk

How will your Android experience change?

Actually, not so much. If you're only interested in MicroG for the reasons 2) and 3), you can still use all Google apps, including the Play store (you need a patched version). Be aware, some apps don't work or are not working properly. Implementation status of different Android/Google services can be found here: https://github.com/microg/android_packages_apps_GmsCore/wiki/Implementation-Status

If you wonder if an app works or if you've tried and it doesn't work, just check on the issues tracker on Github or on your favorite search engine.

Now, if you want to change your habits, F-Droid will become your new best friend. It's an app store, like the Play Store, but which only delivers controlled, quality and open source apps. Both stores share many apps in common but F-Droid also has apps that the Play Store doesn't, because they're against Google policy for example. It should become your main app store as it's always good to use open source apps, for many reasons. Let's not start a debate here. :)

However, at least, at the beginning, it's tough to not use ANY app from the play store. For that, you should use Aurora store (whick is a fork of Yalp Store FYI). You get access all apps from Play Store. You can either use an anonymous account or use your own Google account. In the second case, you'll be able to download your paid apps. However, these won't work if they include a license check (most of them nowadays). You can nicely ask the dev if there's a workaround. Some accept, like the team behind Titanium Backup for example. Or SmartPack Kernel Manager's developer.

If you're looking for open source alternatives to the apps you usually use, I could list a few of them but this list is just great: https://github.com/offa/android-foss .

If you don't know how to replace Google services, this list is great as well: https://shadow53.com/android/no-gapps/alternatives/

You can also check on reddit like on this subreddit: https://www.reddit.com/r/fossdroid/

What ROM to use?

Any custom AOSP ROM should work, as long as :

1° it supports signature spoofing

2° it's deodexed

3° it supports alternative location backends, it's

-I wouldn't recommend any ROM that comes with gapps included. It just makes things more complicated.

On Android 10, I would highly recommend OmniROM, which offers an archive with microg prebundled, and also because it perfectly supports microG (signature spoofing, alternative location backends, etc.)

USEFUL LINKS

-MicroG thread: https://xdaforums.com/android/apps-games/app-microg-gmscore-floss-play-services-t3217616

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

-UnifiedNlp thread (location): https://xdaforums.com/android/apps-games/app-g-unifiednlp-floss-wi-fi-cell-tower-t2991544

-Nanodroid (provides packages related to open source / microG stuff): https://xdaforums.com/apps/magisk/module-nanomod-5-0-20170405-microg-t3584928/ (you need to download the microG edition) + here to understand how to edit the .nanodroid-setup file: https://gitlab.com/Nanolx/NanoDroid/blob/master/doc/AlterInstallation.md#detailed-description

-microG unofficial installer (doesn't work on our device yet): https://xdaforums.com/android/development/microg-unofficial-installer-t3432360

-Useful website about installing, getting packages, etc. : https://shadow53.com/android/no-gapps/setup-guide/microg/

-Great list of FOSS (open source software) apps for Android: https://github.com/offa/android-foss

-Alternative to Google apps: https://shadow53.com/android/no-gapps/alternatives/

-Personnal experience feedback: https://xdaforums.com/android/general/gapps-free-samsung-galaxy-s3-lte-gt-t3553620

If you read all these threads you'll start to have a good understanding of what is microG and how to live without Google.

Prerequisites:

-OnePlus 6

-Unlocked bootloader

-TWRP installed

-A ROM supporting microG

-All files downloaded, on your device

DOWNLOAD LINKS

-OOS: https://xdaforums.com/oneplus-6/how-to/official-oxygenos-5-1-5-ota-oneplus-6-t3794232

-TWRP: https://xdaforums.com/oneplus-6/development/recovery-unofficial-twrp-touch-recovery-t3860815

-Magisk: https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

-Nanodroid: https://downloads.nanolx.org/NanoDroid/Stable/ (you need to download the microG file)

-Push Notification Tester: https://play.google.com/store/apps/details?id=com.firstrowria.pushnotificationtester

-Working Google Maps app: https://www.apkmirror.com/apk/google-inc/maps/maps-9-82-1-release/

-F-Droid: https://f-droid.org/FDroid.apk

INSTALLATION TUTORIAL

Italic = recommended, but not mandatory. Do it if something doesn't work properly

0) DON'T RESTORE your apps until everything is set up, otherwise you'll have issues with GCM (getting instant notifications from messaging apps for example)

1) Flash the custom ROM of your choice ( these instructions should work: https://privatebin.net/?42d550f9ae5df09f#imAFxWjM0gW+V9+ex+8nRyYSoSQzLPjhNXsbKIUjzqA= )

2) Flash magisk, reboot to system

3) Reboot to recovery

4) Flash Nanodroid (you need to download the microG edition, and make sure you have made the .nanodroid-setup file at the root of your internal storage, see instructions here https://github.com/Nanolx/NanoDroid/blob/master/doc/AlterInstallation.md) or you can also try MinMicroG (https://github.com/FriendlyNeighborhoodShane/MinMicroG_releases/releases).

If you choose nanodroid, update microG thhis way: https://www.reddit.com/r/MicroG/comments/fd7udr/fork_of_microg_gmscore_with_unifiednlp_working_in/

5) Reboot to system

6) Open MicroG, give it permissions if that's not already the case

7) Click on self-check. Give signature spoofing to all the empty boxed so they get ticked.

For Omni/Arrow/Aex, you can make sure it's allowed in settings/apps & notifications/apps permissions/spoof package signature. for playstore/fakestore make sure you click on the 3 dots and check system apps (if it exists).

8) Give permission to ignore batter optimizations.

9) Enable Google device registration and Google Cloud Messaging.

10) Enable Safetynet if you want

11) Click on UnifiedNlp and active the 3 backends: location backends: Mozilla+ Déjà Vu; adress lookup backends: Nominatim.

12) REBOOT

13) Open your phone app, and type this:

Now try this instead in order to manually enable device registration and connect to Google Cloud Messaging:

*#*#2432546#*#*

(old) *#*#42678278#*#*

. Nothing will appear on your screen but it can help. It's probably necessary but I prefer to make all the steps to make everything work. Sometimes logging in on your Google account through settings help. You can then log out if you don't want to use any Google account.

14) Install Push Notification Tester from Yalp Store.

15) Test the app, see if everything works. If it doesn't, ask for advice here as it should at this point. You can try to reboot one more time. Make sure that in the GCM settings you're connected since X time, otherwise something is wrong. Step 23 is the most important step to check if it doesn't work.

16) Go back to the self-check menu, now you can check the self check status and almost all boxes should be ticked. Some are not for me but GPS still works, even on Google Maps. Here is a screenshot of how it looks like for me: https://i.imgur.com/WsPX5RC.png

17) Now you can try to install the apps you want! Don't install apps that need push notifications before all these steps otherwise they might never be registered. Clean installing apps is recommended. You can try to restore them from a backup as well, but it often doesn't work. The middle ground solution is to install the app with the Yalp Store / F-droid and then restore its data with Titanium Backup for example.

18) Now you should see apps being registered in microG.

19) You can make sure your gps work with either OSM (https://f-droid.org/en/packages/net.osmand.plus/) or Google Maps (see apk mirror link earlier, the last version won't work). You should get your location without any isuses at this point.

20) Enjoy your almost Google free phone.

EXTRAS:

α) If you have issues with location, you can try this (on some custom ROMs, Google Maps finds my location but then it doesn't update and so if I move around it won't update my location. Also sometimes I need to reload the app to update my location which is quite inconvenient. It seems that doing the steps following help)

Install a terminal emulator (I recommend Termux)

Make sure your phone has root rights and type :

su

Authorize the app

Type next:

pm grant com.google.android.gms android.permission.ACCESS_FINE_LOCATION

Then

pm grant com.google.android.gms android.permission.ACCESS_COARSE_LOCATION

iii) Reboot

β) If you have issues in general, try to update Nanodroid (if you used Nanodroid, ofc) apps from F-Droid. Add this repo to F-Droid: https://www.nanolx.org/fdroid/repo/

And then make sure all your apps are updated (including microG GmsCore)

A) DroidGuard uses non-open source stuff. It's in order to pass safety net.

B) GCM is not open source either.

C) If you want google maps to work, you need to install an "old" version and not update it. You can find it here: https://www.apkmirror.com/apk/google-inc/maps/maps-9-82-1-release/. Sometimes, your location might never appear. In this case, restart a few times Maps until your position shows up.

D) You can also try to install MicroG and its dependencies as user apps. I've tried it and wasn't very happy with the results as they don't work as well being user apps. From what I've heard, everything works fince except location. So you can give it a try as well this way.

E) My personal .nanodroid-setup is this one (to understand what it does, check here: https://gitlab.com/Nanolx/NanoDroid/blob/master/doc/AlterInstallation.md#detailed-description ):

nanodroid_gmscore=0
nanodroid_play=21
nanodroid_overlay=0
nanodroid_mapsv1=1
nanodroid_gsync=0
nanodroid_swipe=1
nanodroid_forcesystem=0
nanodroid_fdroid=1
nanodroid_nlpbackend=1100