This wiki is intended as a place to find out up-to-date information on how to install microG on Sailfish OS with Android AppSupport. Initially I’ve just copied over the information @DrYak’s excellent summary on TJC. But because this is an editable wiki, we all can keep it up-to-date.
I’ve not tested these instructions, so please use them at your own risk, and update the information if you find something has changed.
What is microG good for?
microG is an Open Source Software replacement for the proprietary Google Play Services, which some Android apps require to install or run properly, e.g. some online banking apps. For details read the excellent Wikipedia article about microG or microG’s own description.
Donations
As a side note, if you would like to support the development of MicroG, you can do so via LibrePay or GitHub Sponsors.
Notes
For Android, when I write : " App permissions - Apps using Location, Microphone, Camera ", " App permissions " is the big text that appears in big bold on the menu, and " Apps using Location, Microphone, Camera " is the text that appears in light gray underneath.
Pre-requisites
The really base (most of the people already have) :
- You need obviously to have a smartphone on which you have flashed Sailfish OS
- You need to have paid the license for Sailfish X (this includes the paying bits like AlienDalvik aka “Android™ App Support” / AppSupport / AAS)
- You need to have your Jolla account set up on the smartphone.
- You need to install “Android™ App Support” (AppSupport / AAS) from the Jolla store (will not show up until you have an account with a paid licence for the type of device you’re running)
- Installing AppSupport doesn’t pop up any new icon in Launcher, that’s normal
- It’s not obligatory, but it helps a bit : you can turn developer mode on.
If you’re installing on a freshly flashed phone, with a fresh installation of AppSupport, that’s okay you can skip to the procedure itself. If you have fooled around on your device (e.g.: installed Google Play Service, installed microG, etc.) and if you hit the " I don’t have the spoofing permission showing up in the list " issue, make also sure :
- there’s no extra stuff left over in
/opt/alien/
(the space on that partition is limited, it’s barely enough for holding the original file and any system upgrade. Any leftover backup might not leave enough room to proceed ) - that you have the original pristine file in
/opt/alien/system.img
(and not your patched stuff) - that currently you do have the latest version of AppSupport installed.
As of 4.5.0.16 Struven Ketju (you can check the changelog):
rpm -qf /opt/alien/system.img
appsupport-system-unprivileged-11.0.0.60.28-1.15.1.jolla.aarch64
If you have any doubt about the two above, you can force re-installing AppSupport with commands:
devel-su
pkcon refresh
pkcon install --allow-reinstall appsupport-system-unprivileged
Also last but not least, make sure you’re currently running some 4.5.0 Struven Ketju version of the OS (and not that the upgrade has completely failed and you’re kicked back to 4.4.0 Vanha Rauma):
ssu re
Device release is currently: 4.5.0.16
Enable Signature Spoofing
- Settings app
- section Info , tool Android™ App Support
- you get to the screen shot above
- check the checkbox Disable Android App Support system package verification
- push the Stop button
- wait until AppSupport has completely shutdown ( Start button become available)
- push the Start button
- wait until AppSupport has completely re-started ( Stop button become available)
The Signature Spoofing permission is enabled in AppSupport and could now be granted.
Install software
F-Droid
Install F-Droid from Jolla Store and let it update itself.
microG repository
Hint: to avoid having to manual type the data information, you can use the Camera app and scan the QR-Codes on web pages such as the microG download page and copy-paste them into the relevant fields
- Open and check the info from the the microG download page on your computer.
- open the “F-Droid” app store
- Settings icon (down, right in the blue bar on the F-Droid window)
- section My Apps , tap on Repositories - Add additional sources of apps
- hit the " + " icon on the top, right in the blue bar.
- Repository address : F-Droid repository - microG Project
- Fingerprint : 9BD06727E62796C0130EB6DAB39B73157451582CBD138E86C468ACC395D14165( ^- that’s very long. It’s much easier to copy-paster from the QR-code scan in Camera)
- make sure the " microG F-Droid repo is checked active (green)
- back to the main screen (hit the " " Android back button, than hit again " Latest " down, left in the blue bar on the F-Droid window)
- hit on the green magnifying glass search icon down right on the main pane.
- search for microG
- Download ( blue icon down arrow ) then install the following software (the first time, Android will ask you to grant to F-Droid the permission to install software) (each time a box pops-up asking you to confirm the installation).
- microG Services Core - Re-Implementation of Playservice (That’s microG proper, it also includes UnifiedNlp)
- Apple UnifiedNlp Backed . Unified location provider (Apple Wifi) (Alternative option)
- Signature Spoofing Checker - Test the signature spoofing capabilities (optional)
- NominatimNlpBacked - UnifiedNlp geocoding provider (That’s for finding street addresses)
- microG DroidGuard Helper installation (optional - that’s tools to help make use of the Security Net feature of Google Services)
- FakeStore - microG Store (FakeStore release) (it’s empty, but pretends that “Google Play Store” is installed, because some apps look for that) Make sure you install version 0.1.0 or later - by default F-Droid installs an older version
- microG Services Framework Proxy - Legacy support proxy library (for making Google Cloud Messaging work).
- other applications to search for, then install:
- Aurora Store - A Google Playstore Client (optional - a modern-looking Google Play Store replacement)
microG will make a microG settings appear in Launcher. If installed, the optional Aurora makes an icon too.
Other optional application to search for and install, that are useful in my opinion “Android Permissions”, “Stanley - An application explorer for developers”.
Grant Signature Spoofing Permissions
-
You need to go to the Android settings.
- Go to Settings app
- section section Info , tool Android™ App Support
- Push the Android version field five times
-
You are now in the the main screen of Android settings app. Now continue:
-
Apps & notifications - Recent apps, default apps
-
Permission manage - Control app access to your data"
-
Spoof package signature - 0 of 2 apps allowed
-
Here you can grant the “Spoof package signature” permission,
- FakeStore (make so the empty package seem to contain “com.android.vending” coming from the genuine Google’s Play Store, so that apps checking for that are kept happy)
- microG Service Core (make so “com.google.android.gms” seems to be coming from the genuine Google Play Service)
- Signature Spoofing Checker (if you installed this option. It makes the checker apps’ screen go green if the spoofing works)
Restart AppSupport
So the permission granting takes effect:
- Settings app
- section Info , tool Android™ App Support
- you get again to the screen shot above
- push the Stop button
- wait until AppSupport has completely shutdown ( Start button become available)
- push the Start button
- wait until AppSupport has completely re-started ( Stop button become available)
Checks
After this last restart, Signature Spoofing should work for the software you granted it to.
- application microG Settings
- At the top, Self-Check - Check if the system is correctly set up to use microG.
- you arrive at the screen above
- control that each test has passed (has a green check-mark)
- specially Play Services (GmsCore) and PlayStore (Phonesky) should both be installed and have correct signatures.
More checks
- if you have installed “Signature Spoof Checker” and has granted it permission, it should show a green screen
- if you have installed “Stanley”, when you check the application “microG Services Core - com.google.android.gms” and “FakeStore - com.android.vending”, you’ll notice that the signature pretends to be from Google (and not from “nogapps.de” unlike the other microG components)
Configure
- application microG Settings
- section Location modules
This is where you can configure the location services.
- location service modules you’ve installed from F-droid (as described earlier) will be listed.
- select the toggle switch to activate or deactivate a particular module.
- press the main title to configure the backend
- once selected, some modules can be further tuned by selecting the Configure option (not all modules have this though).
Note : Keep in mind that, as of 3.1.0 Seitseminen, Android app can see and query the WLAN (Wifi connection), but currently as demonstrated by several questions filed by other community members, the 3G/4G connection isn’t always seen by Android Apps.
Thus you need to only rely on Wifi Network-based connection e.g.: rely on Apple’s back-end. If you do not do that you’ll get the following problems :
- “UnifiedNLP has no last known location. This will cause some apps to fail.” (if no other back-end present)
- “UnifiedNLP do not have Location to test Geocoder - Please verify your location Backend” (if no other back-end present)
- “No UnifiedNlp location was provided by the system within 10 seconds”. (always fails)
That because the back-ends that rely on 3G/4G cell hang.
Advanced tips
Chrome
Some apps rely on a Google Chrome web browser to be present.
You can add the Bromite repository to the F-Droid client app: Bromite is an derivative of Chromium (which in turn is the Open Source Software variant of Chrome), but offers more privacy and built-in Ad-blocking (unlike Mozilla Firefox on which plug-ins work in all variants, for Chrome plug-ins can only be installed on the desktop version, e.g. the µBlockOrigin plug-in).
Google Cloud Messaging
I’ve written another HOWTO about auto-starting apps. You might check how to enable/disable apps getting automatic alerts from the Cloud, and optionally getting auto-started to process it (e.g.: WhatsApp automatically getting messages instead of you needing to fetch them).
Apps that rely on Google Cloud Messaging and were already on the phone before you setup microG need to be installed again.
Google Play Store
This how-to is done for using an Open Source Software client app for browsing, fetching and installing APKs from the Google Play Store (such as aforementioned Aurora Store app) and the empty FakeStore package to trick any application that checks the presence of " com.android.vending ".
For people wanting to use the genuine Google Play Store client app (only needed in order to buy Android apps directly from within the Google Play Store client app), this is possible thanks to NanoDroid and carmeloferso’s guide:
- add nanodroid repository to F-Droid
- install Google Play Store from nanodroid
- grant it signature spoofing using the " enable system package replacement " permission
- in the Android Settings , in section " Users & accounts - Current user: Owner "
- add Google account (if not already set-up in microG).
- " Sign-in & security "
- Turn on " Trust Google for app permissions - When disabled, the user is asked before an app authorization {…} "
- Turn on " Allow apps to find accounts - When enabled, all applications on this devices will be able to see your Google Accounts "
- Start Google Play Store and let it sync.
“Root detected” and banking apps
Root detection relies on two things.
presence of Google APIs
- something must provide ’ com.google.android.gms ’ (aka.: GmsCore): you must install microG Services Core and grant it signature spoofing
- something must provide ’ com.android.vending ’ (aka.: Phonesky): you must install either install microG’s FakeStore or Nanodroid’s patched Google Play Store and grant it signature spoofing
This makes most Android apps run fine.