I have successfully (so far at least) degoogled and gotten
microG (open source Google Services replacement) working on the stock Cosmo ROM (V19).
Here is what I did:
- Root via Magisk (there's another thread about this)
- Install Titanium Backup Pro and use it to uninstall:
- com.google.android.gms.policy_sidecap_aps, Drive, Google, Google Backup Transport, Google Contacts Sync, Google One Time Init, Google Partner Set Up, Google Play Movies & TV, Google Play Music, Google Play Store, Google Services Framework, Google Text-to-Speech Engine, Google Play Services
- Install EdXposed Magisk module (also requires Riru-Core module)
- Install microG Installer Revived Magisk module
- Install FakeGapps Xposed module to enable signature spoofing
That's it. Seems to be working just fine so far, although I have not yet extensively tested. YMMV, use at your own risk.
Please note that it is not required to remove everything I listed above in order to get microG functional, and there are still some other bits of Google cruft I plan to expurgate in due time, but this is where I am right now.
Also note that this may interfere with OTA updates, or at the very least an OTA will reinstall the Google bits and may cause undesired results. Again, use at your own risk.