Unified NLP on Fairphone 2 Open OS

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

Thanks again

Patrik

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.

Patrik

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?

Cheers!

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…

Interesting. Maybe you can report this to observation to µg Unified Nlp people? I saw someone else here having a problem with OSMmaps and GPS. Maybe that was related, but I don’t recall anymore.

Will do - but first I need to understand what’s going on… :slight_smile:

I assume your location mode is still “High accuracy”, during the testing right? “Battery saving” wouldn’t be enough. And I don’t think that apps can change this setting.

Too bad that there is no “debug” mode for the location settings that shows what backend currently gets what data.

OK, so it works - somehow. My problem: the GPS receiver’s performance is baaaaad. Just like the good old Garmin PhaseTrac12 - the 90s are calling. :wink: Satellite acquisition takes ages. Once it’s locked in, the receiver seems to work fine. Could this be related to an issue with A-GPS or the ability to save the almanac? Any idea how to debug?

There is a new version of Unified NLP out - “v1.6.2-dirty”. I assume “dirty” means unstable?! Anyhow, this version offers a system self-check. See attached - even after acquiring a location, there is no “last known location” available. Might this be the issue?

I’ve deleted the com.qualcomm.location.apk and the location system seems to work even better :).

@paulakreuzer (or one of the admins), can you make the first post a wiki, so I can add this information?:

rm vendor/qcom/proprietary/target/product/FP2/system/priv-app/com.qualcomm.location/com.qualcomm.location.apk

1 Like

Good idea! Done. :slight_smile:

Interesting! But is it safe to delete it? Isn’t this apk also responsible for getting the location via GPS? Or is this done by another service/app?

It’s save to delete, GPS works fine without.

Wonderful! In this case, I will do this as well. Thanks a lot for the hint! :slight_smile:

Any ideas how to enable UnifiedNlp after compilation? I am testing the FPOSOS Beta, and UnifiedNlp would not work…

You need to modify files. Following this guide should help. Thanks to mar-v-in & jspricke.

Best read the full discussion, these are just the important facts as quotes.

“To adjust the source code you need to add com.google.android.gms to the config_locationProviderPackageNames resource array, either by modifying platform/frameworks/base/core/res/res/values/config.xml directly or by using an overlay”

“It seems like qualcomm is adding some fixed link to their proprietary location service through device/qcom/common/product/overlay/frameworks/base/core/res/res/values/config.xml. Remove this file completely or at least change config_enableNetworkLocationOverlay to true.”

I assume the question of @root was how to apply this patch when you are already running your own build in phone and do not want to recompile the wholeimage just because of missing unifiednlp.