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

Unified NLP not working on self-compiled AOSP 7 #102

Closed
danielegobbetti opened this issue Oct 14, 2016 · 16 comments
Closed

Unified NLP not working on self-compiled AOSP 7 #102

danielegobbetti opened this issue Oct 14, 2016 · 16 comments

Comments

@danielegobbetti
Copy link
Contributor

Background info here:
microg/GmsCore#216
I was directed here to check #55 but I couldn't find any overlay that would interfere with the Android 6 patch (which adds the required package name to the framework).

@danielegobbetti
Copy link
Contributor Author

I recompiled and signed with the platformkey. The app is still installed in /data. The warnings went away but the location provider still does not work. The microg's settings don't show the tick next to "UnifiedNlp is registered in system".

@mar-v-in
Copy link
Member

did you reboot after installation?

@danielegobbetti
Copy link
Contributor Author

Yes! I also tried several location provider just to be sure.

@mar-v-in
Copy link
Member

Just to verify: Self-Check has everything ticked but "registered in system" and "has known location"?

@danielegobbetti
Copy link
Contributor Author

That is correct. Everything ticked beside "registered", further no last known location present and no update within 10 seconds " warnings".

@mar-v-in
Copy link
Member

Confirmed and reported upstream https://code.google.com/p/android/issues/detail?id=226358. Until now it should be enough to put the app into /system. Updates can still be installed to /data as long as a copy in /system is present.

@danielegobbetti
Copy link
Contributor Author

Thanks a lot! It's a pity seeing aosp getting more and more crippled with each release :-/

@IzzySoft
Copy link

@danielegobbetti one of the reasons I'm still sticking to LP. Sadly.

@danielegobbetti
Copy link
Contributor Author

@IzzySoft Android 6 worked well for me with microg.

@n76
Copy link
Contributor

n76 commented Oct 27, 2016

@IzzySoft Like @danielegobbetti I've been using Android 6 with no issues. I self-compile AOSP so with the signature spoof changed needed for GmsCore and I've been running GmsCore with its built-in UnifiedNLP.

@IzzySoft
Copy link

@danielegobbetti @n76 I wasn't so much speaking of microG (pretty sure it will do its job), but e.g. hat the crippled permission system in mind. I guess Xprivacy should do its job independently from that (as it doesn't care about those "declarative permissions" but rather covers "functionalities/interfaces") – but before someone confirms "with enthusiasm and authority" that's the case I'll stay hesistant :)

@danielegobbetti
Copy link
Contributor Author

OK, I took the opposite approach and patched the aosp file responsible for the additional check. I can confirm that the change works (all checks are green now, and unifiednlp started working immediately) with no apparent drawback.

Do you want me to make a pull request with the patch for android N?

@mar-v-in
Copy link
Member

@danielegobbetti Thanks for your work.

If you can setup a PR with the patch required to run UnifiedNlp (not the signature patching of GmsCore) in a patches/ subfolder.

If you don't mind, it would also be awesome if you push the patch to CM and OmniROM gerrit, but I can do this as well if you want.

@danielegobbetti
Copy link
Contributor Author

danielegobbetti commented Oct 28, 2016

@mar-v-in closing this in favor of #103. I'd prefer if you could do the push to Omnirom and other ROMs. I am available to test other approaches if there are suggestions (edit: I mean if the ROM maintainers aren't happy with this and want to try something different)

@nikolowry
Copy link

Big fan of microg and the effort to make FOSS Android usable again - so first thanks for the continued work!

I'm on the 0.2.4-22-gcb356d2 gmscore build (with UnifiedNlp) and found this issue after about two weeks of not being able to get location to work.

I didn't have any plans (or time) to compile/flash my own rom, so I booted into recovery, mounted /system and copied the following to /system/priv-app:

  • com.google.android.gms-1
  • com.google.android.gsf-1
  • org.fitchfamily.android.wifi_backend-1
  • org.fitchfamily.android.gsmlocation-1
  • org.microg.nlp.backend.ichnaea-1
  • org.microg.nlp.backend.nominatim-1

Obviously I didn't know if I should just copy com.google.android.gms-1 or if the gsf framework and backends needed to be in /system/priv-app as well - so I just played it safe and copied them all.

Point being, it might be really helpful for other users like myself who align with the FOSS mentality but aren't Android-first devs/tinkers, if the wiki was updated with a note concerning which apk{s} needs to be copied to /system/priv-app until the newer builds are stable.

@ale5000-git
Copy link
Member

ale5000-git commented Jan 8, 2017

@nikolowry: Installing it manually in the system partition is likely to cause problems since there are many things to consider and it differs on various Android version.

To do it more easily you could try my flashable ZIP
Note: In case you try, remove the files you have already copied before installing the ZIP.

ttefke pushed a commit to ttefke/android_vendor_ngc4622 that referenced this issue Mar 19, 2018
This restores the behavior of android M. Tested on AOSP 7.0.0_r14.
Closes microg/UnifiedNlp#102
ttefke added a commit to ttefke/android_vendor_ngc4622 that referenced this issue May 10, 2018
These are all patches from lineage-15.1 that are needed for cm-14.1.
Some small adaptions for cm-14.1 have been made.

