microg / GmsCore

Free implementation of Play Services
https://microg.org
Apache License 2.0
7.63k stars 1.61k forks source link

UnifiedNlp has no location #366

Open JonnyTech opened 7 years ago

JonnyTech commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

selfcheck

JonnyTech commented 7 years ago

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 commented 7 years ago

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

JonnyTech commented 7 years ago

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

n76 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

JonnyTech commented 7 years ago

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

KarmaMonk commented 7 years ago

Still the same problem with 0.2.4-103-gd9e86d9.

ArchangeGabriel commented 7 years ago

I think this is a false positive (false in the sense that location actually works) that needs to be fixed in UnifiedNlp: https://github.com/microg/android_packages_apps_UnifiedNlp/issues/123

ZJaume commented 6 years ago

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 commented 6 years ago

Has anyone with the problem tried latest version?

ildar commented 6 years ago

is this issue the same as https://github.com/microg/android_packages_apps_GmsCore/issues/411 ?

0pLuS0 commented 5 years ago

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... :face_with_head_bandage:

0pLuS0 commented 5 years ago

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 commented 5 years ago

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

ArchangeGabriel commented 5 years ago

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

0pLuS0 commented 5 years ago

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;

https://github.com/microg/android_packages_apps_GmsCore/issues/575#issuecomment-427457585

ghost commented 5 years ago

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 commented 5 years ago

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

MMMiel commented 5 years ago

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

Thanks!

DynaSpan commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

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

ArchangeGabriel commented 5 years ago

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

ArchangeGabriel commented 5 years ago

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

f1reflyyyylmao commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

drrossum commented 5 years ago

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

ariagit commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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.