microg / UnifiedNlp

Alternative network location provider for Android, with plugin interface to easily integrate third-party location providers.
977 stars 210 forks source link

[Question] How to install whith Gapps already installed? #9

Closed Mosrite closed 9 years ago

Mosrite commented 10 years ago

Hello, I use OmniRom with Gapps installed. Now I try to switch from Google location service to UnifiedNLP. I downloaded the NetworkLocation.apk and put it into /system/priv-app/, afterwards I rebooted. Then I downloaded and installed the Apple and GSM plugins form F-Droid and rebooted again. But the NLP backend is not listed among settings->apps. Furthermore, my phone still uses Google's location service. How do I change this and make it work? Thanks in advance for your help!

languitar commented 10 years ago

Up until now I could enable UnifiedNLP with Gapps by renaming /system/priv-apk/GmsCore.apk to something that is not loaded automatically (e.g. GmsCore.bak) and then rebooting. It seems they conflict somehow. However, this also stopped working for me today.

mar-v-in commented 10 years ago

UnifiedNlp interferes with Google Play Services, which is located in /system/priv-app/GmsCore.apk. You'll run in trouble if you try to use some google apps without original (or atleast compatible) GmsCore package - thus I clearly disadvise doing so. Depending on what component of GAPPS you require, there might already be a free replacement out there :)

Mosrite commented 10 years ago

OK, thanks for your answer. Where can I find a suitable replacement?

languitar commented 10 years ago

https://github.com/microg/android_packages_apps_GmsCore This should be one, but I didn't try it so far.

Mosrite commented 10 years ago

Thanks. Apparently, there hasn't been much going on with this repository so far. I'll watch it however, maybe they expand the description sometimes. Then I'll try it.

mar-v-in commented 10 years ago

Where can I find a suitable replacement?

There is none yet. I started working on one, but its far from complete.

May I ask you: What's the reason for you to have Gapps installed at all?

Mosrite commented 10 years ago

Well, as much as I distrust Google, there isn't really a way around GApps for me. I need a properly working location service and push notifications. Furthermore, I don't want to miss out on some apps I only can get on the Play Store. I know there is an APK-downloader webapp, but this doesn't support non-free apps and forces me to update apps manually which is far from comfortable. I would be more than happy to do without GApps or at least only use the Play Store but no other GApps. But I don't think there is a way to use Apps with GCM push notifications without GSF.

languitar commented 10 years ago

@mar-v-in you said that UnifiedNLP interfaces with GmsCore? How can this work then if no Gapps are installed since that apk is from Gapps?

mar-v-in commented 10 years ago

I think I wrote interfere, not interface :)

In theory LegacyNetworkLocation can be used together with GmsCore. It turns out that OmniROM might be compatible with LegacyNetworkLocation. Download that one and copy it to /system/priv-app/ without removing GmsCore should work, but I can't guarantee that it's not using Google's location service then (to find that out, check logcat). CM will not work with LegacyNetworkLocation

If you compile your ROM from source or are familiar with modifying system resources: Modify the string-array config_locationProviderPackageNames, so that it contains com.google.android.location (which is legacy) instead of com.google.android.gms. The behaviour when both are in the string-array (which is the case for OmniROM) is unknown to me.

languitar commented 10 years ago

@mar-v-in oh right ;) So anyway, assuing I don't have anything that uses gapps, the weird thing is that now even removing all Google*.apks and GmsCore.apk doesn't give me the provider choser back to the menu. I also couldn't find anything related in a logcat. Any idea what could cause this?

mar-v-in commented 10 years ago

@languitar did you check file permissions?

languitar commented 10 years ago

@mar-v-in I think the reason for my problem is that everything in the folder is loaded, and not only .apk files. If I move the files completely out of that folder, things work correctly. Strangely, this seems to be different since the last Cyanogenmod update. Before, just renaming to .bak was sufficient.

mar-v-in commented 9 years ago

I guess this problem can be closed, as everything relevant is said.

UnifiedNlp interferes with Google Play Services, which is located in /system/priv-app/GmsCore.apk. You'll run in trouble if you try to use some google apps without original (or atleast compatible) GmsCore package - thus I clearly disadvise doing so.