Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work on FairphoneOS #55

Open
jspricke opened this issue Jan 25, 2016 · 14 comments
Open

Does not work on FairphoneOS #55

jspricke opened this issue Jan 25, 2016 · 14 comments

Comments

@jspricke
Copy link

Hi,

NLP doesn't work on my Fairphone 2 using the open source version of FairphoneOS (derived from AOSP 5.1; Sources here: http://code.fairphone.com/gerrit/). I tried the normal and the legacy version both as a user and a system app. It installs fine, but I don't get a location (tried different providers and same configuration works on an other phone using Omnirom). Is there some special patch I need to apply to the OS? Any way to debug?

Thanks!

@mar-v-in
Copy link
Member

I just checked the source code and it seems fp2-osos does not have third-party location provider support yet (which means that the GAPPS version is likely not working properly as well).
You can either use the Xposed module, sign UnifiedNlp releases using your platform key (= the key the AOSP build system uses to sign the operating system) or adjust the source code.

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 (example)

@jspricke
Copy link
Author

Thanks for the answer, I've modified the config.xml but the behavior, but it still does not work. Do you have any other hint?

@mar-v-in
Copy link
Member

Just to clarify details: You did use modified config.xml with NetworkLocation.apk (or non legacy version from F-Droid) as a user app?

Can you try this version with the new Self-check to see what it reports?

@jspricke
Copy link
Author

I tried the non legacy version from F-Droid as user and system app.

The new version looks awesome :). I only get a checkmark for "Android version supported", nothing else.

@mar-v-in
Copy link
Member

This certainly means that the change did not apply correctly. Can you upload your /system/framework/framework-res.apk somewhere so I can check what went wrong?

@jspricke
Copy link
Author

(link removed)

@mar-v-in
Copy link
Member

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 don't understand how this fixed binding to a proprietary service can be published as "open"... Even more interesting is, that according to their license, you are not allowed to remove the now unused qualcomm location blob from the system (because qualcomm wants your tracking data) without removing all other proprietary blobs (various audio/video codes, libraries for gps, hardware crypto and camera)...
Summary: As with the first Fairphone, fair ends when it comes to the software part of the device...

@jspricke
Copy link
Author

That was it, thanks a lot! I will try to look into the other blobs as well.

@jspricke
Copy link
Author

Regarding the config_locationProviderPackageNames, I would propose to add the information to the readme. Should I send a pull request?

@wvengen
Copy link

wvengen commented Feb 9, 2016

Thanks for figuring this out.
Would there be any way to modify the existing FP2 OS to support this?

@jspricke
Copy link
Author

jspricke commented Feb 9, 2016

@ale5000-git
Copy link
Member

ale5000-git commented Aug 15, 2016

@jspricke: I want to support also FairphoneOS in my patcher (Tingle) but I don't have it.
Can you please help me?
I need the original unpatched version of these files:
/system/framework/framework.apk
platform/frameworks/base/core/res/res/values/config.xml
device/qcom/common/product/overlay/frameworks/base/core/res/res/values/config.xml

@jspricke
Copy link
Author

Hi ale5000,

I guess you want to support the closed source version (not
Fairphone Open OS).

I need the original unpatched version of these files:

You can get the current image here:

https://fairphone.zendesk.com/hc/en-us/articles/201189497-Fairphone-OS-downloads-for-Fairphone-1-Fairphone-2

Use https://github.com/xpirt/sdat2img to convert it to a filesystem
image.

/system/framework/framework.apk

That one doesn't exists, but there is a framework-res.apk in there.

platform/frameworks/base/core/res/res/values/config.xml

There are no sources for FairphoneOS, but it should be similar to the
one in Fairphone Open OS. You can clone the repo here:

git clone https://code.fairphone.com/gerrit/fp2-dev/platform/frameworks/base
git checkout 01e9b64~

device/qcom/common/product/overlay/frameworks/base/core/res/res/values/config.xml

same here:
git clone https://code.fairphone.com/gerrit/fp2-dev/device/qcom/common
git checkout 3ec3b72~

Cheers Jochen

@ale5000-git
Copy link
Member

There isn't an estimated time for this but I will see what I can do.
I want also support old versions of Fairphone Open OS that aren't fixed (but it is low priority).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants