2020-03-22 18:57:23 +00:00
|
|
|
# Install Guide
|
|
|
|
|
|
|
|
**Where I force my opinions on you**
|
2021-03-18 21:52:01 +00:00
|
|
|
|
2020-03-22 18:57:23 +00:00
|
|
|
**Kanged from the NoGoolag Telegram group and microG subreddit**
|
|
|
|
|
|
|
|
### Instructions for installation
|
|
|
|
|
|
|
|
##### Chapter 1: ROM
|
2021-09-07 22:35:45 +00:00
|
|
|
You can skip this if you have the ROM set up already, but it's highly
|
|
|
|
recommended to start with a clean install.
|
2020-03-22 18:57:23 +00:00
|
|
|
- Wipe or format data from your custom recovery.
|
|
|
|
- Flash your clean ROM and any other system mods you may want.
|
|
|
|
|
2020-03-23 04:03:12 +00:00
|
|
|
##### Chapter 2: microG
|
2021-09-07 22:35:45 +00:00
|
|
|
You can install MinMicroG as a Magisk module or directly to the system. If you
|
|
|
|
install as a module, it will not touch system at all, and you can easily remove
|
|
|
|
it when something goes wrong. On the other hand, it will be tied to the Magisk
|
|
|
|
installation and can be removed with it.
|
|
|
|
- If you want MinMicroG to be installed as a Magisk module, flash Magisk and
|
|
|
|
boot your phone once to allow Magisk to setup properly.
|
2020-03-22 18:57:23 +00:00
|
|
|
- Flash MinMicroG, preferably from recovery.
|
2021-09-07 22:35:45 +00:00
|
|
|
- Open microG Settings > Self-Check. If "System grants signature spoofing
|
|
|
|
permission" isn't ticked, click on it and grant the permission.
|
|
|
|
- In microG settings, Go to "Google device registration", "Google Cloud
|
|
|
|
Messaging" and enable both of them.
|
2023-07-28 22:55:18 +00:00
|
|
|
- In microG settings, go to Location, and configure every source you want to
|
|
|
|
enable.
|
2021-09-07 22:35:45 +00:00
|
|
|
- If you wish to connect to your Google account, go to Settings > Accounts >
|
|
|
|
Add Accounts > Google and login to your account.
|
2020-03-22 18:57:23 +00:00
|
|
|
- Reboot.
|
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
Most of your self-check should be checked by now. If the last one or two are
|
|
|
|
not, just enable high accuracy location, open the map tab on Satstat (from
|
|
|
|
FDroid) and wait until a blue circle appears. They should be okay now.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
|
|
|
### Prerequisites
|
|
|
|
|
|
|
|
##### [microG] Signature spoofing
|
2021-09-07 22:35:45 +00:00
|
|
|
Sigspoofing is a feature that is required by several core features of MicroG,
|
|
|
|
namely those that require pretending to be the real Google Play Services.
|
|
|
|
|
|
|
|
All apps basically call Play Services like, "Yo, package
|
|
|
|
`com.google.android.gms` with signature `x`, I need this done". So for microg
|
|
|
|
to receive that message, microg needs to have the same signature.
|
|
|
|
|
|
|
|
But since we don't have google's keys to sign the microg apk with the same
|
|
|
|
signature as gapps, we add an extra feature in Android that makes microg look
|
|
|
|
like it has the play services signature. The app asks, "Hey Android, is this
|
|
|
|
really play services?" Android responds <crossing its fingers>, "Yeah, sure".
|
|
|
|
|
|
|
|
Of course, this is only a simplified explanation. To be more technically
|
|
|
|
accurate, it patches Android's signature checking mechanism at the core.
|
|
|
|
Because of that, apps can misuse the permission and compromise your device by
|
|
|
|
allowing APKs from different (possibly malicious) creators to be installed over
|
|
|
|
the current one.
|
|
|
|
|
|
|
|
ROMs with a source sigspoof patch are much less dangerous in this regard
|
|
|
|
because they have sigspoofing as a part of the Android runtime permissions GUI,
|
|
|
|
as opposed to dexpatched ROMs, which grant it universally without any user
|
|
|
|
consent. Regardless, you should carefully watch who you grant sigspoof to, and
|
|
|
|
how you update that app. I am not aware of any app that legitimately requires
|
|
|
|
sigspoof other than microG, fakestore, and patched Playstore.
|
|
|
|
|
|
|
|
Because the permission has the possibility to be misused, several ROM
|
|
|
|
maintainers (including LOS) have rejected putting sigspoof in the official
|
|
|
|
code. But most of them have rejected it just because they are averse to trying
|
|
|
|
to leave Google. Some ROMs that do include sigspoof in official builds are:
|
2020-03-22 18:57:23 +00:00
|
|
|
* LOS for µG
|
|
|
|
* AEX
|
|
|
|
* AospExtended
|
|
|
|
* AOSIP
|
|
|
|
* ArrowOS
|
|
|
|
* CarbonROM
|
|
|
|
* NitrogenOS
|
|
|
|
* OmniROM
|
|
|
|
|
|
|
|
There are several other ways to have your ROM support sigspoof too:
|
|
|
|
- Patching it at the source level
|
|
|
|
- Easiest if you self-build or know a friendly neighborhood maintainer
|
2020-04-13 08:36:26 +00:00
|
|
|
- Patches in microG repo
|
2021-09-07 22:35:45 +00:00
|
|
|
- OmniROM's commits to integrate it into Android's permissions GUI
|
|
|
|
[here](https://gerrit.omnirom.org/c/android_packages_apps_PackageInstaller/+/36730)
|
|
|
|
and [here](https://gerrit.omnirom.org/c/android_frameworks_base/+/36729)
|
2020-03-22 18:57:23 +00:00
|
|
|
- Patching it with Haystack patcher or Needle patcher
|
|
|
|
- Requires PC
|
|
|
|
- Using the NanoDroid-patcher standalone zip for on-device patching
|
|
|
|
- Fork of Haystack modified to run on-device
|
|
|
|
- Using an Xposed module called FakeGapps
|
|
|
|
|
|
|
|
##### [microG and UNLP] Network Location Provider support
|
2023-07-28 22:55:18 +00:00
|
|
|
Another major thing MicroG does is providing network location to apps.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
What is network location? It's a quick and rough estimate of your location,
|
|
|
|
several hundred metres wide, made using cellular towers and wifi networks
|
|
|
|
around you, before you get a precise GPS lock. Basically it's the wider circle
|
|
|
|
that appears on your maps app quickly before a smaller accurate one appears.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
It technically should not be needed for the functioning of most apps, but
|
|
|
|
poorly coded ones that depend on Google Play Services often crash without it.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
Most ROMs should support it, but some OnePlus's and Xaiomi's have other
|
|
|
|
providers (like `com.qualcomm.location`) that do not allow other providers to
|
|
|
|
bind with system.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
2020-04-24 06:39:55 +00:00
|
|
|
If UNLP doesn't bind on your N+ ROM:
|
2021-09-07 22:35:45 +00:00
|
|
|
- Ask maintainer to apply this
|
|
|
|
[patch](https://github.com/microg/android_packages_apps_UnifiedNlp/blob/master/patches/android_frameworks_base-N.patch)
|
|
|
|
- Make sure your the ROM looks for `com.google.android.gms` as a location
|
|
|
|
provider
|
2020-03-22 18:57:23 +00:00
|
|
|
|
|
|
|
##### No preinstalled GApps, obviously
|
2021-09-07 22:35:45 +00:00
|
|
|
MinMicroG does a little debloating that may even make it work on GApps-infected
|
|
|
|
ROMs, but I've never tested and give no guarantees. (Well I don't give
|
|
|
|
guarantees for clean ROMs either, but that'a a different thing)
|
2020-03-22 18:57:23 +00:00
|
|
|
|
|
|
|
Get a clean AOSP-based ROM.
|
|
|
|
|
|
|
|
Or if you're a masochist, there are several ways to clean those kinds of ROMs:
|
|
|
|
- Gapps removal script
|
2020-03-23 04:03:12 +00:00
|
|
|
- https://github.com/CHEF-KOCH/Remove-Gapps
|
2020-03-22 18:57:23 +00:00
|
|
|
- G-Killer (GAPPS aroma Debloater)
|
2020-03-23 04:03:12 +00:00
|
|
|
- https://forum.xda-developers.com/android/software-hacking/aroma-google-services-debloater-t3668456
|
2020-03-22 18:57:23 +00:00
|
|
|
- Rom Cleaner
|
2020-03-23 04:03:12 +00:00
|
|
|
- https://github.com/DroidTR/Rom-Cleaner
|
2020-03-22 18:57:23 +00:00
|
|
|
- /d/gapps
|
2020-03-23 04:03:12 +00:00
|
|
|
- https://f-droid.org/app/org.droidtr.deletegapps
|
2020-03-22 18:57:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
### Troubleshooting
|
|
|
|
|
|
|
|
##### Not registered as system location provider
|
2021-09-07 22:35:45 +00:00
|
|
|
If multiple reboots do not solve this, some other provider might be overriding
|
|
|
|
it, like `com.qualcomm.location`. Debloat them. If that doesn't solve it, your
|
|
|
|
ROM may require source-level patches, detailed in the prerequisites section.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
|
|
|
##### Misc network location problems
|
2021-09-07 22:35:45 +00:00
|
|
|
I should take these two paragraphs to clarify that Network location is NOT GPS.
|
|
|
|
microG has nothing to do with your GPS. Network Location is that hugely
|
|
|
|
approximated wide-circle that appears before you get a GPS Lock.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
If you cannot get a location even on device only location mode, it's not
|
|
|
|
microG. It's your app, your ROM, your device, or your cursed house. Change any
|
|
|
|
of these.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
To test network location, enable high accuracy location, and then use satstat
|
|
|
|
(from FDroid), open maps tab and wait for the blue circle to appear.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
|
|
|
If it doesn't, there's a problem with UNLP.
|
|
|
|
|
|
|
|
##### Permission troubles with microG and gang
|
2021-09-07 22:35:45 +00:00
|
|
|
Run this command from any terminal app (like Termux) after `su`, or from a
|
|
|
|
computer after `adb shell`, and then reboot:
|
2020-03-22 18:57:23 +00:00
|
|
|
```
|
|
|
|
npem;
|
|
|
|
```
|
|
|
|
|
2022-12-31 13:54:04 +00:00
|
|
|
MicroG or Playstore might be unable to connect to the internet, even if there
|
|
|
|
is no firewall or DNS blocking them. This is caused by dirty flashing, as it
|
|
|
|
confuses the LOS internet blocking feature, which works on an allowlist basis.
|
|
|
|
To fix, enable: `App info` > `Mobile data and Wi-Fi` > `Allow network usage`.
|
|
|
|
`npem` tries this for you automatically.
|
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
Some new permissions are protected by Android now, and cannot simply be
|
|
|
|
granted. You can try several things that may or may not work, depending on your
|
|
|
|
ROM:
|
|
|
|
- Extracting the MicroG APK from the zip
|
|
|
|
(`system/priv-app/MicroGGMSCore/MicroGGMSCore.apk`) and installing it as an
|
2022-01-26 07:40:00 +00:00
|
|
|
user app update (`npem` tries this for you automatically)
|
2020-11-28 14:35:28 +00:00
|
|
|
- Installing MinMicroG as system instead of as a Magisk module
|
|
|
|
- Clean flashing, if all else fails
|
|
|
|
|
2020-03-22 18:57:23 +00:00
|
|
|
##### GCM/FCM push messaging
|
2021-09-07 22:35:45 +00:00
|
|
|
Go to microG settings > Google Cloud Messaging and check if the app is
|
|
|
|
connected.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
|
|
|
if no:
|
|
|
|
- Try wiping data for the app
|
2021-09-07 22:35:45 +00:00
|
|
|
- Before restoring a backup, first restore the app only (without data) and
|
|
|
|
start it to register the app. After that you can restore the data.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
|
|
|
If yes:
|
2021-09-07 22:35:45 +00:00
|
|
|
- Ensure you don't have an adblocker blocking the domain, whitelist it in
|
|
|
|
adaway and similar: `mtalk.google.com`
|
2020-03-24 13:30:32 +00:00
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
If you can't get any app to register for Google Cloud Messaging, try dialing
|
|
|
|
this:
|
2020-03-22 18:57:23 +00:00
|
|
|
|
2020-04-24 06:39:55 +00:00
|
|
|
`*#*#2432546#*#*` or `*#*#CHECKIN#*#*`
|
2020-03-22 18:57:23 +00:00
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
If you restored app data from old backups, there might be some configuration
|
|
|
|
files left over preventing the app from registering for push with microG. Run
|
|
|
|
this from a root terminal:
|
2020-08-20 08:20:58 +00:00
|
|
|
|
2021-07-18 19:16:49 +00:00
|
|
|
```
|
|
|
|
rm -rf /data/data/*/shared_prefs/com.google.android.gms.*.xml
|
|
|
|
```
|
2020-08-20 08:20:58 +00:00
|
|
|
|
2020-03-22 18:57:23 +00:00
|
|
|
##### Play Store RH-01 error
|
|
|
|
Go to System > Apps > Play Store
|
|
|
|
- Force stop
|
|
|
|
- Clear storage
|
|
|
|
- Grant all permissions (make sure sigspoof is)
|
|
|
|
|
|
|
|
If even that doesn't work:
|
2020-04-13 08:05:30 +00:00
|
|
|
- Settings > System > Accounts > Remove Google Account
|
|
|
|
- System > Accounts > Disable Account Data Synchronization
|
2021-09-07 22:35:45 +00:00
|
|
|
- After all is set in microG self-test after doing the above steps, open Play
|
|
|
|
Store and re-add your account.
|
2020-04-13 08:05:30 +00:00
|
|
|
- You may have to close (recent apps > swipe it away) the Play Store once
|
2020-03-22 18:57:23 +00:00
|
|
|
|
|
|
|
Et voila, it (hopefully) works properly again.
|
|
|
|
|
|
|
|
### Alternatives and Suggestions
|
|
|
|
|
|
|
|
##### Contact sync
|
2021-09-07 22:35:45 +00:00
|
|
|
The standard package includes sync adapters that work automatically after
|
|
|
|
logging in and turning on device registration.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
But giving all your contacts to Google is not on the "top 100 ideas of all
|
|
|
|
time" list. You should probably look into selfhosting.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
|
|
|
You can retieve your contacts directly from your Google account in a vcf file:
|
2020-04-24 06:39:55 +00:00
|
|
|
- Go to [Google Contacts](https://contacts.google.com) and login
|
2020-03-22 18:57:23 +00:00
|
|
|
- Use sidebar > Export > select 'Export as VCard' > Export
|
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
You should also be able to sync contacts with Google without proprietary apps
|
|
|
|
or microG using the open-source CardDAV client DAVx5 (available on F-Droid or
|
|
|
|
Play)
|
|
|
|
- Go to Google Dashboard's
|
|
|
|
[app passwords](https://myaccount.google.com/apppasswords) page, and create
|
|
|
|
an app password if you don't have one already
|
2021-08-28 10:58:04 +00:00
|
|
|
- When logging in with DAVx5, Use "Login with URL and user name"
|
2021-09-07 22:35:45 +00:00
|
|
|
- Base URL:
|
|
|
|
`https://www.google.com/calendar/dav/[your_gmail_id]@gmail.com/events`
|
2021-03-18 21:52:01 +00:00
|
|
|
- User name: `[your_gmail_id]@gmail.com`
|
2021-07-07 15:16:42 +00:00
|
|
|
- Password: `[your_app_password]`
|
2020-03-22 18:57:23 +00:00
|
|
|
|
|
|
|
##### Android Wear companion apps
|
2020-04-24 06:39:55 +00:00
|
|
|
- GatgetBridge companion app on F-Droid
|
2020-03-22 18:57:23 +00:00
|
|
|
- AsteroidOS and similar projects
|
|
|
|
|
|
|
|
##### Making miscelleneous Google Apps work
|
2021-09-07 22:35:45 +00:00
|
|
|
If they don't log into an account, try force stop and wipe data. Or perhaps
|
|
|
|
logging out of all Google accounts, and logging in from inside the app's prompt.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
If nothing else works, backing up the app from a working GApps setup and then
|
|
|
|
restoring it should. Stuff like MagicGapps or WeebGApps should be helpful.
|
2020-03-22 18:57:23 +00:00
|
|
|
|
2020-04-24 06:40:47 +00:00
|
|
|
##### Paid apps, license verification and IAPs
|
2021-09-07 22:35:45 +00:00
|
|
|
You can directly buy apps from the Play Store if you have it installed with
|
|
|
|
microG. But if you don't, a much cleaner way is to buy it from the
|
|
|
|
[Google Play](https://play.google.com) website through a browser.
|
2020-04-24 06:40:47 +00:00
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
If you've bought an app, you can download it without Play Store by using Aurora
|
|
|
|
Store by logging in with your own account.
|
2020-04-24 06:40:47 +00:00
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
License verification, unfortunately, is something tied to Play Store and
|
|
|
|
probably always will be. If you don't want to install it, all you can do is
|
|
|
|
pester the devs to remove it or atleast offer alternative means of verification.
|
|
|
|
- The Titanium Backup devs are a bunch of nice people. If you email them,
|
|
|
|
they'll give you offline verification codes.
|
2020-04-24 06:40:47 +00:00
|
|
|
|
2021-09-07 22:35:45 +00:00
|
|
|
In App Purchases are even more tied to Play Store. Not even vanilla Play Store
|
|
|
|
will do, it has to be patched for sigspoofing to be able to use IAPs. Setialpha
|
|
|
|
regularly grabs the latest release and patches it, and the product can be found
|
|
|
|
in the NanoDroid F-Droid repository.
|
2020-04-24 06:40:47 +00:00
|
|
|
|
2020-03-22 18:57:23 +00:00
|
|
|
##### Making swipe work on AOSP keyboard
|
2021-09-07 22:35:45 +00:00
|
|
|
If you do not wish to switch to the superior AnySoft keyboard and the swipe
|
|
|
|
libs don't work with AOSP kb on your ROM, try this:
|
2020-03-22 18:57:23 +00:00
|
|
|
https://forum.xda-developers.com/android/apps-games/enhancedime-aosp-latinime-enhancements-t3366639
|