WiGLE location no longer runs in 'background'

Issues with the Android network detection software. Please include Software version, Android version, and device when reporting

45 posts • Page 3 of 3
It's worth making sure "battery optimization" or "adaptive battery optimization" are turned *off*.
We've definitely seen that make a difference in past instances.
I had the time to take a logcat while experiencing the issues. I have of course set the battery settings to not optimize and have given the app whatever permissions it has asked for.

There are definitely issues with NL80211_CMD_TRIGGER_SCAN, android.hardware.wifi@1.0-service, and NetlinkEvent: NetlinkEvent::FindParam(): parameters. I wonder if it has to do with only having location permissions while using the app, rather than all the time.

EDIT: Definitely a location permissions issue:

Code: Select all

WifiService: startScan uid=10382 09-15 07:39:17.790 1036 4395 E WifiService: Permission violation - startScan not allowed for uid=10382, packageName=net.wigle.wigleandroid, reason=java.lang.SecurityException: UID 10382 has no location permission 09-15 07:39:17.791 16119 16119 I wigle : main] startScan returned false. last response seconds ago: 6.603

Code: Select all

09-14 14:03:37.857 1136 1136 E wificond: NL80211_CMD_TRIGGER_SCAN failed: Device or resource busy 09-14 14:03:38.754 1136 1136 E wificond: NL80211_CMD_TRIGGER_SCAN failed: Device or resource busy 09-14 14:03:38.853 1136 1136 E wificond: NL80211_CMD_TRIGGER_SCAN failed: Device or resource busy 09-14 14:03:39.860 1136 1136 E wificond: NL80211_CMD_TRIGGER_SCAN failed: Device or resource busy 09-14 14:03:42.878 1136 1136 E wificond: NL80211_CMD_TRIGGER_SCAN failed: Device or resource busy 09-14 14:03:44.344 1136 1136 E wificond: NL80211_CMD_TRIGGER_SCAN failed: Device or resource busy 09-14 14:03:44.885 1136 1136 E wificond: NL80211_CMD_TRIGGER_SCAN failed: Device or resource busy 09-14 14:03:44.975 1036 1064 I chatty : uid=1000(system) ActivityManager expire 11 lines 09-14 14:03:45.801 861 861 E android.hardware.wifi@1.0-service: Failed to open directory: Permission denied 09-14 14:03:45.802 861 861 E android.hardware.wifi@1.0-service: Error occurred while deleting old tombstone files 09-14 14:03:45.802 861 861 E android.hardware.wifi@1.0-service: Error writing files to flash 09-14 14:03:46.342 1036 2529 I chatty : uid=1000(system) uteStateMachine expire 12 lines 09-14 14:03:46.345 1036 2522 I chatty : uid=1000(system) BluetoothRouteM expire 1 line 09-14 14:03:46.448 1036 1446 I chatty : uid=1000(system) Binder:1036_3 expire 1 line 09-14 14:03:46.459 1036 1069 I chatty : uid=1000(system) batterystats-wo expire 1 line 09-14 14:03:48.877 1036 1050 I chatty : uid=1000(system) Binder:1036_1 expire 3 lines 09-14 14:03:48.877 1036 1064 I chatty : uid=1000(system) ActivityManager expire 12 lines 09-14 14:03:48.879 1036 1036 I chatty : uid=1000 system_server expire 20 lines 09-14 14:03:50.321 1136 1136 W wificond: Scan is not started. Ignore abort request 09-14 14:03:50.470 1036 1870 I chatty : uid=1000(system) WifiHandlerThre expire 1 line 09-14 14:03:50.476 1036 2384 I chatty : uid=1000(system) Binder:1036_9 expire 4 lines 09-14 14:03:50.495 1036 1874 I chatty : uid=1000(system) ConnectivitySer expire 40 lines 09-14 14:03:51.729 1036 2380 I chatty : uid=1000(system) Binder:1036_8 expire 4 lines 09-14 14:03:51.968 693 764 E NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'INTERFACE' not found 09-14 14:03:51.968 693 764 E NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'STATE' not found 09-14 14:03:51.968 693 764 E NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'TIME_NS' not found 09-14 14:03:51.968 693 764 E NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found 09-14 14:03:52.008 1036 2491 I chatty : uid=1000(system) Binder:1036_A expire 2 lines 09-14 14:03:52.018 1036 3428 I chatty : uid=1000(system) Binder:1036_10 expire 9 lines 09-14 14:03:52.099 1036 1065 I chatty : uid=1000(system) ActivityManager expire 31 lines 09-14 14:03:52.300 1036 1446 I chatty : uid=1000(system) Binder:1036_3 expire 12 lines 09-14 14:03:52.315 1036 4035 I chatty : uid=1000(system) Binder:1036_11 expire 10 lines 09-14 14:03:52.362 1036 4545 I chatty : uid=1000(system) Binder:1036_19 expire 5 lines 09-14 14:03:53.330 1036 4556 I chatty : uid=1000(system) Binder:1036_20 expire 2 lines 09-14 14:03:53.330 1036 3426 I chatty : uid=1000(system) Binder:1036_F expire 1 line 09-14 14:03:53.445 1036 4555 I chatty : uid=1000(system) Binder:1036_1F expire 1 line 09-14 14:03:53.734 1036 4551 I chatty : uid=1000(system) Binder:1036_1D expire 2 lines 09-14 14:03:54.334 1036 2377 I chatty : uid=1000(system) Binder:1036_7 expire 4 lines 09-14 14:03:55.049 1036 4441 I chatty : uid=1000(system) Binder:1036_16 expire 3 lines 09-14 14:03:55.364 1036 1051 I chatty : uid=1000(system) Binder:1036_2 expire 2 lines 09-14 14:03:55.426 1036 4417 I chatty : uid=1000(system) Binder:1036_15 expire 1 line 09-14 14:03:56.705 1036 3422 I chatty : uid=1000(system) Binder:1036_D expire 9 lines 09-14 14:03:58.682 1036 4386 I chatty : uid=1000(system) Binder:1036_13 expire 7 lines 09-14 14:04:00.045 1036 2113 I chatty : uid=1000(system) Binder:1036_6 expire 5 lines 09-14 14:04:00.060 1036 4395 I chatty : uid=1000(system) Binder:1036_14 expire 6 lines 09-14 14:04:00.723 1036 1036 I chatty : uid=1000 system_server expire 11 lines 09-14 14:04:02.729 1036 1064 I chatty : uid=1000(system) ActivityManager expire 13 lines 09-14 14:04:10.831 1036 1065 I chatty : uid=1000(system) ActivityManager expire 11 lines 09-14 14:04:13.009 1036 3425 I chatty : uid=1000(system) Binder:1036_E expire 7 lines 09-14 14:04:19.092 1036 1036 I chatty : uid=1000 system_server expire 8 lines 09-14 14:04:21.904 1036 4035 I chatty : uid=1000(system) Binder:1036_11 expire 4 lines 09-14 14:04:21.967 1036 1874 I chatty : uid=1000(system) ConnectivitySer expire 2 lines 09-14 14:04:23.176 1036 1446 I chatty : uid=1000(system) Binder:1036_3 expire 4 lines 09-14 14:04:26.479 1036 1064 I chatty : uid=1000(system) ActivityManager expire 12 lines 09-14 14:04:36.797 1036 3425 I chatty : uid=1000(system) Binder:1036_E expire 9 lines 09-14 14:04:36.815 1036 4441 I chatty : uid=1000(system) Binder:1036_16 expire 10 lines 09-14 14:04:36.848 1036 1036 I chatty : uid=1000 system_server expire 10 lines
I was able to resolve my background scanning by adding the following permission to AndroidManifest.xml and repacking the APK. I did manually set the "Allow all the time" location setting in the app settings.

