microg / IchnaeaNlpBackend

Backend for UnifiedNlp that uses Mozilla Location Service for geolocation.
116 stars 29 forks source link

Android 11 requires permanent location permission #56

Closed breversa closed 2 years ago

breversa commented 2 years ago

Describe the bug Android 11 apparently requires new permissions to work in background : https://medium.com/swlh/request-location-permission-correctly-in-android-11-61afe95a11ad

To Reproduce Steps to reproduce the behavior:

  1. Install Mozilla Location backend
  2. Activate it in MicroG
  3. Configure it
  4. Android requests location permission, but doesn't allow permanent location ; only while the app is running"
  5. No network location is shown in troubleshooting apps such as SatStat

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

System Android Version: Android 11 Custom ROM: LineageOS 18.1

breversa commented 2 years ago

Related : https://github.com/microg/GmsCore/issues/1440 ?

breversa commented 2 years ago

The solution that worked for me : https://github.com/microg/GmsCore/issues/1440#issuecomment-902846916

I was using https://github.com/FriendlyNeighborhoodShane/MinMicroG as a Magisk module, and from what I understand, apps embedded in a Magisk module do not quite follow the same permissions as normal apps. The solution was to disable the Magisk module, install the MicroG GMS Core and the NLP backends as normal apps, start each of them to grant them background location access, then activate the Magisk module and reboot. :-)