Lineageos + opengapps: remove gapps, dirty migration to lineageos-for-microg fails I've got a motorola g4. Bootloader unlocked, twrp installed, lineageos installed, opengapps installed, non-rooted. Been using it for about a year.

I want to try lineageos-for-microg: https://lineage.microg.org/

I want to keep my current data/apps (including some enduser 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 opengapps, 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 opengapps 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?
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