microg / GmsCore

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

Your system does not support this UnifiedNlP Package #575

Closed 0pLuS0 closed 5 years ago

0pLuS0 commented 6 years ago

Hello

I'm running an Mi A1 Stock Oreo. I used the Terminal Debloater and removed as much of Google as I understand...

Apps Installed Xposed - version 90-beta 3 FakeGapps - 2.0 Magisk 16.0 Services Core - com.google.android.gms-9258259.apk Services Framework Proxy - com.google.android.gsf-8.apk Store (FakeStore release) - com.android.vending-16.apk DroidGuard Helper - org.microg.gms.droidguard-4.apk

From the above apps I installed, I didn't install any UnifiedNlP package. These are the same apps I install in Custom Roms, and I don't see this message in Custom Roms, but for some reason running Stock Oreo with only these packages installed, it is not working. instead in the microg settings I see this section;

System supports location provider Your system does not support this UnifiedNlP package. Either install a matching package or a compatibility Xposed module.

Should I also install UnifiedNlp.apk & NetworkLocation.apk?

I'm attaching two screen shots showing the microg settings.

settings2

0pLuS0 commented 6 years ago

Sorry if I have found a correct solution? After reading around, I installed the XposedGmsCoreUnifiedNlP

And now I have System supports location provider Checked

0pLuS0 commented 6 years ago

Since I posted this, I am now using a OnePlus 5T with Oxygen OS 5.1.5 and I'm running into the same thing using the latest microg v0.2.6.13280.

