[GH-ISSUE #96] Need smarter use of location age and accuracy #67

Closed
opened 2026-02-26 21:31:41 +03:00 by kerem · 1 comment
Owner

Originally created by @lbdroid on GitHub (Jan 10, 2023).
Original GitHub issue: https://github.com/seemoo-lab/AirGuard/issues/96

Curently, there are some hardcoded values in the code that result in poor performance in tracker detection;

MIN_DISTANCE_BETWEEN_BEACONS = 400
getScanDuration() = 8000
Maximum time to wait for location = 8000
MAX_AGE_SECONDS = 100
MIN_ACCURACY_METER = 100

  • The low scan duration results often in beacons being missed altogether. From what I can tell, TILE trackers seem to have a period of about 20 seconds, so the result is that it very often misses these beacons. Raising this to 25 seconds improves tracker detection.

  • The time to wait for the location is set to 8 seconds. This is far too low for most GPS's to lock onto a location unless they are already active. Network location maybe works faster, but I would think that anyone interested in finding trackers would also want to keep trackers like google binary software (where network location is implemented) out of their phones, so this should be assumed to not even exist. This should be raised to at least a few minutes. Raising this to 3 minutes makes location acquisition much more reliable.

  • MIN_DISTANCE_BETWEEN_BEACONS, MIN_ACCURACY_METER: This should be implemented in a much more dynamic way. There is no reason to limit accuracy to 100M because sane tracker detection can be implemented even with accuracy of 1000 km -- as long as the distance between the two beacons is greater than the sum of the location accuracies, then you can conclude that the device is a tracker. Instead of a minimum accuracy, it should be a desired accuracy. Make best effort to obtain desired accuracy, but if it fails, use whatever location has been obtained with a lower accuracy.

  • MAX_AGE_SECONDS: The purpose of this is obviously so that you don't have a situation where you read a beacon with a location, go somewhere that the phone obtains a new location, and then come back to read the same beacon with a location somewhere far away. This makes sense, but the value is unreasonably small and not necessary useful. The software should make best effort to obtain a new location, but if it fails, then it should store the most recent location AND FIX AGE and decide whether a comparison is valid based on a combination of distance and time. For example, if the fix is 15 minutes old, and the distance is 500 km, then you obviously didn't get back to the starting location in that time since you'd have to travel at 2000 km/h.

Originally created by @lbdroid on GitHub (Jan 10, 2023). Original GitHub issue: https://github.com/seemoo-lab/AirGuard/issues/96 Curently, there are some hardcoded values in the code that result in poor performance in tracker detection; MIN_DISTANCE_BETWEEN_BEACONS = 400 getScanDuration() = 8000 Maximum time to wait for location = 8000 MAX_AGE_SECONDS = 100 MIN_ACCURACY_METER = 100 - The low scan duration results often in beacons being missed altogether. From what I can tell, TILE trackers seem to have a period of about 20 seconds, so the result is that it very often misses these beacons. Raising this to 25 seconds improves tracker detection. - The time to wait for the location is set to 8 seconds. This is far too low for most GPS's to lock onto a location unless they are already active. Network location maybe works faster, but I would think that anyone interested in finding trackers would also want to keep trackers like google binary software (where network location is implemented) out of their phones, so this should be assumed to not even exist. This should be raised to at least a few minutes. Raising this to 3 minutes makes location acquisition much more reliable. - MIN_DISTANCE_BETWEEN_BEACONS, MIN_ACCURACY_METER: This should be implemented in a much more dynamic way. There is no reason to limit accuracy to 100M because sane tracker detection can be implemented even with accuracy of 1000 km -- as long as the distance between the two beacons is greater than the sum of the location accuracies, then you can conclude that the device is a tracker. Instead of a minimum accuracy, it should be a *desired* accuracy. Make best effort to obtain desired accuracy, but if it fails, use whatever location has been obtained with a lower accuracy. - MAX_AGE_SECONDS: The purpose of this is obviously so that you don't have a situation where you read a beacon with a location, go somewhere that the phone obtains a new location, and then come back to read the same beacon with a location somewhere far away. This makes sense, but the value is unreasonably small and not necessary useful. The software should make best effort to obtain a new location, but if it fails, then it should store the most recent location AND FIX AGE and decide whether a comparison is valid based on a combination of distance and time. For example, if the fix is 15 minutes old, and the distance is 500 km, then you obviously didn't get back to the starting location in that time since you'd have to travel at 2000 km/h.
kerem closed this issue 2026-02-26 21:31:42 +03:00
Author
Owner

@Sn0wfreezeDev commented on GitHub (Jan 23, 2023):

Hi,

Yes we worked on fixing these issuesX thank you for your suggestions. I like the way of including the accuracy in the tracking detection. Limiting the accuracy to 100-200m often results in bad locations.

I think the problem is that I expected all Android phones to perform similar. And that they also perform similar to iPhones. Normally Pixel and iPhones get quick location fixes with high accuracy, but Samsung phones take over 40s for this.

<!-- gh-comment-id:1400069582 --> @Sn0wfreezeDev commented on GitHub (Jan 23, 2023): Hi, Yes we worked on fixing these issuesX thank you for your suggestions. I like the way of including the accuracy in the tracking detection. Limiting the accuracy to 100-200m often results in bad locations. I think the problem is that I expected all Android phones to perform similar. And that they also perform similar to iPhones. Normally Pixel and iPhones get quick location fixes with high accuracy, but Samsung phones take over 40s for this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AirGuard#67
No description provided.