Fork of the MicroG UnifiedNlp repository with a working standalone app implementation
Go to file
2022-06-02 22:59:22 -04:00
.github/workflows Use GitHub CI 2022-01-24 17:01:53 +01:00
api Only update backend helpers on actual changes 2022-04-24 14:39:01 +02:00
app app: Add ACCESS_BACKGROUND_LOCATION permission 2022-06-02 22:58:41 -04:00
artwork Move to artwork folder 2020-06-05 20:52:10 +02:00
client Revert "Add force enabled backends array" 2022-06-02 21:12:49 -04:00
compat Adjust code for new service API 2022-01-18 13:46:39 +01:00
docs/backend-sample Add API docs 2020-06-05 20:51:20 +02:00
geocode-v1 Add delay when before connecting to userspace service from system service 2022-01-21 22:41:33 +01:00
gradle Improve dump 2022-04-20 20:58:02 +02:00
LICENSES Add LICENSES 2020-06-05 20:51:22 +02:00
location-v2 Improve dump 2022-04-20 20:58:02 +02:00
location-v3 Adjust code for new service API 2022-01-18 13:46:39 +01:00
patches Add description and license to patch file 2020-06-05 21:58:50 +02:00
service Correctly rebind backends after upgrade 2022-04-24 14:39:01 +02:00
service-api Add new split service logic 2022-01-18 13:46:26 +01:00
ui Correctly rebind backends after upgrade 2022-04-24 14:39:01 +02:00
.gitignore Update .gitignore for Android Studio build outputs 2022-06-02 22:59:22 -04:00
build.gradle Add new split service logic 2022-01-18 13:46:26 +01:00 Fix build 2020-06-05 20:52:03 +02:00
gradlew Upgrade Gradle 2022-01-18 13:43:50 +01:00
gradlew.bat Upgrade Gradle 2022-01-18 13:43:50 +01:00 Support SHA-1 digests in configuration 2020-10-15 19:07:37 +02:00
settings.gradle Add back standalone app 2022-06-02 20:51:51 -04:00

microG Unified Network Location Provider

Build Status

The next generation Network Location Provider, based on plugins. Usually abbreviated as UnifiedNlp.

Available on F-Droid


Release builds may be found on the release page.

Unified Network Location Provider is provided in 3 variants:

  • NetworkLocation.apk for the usual configuration of Android 4.4+ without GApps
  • LegacyNetworkLocation.apk for the usual configuration of Android 2.3 - 4.3.1 without GApps
  • UnifiedNlp.apk for Android WITH Gapps

Keep in mind that:

  • All three variants are available on F-Droid as well, but they use different apk names (have a look at app description on F-Droid to check which version to use).
  • There is another repo containing the deprecated version of NetworkLocation.apk without the plug-in system.
  • microG GmsCore project already includes the Unified Network Location Provider.

Android 4.4 - 7.1.1 (KitKat / Lollipop / Marshmallow / Nougat)

Most modern ROMs come with support for non-Google geolocation providers. On these systems installation is easy:

  1. Make sure that no Google geolocation tool is installed (it is usually listed as Google Play Services in Apps)
  2. Download and install NetworkLocation.apk as a usual app (you may need to enable "Unknown sources" in Settings->Security)
  3. Reboot and continue at Usage

Some ROMs, especially those not based on AOSP might have problems using this method. However, if your system has root, you can try installing the hard way:

  1. Download NetworkLocation.apk
  2. Mount /system read-write (from your PC, call adb root && adb remount)
  3. Copy NetworkLocation.apk to /system/priv-app (from your PC, call adb push NetworkLocation.apk /system/priv-app/NetworkLocation.apk)
  4. Reboot (from you PC, call adb reboot) and continue at Usage

Note: On Android 7 (or later) an additional patch is needed to make it working, or alternatively, you can install it in /system/priv-app as explained above.

Android 2.3 - 4.3.1 (Gingerbread / Honeycomb / Ice Cream Sandwich / Jelly Bean)

Older Android versions are no longer officially supported. However I still provide a legacy build, that should be compatible with those systems. It is required to have a rooted system to install on Jelly Bean and older.

  1. Download LegacyNetworkLocation.apk
  2. Mount /system read-write (from your PC, call adb root && adb remount)
  3. Copy LegacyNetworkLocation.apk to /system/app (from your PC, call adb push LegacyNetworkLocation.apk /system/app/LegacyNetworkLocation.apk)
  4. Reboot (from you PC, call adb reboot) and continue at Usage


UnifiedNlp alone does not provide any features, but acts as a middleware for multiple backends. Most of them can be downloaded and updated using F-Droid. Here is a list of backends known to me.

List of backends for geolocation:

  • AppleWifiNlpBackend - Uses Apple's service to resolve Wi-Fi locations. It has excellent coverage but the database is proprietary.
  • OpenWlanMapNlpBackend - Uses to resolve user location but the NLP backend did not reach release-quality, yet. Users interested in a freely licensed and downloadable database for offline use should stick with openBmap for now - Last updated in 2015
  • OpenBmapNlpBackend - Uses openBmap to resolve user location. Community-created, freely licensed database that can optionally be downloaded for offline operation. The coverage varies from country to country (it's best in central Europe).
  • MozillaNlpBackend - Uses the Mozilla Location Service to resolve user location. The coverage is OK. Only the cell tower database is free.
  • LocalWifiNlpBackend - Local location provider for Wi-Fi APs using on-phone generated database.
  • LocalGSMLocationProvider - Local opencellid based location provider backend. Has been surpassed by LocalGSMBackend which also has an OpenCellID option - Last update in 2014
  • LocalGSMBackend - Local location provider for GSM cells. It works offline by downloading freely licensed database files from Mozilla, OpenCellID, or lacells.db.

List of backends for (reverse) geocoding:

(...) Create issue or pull request to extend either list :)

After installing a backend, you can use UnifiedNlp by activating network-based geolocation in Settings->Location. Since KitKat, you need to select any mode but "device only", on older Android version this setting is called "Wi-Fi & mobile network location" (ignore any misleading texts saying this is for Google's location service, you don't have Google's service installed but UnifiedNlp 😄)

Backend development

The API is available here. Documentation may be found in the README provided with the API.

You might also take a look into existing backends, to see how they work out.


UnifiedNlp can be easily built using Gradle.

git clone
cd UnifiedNlp
./gradlew build


Some components: Copyright (C) 2013 The Android Open Source Project

compat-folder is extracted from different AOSP versions for cross-version compatibility


Copyright (C) 2013-2019 microG Project Team

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.