[Solved] Issues updating microG apps in LineageOS

Yes, I have read about this behaviour before but I couldn’t seem to resolve the issue. Even with only the mirog repositories activated and microg gms core showing up correctly (not as unifiednlp) I still received an error message about mismatching signing keys… But perhaps I am still getting something wrong here…

I could only resolve the issue in the (not so) quick and dirty way…

  1. Reflash LineageOS (as I dont’t know if there is any way to “unflash” or uninstall the microg.zip and installing it on top of the flashable version might lead into problems).
  2. Install Tingle, following the instructions here.
  3. Download the latest (unstable) version of microg Services Core from the download section of microg.
  4. Make sure you know how to use adb and adb is installed correctly on your computer and you have activated adb access in the developer options of your Fairphone.
  5. Mount /system read-write: from your PC, call
    adb root && adb remount
  6. Copy com.google.android.gms-<version_number>.apk to /system/priv-app: from your PC, call
    adb push com.google.android.gms-<version_number>.apk /system/priv-app/com.google.android.gms-<version_number>.apk
  7. Reboot: from your PC, call
    adb reboot
  8. Install GsfProxy.apk as provided in the download section of microg. The GsfProxy version does not need to match the GmsCore.apk version and is installable without higher privileges.
  9. Install a PlayStore APK. If you don’t care about Play Store access, Install FakeStore.apk as provided in the download section of microg.
  10. From fdroid, install MozillaNlpBackend (or any other Nlp backend) and NominatimNlpBackend.
  11. Open the microg settings, which are available in the launcher now. If you want to use any Google services (Log-In, Cloud Messaging), tick both checkboxes for background services. Also open the UnifiedNlp (within the microg settings) settings to enable the location backends of your choice.
  12. Reboot your device.
  13. Disable Battery Optimization. Ensure that it is disabled for microG Services Core in System Settings > Battery > Menu > Battery optimization.
  14. Perform the microg self-check again. Now all boxes should be ticked.

But as said, it is a rather long process you have to repeat after each and every LineageOS update… :frowning:

Well, you basicaly re-did manually what my flashable ZIP was built to do automatically, with the exception of the OTA survival script, as pointed by you. Sorry you need to go through such process.


Ok, I’ll try to help you to make a clean reinstallation of microG and avoid you such process for every update.

First thing, to delete the thing any OTA-survival flashable ZIP did, you need to reinstall the ROM indeed. But most important, you need make a clean install, to clean the system partition first. Otherway, OTA survival script(s) will honor their name and survive. So, step by step (this is a one-time process):

  1. Make sure you have a ZIP with your actual OS version in your phone.
  • For LineageOS: If you have not cleared the LineageOS Updater downloads, then you can locate you actual OS ZIP at /data/data/org.lineageos.updater/app_updates/ from TWRP. If you are not sure or cleared it, then download latest ZIP from the community LOS thread.
  1. Grab the microG flashable ZIP you chose, too, and any other flashable ZIP you wish to install, and save them inside your phone storage.
  1. Maybe optional, but recommended: delete any user-installed app you’ll install with ZIPs to avoid any conflicts. This means: delete microG Services Core, microG Framework Proxy, microG FakeStore, microG DroidGuard Helper, Mozilla Nlp Backend and Nominatim Nlp Backend.
  • In the case of F-Droid, if included, you may want to backup your data first (or just write down your repo URLs in a piece of paper)
  1. Reboot to TWRP.
  2. WipeAdvanced Wipe → Check only Dalvik / ART Cache and System
  3. Install → Search for your OS ZIP → Swipe to confirm Flash
  • LineageOS Updater OTAs are stored on the /data/data/org.lineageos.updater/app_updates/ folder.
  1. Install → Search for the microG ZIP → (Add more Zips → Search for each ZIP) → Swipe to confirm Flash
  2. Without exiting TWRP, connect your phone to your computer and Tingle-patch it through ADB.
  • You can do this from the system itself, but this is a more convenient way because it doesn’t require two reboots in the process.
  1. Reboot to System. You are done, :slight_smile:

After this clean installation, you can apply OTA updates from the LineageOS Updater and microG will survive. You’ll need to Tingle-patch your system, though.


My OTA update procedure is the following, if you or anyone want to copy it (it saves you a reboot):

  1. Download new OTA from within LineageOS Updater. But don’t apply it!
  2. Reboot to TWRP.
  3. Install → Search for the latest OTA in /data/data/org.lineageos.updaterSwipe to confirm Flash
    • System mods (root modifications or flashable ZIPs) with OTA survival scripts will honor their name and survive.
  4. Mount → Enable System Not needed anymore.
  • Make sure Mount system read-only is disabled.
  1. Without exiting TWRP, connect your phone to your computer and Tingle-patch it through ADB.
    • You can do this from the system itself, but this is a more convenient way because it doesn’t require two reboots in the process.
  2. Reboot to System. You are done, :slight_smile:
3 Likes

Thank you very much for your detailed instructions! :slight_smile: I’m still not quite sure what I did wrong in my first attempt, but now it actually works fine and I can even update microG Services Core (even though they show up as UnifiedNlp) in F-Droid… But that’s another story, as you have mentioned earlier…

2 Likes

You are welcome! Happy to have helped you, :slight_smile:

2 Likes

@Roboe

Hi,
I just want to add that now Tingle auto-mount /system, so the mounting step is now useless.

3 Likes

This topic was automatically closed after 183 days. New replies are no longer allowed.