Was Google Location Accuracy (now is How to Spoof Wi-Fi Location)

Oct 26, 2024 Last reply: 1 year ago 28 Replies

Andy Burns wrote on Mon, 28 Oct 2024 15:45:49 +0000 :

We can endlessly debate which is more precise, particularly indoors versus outdoors, so I don't want to get bogged down on that - namely because I don't want *any* location lookups when I'm using an app that doesn't need it such as the insect-lookup app that I used to find out what this bug is

formatting link

I'm not talking about routing apps by the way, as they do need at least the most course of lookups in order to route you. I'm talking about apps that do not need your location at all - or which don't need precise location - and yet - because they're using Google API's - they *require* it to work.

Ever since Jeff Layman brought up fused location services a few years ago, I've never understood what they are - so I can't answer that question.

However, most of my knowledge (and understanding) is empirical, where I

*do* understand what my eyes are telling me when I run a variety of tests.

The main test I run is the following:

  1. I install & set up the Lexa mock-location app in Developer options.
  2. In Lexa, I set my location to the middle of the Golden Gate Bridge.
  3. In Android "Location Settings" I turn "Location = On"
  4. At this point, all other "Location Services" are not enabled a. Google Location Accuracy = off b. Google Location Sharing = off c. Google Location History = does not exist d. Wi-Fi scanning = off e. Bluetooth scanning = off f. Earthquake alerts = off g. Emergency Location Service = off In "App Permissions" no apps have "Location" allowed. (yes, even Google Maps has "Don't Allow" for location access. Also in "App Permissions" no apps have "Nearby devices permission".

This is my normal setup (since Lexa runs at boot), which is that no apps have access to location, and even if they did, it's a spoofed location.

But now I want to *test* if my location is being spoofed, right? I need an app that wants GPS but which doesn't force precise location.

Finding that app isn't as easy as you might think it is, simply because most apps use GSF spyware which forces precise location even though the app doesn't need it. But I just tried OSMAnd~ (version 4.5.1.0) which let me keep "approximate location" and it thinks I'm on the Golden Gate Bridge.

But let's try a more pernicious app, such as Google Maps which won't work unless I enable "Precise Location". If I fight with Google Maps, repeatedly telling it to keep the "Approximate Location", eventually (after three or so repeats), Google Mpas gives up trying and then it starts working, but it thinks I'm on the middle of the Golden Gate Bridge.

At this point, I've "fooled" Google Maps, right? Well, not really.

Sure, Google Maps thinks I'm on the Golden Gate Bridge because Google Maps fought with me and lost the battle for me to enable Precise Location.

But now let's say I want to route with Google Maps by choosing a desired destination. You can't "Choose start location" of "Your location" because Google Maps will complain "Can't apply some route options. Try again".

What I can do is "Choose Start Location" by selecting "Choose on map" where Google Maps zooms to the destination first, but I can hit the "Where am I" button to get Google Maps to zoom back to the San Francisco Bay.

Now Google Maps will create directions from the "pin location" to the destination (where the pin location is my spoofed location) but it won't update it because "Precise Location Denied" keeps coming up in Maps.

So I give in and give Google Maps "Use precise location = on", and a funny thing starts happening.

Google Maps thinks I'm in San Francisco, and then a few minutes later, Google Maps realizes (presumably from my neighbors' Wi-Fi access points perhaps - or maybe from cellular tower geolocation data) that I'm not.

So Google Maps gets confused and jumps back and forth between the two locations every few seconds.

What does this tell me? I think it implies that Google Maps is using GPS to think I'm in San Francisco, but it's using my dumb neighbors' Wi-Fi access points to know I'm not. So it gets confused.

From that, I'm gonna guess that I'm spoofing the GPS, but not the WI-Fi location (which is what I think it means to get "precise location" although "precise location" could use cellular tower information for all I know.

What does it mean to allow Precise Location anyway?

Anyway, to speed things up, I set Lexa to move 10 meters every 10 ms, and Google Maps keeps trying to re-route me as Lexa moves me from point to point but not following the path that Google had set up for me to follow.

In order to prevent Google Maps from figuring out I'm in two very different locations at the same time, all I really want to do is kill the Wi-Fi access point data - by spoofing it to nonsensical information so Google Maps can't use it so Google Maps has to rely on the GPS information alone.

The main question, I just realized, is not how to "spoof" the Wi-Fi access point data (of nearby Access Points) but how to zero them out so that any app that "wants" Wi-Fi access point data gets nonsensical data that it can't make any sense of - so - it has to rely on the GPS data alone.

But how?

How do you make sure Wi-Fi access location data is zeroed out?

Andrews wrote on Sat, 26 Oct 2024 05:47:36 -0000 (UTC) :

I realized while answering Andy's questions that what is needed is not to "spoof" any particular Wi-Fi access point location, but to zero it out.

That is, any app that requires Wi-Fi access point information would get nothing so the app would have to fall back on GPS information instead.

Which can easily be spoofed.

Note: You don't use this stuff when you're routing; you use it for apps like a weather app that don't really need your exact location but they require it for the app to work (because they're mining your data).

So the question morphs to: How to we make sure ZERO Wi-Fi access point data is utilized when precise location is turned on with Google Location Accuracy?

Andrews, 2024-10-26 07:47:

On a real device? You can't do this.

