@root: I also wonder how to do it, though you could always just manually edit the files.
@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?
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.
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 ).
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~.
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?
@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
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 ) 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…