Code: Select all

<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
Because WiGLE is written as a foreground Service (https://developer.android.com/guide/com ... d-services), ACCESS_BACKGROUND_LOCATION shouldn't apply, per https://developer.android.com/training/ ... ermissions.
Regardless, I was having a problem, but now I'm not and that was the only change.
Just upgraded a Pixel 5 to RQ3A.210905.001 - it had silently set WiGLE to "battery optimized" without asking.
Upon disabling, the app behaved as expected.
I take that back. GPS appears only to function with the screen on. Furthermore in the case of this update (RQ3A.210905.001), adding

Code: Select all

android.permission.ACCESS_BACKGROUND_LOCATION
has no effect - GPS does not update when the device is locked.
Found the root cause for why Android started assuming the service was started from background, fix will be in 2.62 which is currently in process of rolling out to beta channel.
-bobzilla - WiGLE.net just a little bit
Image
fix confirmed - it's remarkable that Google would change such a core behavior at the very end of a release lifecycle.
bobzilla++
fix confirmed - it's remarkable that Google would change such a core behavior at the very end of a release lifecycle.
bobzilla++
bobzilla++ indeed! Thanks for the update.
I can confirm that the latest update resolves the issue for me.
and 2.62 has broken it for me, its not updating the GPS anymore as soon as the screen turns off.
Im running it on a S7 with Android 9.

Screen on and the Popup that it changed to GPS appeard, Screen off and no update.

The Version before, i think it was 2.6 was running fine (did a 300km ride with screen turned off) then saw the update in google play and did it. And then on the next 50km it tracked exactly nothing as the screen was dark.
Then uninstalled, took the version from f-droid (2.51), and drove the 300km back home with screen off and everything back to normal (except that i lost the total distance traveled on the device).

So whatever it has fixed, its broken now for me on Android 9.
Thanks for the report, should be fixed in 2.63 rolling out now.
-bobzilla - WiGLE.net just a little bit
Image
An update on what I have been experiencing - doesn't work when locked - doesn't work when in background (screen on) - I observed this while using navigation. Screen was on with navigation in foreground - no scanning took place during this time.
Update to the app has everything back to normal for me. Thanks!

45 posts • Page 3 of 3

Return to “WiGLE WiFi Wardriving Bugs”

Who is online

Users browsing this forum: No registered users and 2 guests