I've got a Motorola Moto G4. Bootloader unlocked, TWRP installed, LineageOS installed, Open Gapps installed, non-rooted. Been using it for about a year.

I want to try LineageOS for microG.

I want to keep my current data/apps (including some end-user Google apps like their PDF viewer) as much as possible and migrate to microG, removing only the "core" Google stuff a user doesn't generally care about directly that will be replaced by microG. So, I'm following the dirty install process.

I have none of the listed apps installed.

I have tried removing Open Gapps, but it doesn't seem to work. Using the aroma installer to choose settings until the config at the end is "Include" with no apps listed, some Google apps are still installed (notably, the Play Store) after rebooting. The Open Gapps installer process also mentions removing existing/obsolete apps for only a short time, then moves to the next step "installing Gapps" which takes a long time. This seems to contradict the settings I gave it, namely to leave none installed, but is consistent with the fact that they don't seem to get uninstalled.

I have also flashed https://github.com/CHEF-KOCH/Remove-Gapps to try to get rid of them, but some Gapps (like the Play Store) still survive.

After any combination of attempts to follow the instructions and remove the Gapps, I flash the key migration zip followed by the lineage-microG.zip for my device (athene). I also make sure to wipe the Dalvik and cache partitions before rebooting.

After all this, every time I reboot, my system is almost exactly like it was before I did anything: Google services installed (though the Play Store does not actually work, it's still there), the microG settings app is not installed, etc. A few things are broken (some notifications of apps crashing) but overall nothing noteworthy has happened.

I've resorted to even wiping /system before a migration attempt, but even this achieves nothing.

I got a partial success once by manually going through /system/app, /system/priv-app, and /data/app and removing anything that looked Google-y, then performing the migration. Upon rebooting, the microG settings app was present and the self-check section looked like it should look on a clean install, but the Play Store was still present. I don't know to what extent this migration was a success.

I'm not familiar with the Android/Google ecosystem's insides and app politics, just the userland, so when I'm manually going around deleting files, I have little knowledge of what I'm doing, so I don't consider this attempt a success.

Now that all the info has been laid out, could someone please help me cleanly perform the migration to lineage-microG, without excessive butchering of my system or leaving things that should not be left? Why does the dirty install procedure laid out by the lineage-microG team fail? Why do the Gapps removal tools fail? What exactly is necessary to correctly and cleanly migrate lineage to lineage-microG?

  • Will be a bit more effort but should work: Performing an adb backup of your apps (hopefully none opted out or you'd need Xposed an the BackupAllApps module; my tool Adebar may help you by creating a script for backup and restore) minus the GApps you want to get rid of, then wipe system, cache and data, install µG-LOS, restore the ADB backup. That's what I usually do for a "clean flash" – but it of course means some configuration to be done afterwards.
    – Izzy
    Jan 8, 2018 at 8:00
  • @Izzy adb backup/restore will reinstall the apps but their data will still be lost, basically resetting each app to a clean install state, no?
    – user205488
    Jan 8, 2018 at 11:48
  • Apparently the command adb backup -f “x:\bla” -all -apk -nosystem will be useful, since they say it backs up/restores apps and their data. I can back up the internal storage separately. With that, I should have the essence of my phone backed up, that should be all I need to restore all my stuff after flashing a new system. Thanks @Izzy
    – user205488
    Jan 8, 2018 at 11:57
  • Keep in mind that with the syntax you used it will result in one big archive – and might contain stuff you just want to get rid of. That's why I mentioned Adebar and the script it generates – which then creates separate backup archives, one per app (and the restore script considers that as well, of course). That way you could check the script before running it, and simply remove or comment out things you don't want (maybe not in the backup script, just in case, but at least in the restore script – as you could then restore "skipped stuff" any time later).
    – Izzy
    Jan 8, 2018 at 20:09
  • Unfortunately my OS is named after glass panes, which adebar is not a fan of
    – user205488
    Jan 8, 2018 at 22:02

1 Answer 1


You can do this:

  • Flash the "microG unofficial installer" (Disclaimer: a flashable zip created by me) that remove the base of GApps from all partitions in addition to installing microG
  • Wipe /system to remove traces of the installer
  • Flash LineageOS for microG
  • 1) worked for removing openGApps from an existing Lineage 14.1 installation on a Moto X Play (Lineage image 'Lux'). 2) had to do a factory reset since LineageOS for microG refused to install due to 'incompatible components'.
    – eci
    Mar 25, 2018 at 10:13