Randomly accessing location
- [x] I have searched open and closed issues for duplicates
- [x] I am submitting a bug report for existing functionality that does not work as intended
- [x] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
- [x] This isn't a feature request or a discussion topic
Bug description
When I open Signal it queries location, even though I do not try to share location. (https://community.signalusers.org/t/randomly-accessing-location/55088)
Steps to reproduce
- install signal via website APK in GrapheneOS
- grant location access
- open the app
- see location access label in top right corner
Actual result: Location queried even if not sharing Expected result: nothing
Screenshots
Device info
Device: Google Pixel 6 Pro Android version: Android 13 GrapheneOS TQ3A.230805.001.2023080800 Signal version: Version 6.28.5
org.thoughtcrime.securesms versionCode 131000
Link to debug log
https://debuglogs.org/android/6.28.5/86cab3d88a80d6dcbd1d9842911fa3a86391c6d09589817799624cb115bcb2fd
There are two things we use location for in the app:
- device transfer (you need location permission in order to use WiFi-Direct)
- the location picker we show if you choose to share your current location.
It's not used for anything else. And I don't see either being used in the log, so I don't really know what's going on here. It could be a bug in Graphene?
It has nothing to do with GrapheneOS beyond the fact that we fully enable the location indicator and location permission history compared to Android 13 and 14 still not enabling it. They only have a developer option for partially enabling it.
It has nothing to do with GrapheneOS beyond the fact that we fully enable the location indicator and location permission history compared to Android 13 and 14 still not enabling it. They only have a developer option for partially enabling it.
Thanks for confirming.
@greyson-signal Any ideas how I can provide more information on order to better debug this?
@thestinger Maybe Signal probes the location permission regularly and that is displayed by GrapheneOS's indicator? I checked sensor access using BetterBatteryStats. Apps that do access location (GPS Status, MyLocation) show up as using Sensor 'Unknown' (which most likely is the GPS). Signal does not show up in the list, even after GrapheneOS shows the indicator of location access.
No.
@thestinger What things specifically cause the indicator to show up? I stand by my initial assertions around how Signal uses location. I just did yet-another-audit and confirmed that we use the LocationManager exactly two places:
- Our device transfer flow (where we simply check if the user has a GPS provider): link
- The place picker (where we actually read the location): LocationRetriever, and it's usage
We do not directly use any the Play Services API's for location (we use their map view, but we manually feed it the location -- but again, only if you open the place picker).
I do not see anything else that could be triggering this indicator from GrapheneOS. Is it just the fact that we have the location permission? Do certain network API's trigger location access?
Still an issue with current Signal version and Android 14.
Version 6.35.5
org.thoughtcrime.securesms versionCode 134110
targetSdk 33 minSdk 21
Installed: 01.05.2023; 13:21 Updated: 14.10.2023; 08:47
GrapheneOS Android 14 build UP1A.231005.007.2023101100
FWIW, there is no such behaviour when using the fully FOSS Signal fork Molly.
I'm fine with using Molly instead. Shall we close this?
I don't think you should close it.
What things specifically cause the indicator to show up?
Using APIs which obtain location data via the location permission.
I do not see anything else that could be triggering this indicator from GrapheneOS. Is it just the fact that we have the location permission? Do certain network API's trigger location access?
This is not a GrapheneOS specific feature. All we do is fully enable it by default instead of having a partial implementation of it available via developer options.
https://github.com/GrapheneOS/platform_frameworks_base/commit/680027d5e9f7c35bc646def3c4bc46ea8f083a32 https://github.com/GrapheneOS/platform_frameworks_base/commit/9b6db19cf100c1368cef6c624529dddaae37788f https://github.com/GrapheneOS/platform_frameworks_base/commit/83c2453c4fa614d6f3747985fc1367e21a517a54 https://github.com/GrapheneOS/platform_frameworks_base/commit/eeca66d5990f308628d256fa423872f0ebe8fa61
You can partially enable this on modern Android via developer options.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Same behavior here on GrapheneOS. https://debuglogs.org/android/7.10.3/31fb5764970bb9ace73bde6b14411837b2357eeb9b288d95eb7a50db976462c7 (sha256sum: 450ef309635cedb3254a7295b0c05755a31f451855d559f9a260e23a846b951c) Very creepy, started today randomly accessing my location. Will also use Molly until fixed.
I'm also experiencing this issue. Whether by coincidence or not, this started to happen the day after I had shared my location for the first time with two of my contacts. I had used signal before without seeing the green location dot appear before this.