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

UnifiedNlp has no location #366

Open
JonnyTech opened this issue May 5, 2017 · 40 comments
Open

UnifiedNlp has no location #366

JonnyTech opened this issue May 5, 2017 · 40 comments

Comments

@JonnyTech
Copy link

I have just moved to a new Nougat based ROM. I patched for signature spoofing and copied com.google.android.gms-10545451.apk to /system/priv-app/ plus the usual stuff such as installing the other components and rebooting. The problem is that the microG Self-Check keeps saying that UnifiedNlp does not have a last known location. Using HereGPS Location reports back a location on both GPS and Network, and other navigation programs find network location too. I copied all microG and nlp apk's to /system/priv-app/ but still no network location. Is there anything else that I can try or logs that I can look at?

@JonnyTech
Copy link
Author

I figured out how to do logcats (I think), see attached logcat.txt (note: location obscured by X's)

From what I can see, it is getting a location but never better than 42m which seems strange.

Any suggestions please?

@JonnyTech
Copy link
Author

selfcheck

@JonnyTech
Copy link
Author

After much tinkering, wiping, reflashing, reinstalling, and cursing, nothing worked.

I fully wiped, reflashed and installed version 0.2.4-81-gb1e98ea - success!

Installing version 92 breaks my system and no combination of downgrading or reinstalling fixes it. Only a full data wipe together with a ROM reflash is necessary.

I am going to experiment further to see if remains stable but the problem is definitely with v92.

@ale5000-git
Copy link
Member

Have you tried to disable and re-enable the backends?
I have noticed sometimes that the backends lost permissions.

@JonnyTech
Copy link
Author

Yes, many times, and remove and reinstall them, every combination of actions that I could think of - my original thought was permissions.

@n76
Copy link

n76 commented May 7, 2017

I am running crDroid 3.0 (Android 7.1.2) and microG Services Core 0.2.4-92-g3669bab and location services are running fine for me.

However my install may be slightly different than a fresh one: When I installed the ROM I copied the whatever was current microG in /system/priv-apps/ and then later installed the 0.2.4-92 update from the microG repository using F-Droid, so the 0.2.4-92 update is not in /system/priv-apps/

I think the system accepts the non-system update because the signature matches the one found in /system/priv-apps/. I don't know if I would have a problem if I replaced the older microG in /system/priv-apps/ with the current update.

@JonnyTech
Copy link
Author

I have v81 in /system/priv-apps/ and everything works.

Installing v92 (either from f-droid or direct download) as a standard app breaks my system.

Overwriting v81 with v92 in /system/priv-apps/ also breaks my system.

Nothing else is installed as a system app. Wonder what v92 changed?

@WanderMax
Copy link

@JonnyTech what kind of backend do you install? Thanks.

@JonnyTech
Copy link
Author

I tried them all, everything worked with v81, nothing with v92, the problem is microG not the backends.

@KarmaMonk
Copy link

Still the same problem with 0.2.4-103-gd9e86d9.

@ArchangeGabriel
Copy link
Contributor

I think this is a false positive (false in the sense that location actually works) that needs to be fixed in UnifiedNlp: microg/UnifiedNlp#123

@ZJaume
Copy link

ZJaume commented Jul 24, 2017

Same problem with LOS 14.1, installing as a system app breaks my system and as a user app location doesn't work for me. I'll try v81

@bam80
Copy link

bam80 commented Mar 11, 2018

Has anyone with the problem tried latest version?

@ildar
Copy link

ildar commented Mar 12, 2018 via email

@0pLuS0
Copy link

0pLuS0 commented Jul 12, 2018

I'm running microG on Stock Oreo 8.0.0 - AndroidOne and I'm seeing the same things;

No last known location...
Do not have location to test geocoder...
No UnifiedNlP was provided by the system within 10 seconds

Is there a fix for this, I can do on my end? I've been trying a lot of things, with no end in sight... 🤕

@0pLuS0
Copy link

0pLuS0 commented Oct 5, 2018

I just figured out a Solution when UnifiedNlP do not have Location to test Geocoder is not checked, to run these cmds;

./adb shell
su

pm grant com.google.android.gms android.permission.ACCESS_FINE_LOCATION
pm grant com.google.android.gms android.permission.ACCESS_COARSE_LOCATION

Can anyone confirm if this might be a fix?

Since it was mention about permissions...

@ppotato
Copy link

ppotato commented Oct 5, 2018

Yeap. Granting permissions worked for me on Android 8.1. Thanks.

@ArchangeGabriel
Copy link
Contributor

Worked for me too. So that would be μG not asking for both network and gps position permission?

@0pLuS0
Copy link

0pLuS0 commented Oct 6, 2018

Also if people are manually installing microG, Nanolx showed me on the post below permssions used in NanoDroid, which should probably also be ran, just to be on the safe side;

#575 (comment)

@ghost
Copy link

ghost commented Oct 11, 2018

Granting permissions worked for me on Android 9 - LineageOS with Magisk - nanodroid-patcher - microG services core and other microG apps from fdroid/microg repo - all as user apps
Thanks

@nolosb
Copy link

nolosb commented Oct 23, 2018

same here on 8.1. and fixes it! Thanks so much, was already giving way to despair with this!!

@MMMiel
Copy link

MMMiel commented Oct 24, 2018

Is there an app where I can run the command lines regarding permissions from?

Thanks!

@DynaSpan
Copy link

@MMMiel if you're on Lineage OS you can activate a Terminal app from the developer settings. Or, you can connect your phone to your PC and run the commands via ADB.

@Mafus1
Copy link

Mafus1 commented Oct 27, 2018

Anybody know why I get the following exception? I ran the command as root.
Operation not allowed: java.lang.SecurityException: Cannot grant system fixed permission android.permission.ACCESS_FINE_LOCATION for package com.google.android.gms

@f1reflyyyylmao
Copy link

You need to be root to run the command, notice the su preceeding the permission commands

@ArchangeGabriel
Copy link
Contributor

Actually it might depend on your ROM. I’ve been able to run those without su on OmniROM for instance.

@ArchangeGabriel
Copy link
Contributor

(Or maybe I was running from TWRP, not sure)

@f1reflyyyylmao
Copy link

Considering the error message he got, i thought root access would be the answer here. If the rom were to allow it, it wouldn't have thrown an error innit?

@Mafus1
Copy link

Mafus1 commented Oct 31, 2018

I did run as root. I even double checked that I really have root access, but I still get this error. Never the less it still fixed the problem with UnifiedNlP do not have Location to test Geocoder.

@ghost
Copy link

ghost commented Jan 4, 2019

I confirm that UnifiedNlp (No GApps) doesn't work on Android Pie 9.0 (AOSP w/o Gapps).

Self-Check shows all good, I configured it to use Deja Vu and Mozilla backends installed from F-Droid along with Nominatim for address lookups.

UnifiedNlp has no last known location. This will cause some apps to fail.
No UnifiedNlp location was provided by the system within 10 seconds.

It was working fine configured exactly the same way on Oreo 8.1 AOSP w/o Gapps

@ubmarco
Copy link

ubmarco commented Jan 9, 2019

The permission commands fixes the problem for me too. Android Pie LineageOS without GApps on Samsung Galaxy S4 mini.

@drrossum
Copy link

The permission commands suggested by 0pLuS0 fixed the issue for me, too. I'm using LineageOS 16 with microG on a mi a1.

@ariagit
Copy link

ariagit commented Feb 26, 2019

Anybody know why I get the following exception? I ran the command as root.
Operation not allowed: java.lang.SecurityException: Cannot grant system fixed permission android.permission.ACCESS_FINE_LOCATION for package com.google.android.gms

Same issue as above when trying the permissions fix, I get

Operation not allowed: java.lang.SecurityException: Cannot grant system fixed permission android.permission.ACCESS_FINE_LOCATION for package com.google.android.gms

and

Operation not allowed: java.lang.SecurityException: Cannot grant system fixed permission android.permission.ACCESS_COARSE_LOCATION for package com.google.android.gms

ran them in terminal as ROOT. I didn't see anything in the log that pertained to to that error.

Mafus1 who also got this error mentions it still got rid of the "has no location" error. I noticed the same, yet upon reboot the "has no location" error is back.

S4 on latest MicroG Lineage OS 14.x Android 7.x

Mozilla Location Service and Nomination (tried both osm and mapquest, same issue) backends,

thanks for any help.

@7ider5
Copy link

7ider5 commented Mar 18, 2019

Hello,

Same problem here. Fresh install of LineageOS unofficial fork with MicroG included on Sony Xperia Z5 Compact (E5823)

  1. Unified has no known location
  2. Unified does not have a location to test Geocoder.

-> Cannot grant permission from ADB nor internal terminal, both in su.

Android 7.1.2 - LineageOS 14.1 - microG v0.2.6.13280

@UHSL-Marcus
Copy link

UHSL-Marcus commented Mar 20, 2019

I am running CypherOS Nougat 7.1

I have installed All of microG using nanodroid. I am getting "No last known location",
"Do not have location to test geocoder", and no updates in last 10 seconds.

I have deja vu, apple and mozilla backends. All system apps with all permissions.

I tried manually adding the 2 permissions mentioned above but no avail.

@100100100100
Copy link

100100100100 commented Mar 31, 2019

hi, if anyone is still having this problem on LOS 16 w/ microg, I was able to solve simply by installing the Apple Backend from here:

https://f-droid.org/app/org.microg.nlp.backend.apple

as my phone is not rooted this was the only option that worked.

@ariagit
Copy link

ariagit commented Apr 15, 2019

hi, if anyone is still having this problem on LOS 16 w/ microg, I was able to solve simply by installing the Apple Backend from here:

https://f-droid.org/app/org.microg.nlp.backend.apple

Thanks this did get rid of the 'has no location' error for me after freezing the mozilla backend as well (S4 on LOS w. microg on Nougat) ..though as far as if location is working with any applications is another matter.

was hoping google maps might work but it only gets my location, it seems unable to track movement, anyway that's a separate issue, hopefully this backend works with map apps on FDroid

@murad-alm
Copy link

hi, if anyone is still having this problem on LOS 16 w/ microg, I was able to solve simply by installing the Apple Backend from here:

https://f-droid.org/app/org.microg.nlp.backend.apple

as my phone is not rooted this was the only option that worked.

Thanks! This helped!!!

I don't want to sound stupid, but can i trust Apple on my location? The reason why i installed MicroG was because i don't trust Google LOL..

@murad-alm
Copy link

Instead of Apple i would:
install GSM Location Service & MozillaNlpBackend
https://f-droid.org/en/packages/org.fitchfamily.android.gsmlocation/
https://f-droid.org/en/packages/org.microg.nlp.backend.ichnaea/

P.S: this worked for me :)

@SolAZDev
Copy link

SolAZDev commented Feb 18, 2020

LOS17, I've 9 set up (DejaVu, Apple, Mozilla Location, RadioCells.org, AMap, Baidu, GSM Location and Wifi Location) (Installed from Nanodroid and FDroid) I've ran Nanodroid's npem and the permission commands as root, and I continue to have the same issue, it may be checked sometimes but it's very rare. I am uncertain if that's the expected behavior...

One wierd quick fix is to disable and reenable any location provider.

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