With an Android emulator you can spoof any location you want for the apps. But this is only possible because the emulator is controlled by the host PC. On a real device you would need to fake the database which is used to derive the location based on the Wi-Fi SSID(s) the device can see.

No, it is not "GPS location" it is really just the location of the Wi-Fi access point which Google recorder earlier when other devices had GPS

*and* Wi-Fi active and the users allowed Google to use that data in the device settings (maybe this is even the default, I am not sure). [...]

You can't.

I'm wondering if carrying a Wi-Fi access point around with you might offer some benefits. Most (not all) Wi-Fi protocols allow only allow your phone to join only one wi-fi network at a time. The older protocols have this useful limitation. Later protocols, such as those which support seamless roaming, can connect to more than one access point.

formatting link
Pre-authenticating, which requires joining more than one wi-fi network at a time, might also be a problem. For example, the phone could properly connect your pocket wi-fi access point, and then go wandering off and roam to some other access point, which is connected to the internet, in the hope of finding an access point with an internet connection.

If your phone is connected to a wi-fi access point that is under your control and is NOT connected to the internet, all the access point can do is provide your position when it last connected to the internet. In other words, instead of zero location data, give Google old or erroneous location data.

Reminder. I'm retired and am not keeping up to date on such things. I also don't have the time and resources to investigate this further. I have no plans to do any testing. Also, thank you for the long lists of URL's on the topic. I'm sure these would make interesting reading, but right now, I'm dealing with other projects and have other priorities.

Jeff Liebermann, 2024-10-29 18:17:

I don't think so. Because this access point can be seen by *other* devices which may report its current position. This is how Google learns the positions of Wi-Fi access points anyway.

Arno Welzel wrote on Wed, 30 Oct 2024 11:39:52 +0100 :

With Jeff's suggestion, we're finally making progress on the solution.

What Arno said is true that any access point (that advertises itself on airwaves as not hidden) will be seen (& uploaded) to the AP databases.

This upload is not done by you - but by all the rude people around you. Which is pretty much everybody who owns an Android phone (9,999 of 10K).

For the one out of 10,000 people who doesn't want to be in the AP db Google was forced to create an "opt out" mechanism to that upload.

formatting link

Apple & Mozilla "say" they will respect Google's opt-out mechanism too. Microsoft uses a different opt out, though, namely xxx_optout_nomap

formatting link

Notice it "can take up to five business days" for these outfits to scrub you from their access point databases, which means, effectively, as long as a rude Android owner is near you within those five days, you're screwed.

That's why you also need to set your SSID broadcast to "hidden" since all respectable companies will honor hidden broadcasts as "private" in intent.

Overall, that means your SSID needs only to have these three things: a. You start with the Google/Mozilla/Apple opt out (SSID_nomap) b. Then you add the Microsoft opt out (SSID_optout_nomap) c. Then you turn off the public broadcast (aka, hidden network). (See the sig for clarification on hiding the access point broadcast.)

I love that Jeff Liebermann has come up with a potential solution. I will dig into the references to see if what he suggests might work.

Any other ideas for Wi-Fi access point privacy are invited as Jeff, Andy, Arno and I seem to understand the goal of zeroing out Wi-Fi AP uploads while we're forced to use precise location for apps that don't need it.

Note: We don't zero it out during routing - but an insect lookup app which requires precise location doesn't really need it. They're mining you.

Andy Burns wrote on Mon, 28 Oct 2024 09:08:01 +0000 :

I realize I told Jeff Liebermann a slight mistruth when I said in the post that Andy is responding to...

"I just have to figure out HOW to tell what the heck they're spoofing. Maybe WireShark, Netstumbler, WiGle, etc., might tell me. Dunno.

You're the Wi-Fi expert who taught me everything I know, way back in the day when I was trying to spoof my MAC address (now the AP MAC addresses are spoofed by default on iOS and Android).

You told me, long ago, that you can't spoof the ROUTER's WAN-facing MAC address though - which - unfortunately - is the one we'd want to spoof!"

Since this thread wasn't about randomizing a MAC address, I didn't notice that what I said above is slightly wrong in "what" MAC address is randomized.

To be clear on the current state of Android MAC address randomization:

  1. The home router's outward-facing (WAN) MAC address is NOT randomized (unless the router software allows that - which I don't know about).
  2. What's randomized by default now is the mobile device MAC address that connects to the router's LAN-facing access point. This default mobile device (iOS & Android) randomization is per access point.
  3. For Android only in Developer options" is another privacy setting to randomize #2 per connection (so it changes every time you connect).

When Jeff Liebermann and I last spoke about MAC randomization (oh, maybe ten or fifteen years ago or so), this default randomization didn't exist.

Now both iOS & Android do MAC randomization (per AP) by default.

To get info about what an AP (access point) can hear, dumping the ARP (address resolution protocol) table or collecting broadcasts seems like likely methods. There are various ways to limit the scope of the ARP table. The easiest way is to reduce the number of entries in the table one entry and assign a static ARP entry. Only one pre-specified device can connect. Another AP might be able to hear broadcasts from the pocket AP, but I suspect that it will not add ARP table entries for devices which cannot connect. This needs to be tested (not by me).

Jitsi meeting beckons. Later...

Andrews, 2024-10-30 14:55:

Not *people* - *devices*! People just use their devices and may not even be aware of this!

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required