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

[Question] How does it work? #2

Open
danielmmmm opened this issue Feb 9, 2015 · 19 comments
Open

[Question] How does it work? #2

danielmmmm opened this issue Feb 9, 2015 · 19 comments

Comments

@danielmmmm
Copy link

Edit: I figured out what was wrong on my phone. I am in the progress of configureing the backends and I assume that means that your module works :-)

Hello and thanks for this interesting module!

For some reason, I cannot get UnifiedNlp to work on my phone. I copied NetworkLocation.apk to /system/priv-app, changed the access rights to rw-r--r-- and rebooted. UnifiedNlp and Local-GSM-Backend are installed. Your module is activated and I rebooted afterwards.
The only app that I can start is UnifiedNlp itself, but that just opens "Google Settings". Local-GSM-Backend doesn't appear as an app (in my launcher) that can be opened and configured.

@danielmmmm
Copy link
Author

Hm, I did not get it to work after all. Only removing GmsCore.apk worked ... but I was hoping to being able to keep it and still use UnifiedNlp. Apparently I cannot install UnifiedNlp when GmsCore is installed in /system/priv-apps.
Did I overlook something or is there a special procedure to get UnifiedNlp up and running with your XPosed module?

@Rawi01
Copy link
Owner

Rawi01 commented Feb 9, 2015

It seems like you using the wrong apk.

If you want to use UnifiedNlp with this module you have to download and simply install the UnifiedNlp.apk from the UnifiedNlp release page. It only works with this apk. It is not necessary to copy it to some speciall directory or set permissions.

@danielmmmm
Copy link
Author

Ah, that explains a lot. How do I know that UnifiedNlp is working? I can configure backends, but in Android location settings, I only see "Google location reporting" as location service (and I have disabled location for Google apps).

@Rawi01
Copy link
Owner

Rawi01 commented Feb 12, 2015

I will add some documentation soon. I will also try to update the module to reduce problems.

@danielmmmm
the "Google location reporting" can be ignored. It does not mean that Google Loaction Services are still used. You will also see no UnifiedNlp entry. At the moment there is no built-in function to see if it is running. I described a way to check it under #1.

@CHEF-KOCH
There are three different releases of UnifiedNlp: NetworkLocation.apk, LegacyNetworkLocation.apk and UnifiedNlp.apk. This module only works with UnifiedNlp.apk. The F-Droid build is equivalent to NetworkLocation.apk which seems to be your problem. So a soultion for your problem should be to remove your currently installed version and simply install the correct version. It is not important where you place it, at my phone it is installed under /data/app.

@Rawi01
Copy link
Owner

Rawi01 commented Feb 13, 2015

I added some documentation and updated the module. You can now open the module settings to check if everything is ok.

@CHEF-KOCH your last comment seems to be lost but i think the new dialog is similar to your suggestion

@danielmmmm
Copy link
Author

Sorry for not replying earlier. I like the new testing UI!
Unfortunately it fails at step 3 (UnifiedNlp location). Do I have to have anything from Google installed to make UnifiedNlp work with your module? I only use the Play store and therefore I only have the following apk's from the Google apps installed to system/priv-app:
GmsCore.apk, GoogleLoginService.apk, GoogleServicesFramework.apk and Phonesky.apk
Nothing else is installed. I am afraid that I miss an apk or that I disabled something with MyAndroidTools or blocked something with XPrivacy :-(

@Rawi01
Copy link
Owner

Rawi01 commented Feb 21, 2015

Step 3 can fail with different messages. If you get no location you should install a backend, if your location is not an UnifiedNlp location you should make sure that the module is active.
Another problemm could be your phone or your android version. Which one do you use?

@danielmmmm
Copy link
Author

Thanks a lot for your support! I get the impression that I am a special case :-)

Your module says "Your location was not found. Make sure that you added at least one backend". LogCat says:
I/CheckStep(14327): UnifiedNlp locations state changed to FAIL
D/CheckWorkingTask(14327): UnifiedNlp location: FAIL

I have two backends installed, configured and activated (GSM Local Backend and WiFi Personal Backend).
My phone is a Motorola Droid 4 running CM11 (M12). I removed most of the original CM apps and GApps are the minimum for the Play store. In addition are all apps restricted with XPrivacy and I disabled many services, activities and receivers, especially for the Google Play Services.

I will install some other backends and try again.

Edit: I installed the Mozilla location Plugin and I think I got a location with "Here GPS Location" (even though I still get the same error with your module). Maybe there is something wrong with my GSM Local Backend database. I will re-build it and test again when I have a fast Internet connection available...

@Rawi01
Copy link
Owner

Rawi01 commented Feb 25, 2015

If you get a network locaiton with Here GPS Location you should get a location in the module too. Both using the default android location api. Please check that you not blocked network location access for the module via XPrivacy.

@danielmmmm
Copy link
Author

I disabled XPrivacy for UnifiedNlp, your module and the backends ... which didn't make a difference. With "Here GPS" I get a location every now and then. Very often, it won't update my location and then it just tells me that it got the last location some thousand seconds ago.
Well, I give up and just assume that my phone is bugged...
Thanks a lot for your support! Maybe I will get everything to work when I update to CM12 in some months and re-install everything from scratch.

@IzzySoft
Copy link