Make building possible on Arch Linux

* On Arch, python version 2 is linked to python2 instead of python.
  We need to create a virtual environment to fix this,
  because only linking python2 to python can,
  under some circumstances, cause weird build errors.

* According to the Arch wiki
  (https://wiki.archlinux.org/index.php/Android#Setting_up_the_build_environment)
  we might encounter build errors due to missing python modules.
  They recommend to symlink the python module dir to
  the virtual environment dir.
  However, some of these files are already there,
  so we pass stderr of the link command to /dev/null
  in order to avoid spamming the console due to these linkage errors.

* Prefer clang: gcc can cause weird build errors, too.
  These errors do not happen if using clang.

Change-Id: If502f7ccff2223bd8fbea8156c67b4e76ae28f6e

Source ngc4622 envsetup

Change-Id: Ib313a4a72a1f6b17770da308bd2adee85ebbf238

Allow location providers also outside of /system

This restores the behavior of android M. Tested on AOSP 7.0.0_r14.
Closes microg/UnifiedNlp#102

overlay: Allow to use UnifiedNlp location provider

This doesn't have security implications as in order to use the location
provider in needs to be installed as a system app. However this would
allow it to be flashed to system like gapps.

Change-Id: I120b8dc85dfbbe0b4d9e0a620c58d7556feca9c5

Disable lockscreen rotation

This only makes sense on tablets. It is annoying on phones.

Change-Id: I78ebcc8d3587d91db2b0b25ca60ebd9af0a13e74

Build prebuilt microg apps

Change-Id: I7e18040e7242d60129606fea75962977b37a156b

Apache 2.0 license

It's the default Android license.

Add whitelists for privileged permissions

Change-Id: Id5bc8e402f513e2e2597f3d9522fc63e245b0630

Add missing microg packages

Change-Id: Iba9021bd806478960a8ef4f684e9fb36ef3988ba

envsetup: include su

Change-Id: I9ee5cefdd99676c4908ba370c8ad88c07a729a15

Include vendor/ngc4622 config subdir

Include overlays

Add permission spoofing patch

Add install script for patches

Building on arch linux: add flag

Building on arch linux: add patch for ART
ttefke added a commit to ttefke/android_vendor_ngc4622 that referenced this issue May 10, 2018
These are all patches from lineage-15.1 that are needed for cm-14.1.
Some small adaptions for cm-14.1 have been made.

Make building possible on Arch Linux

* On Arch, python version 2 is linked to python2 instead of python.
  We need to create a virtual environment to fix this,
  because only linking python2 to python can,
  under some circumstances, cause weird build errors.

* According to the Arch wiki
  (https://wiki.archlinux.org/index.php/Android#Setting_up_the_build_environment)
  we might encounter build errors due to missing python modules.
  They recommend to symlink the python module dir to
  the virtual environment dir.
  However, some of these files are already there,
  so we pass stderr of the link command to /dev/null
  in order to avoid spamming the console due to these linkage errors.

* Prefer clang: gcc can cause weird build errors, too.
  These errors do not happen if using clang.

Change-Id: If502f7ccff2223bd8fbea8156c67b4e76ae28f6e

Source ngc4622 envsetup

Change-Id: Ib313a4a72a1f6b17770da308bd2adee85ebbf238

Allow location providers also outside of /system

This restores the behavior of android M. Tested on AOSP 7.0.0_r14.
Closes microg/UnifiedNlp#102

overlay: Allow to use UnifiedNlp location provider

This doesn't have security implications as in order to use the location
provider in needs to be installed as a system app. However this would
allow it to be flashed to system like gapps.

Change-Id: I120b8dc85dfbbe0b4d9e0a620c58d7556feca9c5

Disable lockscreen rotation

This only makes sense on tablets. It is annoying on phones.

Change-Id: I78ebcc8d3587d91db2b0b25ca60ebd9af0a13e74

Build prebuilt microg apps

Change-Id: I7e18040e7242d60129606fea75962977b37a156b

Apache 2.0 license

It's the default Android license.

Add whitelists for privileged permissions

Change-Id: Id5bc8e402f513e2e2597f3d9522fc63e245b0630

Add missing microg packages

Change-Id: Iba9021bd806478960a8ef4f684e9fb36ef3988ba

envsetup: include su

Change-Id: I9ee5cefdd99676c4908ba370c8ad88c07a729a15

Include vendor/ngc4622 config subdir

Include overlays

Add permission spoofing patch

Add install script for patches

Building on arch linux: add flag

Building on arch linux: add patch for ART
MSe1969 pushed a commit to lin14-mGoms/android_frameworks_base that referenced this issue Feb 3, 2020
This restores the behavior of android M. Tested on AOSP 7.0.0_r14.
Closes microg/UnifiedNlp#102

Change-Id: I81d487376d4a5aa4695531a063289ac18921565e
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

6 participants