Skip to content

WeAreFairphone/flashable-zip_microG

Repository files navigation

microG/UnifiedNlp Installer

Flashable ZIP to install microG or UnifiedNlp into an Android system. This also includes an OTA survival addon.d script.
You'll usually install them normally, but Google blocked userspace location providers in Android 7+, and some ROMs have not applied required patches yet, like LineageOS.

microG is a free-as-in-freedom re-implementation of Google’s proprietary Android user space apps and libraries.
Unified Network Location Provider (UnifiedNlp) is a library that provides Wi-Fi- and Cell-tower-based geolocation with configurable plugins to applications that use Google’s network location provider. It is included in GmsCore but can also run independently on most Android systems.

Install

You'll need a custom recovery installed on your device, such as TWRP.

Restart your device into recovery and start ADB sideload. Then run:

adb sideload <flashable-zip-name>

Alternatively, copy the resulting ZIP to your device storage, restart your device into recovery and use the GUI Install or Install ZIP option.

Note for UnifiedNLP on Android Oreo

In Oreo, the UnifiedNlp app is launched in a different way than before. After reboot, you need to go to "Location settings" in SettingsSecurity and PrivacyLocation Settings, or by tapping and holding the notification bar quick-setting for toggling location. Then, at the bottom ("Location services"), you can launch UnifiedNlp settings. There you need to enable at least one location backend for network location to work, as usual. If you chose the minimal ZIP flavour, you need to install your preferred location backends first, e.g. from F-Droid.

Build

Requirements

XMLStarlet is needed to parse F-Droid-like repo indexes.

On Debian/Ubuntu systems, run sudo apt install xmlstarlet

On Arch Linux, run sudo pacman -S xmlstarlet

Furthermore, on some barebones, Busybox-based systems (like Termux or Alpine Linux), the following packages need to be manually installed: bash, findutils, gawk, wget, zip

Build ZIP

Run the build-zip.sh shell script:

./build-zip.sh

This will generate a microg_YYYY-MM-DD.zip file.

ZIP Flavours

You can add you own flavour just by writing a <newflavour>_config.txt file.

build-zip.sh accepts a single <flavour> string argument. Each flavour has a <flavour>_config.txt file.

./build-zip.sh <flavour>

This will generate a <flavour>_YYYY-MM-DD.zip file.

For example, to build the unifiednlp flavour, run:

./build-zip.sh unifiednlp

This will generate a unifiednlp_YYYY-MM-DD.zip file.