I'm sitting in the same boat with @danielmmmm and @CHEF-KOCH – I've already checked to use the correct UnifiedNLP.apk (F-Droid seems to have "switched", as what I've got here is org.microg.nlp). Still, with 80% of the checks I get no location, and in the remaining 20% it says it's not a UnifiedNLP location. And yes, I've checked things more than 5 times: There've been quite a few reboots since I've first installed Xposed (and other modules are working fine) as well as your module, I've got the Local-GSM-Backend installed and a datafile is in place (recognized as well; the very same cell-data file works fine on a different device with NOGAPPs). Even converted both apps to system apps using TitaniumBackup. Nada.

Device: LG P880 (aka "Optimus 4X HD"), latest stock LG ROM (Android 4.1.2), latest stable XPosed.

UPDATE: Though package names are similar, I've uninstalled the F-Droid version and replaced it by the UnifiedNLP.apk picked from Github this morning. Not sure if I can call that an improvement, but at least the error thrown now is consistent: I've tried a few times, and now always get the "not a UnifiedNLP location" error. So I'm not 100% sure where the error lies (will do a logcat ASAP for this; maybe I should report this as issue with Local-GSM-Backend as well). Related issue with µg is Germany - only Apple WiFi backend works (I'm in Germany as well), where my previous logcat and screenshots are attached already.

@IzzySoft
Copy link

@Rawi01 I've followed your advice from above (as described with my previous comment). Checking with logcat, it seems UnifiedNlp itself is working, but its provided locations are not accepted by the system:

W/LocationManagerService(13440): org.microg.nlp implements com.android.location.service.GeocodeProvider but its signatures don't match those in com.google.android.location, ignoring

So it does'nt get a chance. My impression was that's exaclty what your Xposed module is supposed to care for ("Module to integrate UnifiedNlp into the system even if GAPPS are installed"). So where am I wrong here? All the module GUI lets me do is run the check, which fails (location is reported, but not a UnifiedNlp location – as the latter gets no chance due to the signature error listed above); I see no options I could set, or actions other than the check I could perform.

Device specs in my last comment. Installation steps from the xposed repo page have been followed, plenty of reboots since.

@Rawi01
Copy link
Owner

Rawi01 commented Jul 3, 2015

Sorry guys, I was busy with some genetic algorithm stuff...

The logfiles you posted here looks like your device has some problems getting the GsmCellId. Have you tried another backend? I would recommend the AppleWifiNlpBackend for testing as it seems quite stable.

If I remember correctly the signature problem is something else. UnifiedNlp tries to add itself to the location provider list which only works if it pass the signature check. The Xposed module should ensure that but it seems not to work on your device. This is not related to the location stuff it is only there to adjust the settings dialog.

@IzzySoft
Copy link

IzzySoft commented Jul 3, 2015

@Rawi01 yes, I've tried a second provider meanwhile (OpenBmap), same results. I prefer not to use the Apple backend (replacing one tracker by another). As I see it, the main problem is the signature stuff, which this Xposed module was supposed to take care of. Any idea what goes wrong with that, or how to figure it? Makes no sense to play with different providers before this issue is solved.

Some day I plan to upgrade the device to a custom ROM without GApps, which should make the current issue obsolete for me. What currently keeps me from doing so is I need GCM. I've read µg meanwhile provides that; but as long as the documentation is missing (how to set it up), and advices here and there pretty much differ, I'd rather not...

@IzzySoft
Copy link

@Rawi01 I've just tried with a "virgin device": Stock ROM, also Android 4.1.2. Installed UnifiedNlp, the OpenBmap backend, and XposedUnifiedNlp (1.0.3), rebooted after enabling the module, enabled network locations in settings. Result: Exactly the same as on the LG device,

W/LocationManagerService( 3619): org.microg.nlp implements com.android.location.service.GeocodeProvider but its signatures don't match those in com.google.android.location, ignoring

A closer look: Seems this message was before the update to 1.0.3 (strange, I always thought logs don't survive a reboot?), I could not find it afterwards – so it seems this part works on this device.

Still, the check failed (logcat excerpts at pastebin.com). But that might well be due to the fact the device has no GSM facility (nor GPS, it's a tablet), and the OpenBmap database has no entries in my area (I could find no hint in the logcat that the OpenBmap module provided any location; checking with their database confirms my AP is unknown to them).

I'm tempted to assume the "signature issue" is due to some LG modifications on my phone (as it didn't pop up on the tablet after enabling v1.0.3). I still welcome hints for how I can verify it works on the tablet. I've tried with the Apple backend (no success) and the Mozilla backend (no success either; though marked compatible with Android 2.3.3+, this one seems to require at least 4.2 according to logcat – which is a pity, as according to their map, the latter should cover my area's WiFi APs).

@Nixbligger
Copy link

Hello everybody,

any news concerning this matter? Unfortunately I'm bound to use a Vanilla Rom on my Xperia E Dual device, and am very reluctant to use google location services.
On my former device (CM11 xperia mango) I had all the UnifiedNlp environment running smoothly, as there was no Gapps hassle to start with.
But now there is this app listed as installed in FDroid (µg UnifiedNlp for GAPPS-free devices) that is neither able to be updated nor removed - ok, I learned now that this is the Gapps location service with the same package name, unfortunately.

After some failed attempts to make the whole thing work with Xposed Framework, Rawi01's module and the F-Droid version of "µg UnifiedNlp for devices with GAPPS" I found this thread.

I learned that I only have to download and install the UnifiedNlp.apk linked above (prompts for something being overwritten - supposed it would be the GMS.apk), some of the backends ( install via FDroid? I tried Mozilla location service and Openbmap offline database + Nominatim address lookup), choose them in the Nlp settings, activate the Xposed module and I would be set to go.
But I am not.

If I check the state of nlp with the respective tool provided by the module, I get similar results like @IzzySoft : "Your location were found but...not like an UnifiedNlp location. ..."

Did anybody actually ever reported a UnifiedNlp environment working on a device with GAPPS installed? A silver bullet at hand somebody? Or a good step-by-step guide?

Thx for any advice you might have!

Cheers,
Nix

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

5 participants
@danielmmmm @Nixbligger @Rawi01 @IzzySoft and others