radiocells-scanner-android
radiocells-scanner-android copied to clipboard
Dying in lock
Since today the radiobeacon app freezes in background. I first recognized it when I locked the screen by hand and walked around. It looses location and therefore stops to scan. I am on OmnriROM Android 6.0.1 on a Nexus 5. I didn't change anything in permissions and I allowed all three ones asked. I have no clue why that happens. I rebooted and installed the app again but it didn't disappear.
I fixed it myself. I had to uninstall the app, reboot and then instqll it again.
I still have some issues.
Now it happens that only the app in the foreground gets GPS. When I have Satstat on the screen it gets satellites. When I switch to another and come back the sats are reset to 0.
Is there somebody with a solution or similar issues?
Today while running I further surveilled the situation. When Radiobeacon is in the background it can scan Wifis but as soon as I lock the screen Wifi goes to idle.
In Wifi settings I have checked that "keep Wifi activated even when locked" is set to "always". I changed the options in developer settings but nothing changed. I may have to post to the OmniROM Jira bugtracker.
At the moment I have to have the screen on to scan Wifis so I am virtually unable to scan.
I think i finally found the problem.
In the settings under "Location" and then in the "three dots menu" you find "scanning". There are two switches to allow scanning for Wifis and Bluetooth devices while in lock. I am going to check tonight if it works again.
That isn't the problem either. Still doesn't work.
I filed a bug in OmniROM. http://jira.omnirom.org/browse/OMNI-1282
Today I tried to fix it by uninstalling location middleware and backend. Didn't change anything.
I solved it by a fresh install of the whole Android system.
And it broke again. Tmr I will test if it works with @MozStumbler to determine wether the problem is in Radiobeacon or somewhere else.
It does work when MoStumbler scans as the same time. So it looks like it is a problem of the Radiobeacon app. Probably an incompatibility with Android 6. @wish7code could you help somehow?
To not support an unfree project like Mozilla Location Service I do use now OpenWLANMini as "companion app" for Radiobeacon. Like this I can scan for our project even when then phone is locked.
Am I the only one scanning with an Android 6.x device? I still can't scan without contributing to another project like OpenLWANmap or Opencellid because as soon as our app loses GPS signal it never gets it again. Therefore I need to run another app which gets a GPS signal for Radiobeacon. Has anyone a clue why this cloud be? I don't want to improve other projects I want ours to advance.
Thanks for the hint on Android 6... This is an important hint! I remember another user mentioned there some upcoming changes with the new Android version and background scans. I'll try to update my 'dev' device to 6.0 to see wether I can replicate
I mentioned it in the initial post ;-) Thanks for investigating!
What model is your dev device?
Does this issue exists on Android 5.1.1, too? I have a similar issue: after locking screen manually radiobeacon isn't scanning anymore. It seems that it still tracks GPS signal and position but not the sourrounding wifis. I'm using version 0.8.8, so I'm not sure whether this bug doesn't exist anymore.
I am not really shure if mine just looses GPS or if it doesnt get access to Wifi. It might be related because if it has no Wifi acces it has no AGPS and therefore maybe no location fix.
At some point it seemed like it had no Wifi but GPS and now I think it has none of the two.
Radiobeacon tracked the way I have been walking but scanned only for wifis if I turned screen on again. If I'm right the way is shown as a green line in the map. I haven't tested it for a long time so it might be that it is loosing GPS after a while, too.
I have the same issue. 3 bars of gps signal i was moving outside in the city and after some time I was supprised it recorded 0 network. Also scanning with screen locked.
@AreYouLoco What device, Android version and app version do you use?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Android 6 CM 13 stock kernel Radiobeacon 0.8.8 Openbmap 0.1.11 fdroid :-) -----BEGIN PGP SIGNATURE-----
iQJEBAEBCgAuJxxBcmVZb3VMb2NvPyA8YXJleW91bG9jb0BwYXJhbm9pY2kub3Jn PgUCVuXIAQAKCRD9y75DgGLNL8hxD/0XblOPl/QzBvYjoR9tH4i1sRhPq/u60kOa sTE0WPyiOnej4nLUmHk3DkdvPWBGHJMK0basbRJQqDQqkRwwpfaLt4BzaCEJm3s6 3JqQiUQ1xSQofFjtUb9uy6MZvxJlZqZQhQeP8377096CPxiLPSalSd0t1UxtSibE /8wwDcyrJi8IzC94D2om2bNKdAwP9dM0gdPkj4WUNUKYRnBj/6cSCvt+D9c0kizZ kt2nYHW4g7ucSy2G0JM7v9ne7ZdBgjESYl6L2doZUzqp0XoLuq0jyyZcv/MCjnAq S2yMstIys/WfogjY/ozX6/g2XPiHJ7ZTHXcV6uX9MWL0g+s2sCujttF5hLoLqRqr rYuqQ+W6rgjbKdfCMQzJEOALK/Hyr6EW6OK6sNIYE1yqDAKWHqJqzxP8eg8sWwpk 81PcGDO0miYij16UDvOeA+GV6fJPLARI/JlEA0eejOlPPq0gQWr8dGyjgIF7TdXN UuJXanRbYsh+ddkxn/xJA9LZV/+GfHV5otHdUAHT2A25/D+hUqWtRctP7aq/dBQT sI2mUWhcSX8WWKalryXSFYMubnptCt1ALiZz1DIRGHk3Mybbyj36jlIl1vT+0TF0 Wbu9r6g3aBYrwDMFHVzzSNfEr5rnDzZjjc7torzmNxeQf4VsipTvsoapWWJrDBQV EfxMou4kTA== =t3A7 -----END PGP SIGNATURE-----
Scanned over the code again: For power saving purposes we set the wifi adapter in WIFI_MODE_SCAN_ONLY mode in https://github.com/wish7code/openbmap/blob/master/android/app/src/main/java/org/openbmap/services/wireless/WirelessLoggerService.java#L452
This might be the issue here. We might try try WIFI_MODE_FULL_HIGH_PERF, but that would obviously increase battery consumption. The documentation explicitly mentions, that the adapter in this mode continues to run in full power even if screen is turned off.
see https://developer.android.com/reference/android/net/wifi/WifiManager.html#WIFI_MODE_FULL_HIGH_PERF
If anyone is willing to test, I could provide a separate apk for testing?
I am!
Just make a new release on fdroid. People who do wardriving with their portable devices like tablets phones expect bigger power consumption anyway.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Please send me test apk file.
Thanks!
I will test it out and submit some feedback. -----BEGIN PGP SIGNATURE-----
iQJEBAEBCgAuJxxBcmVZb3VMb2NvPyA8YXJleW91bG9jb0BwYXJhbm9pY2kub3Jn PgUCVuq5bAAKCRD9y75DgGLNL2waD/48InLolu1ymFWGhJGpUmdj/Q8ILNgGDJhH Y5qvhCPNZ+VXjds4CntLm/u0JalJw35hqRJVwe0Xf6GuKdnWdzCWAfAbhi/sfcNR 1H2fqw7ewhcYhqLtRsrEHRuJbzJkAV9tM92SVgmutNzdgJPZeQJFjh60spqi9iWX nenI0bvAdeibWx9+W9NO5wZzh8vh5Gke4XI9G5E3YhN0/p4ZYElWNcs8xpxcPAJj eqZp7chiVT+AYp2gLFJ5Dx2rS4IFuPT4QIn4ZTFJx0fqSj+pW9vJ7n4hPTMl/m46 fldSttuf9Y6a7PjQgikjcOzBLLZ/Y64iQkSoUJw5JHPxYykdvUh+mGjqFFaHl8Lx zPCZwx/eNAE/1avqbFy0Y6rOKnZgTPXE/05DcOXYwHfYR9aFoGZmcG6vZQpPa3wy i4OWD5KFu2WCrV69DqOd627/qhdaGQAH/RnA2mpi8Ot0T3lgy6Us4J4CoXzOU04P W1JR0cr+w3PUi9sF60spNJNtwpdf8D/rJsoduwlcpwLHEJGM0ILTKrTAc3Ecso/c Sc51QbV9BMLRyQQlgkB/aG/b7HxyluLFsW2TAy+2FJ+J/AdWZcUZ4flPS9Qbr8MC znipYAcf762zYeTFekaMmjYDAKlgWse4zewkbx0l9dVUdWxeXoZ0uQkC2yoAVFlg fEsAD9Ysfg== =sGQ0 -----END PGP SIGNATURE-----
Hello altogether, yesterday I got an update to Android 6.0.1 (radiobeacon version stayed the same). Surprisingly the issue has resolved for me: I walked a bit with wifi and gps (high accuracy) enabled. When turning of screen, scanning continued and logged everything. It was just for a few minutes so I don't know the behaviour for a longer time. I will test this.
What I wanted to ask: what is the advantage to choose WIFI_MODE_FULL_HIGH_PERF over WIFI_MODE_FULL? And is the current client requesting the wifi scans as proposed in the description of WIFI_MODE_SCAN_ONLY (sorry, didn't check the source code)?
Thanks for your work!
@bastorran What Android version did u use before the update?
In my case it works as long I directly see the sky. When I loose because I walk thru an underpass it wont find GPS again.
@bastorran The story is quite funny.. Initially Google has once introduced their 'secret' private API to improve SIP call quality while screen device was turned off. It was Google magic. Third party clients were suffering from bad performance as once the screen was off, wifi adapter simply went into sleep mode. Later on our benevolent big brother decided to share the full high performance mode with everybody and made the API public.
(Source: https://code.google.com/p/android/issues/detail?id=15549 and various other Android issue reports)
And is the current client requesting the wifi scans as proposed in the description of WIFI_MODE_SCAN_ONLY
To put it neutrally: I just think so ;-) The documentation says WIFI_MODE_SCAN_ONLY requires the client to perform the scan manually. That's what we actually do. The workflow is as follows:
GPS service signals new position --> wireless logger service performs scan --> once wifi adapter signals new scan results arrived, save them
Obviously there's one caveeat: if GPS dies we won't even start to scan..
@all Full high power apk available at
https://6597aa1f72f81233f964cec56f26d45bc9ed86d3.googledrive.com/host/0B97gHr4MqjHpM2h0QVR5SWJOcGs/full-power.apk
As always: remind that installing this debug version will remove F-Droid version and delete all files you logged with F-Droid version (reason: apk above is signed with our debug key, f-droid apk is signed with f-droid key)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Dig in dig in. I cannot help with code I am not a programmer yet. But I would love to test on my device and send feedbacks if its accually working.
Good luck! -----BEGIN PGP SIGNATURE-----
iQJEBAEBCgAuJxxBcmVZb3VMb2NvPyA8YXJleW91bG9jb0BwYXJhbm9pY2kub3Jn PgUCVusyFAAKCRD9y75DgGLNL1bBD/9rH8fUt8nSlRMQW/rEtRyozNI5R6f3CoU4 zbtX6NilZdUaeiCt5JCk5DBRZn3n6hhRXhTVIBQeythKdiYiBq2D4N/u4QyIZU2n PgsN9KUdRJlI3h9xjhJhXp8EhrFn6ir27sP3d7QIoV562FI00o/6QXZwKGjPB/+P i3ALLRhNJ+ZgUao7nB5XvkgQOr+FjYH502/HbM8DIV0OYio9FCQtiU+80WWNyFZ2 yYADIC1/KOe1lasIBg6oiEJ69Ag9CnbCneY8DGYOsDaA4g32X92L9tiX0oKlhkZ6 SN/44/P4+N76d8UalaM8TwGOQwRfxsLJA/i1bBXbK63+BO7CoOqt9wQ3M1dW+oaN ens2MFsytih2W3iaPQ4jXAKqdyClyWxXfXGBxFBGDwKVXj2TUIW64wXhgtQS3cg2 FsxhllICR9ic4Sw6i57mViz+6rtJ8dIFO4V1rXqCARL5ZgnLbNBVewLCv/ufxMzh uXvMXlTXLF5HuxD8L7wv1wEah8t58/oUwrOB6LujyFXQKXx7TtU0e98iZmMzQqOH UfXZlhgCxII6vfXkTl3Ugt2Y9PRlfyl70OYvcWMIqaZv/wmotpGVJkVHY7KnNZeL 6pd3IKHgO0Ko5bOlJwt6l5DMM+6sBcRHtCjwuTPEmXk1FIHFzEQFOV+DrjO8kgVY fVt0tgMhpw== =08Ga -----END PGP SIGNATURE-----
Already one bug found. Just after installation I choosed reorganise database wich I guess is empty after reinstalling app. And app crashed on please be patient.
Backdoor?