GmsCore
GmsCore copied to clipboard
Location (network) not working
Describe the bug Microg version 0.3.6.244753. Clean lineage 21. All self check options pass. Location WiFi and Bluetooth enabled. In microg all settings for location enabled. Provider is beacondb (tried position xyz too). Some apps request location sometime via microg (recent location requests) bit most don't show up at all. In android location settings they do. Network location doesn't seem to work properly then?
Hello! Similar problem here, same microg version (0.3.6.244735), clean lineageos 22.1. Microg was granted location permissions, location settings in microg are al active, tried both default location services, I'm getting these logs from the app that I'm trying to make work (via adb logcat):
01-04 18:29:17.513 7765 7765 D LocationApisInterface: fast location: null
01-04 18:29:17.517 7765 7864 W GoogleApiManager: The service for com.google.android.gms.internal.location.zzdz is not available: ConnectionResult{statusCode=SERVICE_INVALID, resolution=null, message=null}
PS: tried an older version of microg (the previous) but still not working.
PS2: it worked! I had to install "microG Companion" (from fdroid, same repo as microg).
Same here. Worked previously with lineageos for microg. For lineage 22.1 I switched (dirty flash) to official lineage. Since then network location seems to be broken. Already reinstalled betas via fdroid (0.3.6.40226, 0.3.6.244735). Hopefully the corresponding logcat:
01-16 15:39:43.839 1417 16447 D ConnectivityService: requestNetwork for uid/pid:10113/2404 asUid: 10176 activeRequest: null callbackRequest: 2452 [NetworkRequest [ REQUEST id=2453, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED&NOT_BANDWIDTH_CONSTRAINED Uid: 10176 RequestorUid: 10113 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ]] callback flags: 0 order: 2147483647 isUidTracked: false declaredMethods: ALL
01-16 15:39:43.841 2601 2601 D OverviewActionsView: updateForGroupedTask() called with: isGroupedTask = [false], canSaveAppPair = [false]
01-16 15:39:43.841 2601 2601 D OverviewActionsView: updateActionButtonsVisibility() called: showSingleTaskActions = [true], showGroupActions = [false]
01-16 15:39:43.841 1417 2264 D UntrustedWifiNetworkFactory: got request NetworkRequest [ REQUEST id=2453, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED&NOT_BANDWIDTH_CONSTRAINED Uid: 10176 RequestorUid: 10113 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ]
01-16 15:39:43.841 1417 2264 D OemPaidWifiNetworkFactory: got request NetworkRequest [ REQUEST id=2453, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED&NOT_BANDWIDTH_CONSTRAINED Uid: 10176 RequestorUid: 10113 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ]
01-16 15:39:43.841 1417 2264 D MultiInternetWifiNetworkFactory: got request NetworkRequest [ REQUEST id=2453, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED&NOT_BANDWIDTH_CONSTRAINED Uid: 10176 RequestorUid: 10113 RequestorPkg: com.android.systemui UnderlyingNetworks: Null] ]
01-16 15:39:43.842 1417 2281 D ConnectivityService: NetReassign [2453 : null → 114] [c 1] [a 1] [i 0]
//EDIT Fixed by reinstalling as mentioned here: https://gitlab.com/bblacher/microg-installer
https://github.com/microg/GmsCore/issues/2635#issuecomment-2587462850
Did you try this and reboot?
[Edit] Please ignore this comment; the main issue I describe here get's resolved by installing microG as system app; see my last comment.
I observed a similar issue: several apps (like Osmand, SatStat, My Location) don't receive a network location from microG (and don't appear in microG's Location > Recent access), albeit showing up in Android's Settings > Location > Recent access. However, for some apps, network-based location works (Google Camera, WhatsApp, Google Maps), and they also appear in microG's Recent access. ~For MagicEarth, network-based location seems to work, despite not showing up in microG's Recent access (but in Android's Settings).~ [Edit: actually, it just reported the last known GNSS position, certainly from FusedLocationService]
Could it be that different apps request the network location via different location providers and/or different parts of their APIs (perhaps something related to #2307)?
Not sure if helpful, but here some dumpsys extracts:
- For the above mention apps, I get the following from
dumpsys location(removed details):
LOG (click to expand)
Historical Aggregate Location Provider Data:
passive:
10321/com.generalmagic.magicearth: ...
10486/net.osmand.plus: ...
1000/android[SensorNotificationService]: ...
10417/com.vonglasow.michael.satstat: ...
gps:
10301/com.android.gpstest.osmdroid: ...
10321/com.generalmagic.magicearth: ...
10374/com.mirfatif.mylocation: ...
10148/com.google.android.GoogleCamera: ...
1000/android[DeviceIdleController]: ...
10417/com.vonglasow.michael.satstat: ...
1000/com.android.location.fused: ...
10216/com.google.android.apps.maps: ...
10288/com.google.android.gms: ...
fused:
10321/com.generalmagic.magicearth: ...
1000/android[DeviceIdleController]: ...
10417/com.vonglasow.michael.satstat: ...
- Related details about location providers reported by
dumpsys location(removed details):
LOG (click to expand)
Location Providers:
passive provider:
service: registered
listeners:
1000/android[SensorNotificationService]/9FB85B82 Request[PASSIVE, minUpdateInterval=+30m0s0ms, minUpdateDistance=100000.0, WorkSource{1000 android}]
user 0:
last location=Location[gps ...]
enabled=true
user 10:
last location=null
enabled=true
allowed=true
identity=1000/android[LocationService]
properties=ProviderProperties[powerUsage=Low, accuracy=Fine]
fused provider:
service: ProviderRequest[OFF]
user 0:
last location=Location[gps ...]
enabled=true
user 10:
last location=null
enabled=true
allowed=true
identity=1000/com.android.location.fused
properties=ProviderProperties[powerUsage=Low, accuracy=Fine, supports=[bearing,speed,altitude]]
stationary throttled=false (not idle) (not stationary)
target service=1000/com.android.location.fused/.FusedLocationService@0
connected=true
gps provider:
service: ProviderRequest[OFF]
listeners:
10321/com.generalmagic.magicearth/99F9CA94 {bg, na} Request[@+30m0s0ms HIGH_ACCURACY, minUpdateInterval=+1s0ms, WorkSource{10321 com.generalmagic.magicearth}] (inactive)
10321/com.generalmagic.magicearth/32860893 {bg, na} Request[@+24855d3h14m7s806ms HIGH_ACCURACY, WorkSource{10321 com.generalmagic.magicearth}] (inactive)
user 0:
last location=Location[gps ...]
enabled=true
user 10:
last location=null
enabled=true
allowed=true
identity=1000/android[GnssService]
properties=ProviderProperties[powerUsage=High, accuracy=Fine, requires=satellite, supports=[bearing,speed,altitude]]
dumpsys activity service locationshows that several location services are running (removed details):
LOG (click to expand)
SERVICE com.android.location.fused/.FusedLocationService 79f7c28 pid=1510 user=0
Client:
request: ProviderRequest[OFF]
last gps location: Location[gps ...]
SERVICE com.google.android.gms/.semanticlocation.SemanticLocationService d4ef33a pid=18087 user=0
Client:
SemanticLocationService providing services [SEMANTIC_LOCATION]
SERVICE com.google.android.gms/org.microg.gms.location.manager.LocationManagerService cf082be pid=18087 user=0
Client:
LocationManager providing services [LOCATION_MANAGER]
Location availability: LocationAvailability[true]
Last coarse location: Location[cache ...]
Last fine location: Location[cache ...]
...
SERVICE com.google.android.gms/org.microg.gms.location.network.NetworkLocationService 1e77a85 pid=18087 user=0
Client:
Last scan elapsed realtime: high-power: n/a, low-power: 1 minute ago
Last scan result time: wifi: 1 minute ago, cells: n/a
Interval: high-power: ∞, low-power: ∞
Last wifi location: Location[cache ...] (active)
Last cell location: null
...
SERVICE com.google.android.gms/org.microg.gms.location.reporting.ReportingAndroidService 11e5e56 pid=18087 user=0
Additional context:
- I recently moved to a new device (Android 14, AOSP); on the former (Android 11, LOS18.1-based), it still worked well (both used with microG v0.3.6);
- the My Location app shows in the Network section: Not supported (and is disabled);
- @The-First-King: I tried this, yes;
Could it be that different apps request the network location via different location providers and/or different parts of their APIs
Yes, there are multiple location APIs in android, and multiple "providers".
The legacy android location API uses the Location Manager. Location Manager can present data from either GPS, Network or "passive" sources, according to which provider the user app developer chooses.
The API currently recommended by Google for apps distributed through Gplay is Fused Location, it is bundled with Play Services. It uses it's own logic to determine the 'best' location from various inputs including GPS and network, and presents that to the requesting app without the app having to make separate requests from each location provider.
I believe that modern microG is now emulating the Fused Location API. (Which makes sense since it provides various services originally provided by Play Services) Thus the user apps (including Google's own modern apps) using this API will show up in "Recent access" in the microG utility.
This most likely explains why you see some apps showing up there (they are making requests to the Fused Location API provided by microG) whereas other apps show up in the ROM's Location Services page. (They are making requests to the legacy location API)
My Location also displays a section for "UnifiedNLP Backends" which was the legacy and proprietary method of network location used by the OLD (<0.2.28) versions of microG. Even if you have the old UNLP providers still installed on a device today, modern GmsCore will ignore their output, even though My Location can still see them.
SatStat is fairly unusual in that it can make requests to both the legacy and modern (Fused) location APIs and will display the output of multiple providers/APIs. (GPS = red pin or circle, Network = blue pin or circle. A green pin/circle indicates either the legacy passive provider or the Fused API. I have never yet seen it show a green pin/circle on a device, this may be because the legacy API is also available on most custom ROMs. Whether the green pin is for passive or Fused depends on your ROM, I have noticed in the app's map legend.)
Here is the best general overview of Android location providers that I have found:
https://stackoverflow.com/questions/6775257/android-location-providers-gps-or-network-provider
Thanks for your summary, @Sapiosenses! This reminds me that I forgot to add an additional context in my comment above:
- SatStat doesn't show a blue nor green pin in the map view (albeit accessing passive and fused location providers - as apparent from
dumpsys location).
I believe I also have never seen a green pin there.
Btw: there's also an official description of LocationManager's location providers, incl. when they were introduced: developer.android.com/.../LocationManager
Btw: there's also an official description of LocationManager's location providers, incl. when they were introduced: developer.android.com/.../LocationManager
Trivia: It's weird that it shows the Fused provider string added in API 31 but I know for a fact that the fused provider has been listed in the official docs since 2013 or something, based on other reading I've done.
(All of that is a sore spot for me tho, how Google just keeps moving more and more core functions out of the base AOSP code and into Play Services. It's actually one of the early motivations for Marvin to create the NoGapps/microG project in the first place)
[Edit] Please ignore this comment; what I describe here get's completely resolved by installing microG as system app; see my last comment.
[Edit] The following only occurs if microG is started with BeaconDB selected, see my comment below.
Regarding microG's NetworkLocationService, I made new observations that seem irregular:
- it never puts wifis into the
geocache.db - it only puts new cells into the
geocache.dbafter restarting microG.
Steps to reproduce the second point:
- start with a clean
geocache.db: https://github.com/microg/GmsCore/issues/2635#issuecomment-2587462850 - microG will fill it with the currently used cell(s), provided you currently have a GNSS position
- check modification time of
geocache.dband/or the entryDatabase: cells(cached)=ofSERVICE ... NetworkLocationServiceindumpsys activity service location - move to another location that puts you in another cell (in my case, this included ~5min of delay) + assert you currently have a GNSS position; optionally enforce a connection to the new cell by switching Airplane mode on and off
- repeat step 3 and discover that it didn't change (no new cell added to the database)
- force-close microG Services, open it
- repeat step 3 and notice that NetworkLocationService doesn't run (not sure if this is normal); to start/trigger it, open an app that requests a network location (it only worked with Google Maps)[^1]
- repeat step 3 and discover that it changed (new cell added the to the database)
So it seems NetworkLocationService only works for a few seconds. I didn't find anything useful in the logs. Is there anything I can look out for?
[^1]: As mentioned above, My Location or SatStat doesn't work to trigger NetworkLocationService, but also WhatsApp and Google Camera didn't work this time - only Google Maps.
[Edit] Please ignore this comment; what I describe here get's completely resolved by installing microG as system app; see my last comment.
I experimented a bit more and found that cells and/or wifis are only added to the geocache.db database if switching the online location service to Positon once (and optionally switching back to BeaconDB).
It seems that starting microG with BeaconDB selected leads to some issues. In fact, I found the following NullPointerException in the logs (details redacted) when an app requests a network location and microG subsequently makes an Ichnaea query[^1]:
LOG (click to expand)
IchnaeaLocation: GeolocateRequest(carrier=null, considerIp=false, homeMobileCountryCode=null, homeMobileNetworkCode=null, radioType=null, bluetoothBeacons=null, cellTowers=null, wifiAccessPoints=[WifiAccessPoint([REDACTED]), ...
NetworkLocation: Failed retrieving location for 33 wifi networks
NetworkLocation: java.lang.NullPointerException
NetworkLocation: at org.microg.gms.location.network.NetworkLocationService.queryIchnaeaWifiLocation(NetworkLocationService.kt:374)
NetworkLocation: at org.microg.gms.location.network.NetworkLocationService.access$queryIchnaeaWifiLocation(NetworkLocationService.kt:39)
NetworkLocation: at org.microg.gms.location.network.NetworkLocationService$queryIchnaeaWifiLocation$1.invokeSuspend(Unknown Source:17)
NetworkLocation: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
NetworkLocation: at kotlinx.coroutines.internal.DispatchedContinuation.resumeWith(DispatchedContinuation.kt:204)
NetworkLocation: at kotlin.coroutines.SafeContinuation.resumeWith(SafeContinuationJvm.kt:41)
NetworkLocation: at org.microg.gms.location.network.ichnaea.IchnaeaServiceClient.continueError(IchnaeaServiceClient.kt:180)
NetworkLocation: at org.microg.gms.location.network.ichnaea.IchnaeaServiceClient.access$continueError(IchnaeaServiceClient.kt:37)
NetworkLocation: at org.microg.gms.location.network.ichnaea.IchnaeaServiceClient$rawGeoLocate$2$3.onErrorResponse(IchnaeaServiceClient.kt:205)
NetworkLocation: at com.android.volley.Request.deliverError(Request.java:652)
NetworkLocation: at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:104)
NetworkLocation: at android.os.Handler.handleCallback(Handler.java:959)
NetworkLocation: at android.os.Handler.dispatchMessage(Handler.java:100)
NetworkLocation: at android.os.Looper.loopOnce(Looper.java:232)
NetworkLocation: at android.os.Looper.loop(Looper.java:317)
NetworkLocation: at android.app.ActivityThread.main(ActivityThread.java:8592)
NetworkLocation: at java.lang.reflect.Method.invoke(Native Method)
NetworkLocation: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
NetworkLocation: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
After switching to Positon once (and optionally switching back to BeaconDB), it doesn't appear again (unless microG is restarted).
So in my case, I should stick with Positon to have a functioning location learning also after restarts.
Yet, geocache.db is only updated if a network location request is handled by microG (that is, the app must appear in microG's Location > Recent access), but not if leaving the GNSS locked in the background (e.g., with GPSTest) and walking around. Unfortunately, this network location handling only works for a limited number of apps, see my comment above. Btw: in the meantime, I also found that it works well for Locus.
So the problem remains that a network location is only provided to those selected apps in my case.[^2] (I suspect it's related to the two ways of getting a Fused location as mar-v-in mentions in https://github.com/microg/GmsCore/issues/2422#issuecomment-2222369740; only one is currently implemented in microG, see again https://github.com/microg/GmsCore/issues/2307).
[^1]: This Ichnaea query only happens when learned cells/wifis seem inaccurate. This bare state will prevail if BeaconDB is selected from the beginning, as the geocache.db database will be rarely updated with cells and never with wifis (see my previous comment).
[^2]: Related to the footnote of my previous comment: Google Camera does not anymore receive such a network location from microG, but now WhatsApp does. This sporadic behavior is quite weird.
I could solve the main issue by installing microG as system apps. 🤦♀️ Now, network location requests are provided to all remaining apps mentioned above (Osmand, SatStat, My Location, Magic Earth), albeit they still don't appear in microG's Location > Recent access. (so we come back to the actual issue raised by OP 👆).
dumpsys activity service location now shows that all location services of microG are running (details redacted):
LOG (click to expand)
SERVICE com.google.android.gms/org.microg.gms.location.manager.LocationManagerService 17768a5 pid=4753 user=0
Client:
LocationManager providing services [LOCATION_MANAGER]
Location availability: LocationAvailability[true]
Last coarse location: Location[cache REDACTED hAcc=2000.0 et=+5m58s496ms]
Last fine location: Location[cache REDACTED hAcc=21.0 et=+5m58s496ms alt=65.62249514646656 vAcc=11.0]
Interval: gps=off network=off
Network location: built-in=true system=false
Request cache: id=36ed939b-a41e-4820-85ff-2f75942b73e2 size=1
Current location request (GRANULARITY_FINE, PASSIVE, ∞ from WorkSource{})
- pending intent WorkSource{} ∞ GRANULARITY_FINE, PASSIVE (pending: ∞ ∞) app-op: false
Current device orientation request (started=false, sensors=null)
SERVICE com.google.android.gms/org.microg.gms.location.network.NetworkLocationService 24130d5 pid=4753 user=0
Client:
Last scan elapsed realtime: high-power: 2 minutes ago, low-power: 2 minutes ago
Last scan result time: wifi: 2 minutes ago, cells: 2 minutes ago
Interval: high-power: 6h, low-power: ∞
Last wifi location: Location[cache REDACTED hAcc=21.0 et=+5m58s496ms alt=65.62249514646656 vAcc=11.0 {Bundle[{precision=2.42}]}] (active)
Last cell location: Location[cache REDACTED hAcc=4006.0 et=+5m57s7ms {Bundle[{precision=1.0}]}]
Wifi settings: ichnaea=true moving=true learn=true
Cell settings: ichnaea=true learn=true
Ichnaea settings: source=positon endpoint=https://api.positon.xyz/?key=627db168-2a5e-11ef-afbd-a75f87425aa4 contribute=false
Ichnaea start=0 seconds ago omitables=0
Ichnaea request cache size=0 hits=0 miss=0 puts=0 evicts=0
GPS location buffer size=1 first=4 minutes ago last=4 minutes ago
Database: cells(cached)=42, cells(learnt)=3, wifis(cached)=48, wifis(learnt)=108
Active requests:
- WorkSource{10126 com.google.android.as} 6h (low power: false, bypass: false) reported n/a
SERVICE com.google.android.gms/org.microg.gms.location.provider.FusedLocationProviderService 9ac968b pid=4753 user=0
Client:
Bound: true
Enabled: true
Current request: ProviderRequest[OFF]
Current work source: WorkSource{}
Last reported: Location[fused REDACTED hAcc=21.0 et=+5m58s496ms alt=65.62249514646656 vAcc=11.0 {Bundle[{precision=2.42}]}]
Last report time: 2 minutes ago
SERVICE com.google.android.gms/org.microg.gms.location.provider.GeocodeProviderService 7a264b2 pid=4753 user=0
Client:
Enabled: true
Address cache: size=0 hits=0 miss=1 puts=0 evicts=0
SERVICE com.google.android.gms/org.microg.gms.location.provider.NetworkLocationProviderService 1ca2db1 pid=4753 user=0
Client:
Bound: true
Enabled: true
Current request: ProviderRequest[@+6h0m0s0ms, LOW_POWER, WorkSource{10126 com.google.android.as}]
Current work source: WorkSource{10126 com.google.android.as}
Last reported: Location[network REDACTED hAcc=21.0 et=+5m58s496ms alt=65.62249514646656 vAcc=11.0]
Last report time: 2 minutes ago
Before (https://github.com/microg/GmsCore/issues/2726#issuecomment-2628968452), only the first two were running plus com.android.location.fused/.FusedLocationService from Android System, which is now absent (apparently overridden by microG).
I should have disclaimed earlier that I used microG only as user app, but I could swear that it worked well for a while. It seems that after I set up apps in a Work profile (i.e. for user 10), microG didn't work anymore as desired.
In fact, previously (after setting up apps in the Work profile) ...
- ...
dumpsysshowed separateuser 0anduser 10entries forpassive/fused/gps provider; now it doesn't do that anymore (details redacted):
LOG (click to expand)
Location Providers:
passive provider:
service: registered
listeners:
1000/android[SensorNotificationService]/11E9DE5B Request[PASSIVE, minUpdateInterval=+30m0s0ms, minUpdateDistance=100000.0, WorkSource{1000 android}]
10288/com.google.android.gms/23197B39 {bg} Request[PASSIVE, minUpdateInterval=+1s0ms, WorkSource{10288 com.google.android.gms}]
1000/android[UwbCountryCode]/A5A7D4D7 Request[PASSIVE, minUpdateInterval=+1h0m0s0ms, minUpdateDistance=5000.0, WorkSource{1000 android}]
last location=Location[network REDACTED hAcc=21.0 et=+5m58s496ms alt=65.62249514646656 vAcc=11.0 mslAlt=16.264856536823494 mslAltAcc=11.003313]
enabled=true
allowed=true
identity=1000/android[LocationService]
properties=ProviderProperties[powerUsage=Low, accuracy=Fine]
network provider:
service: ProviderRequest[@+6h0m0s0ms, LOW_POWER, WorkSource{10126 com.google.android.as}]
listeners:
1000/android[GnssService]/85AEE95B Request[PASSIVE, minUpdateInterval=0, hiddenFromAppOps, WorkSource{1000 android}]
10126/com.google.android.as/C1874322 (COARSE) Request[@+6h0m0s0ms LOW_POWER, minUpdateDistance=100000.0, WorkSource{10126 com.google.android.as}]
last location=Location[network REDACTED hAcc=21.0 et=+5m58s496ms alt=65.62249514646656 vAcc=11.0 mslAlt=16.264856536823494 mslAltAcc=11.003313]
enabled=true
allowed=true
identity=10288/com.google.android.gms
properties=ProviderProperties[powerUsage=Low, accuracy=Coarse]
stationary throttled=false (not idle) (not stationary)
target service=10288/com.google.android.gms/org.microg.gms.location.provider.NetworkLocationProviderService@2
connected=true
fused provider:
service: ProviderRequest[OFF]
last location=Location[fused REDACTED hAcc=21.0 et=+5m58s496ms alt=65.62249514646656 vAcc=11.0 mslAlt=16.264856536823494 mslAltAcc=11.003313]
enabled=true
allowed=true
identity=10288/com.google.android.gms
properties=ProviderProperties[powerUsage=Low, accuracy=Coarse]
stationary throttled=false (not idle) (not stationary)
target service=10288/com.google.android.gms/org.microg.gms.location.provider.FusedLocationProviderService@2
connected=true
gps provider:
service: ProviderRequest[OFF]
last location=Location[gps REDACTED hAcc=7.365331 et=+4m17s801ms alt=101.9581506997331 vAcc=74.848755 vel=0.0 sAcc=1.1380758 {Bundle[{satellites=0, maxCn0=0, meanCn0=0}]}]
enabled=true
allowed=true
identity=1000/android[GnssService]
properties=ProviderProperties[powerUsage=High, accuracy=Fine, requires=satellite, supports=[bearing,speed,altitude]]
...
-
... was the last time Google Camera appeared in microG's Location > Recent access (i.e., received a network location), i.e, the "Last access" didn't update; now it says again "... minutes ago".
-
... several apps complained that Google Play Services are not installed; now they don't do that anymore.[^1] [^1]: For the remaining ones, it sufficed to simply disable the License Content Provider (
com.pairip.licensecheck.LicenseContentProvider).
Besides, logcat was previously flooded[^2] with [^2]: Not sure if this also happened before setting up apps in the Work profile (too much hassle for me to test that).
W GooglePlayServicesUtil: <APP> requires the Google Play Store, but it is missing.
(mostly system apps) often immediately followed by
E GooglePlayServicesUtil: GooglePlayServices not available due to error 9
I believe that all issues with such entries in the logs are simply due to using microG as user app (and having a Work profile?).
- the My Location app shows in the Network section: Not supported (and is disabled);
Same experience here. I install LineageOS 22.1 and just microG. Everything is turned on under location and rebooted multiple times. I didn't find any geocache,
$ adb shell ls /data/data/com.google.android.gms/databases/
exposure.db
gcmstatus
gcmstatus-shm
gcmstatus-wal
geoapps.db
geoapps.db-journal
gservices.db
gservices.db-journal
snet.db
Yes that is what I'm experiencing too. I forgot to mention that in my initial post. My 2-cents is that when multiple (but not all) apps don't recognize microG's implemenation to fetch location and a Not Supported in My Location app occurs, suggests to me that MicroG doesn't advertise it's implementation in the right way to the Android platform. Otherwise, apps shouldn't be able to tell the difference.... but I could be completely missing the obvious, of course ;) Maybe a dev can shed some light on this?
On Sun, 2025-03-23 at 13:57 -0700, Uncharted User wrote:
- the My Location app shows in the Network section: Not supported (and is disabled); Same experience here. I install LineageOS 22.1 and just microG. Everything is turned on under location and rebooted multiple times. — Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. You are receiving this because you authored the thread.Message ID: @.***> uncharted-useruncharted-user left a comment (microg/GmsCore#2726) [1]
- the My Location app shows in the Network section: Not supported (and is disabled); Same experience here. I install LineageOS 22.1 and just microG. Everything is turned on under location and rebooted multiple times. — Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. You are receiving this because you authored the thread.Message ID: @.***>
New Android versions don't allow an app to bind to system location if it isn't a system app, so in this case location requests through Google Play Services (replaced by microG) will works but requests done directly to Android won't work (at least they won't use microG at all).
Thanks for the comment.
New Android versions don't allow an app to bind to system location if it isn't a system app
Should microG be installed as system app instead of user? Is there any working instruction for the procedure available? I wanted to install on LineageOS 22.1 (provides weekly update) instead of LineageOS with microG (provides monthly update).
Thanks for the comment.
New Android versions don't allow an app to bind to system location if it isn't a system app
Should microG be installed as system app instead of user? Is there any working instruction for the procedure available? I wanted to install on LineageOS 22.1 (provides weekly update) instead of LineageOS with microG (provides monthly update).
Most of microG works also as user app but something don't work. To install as system app, there are many things to do like put apk files, xml files, extract libraries. Personally it would be very boring to do it manually, this is why I use my installer: https://github.com/micro5k/microg-unofficial-installer
my installer: https://github.com/micro5k/microg-unofficial-installer
Thanks for the link and your hard work. I hope it will be soon out of beta.
my installer: https://github.com/micro5k/microg-unofficial-installer
Thanks for the link and your hard work. I hope it will be soon out of beta.
I found this recovery flashable package updated that comes in different flavours depending on how much google you want left For explanations : https://github.com/FriendlyNeighborhoodShane/MinMicroG For recent update : https://github.com/FriendlyNeighborhoodShane/MinMicroG-abuse-CI/releases
You can still download the official one that will install it as system apps and install updates on top of it. I notice that is it imperative to install microG GMS as update even if it's the same version. Some tweaks and location may need it to be active.
Also depending on your rom, you may need to grant permissions :
adb shell pm grant com.google.android.gms android.permission.ACCESS_COARSE_LOCATION
adb shell pm grant com.google.android.gms android.permission.ACCESS_FINE_LOCATION
New Android versions don't allow an app to bind to system location if it isn't a system app, so in this case location requests through Google Play Services (replaced by microG) will works but requests done directly to Android won't work (at least they won't use microG at all).
Wait so youre saying that the only way for user-installed apps to get location, is to go through Play Services? How can non-GSF apps (such as Osmand) get location then? I am having the same issue where using BeaconDB as the location backend in microg isnt giving position to any apps.
edit: this is suddenly working for me. potential delay with database upload and download to/from BeaceonDB via Neostumbler.
New Android versions don't allow an app to bind to system location if it isn't a system app, so in this case location requests through Google Play Services (replaced by microG) will works but requests done directly to Android won't work (at least they won't use microG at all).
Wait so youre saying that the only way for user-installed apps to get location, is to go through Play Services? How can non-GSF apps (such as Osmand) get location then? I am having the same issue where using BeaconDB as the location backend in microg isnt giving position to any apps.
edit: this is suddenly working for me. potential delay with database upload and download to/from BeaceonDB via Neostumbler.
There are multiple methods/APIs on android that an app can use to obtain geolocation data.
From the OS itself, there is the original AOSP API, I believe this is called "Location Manager".
Then there is a newer API, called "Fused Location", this is typically only provided by devices with proprietary closed-source Google components added. (Gapps, Google Play frameworks, GMS)
Lastly, some apps will try to go directly to the GPS chip hardware driver to obtain geolocation data.
Apps do not generally document which method they use, but most open-source apps can at least use the "Location Manager" way as one option. Often a geolocation-using app can use more than one of the methods.
A "vanilla" custom ROM does not include Gapps, so it cannot provide the Fused Location service. However if you have microG installed and enable the network location functionality, microG will provide Fused Location to apps. If an app has queried microG's Fused Location provider, it will appear in the Location section of its configuration tool under the "Recent Access" heading.
Wait so youre saying that the only way for user-installed apps to get location, is to go through Play Services?
I have never said it; I have only said that microG as user app cannot bind to system location so it can't "provide" location to the system but it can always "get" location.