microg / UnifiedNlp

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

N26 banking app cannot get location #210

Open exzombie opened 3 years ago

exzombie commented 3 years ago

Describe the bug It is not possible to open an account with the N26 banking application de.number26.android. One of the steps of the verification process tries to obtain the location and fails.

To Reproduce Steps to reproduce the behavior:

  1. Start the process of opening a bank account on the N26 web page
  2. Install de.number26.android on the phone
  3. Try to complete the verification process on the phone
  4. Observe that the step that requires geolocation fails

Expected behavior Verification process obtains location information and completes successfully.

System Android Version: 10 Custom ROM: LineageOS 17.1, official build microG: 0.2.16.204713 installed via nanodroid; all self-check boxes are ticked Location providers: Déjà Vu, GSM, Mozilla, Nominatim

Additional context To check whether location services work at all, I used SatStat which properly shows both red and blue location markers. logcat output when running SatStat is quite different than the one when running N26, though. Can I (or shoud I) use another application to test?

Below is an excerpt from logcat while performing the location step of N26 identity verification, with coordinates redacted:

02-24 21:02:32.576 D/GmsLocManagerSvc( 3525): onBind: Intent { act=com.google.android.location.internal.GoogleLocationManagerService.START pkg=com.google.android.gms }
02-24 21:02:32.607 D/GmsLocManagerSvc( 3525): bound by: GetServiceRequest{serviceId=LOCATION_MANAGER, gmsVersion=12451000, packageName='de.number26.android', extras=Bundle[{client_name=locationServices}]}
02-24 21:02:32.630 D/GmsLocProviderU( 3525): unified network: requesting last location
02-24 21:02:32.631 D/ULocClient( 3525): ref+get: org.microg.nlp.client.UnifiedLocationClient.getLastLocation(UnifiedLocationClient.kt:409)
02-24 21:02:32.631 D/ULocClient( 3525): unref: org.microg.nlp.client.UnifiedLocationClient.getLastLocation(UnifiedLocationClient.kt:414)
02-24 21:02:32.631 D/ULocClient( 3525): updateBinding - current: true, refs: 2, reqs: 1, avail: true
02-24 21:02:32.632 D/GmsLocProviderU( 3525): unified network: got last location: Location[network <redacted>,<redacted> hAcc=1087 et=<redacted> vAcc=??? sAcc=??? bAcc=??? {Bundle[{AVERAGED_OF=1, SERVICE_BACKEND_PROVIDER=GSM, SERVICE_BACKEND_COMPONENT=org.fitchfamily.android.gsmlocation/.GsmService, OTHER_BACKEND_RESULTS=[Location[network <redacted> hAcc=1581 et=<redacted> vAcc=??? sAcc=??? bAcc=??? {Bundle[{SERVICE_BACKEND_PROVIDER=ichnaea, SERVICE_BACKEND_COMPONENT=org.microg.nlp.backend.ichnaea/.BackendService}]}]]}]}]
02-24 21:02:32.636 D/GmsLocManagerSvcImpl( 3525): updateLocationRequest: LocationRequestUpdateData{opCode=1, request=LocationRequestInternal{request=LocationRequest{priority=100, interval=3600000, fastestInterval=600000, explicitFastestInterval=false, expirationTime=9223372036854775807, numUpdates=1, smallestDesplacement=0.0, maxWaitTime=0}, requestNlpDebugInfo=false, restorePendingIntentListeners=false, triggerUpdate=false, clients=[], tag='null', hideFromAppOps=false, forceCoarseLocation=false, exemptFromThrottle=false, moduleId=null}, listener=null, pendingIntent=null, callback=android.os.BinderProxy@6b62d83, fusedLocationProviderCallback=android.os.BinderProxy@3c17b00}
02-24 21:02:32.660 D/GmsLocProviderReal( 3525): gps: addRequest LocationRequestHelper{locationRequest=LocationRequest{priority=100, interval=3600000, fastestInterval=600000, explicitFastestInterval=false, expirationTime=9223372036854775807, numUpdates=1, smallestDesplacement=0.0, maxWaitTime=0}, hasFinePermission=true, hasCoarsePermission=true, packageName='de.number26.android', lastReport=null}
02-24 21:02:32.660 D/GmsLocProviderReal( 3525): gps: ignoring request as 3600000ms (de.number26.android:3600000ms), is less than 10000
02-24 21:02:32.662 D/GmsLocProviderU( 3525): unified network: addRequest LocationRequestHelper{locationRequest=LocationRequest{priority=100, interval=3600000, fastestInterval=600000, explicitFastestInterval=false, expirationTime=9223372036854775807, numUpdates=1, smallestDesplacement=0.0, maxWaitTime=0}, hasFinePermission=true, hasCoarsePermission=true, packageName='de.number26.android', lastReport=null}
02-24 21:02:32.662 D/GmsLocProviderU( 3525): unified network: requesting location updates with interval 3600000ms (de.number26.android:3600000ms)
02-24 21:02:32.662 D/ULocClient( 3525): Set update interval to 3600000
02-24 21:02:32.662 D/ULocService( 3525): setUpdateInterval[com.google.android.gms] interval: 3600000
02-24 21:02:32.662 D/ULocClient( 3525): updateBinding - current: true, refs: 2, reqs: 2, avail: true
02-24 21:03:02.561 D/GmsLocManagerSvcImpl( 3525): updateLocationRequest: LocationRequestUpdateData{opCode=2, request=null, listener=null, pendingIntent=null, callback=android.os.BinderProxy@6b62d83, fusedLocationProviderCallback=android.os.BinderProxy@4241edf}
02-24 21:03:02.565 D/GmsLocProviderReal( 3525): gps: removeRequest LocationRequestHelper{locationRequest=LocationRequest{priority=100, interval=3600000, fastestInterval=600000, explicitFastestInterval=false, expirationTime=9223372036854775807, numUpdates=1, smallestDesplacement=0.0, maxWaitTime=0}, hasFinePermission=true, hasCoarsePermission=true, packageName='de.number26.android', lastReport=null}
02-24 21:03:02.568 D/GmsLocProviderU( 3525): unified network: removeRequest LocationRequestHelper{locationRequest=LocationRequest{priority=100, interval=3600000, fastestInterval=600000, explicitFastestInterval=false, expirationTime=9223372036854775807, numUpdates=1, smallestDesplacement=0.0, maxWaitTime=0}, hasFinePermission=true, hasCoarsePermission=true, packageName='de.number26.android', lastReport=null}
02-24 21:03:02.568 D/GmsLocProviderU( 3525): unified network: no longer requesting location update
02-24 21:03:02.569 D/ULocClient( 3525): Set update interval to 3600000
02-24 21:03:02.569 D/ULocService( 3525): setUpdateInterval[com.google.android.gms] interval: 3600000
02-24 21:03:02.569 D/ULocClient( 3525): updateBinding - current: true, refs: 2, reqs: 1, avail: true
Natibus commented 3 years ago

Same here with Android 9 ArrowOS : the location service worked with citymapper and velov, but failed with n26

Alev951 commented 3 years ago

Same with android 11, linuage OS MicroG version.

haraldreingruber commented 1 year ago

Not sure if still relevant, maybe to some other users who end up here as well.

For me, the following work-around worked, getting the Location Service working for N26 (and other Apps, e.g. OSMAnd):

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

Looks like one Gapps service was lacking location permissions.

The work-around was posted in this issue: https://gitlab.com/LineageOS/issues/android/-/issues/3436#note_611686760