UNifiedNLP that comes in microg doesn't seem to work in stock Android, or does it, and can someone please help, I've been trying to figure this out for the past 3-4 months with no success... :(

Thanks

Nanolx commented 6 years ago

Stock ROMs usually have there own location provider, which conflicts with unlp. On some ROMs it is enough to 'simply' remove all conflicting ones.

Here you can find a list of conflicting location providers, which you may try to get rid of and see what happens.

If it still doesn't work, then the framework would need to patched in order to support unlp (which the Xposed module does on-the-fly). Please note that regardless of this issue, on Android Pie we experience issues with unlp even on supported ROMs, so Oreo is currently the best choice for microG users.

0pLuS0 commented 6 years ago

@Nanolx I went looking for AMAPNetworkLocation and couldn't find it. Is there documentation that can tell me where to find and what to delete for all these location providers?

Also I used the Magisk Module Debloater (Terminal Emulator) to debloat. If I installed NanoDroid-microg with the following .nanodroid-setup options, only overlay enabled, would this remove the location providers for me, as well as not messing with anything I've Debloated with the Debloater (Terminal Emulator) to help keep Systemless?

nanodroid_microg=0 nanodroid_fdroid=0 nanodroid_apps=0 nanodroid_overlay=1 nanodroid_zelda=0 nanodroid_mapsv1=1 nanodroid_init=0 nanodroid_gsync=0 nanodroid_swipe=0 nanodroid_forcesystem=0 nanodroid_bash=0 nanodroid_nano=0 nanodroid_utils=0 nanodroid_fonts=0 nanodroid_override=0 nanodroid_play=0 nanodroid_nlpbackend=0

Thanks

Nanolx commented 6 years ago

It removes all location providers as per the link posted above.

0pLuS0 commented 6 years ago

I found out, even with XposedGmsCoreUnifiedNlP installed, UnifiedNlP do not have Location to test Geocoder is still not checked.

What I ran across is that I now have to add in these two permissions and then it's checked.

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

Now in Self-Check it shows up as;

Geocoder provides address resolution from location and it's checked.

Do you know anything about these permissions?

So this is what I'm installing manually in this exact order;

XposedInstaller_3.1.5-Magisk XposedGmsCoreUnifiedNlP Magisk 17.1 microG Services Core microG Services Framework Proxy FakeStore microG Store microG DroidGuard Helper

After installing these apps, do these permissions seems like something that does need to be done?

Thanks

Nanolx commented 6 years ago

Hmm... I never installed microG from just the plain APKs, but it may be that you need to manually grant several permissions if it's not a /system app.

Most microG installers place them as system apps and provide a permissions file for Android to know that it has to grant those permissions. But yes, theese two above are among them, see the permissions file used in NanoDroid.

0pLuS0 commented 6 years ago

@Nanolx thanks for sharing this with me. It also made me think to install DejaVu just to be on the safe side for it's benefits....

So I guess to be safe I'll run all these permissions;

pm grant com.google.android.gms android.permission.ACCESS_COARSE_LOCATION pm grant com.google.android.gms android.permission.ACCESS_FINE_LOCATION pm grant com.google.android.gms android.permission.GET_ACCOUNTS pm grant com.google.android.gms android.permission.READ_EXTERNAL_STORAGE pm grant com.google.android.gms android.permission.READ_PHONE_STATE pm grant com.google.android.gms android.permission.WRITE_EXTERNAL_STORAGE

pm grant com.android.vending android.permission.ACCESS_COARSE_LOCATION pm grant com.android.vending android.permission.ACCESS_FINE_LOCATION pm grant com.android.vending android.permission.GET_ACCOUNTS pm grant com.android.vending android.permission.READ_EXTERNAL_STORAGE pm grant com.android.vending android.permission.READ_PHONE_STATE pm grant com.android.vending android.permission.WRITE_EXTERNAL_STORAGE

pm grant org.microg.nlp.backend.ichnaea android.permission.ACCESS_COARSE_LOCATION pm grant org.microg.nlp.backend.ichnaea android.permission.ACCESS_FINE_LOCATION pm grant org.microg.nlp.backend.ichnaea android.permission.READ_PHONE_STATE

pm grant org.fitchfamily.android.dejavu android.permission.ACCESS_COARSE_LOCATION pm grant org.fitchfamily.android.dejavu android.permission.ACCESS_FINE_LOCATION

Look good?

THANKS

Nanolx commented 6 years ago

You don't have to grant all of them manually, only those that are missing

But yes, technically that would be correct.

0pLuS0 commented 6 years ago

Ok, on perms, and getting back to the original problem;

System supports location provider Your system does not support this UnifiedNlP package. Either install a matching package or a compatibility Xposed module

How can this be done on Stock Android to avoid Xposed? Doing Xposed, then SafetyNet problems...

I assumed when I started messing with microG, that Stock Android was taken into consideration for making all of this work? Not just a project for Custom Roms only...

@Nanolx are you working/helping on microg project?

Thanks

Nanolx commented 6 years ago

You said you installed everything from F-Droid? Starting with Android 7 microG needs to be a system app (in /system/priv-app) in first place for unifiednlp to work. So you need to move them there.

0pLuS0 commented 6 years ago

@Nanolx I had a look through the NanoDroid-microg and what it's removing, but I didn't have anything extra that needed removing in these paths

Also I see this is what you place in priv-app

/NanoDroid-microG-18.3.1.20180921/system/priv-app >ls DroidGuard FakeStore GmsCore GsfProxy Phonesky YalpStore

So for microG I'll add in these paths too;

/system/priv-app/DroidGuard /system/priv-app/GmsCore /system/priv-app/GsfProxy

But on the Wiki it only talks about GmsCore for priv-app; https://github.com/microg/android_packages_apps_GmsCore/wiki/Installation

So I would of thought if these were all needed, it would be mentioned on the Wiki...

System supports location provider is still unchecked.

I wonder if decompiling and changing the framework-res.apk this might work?

THANKS

Nanolx commented 6 years ago

As in regard of your previous question: I'm not part of the microG project, I'm just using it myself and try to help others.

About /system/app Vs. /system/priv-app: for GmsCore this is required, for the others it shouldn't make a difference in the end.

As for framework-res, I in fact never had a look at it for modifying one regarding unlp, as I always use Aftermarket ROMs, where in most cases, regardless whether pre- or self-patched, unlp works straight out of the box. The problem with this approach is, that it will be defeated by each ROM update.

Could you post what stuff is inside /system/app and /system/priv-app, aswell as a logcat? It should contain information about why unlp fails to register in the system.

0pLuS0 commented 6 years ago

I know who you are, just wasn't sure if you did anything on microG project. Your work on NanoDroid is greatly appreciated!

I've attached a find.txt run from this cmd; find /system /data/{app,data,misc,system} > /sdcard/find.txt

And a logcat

find.txt

logcat.txt

This is with Xposed installed and the XposedGmsCoreUnifiedNlP module, so I wonder if it's going to hide the problem and I need to give you logs without Xposed and the module?

Thank you very much for your help!

0pLuS0 commented 6 years ago

I have several TWRP backups, so I wiped and installed one without Xposed.

I installed all of microG from F-Droid except I used the patched version of DroidGuard from NanoDroid-microG, which is my understanding helps to pass SafetyNet, so I wanted to test this out.

Here's the logcat and find.txt for this Device Setup without Xposed and this patched DroidGuard;

find.txt

logcat.txt

Thanks

0pLuS0 commented 6 years ago

Ok last one, this time I wiped and installed all microG from F-Droid. So for now it shows two items unchecked, I'm attaching a screen shot. Also new logcat and find.txt

find.txt find.txt

logcat logcat.txt

microg

THANKS!

Nanolx commented 6 years ago

I'll have a look at it during the next days.

0pLuS0 commented 6 years ago

@Nanolx hi, by chance any luck?

Thanks

bam80 commented 5 years ago

@Nanolx, any luck?

0pLuS0 commented 5 years ago

I've since moved on and with the latest changes in NanoDroid-microG, it all works now...

No need to reply on my behalf...

Thanks

bam80 commented 5 years ago

@0pLuS0 I was replying for my behalf. If you had success since then you could report about it. Sorry for that.

0pLuS0 commented 5 years ago

I just installed the Xposed module I mentioned in the second reply, made sure it had all the correct permisions and everything works, there's nothing else I can tell you.

Nanolx commented 5 years ago

The NanoDroid-Patcher (again) includes the unified_nlp patch, which might fix the issue.

But what I noticed is that on some devices com.qualcomm.location must be installed for uNlp to work, while on most/older ROMs you need to remove that package for uNlp to work. The OnePlus 5T is one of the affected devices.

bam80 commented 5 years ago

@Nanolx do you know the reason of such different behavior?

Nanolx commented 5 years ago

It's just the way the location provider is technically implemented, I haven't cared enough to go deepe into details. oF2pks has posted a link (in the NanoDroid XDA-Thread) to a git commit by OnePlus which shows that change.

Iey4iej3 commented 5 years ago

The NanoDroid-Patcher (again) includes the unified_nlp patch, which might fix the issue.

But what I noticed is that on some devices com.qualcomm.location must be installed for uNlp to work, while on most/older ROMs you need to remove that package for uNlp to work. The OnePlus 5T is one of the affected devices.

I wonder whether com.qualcomm.location is the proprietary blob described in their official site as

Qualcomm Location periodically sends us a unique software ID, the location of your device (longitude, latitude and altitude, and its uncertainty) and nearby cellular towers and Wi-Fi hotspots, signal strength, and time (collectively, “Location Data”). As with any Internet communication, we also receive the IP address your device uses. We use Location Data, software IDs and IP addresses, and the other data we collect to help us protect, evaluate, and improve the performance of our systems.

that is to say, even if we use UnifiedNlp, the presence of com.qualcomm.location means that users will upload these privacy data periodically? I searched in the repo of LineageOS and found that the maintainers repeatedly re-added it into blobs, even disabling location overlays so that UnifiedNlp won't work any longer. I don't understand what is the difficulty there, but LineageOS is at least advertised to be free and open-source, if there is no difficulty to remove com.qualcomm.location, I don't understand why they include it and make it exclusive.