Unified NLP on Fairphone 2 Open OS

@root: I also wonder how to do it, though you could always just manually edit the files. :wink:

@All @jochensp: I’m new to this and don’t know how UnifiedNlp works. Until now, my impression was that it works without any “proprietary Google stuff”. However, @jochensp’s patch added com.google.android.gms to the config_locationProviderPackageNames resource array in the source code, as suggested by mar-v-in. Does this mean that UnifiedNlp uses the Google Mobile Services (see also the gms package description) in some way? In any case, what does this patch actually do?

Thanks - makes me feel less stupid! :slight_smile: I guess one needs to run the patch command on the shell. Just wondering from which path…

Regarding GMS - I guess UnifiedNLP mimics the Google services and therefore is named identically? Does this make sense?

Ah, I see. You may be right, even on F-Droid UnifiedNlp carries this name: https://f-droid.org/repository/browse/?fdid=com.google.android.gms Thanks for noticing that!

I assume you need an account for the review tool they use to just be able to pull it. But downloading it manually will work as well, I guess. Too bad it just a “undocumented” website and there is no howto on how to use it without an account.


Update: Solved now, see the top of this thread.

Well, my (and maybe also @root’s) question was rather how to pull (if I’ve already an acoount), because I’ve never done this before …

That is correct.

It doesn’t use any Google Services. It uses (mainly) free location services provided by backends.

I’ve added a howto to the top post.


@jochensp: Nice, thanks for the commands!

@paulakreuzer: Thanks for clarifying!


Hi and thanks for your efforts!

Currently I don’t get any location information in any app on my own built FP2 OS. Will Unified NLP solve that problem? Or will it only make the network based location work?

Do I understand your how-to correctly, that the OS has to be built again after applying your patches?

Is there a way to just modify my FP2 OS? I would like a solution where I wouldn’t have to reinstall and configure all apps etc…

This will only help you with network location. You need to recompile the OS (or at least framework/base, haven’t tried), but you don’t need to reinstall everything afterwards (just don’t flash with -w :wink: ).

1 Like

I haven’t full understand the procedure. It would be nice if someone could clearify some things for me.
If I correctly understand it one has to apply the patches mentioned above and the build the FPOSOS version. Right? But which of the three F-Droid packages

do I have to install? I must have something wrong because so far it didn’t work with either of them. I tested it by trying to show my location in OsmAnd~.

Thanks it advance


I’m guessing this one, or did you include GAPPS in your OSOS build?

For it to actually work you’ll also need to download some backends to use the corresponding databases.

The procedure is correct. For me the “no GAPPS” version works fine (as I don’t have Gapps installed). Some things to check:

  • Did you enable the network location in the location settings?
  • Did you enable a Plugin for NLP (which one)?
  • Did you reboot as proposed in the installation guide?
  • If everything fails, you can try the debug version here.

Thank you @paulakreuzer and @jochensp now it works. I did everything except of a proper activation of the MozillaNlpBackend.

Thanks again


EDIT: @paulakreuzer You are right I didn’t include GAPPS with µg UnifiedNlp (no GAPPS) it works.

1 Like

One more question. I would like to use the database from OpenWiFi but I couldn’t figure out how to use it. I downloaded the *.tbz file, extracted it and tried to import it in LocalWifiNlpBackend. But this is not possible. I think this is related to https://github.com/n76/wifi_backend/issues/28. Is there another way to use the database?

Or do I misunderstand something?

Thanks a lot.


Thanks, it worked with the installation guide in the top post! :slight_smile:
Also just flashing system.img has left all my apps intact. Yay!

For testing I used this app from f-droid: Here GPS Location

@jochensp: When exactly do I have to apply the patches during the build process? Is the moment just before executing . build/envsetup.sh the correct one?

And how exactly do I do this? I tried your command in my build directory ~/fairphone_os, but afterwards the file had been unchanged (confirmed with a text editor). Does my build directory need to be named fp2-dev for this to work?

I applied the patches and rolled my “own” FPOS - all good! I can access the Unified NLP framework and receive location data from e.g. Mozilla. However, I cannot get GPS to work?! Anyone else observed a similar problem?


What services do you have activated? Do you use mircoG and Unified NLP? Is “Location” (=GPS) activated in your Settings? Use an application like “SatStat” to see what is going on. For me it works, but I’m on a FP1/4.4.4.

Or in short, you don’t need a provider for you GPS, your phone/Android does that part somewhere else (Settings->Location). A bit confusing, but I guess you know all this already.

I would guess just switch on GPS/Location, stand still and wait a long time outside while watching SatStat :slight_smile:

Update: What I would like to have is a feature in Android that shows me what service/provider just provided the location data … that would be nice to know sometimes.

I installed “µg Unified Nlp (no GAPPS)” from F-Droid. Location services set to “high precision” (i.e. GPS & WLAN/Cell).

Using “Here GPS Location” from F-Droid to read the data. Interesting observation: After reading the raw data via “Androsend 2” (once again F-Droid :wink: ) the data is available for other apps like “Here GPS Location” as well. Maybe it’s a bug in “µg Unifield Nlp” - will need to observe this…