Unified NLP on Fairphone 2 Open OS

Has anyone sucessfully compiled the latest FPOS code with the uNLP patches? I’m having trouble…

Details in the compiling FPOS thread:

Compiles fine over here, more in the other thread as it’s not uNLP related.
Btw. please don’t crosspost, it’s rather hard to follow.

This forum style is pretty hard to follow no matter what. :stuck_out_tongue:

Hello everyone,

I am having trouble using unifiedNLP: Whenever I start an application which uses location, the phone reboots. (not exactly reboots, but shows the blue FP2 start screen) Here’s what I did:

  • Get the repo
  • Apply patches :
    patch -p0 << EOF --- frameworks/base/core/res/res/values/config.xml.orig 2016-05-22 20:15:16.816563782 +0200 +++ frameworks/base/core/res/res/values/config.xml 2016-05-22 20:15:44.152563388 +0200 @@ -1054,6 +1054,7 @@ <string-array name="config_locationProviderPackageNames" translatable="false"> <!-- The standard AOSP fused location provider --> <item>com.android.location.fused</item> ``+ <item>com.google.android.gms</item>
    <!-- This string array can be overriden to enable test location providers initially. -->
  • delete device/qcom/common/product/overlay/frameworks/base/core/res/res/values/config.xml
  • make, flash via fastboot
  • Install µG UnifiedNLP (no GAPPS) via F-Droid
  • Start Andronsens 2

At this point, the phone crashes. I can see satellites for a short time, then the phone goes to the “Loading…” screen. Interestingly, it does not seem to be a reboot (I get random reboots sometimes, it’s not the same), and SSH stays connected for some seconds while already “Loading…”.

I pasted a log file here: https://justpaste.it/ulmr , containing this:
05-24 22:19:21.513 F/libc ( 5600): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 5647 (android.bg)

Any hints on what I did wrong?

It worked for me last time I tested it. Some notes:

  • Any reason why you didn’t applied the patches as I wrote in the first?
  • The segfault in libc sounds bad but rather unrelated. Did you try an other program like SatStat?
  • Does GPS work without the modifications? (Does it work using the official rom? Does it using a self compiled one?)

update: rebuilding the os using docker did the trick, seems to have been a build environment related problem.

  • From what I understand, using the above repo commands, I check out branches from an older version of the FP os. See the attached png: Left column is the device/qcom/common dir after applying repo download fp2-dev/device/qcom/common 4, right column is after only removing device/qcom/common/product/overlay/frameworks/base/core/res/res/values/config.xml

    Would you suggest checking out the branches anyway? Repo gives me a quite long list of changes I “lose” when running repo download ...

  • I did try google maps, gave me the same error. I also just tried using a clean installation, wiped everything. Same error. Must be something build related.

  • GPS worked in the official stock ROM. I experienced the issues described in GPS doesn´t work on FP Open OS using the official openOS

  • Interestingly, I get location using the “network only” mode. Crashed only occur in “device only” and “high precision” modes.

I will try rebuilding the whole OS from scratch.

Thanks for your help.

Thanks for noticing. I’ve fixed the instructions in the first post.

If it worked in network only mode, it can’t be this patch, as I only target exactly that mode.

The open source release 16.05.0 announcement mentions: Unified Location provider (Thanks Jochen).
And indeed, after installing the new OS and µg UnifiedNlp (no GAPPS) along with some location providers, I find that it works. This was the last think I was waiting for to be able to use my FP2. Thanks a lot to everyone who contributed.

1 Like

UnifiedNlp (no GAPPS) doesn’t work for me. I have an unrooted fairphone 2 running fp open os 16.06.0 without GAPPS, currently with mozilla and GSM backends. Nlps selfcheck says that:
android version supported
system supports location provider
unifiednlp is registered in system
location backend(s) set up
Network-based location enabled

are all ok. But it fails with:

UnifiedNlp has known location
UnifiedNlp provides location updates

Does anyone have a suggestion? I was under the impression that 16.06 didn’t need any patches for unifiednlp to work.

That doesn’t sound like failing but like success to me.?

Did you check whether you actually get a location in battery saving mode with a maps app?

Ah, sorry for being unclear. The selfcheck is a checklist with the things it should do, and the two last things are not checked. So what it’s saying is that unifiednlp lacks a known location, and that it doesn’t provide location update. Neither Osmand nor satstat can find my location in batterysaving mode

It looks like this

It looks the same for me, but it works anyways.

The “location backends set up :heavy_check_mark:” appears if you installed backends, but doesn’t mean that you actually set them up and that they are working. Go set them up and if you still don’t get a location in Osmand (Satstat won’t help in battery saving mode) try different backends. Some backends need a downloaded/imported database the others need an internet connection - all need you to have wifi enabled and/or a SIM inserted and to be somewhere where someone already added the nearby wifis and cell-towers to the database.

1 Like

Ok, I have now experimented some more.

Neither mozilla location service nor openbmap unified works while online. openbmap unified offers to download an offline databses, but nothing happens if I accept.

In GSM location service I can choose between “Download all areas and only save chosen” and “Download chosen areas from lacells (data may be old)”. The first alternative takes half an hour and does nothing, but the second actually kind of works! Osmand still thinks I’m about 3km from where I actually am though… How big does the margin of error tend to be in battery saving mode?

Do you still have this problem? Have you found a solution? The same happens to me (and by the way, how did you find out that the backends don’t work while online? I know Osmand can locate me but I don’t know what it is using to do so…)

Has anyone encountered this message: “microG Services Framework Proxy has stopped”? I get it almost every time I launch my weather app (Meteo Swiss). The app works, though…

@Linda_CH: This happen if you install it before “microG Services Core”, just reinstall “microG Services Framework Proxy”.

The two patches seem to be merged upstream from what I remember. So it’s not any more necessary to apply them - and therefore it’s not even necessary to recompile it.

I just tried it in a newly installed FPOSOS:

adb root
adb remount
adb shell

In the shell:

cd system/etc/permissions/
rm com.qualcomm.location.xml
cd /system/priv-app/com.qualcomm.location
rm com.qualcomm.location.apk

Then again:

adb reboot


1 Like

I installed UnifiedNlp via F-Droid today after updating Fairphone Open to version 17.08.1 – and it just works (at least with OsmAnd~).

The Self-Check in UnifiedNlp Settings still says Your system does not support this UnifiedNlp package. Either install a matching package or a compatibility Xposed module and UnifiedNlp is not listed as active location provider in Android’s location settings. But still, my current location is shown immediately after starting OsmAnd~…

Same situation with the self-check:

Have you tried changing the location mode?
When I’m in “device only” mode, I have a fix really quick with satstat, then quite fast with Osmand, but 150km away… But in less than 1 minute I have a perfect location.
When I’m in “Battery saving” mode, I get a quick location within Osmand, but 1 km away and I don’t get a better location after 5 minutes.
Something wrong!