FORUMS

[GUIDE] MicroG on OnePlus 6 (open source and ligthway alternative to Google services)

1,577 posts
Thanks Meter: 1,500
 
By Tomatot-, Senior Member on 2nd December 2018, 02:23 AM
Post Reply Email Thread
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_pa...s_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:
@MaR-V-iN, for his wonderful and amazing work to free us from Google. One of the most underrated dev in the Android world.
@Setialpha , for his nanodroid module and his availability to help.
@topjohnwu 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_pa...ntation-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://forum.xda-developers.com/and...vices-t3217616
-MicroG wiki: https://github.com/microg/android_pa...s_GmsCore/wiki
-UnifiedNlp thread (location): https://forum.xda-developers.com/and...tower-t2991544
-Nanodroid (provides packages related to open source / microG stuff): https://forum.xda-developers.com/app...crog-t3584928/ (you need to download the microG edition) + here to understand how to edit the .nanodroid-setup file: https://gitlab.com/Nanolx/NanoDroid/...ed-description
-microG unofficial installer (doesn't work on our device yet): https://forum.xda-developers.com/and...aller-t3432360
-Useful website about installing, getting packages, etc. : https://shadow53.com/android/no-gapp...-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://forum.xda-developers.com/and...te-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://forum.xda-developers.com/one...lus-6-t3794232
-TWRP: https://forum.xda-developers.com/one...overy-t3860815
-Magisk: https://forum.xda-developers.com/app...mless-t3473445
-Nanodroid: https://downloads.nanolx.org/NanoDroid/Stable/
(you need to download the microG file)
-Push Notification Tester: https://play.google.com/store/apps/d...ficationtester
-Working Google Maps app: https://www.apkmirror.com/apk/google...-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/?42d550f9ae5d...jhNXsbKIUjzqA= )
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/...nstallation.md) or you can also try MinMicroG (https://github.com/FriendlyNeighborh...eases/releases).
If you choose nanodroid, update microG thhis way: https://www.reddit.com/r/MicroG/comm...lp_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:
Code:
*#*#2432546#*#*
Code:
 (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 :
    Code:
    su
    Authorize the app
    Type next:
    Code:
    pm grant com.google.android.gms android.permission.ACCESS_FINE_LOCATION
    Then
    Code:
    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...-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/...ed-description ):
Code:
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
Attached Files
File Type: zip swipelibOP6.zip - [Click for QR Code] (842.5 KB, 150 views)
File Type: zip priv-app omni.zip - [Click for QR Code] (9.40 MB, 170 views)
The Following 28 Users Say Thank You to Tomatot- For This Useful Post: [ View ] Gift Tomatot- Ad-Free
2nd December 2018, 02:25 AM |#2  
Tomatot-'s Avatar
OP Senior Member
Thanks Meter: 1,500
 
More
Reserved.
The Following 3 Users Say Thank You to Tomatot- For This Useful Post: [ View ] Gift Tomatot- Ad-Free
2nd December 2018, 06:47 AM |#3  
nimrodsv's Avatar
Senior Member
Flag Kfar Saba
Thanks Meter: 1,214
 
Donate to Me
More
Very nice,
too bad that it doesn't support OOS but it's understandable.
2nd December 2018, 06:54 AM |#4  
Tomatot-'s Avatar
OP Senior Member
Thanks Meter: 1,500
 
More
Quote:
Originally Posted by nimrodsv

Very nice,
too bad that it doesn't support OOS but it's understandable.

Maybe it could work with nanodroid patcher for signature spoofing and then manually deodexing the ROM. It would also be necessary to remove all the Google apps. So yes I guess it's just easier to use a custom ROM as a saner base.
The Following 2 Users Say Thank You to Tomatot- For This Useful Post: [ View ] Gift Tomatot- Ad-Free
2nd December 2018, 08:01 AM |#5  
Senior Member
Thanks Meter: 379
 
More
Quote:
Originally Posted by nimrodsv

Very nice,
too bad that it doesn't support OOS but it's understandable.

Like above, it could work. By installing xXx module and choose total gapps removal then try what he said above for spoofing. Tempted to try, but can't atm.
2nd December 2018, 09:11 AM |#6  
Senior Member
Thanks Meter: 369
 
More
OOS has normally odexed system and do not support signature spoofing.
An option would be to deodex services.jar and the use the nanodroid patcher to enable signature spoofing.
I have done that for some 8.1 OOS roms but not on the latest releases.
2nd December 2018, 10:07 AM |#7  
Tomatot-'s Avatar
OP Senior Member
Thanks Meter: 1,500
 
More
Quote:
Originally Posted by whizeguy

Like above, it could work. By installing xXx module and choose total gapps removal then try what he said above for spoofing. Tempted to try, but can't atm.

Quote:
Originally Posted by NisseGurra

OOS has normally odexed system and do not support signature spoofing.
An option would be to deodex services.jar and the use the nanodroid patcher to enable signature spoofing.
I have done that for some 8.1 OOS roms but not on the latest releases.

Maybe I'll give a try it seems possible.
The Following User Says Thank You to Tomatot- For This Useful Post: [ View ] Gift Tomatot- Ad-Free
2nd December 2018, 01:29 PM |#8  
nimrodsv's Avatar
Senior Member
Flag Kfar Saba
Thanks Meter: 1,214
 
Donate to Me
More
@Tomatot- I see that you've tried to working with MicroG on Omni but getting bootloops and that you will try working with it again soon.
Anything I should know before I try this on Omni? Thanks!
2nd December 2018, 01:47 PM |#9  
Tomatot-'s Avatar
OP Senior Member
Thanks Meter: 1,500
 
More
Quote:
Originally Posted by nimrodsv

@Tomatot- I see that you've tried to working with MicroG on Omni but getting bootloops and that you will try working with it again soon.
Anything I should know before I try this on Omni? Thanks!

I had a weird experience on Omni. At first it was working all fine with nanodroid-microG, but then I tried to change the .nanodroid-setup and it broke all my system, I was never able to make it work again on Omni. I also tried once the Nisse .zip and it didn't work either. So I can't really tell what's the pattern to make things work or not work... I really liked Omni so I'm going to try again within the next few days, with a nice clean flash and Nisse zip. I will let you know. If you're impatient and want to try, try to follow the steps from this tutorial and let me know how it goes.
The Following User Says Thank You to Tomatot- For This Useful Post: [ View ] Gift Tomatot- Ad-Free
2nd December 2018, 04:13 PM |#10  
Senior Member
Thanks Meter: 369
 
More
Omni is a bit tricky with permissions, use the latest Nanodroid-microG from https://downloads.nanolx.org/NanoDroid/Stable/ to install on omni, it adds bit more (calendar and contacts sync etc) that i dont want tho
2nd December 2018, 10:00 PM |#11  
Tomatot-'s Avatar
OP Senior Member
Thanks Meter: 1,500
 
More
Quote:
Originally Posted by NisseGurra

Omni is a bit tricky with permissions, use the latest Nanodroid-microG from https://downloads.nanolx.org/NanoDroid/Stable/ to install on omni, it adds bit more (calendar and contacts sync etc) that i dont want tho

Did you manage to make your script work on Omni? I'm not interested in these extras either.
Post Reply Subscribe to Thread

Tags
microg, oneplus 6, open source

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes