Home » How does Google know where I am?

How does Google know where I am?

Solutons:


Google uses BSSID information from your WLAN Access Point to get an approximation of where you are located, even with GPS and WiFi turned off. Taken from “How does Google Maps estimate my location without GPS?”:

Google and others like Apple and Skyhook build a Database which links WLAN BSSIDs to a geographic location. A BSSID is like the MAC address of a access point that gets broadcasted by that access point. It is therefore “public viewable” if the BSSID broadcast is enabled, which is the default for most access points. The BSSID operates on a lower layer as the IP stack, you don’t even have to be connected to an access point to receive these broadcasts.

So, essentially, when you ARE using WiFi and GPS, Google’s database of BSSIDs is updated with a geographic location associated with that BSSID, as you’ve assumed. In your case, your AP is sending beacons advertising its BSSID, and because it is already in Google’s database, Google Maps knows where you are based on the location of that AP.

So it’s not that the ISP is giving Google the location of their routers, it’s that your phone has already helped to build a database of the Access Points around you, and Google uses this data for geolocation.

Sadly, even if you get a new router and keep any and all Android devices away from it, they will still be able to approximate your location based on the cell towers your phone connects with (or maybe even your neighbor’s AP!), but it won’t be nearly as accurate.


I saw in the comments questions about whether or not Android phones will receive location data even with WiFi turned OFF. The answer is, yes, absolutely they can. I’m sorry I didn’t make that clearer. Better check your settings if you were unaware:

The Advanced Wi-Fi settings menu for Android devices. The setting “Scanning always available” is underlined in red for emphasis. The setting's toggle switch is in the On position. The setting's in-menu explanation says “Let Google's location service and other apps scan for networks, even when Wi-Fi is off”.


This “feature” has been included since Android 4.3, and prior versions of the Android OS do not include this feature. Thanks to martinstoeckli for this information.

Although turning off this “feature” on your phone seems like the best way to prevent your BSSID from being added to the database, this isn’t necessarily the case. You’ve got other people’s phones, the phones of passers-by, and even Google’s own Street View cars to contend with. Thanks to Bakuriu for pointing this out.

Though this may be the case, you can opt out of your involvement in this program by appending _nomap to the end of your SSID. Your SSID is the “name” of the network that you have chosen or have been given. For example, you connect to the SSID “Home” or “D-Link” for your WiFi at home. In order to opt out you would rename your network Home_nomap or D-Link_nomap. Thanks for the tip Andrea Gottardo. For more, refer to the Google Support article about opting out.

You disabled WiFi and GPS, but you still have cellular data turned on. That means that the phone is in communication with the local cell towers. Android uses cell tower geolocation to estimate your current location.

Each cell tower has a set of ID numbers that identifies them to the phones. It broadcasts its identity constantly so that phones can connect to it as they move around. Cellular tower antennas are directional, with each tower serving roughly three different areas; you can think of them as three pie-shaped wedges with the cell tower at the center of the pie. Each of those wedges is a “cell” (which is where the technology got its name.)

Each of the radios serving those cells transmits using a certain amount of power – the closer you are to the tower, the stronger the signal your phone receives, and vice versa. Your phone uses the received signal strength to save batteries. The farther away a cell tower is, the more power it takes your phone transmit to it. So a cell phone always tries to lock onto the strongest signal so that it can transmit using the least amount of power. A more useful way of looking at it is that received signal strength represents the rough distance to the cell tower.

So now picture that cell, shaped like a wedge of pie, with the strongest signals received closest to the tower, and weakest furthest from the tower. Imagine slicing the wedge of pie in curved lines ringing the tower, with strong signal strength in the closest slice and the weakest signal in the furthest slice. It looks (very) roughly the WiFi logo. Each of those slices represents some tiny area of the planet, and you’re standing in one of them.

If you’re in a larger populated area, like a city, your phone will usually get signals from more than one cell tower. So picture the intersection of overlapping slices from tower A, tower B, tower C, and tower D. The intersections define a smaller and smaller area.

So how does Google know any of where these cells, wedges, slices, and intersections are? From the billion Android phones that have GPS turned on (including yours, when your GPS was on), constantly sending reports of their GPS location and what cell towers and signal strengths they see. Google has used this data to map out where each cell is located, and what the approximate signal strength is at each point. They have a giant database on their servers with this information; your phone queries that database by making a network request that lists all cell towers that are in range, and the Google servers respond with your estimated location.

It’s all very approximate, of course, because radio signals don’t actually travel in perfect little pie wedges – they bounce off buildings and cars, they get absorbed by trees and walls and fog and clouds and people. And new cell towers come and go every day, so the radio transmitter landscape is frequently changing, too. The millions of reports produce only average GPS coordinates. But that’s OK, because even imperfect location data is still good enough for most user needs.

Finally, for additional accuracy, the Google Play location services software on your phone keeps track of the last known location of your phone, and may use this to better estimate your current location. In particular, the last known location is a plausible estimate for your current location (under the heuristic that you might not have moved since the last time your location was queried); if this seems consistent with cell tower information, it might be used to improve the accuracy of your estimated location.

According to Google:

How Maps finds your current location Maps estimates where you are from
sources like:

Your web browser’s location information. Your phone’s location, if you
have Location History turned on.

In addition, you can set your default location using the Google Maps app, so you might’ve done that in the past.

Try changing your default location and test again with GPS turned off

  1. Click the gear icon at top right to open a menu
  2. From that menu, click Search Settings, which opens up a new page
  3. Enter a new default location in the text box for Location

Related Solutions

Why not use “which”? What to use then?

Here is all you never thought you would ever not want to know about it: Summary To get the pathname of an executable in a Bourne-like shell script (there are a few caveats; see below): ls=$(command -v ls) To find out if a given command exists: if command -v...

Split string into Array of Arrays [closed]

If I got correct what you want to receive as a result, then this code would make what you want: extension Array { func chunked(into size: Int) -> [[Element]] { return stride(from: 0, to: self.count, by: size).map { Array(self[$0 ..< Swift.min($0 + size,...

Retrieving n rows per group

Let's start with the basic scenario. If I want to get some number of rows out of a table, I have two main options: ranking functions; or TOP. First, let's consider the whole set from Production.TransactionHistory for a particular ProductID: SELECT...

Don’t understand how my mum’s Gmail account was hacked

IMPORTANT: this is based on data I got from your link, but the server might implement some protection. For example, once it has sent its "silver bullet" against a victim, it might answer with a faked "silver bullet" to the same request, so that anyone...

What is /storage/emulated/0/?

/storage/emulated/0/Download is the actual path to the files. /sdcard/Download is a symlink to the actual path of /storage/emulated/0/Download However, the actual files are located in the filesystem in /data/media, which is then mounted to /storage/emulated/0...

How can I pass a command line argument into a shell script?

The shell command and any arguments to that command appear as numbered shell variables: $0 has the string value of the command itself, something like script, ./script, /home/user/bin/script or whatever. Any arguments appear as "$1", "$2", "$3" and so on. The...

What is pointer to string in C?

argv is an array of pointers pointing to zero terminated c-strings. I painted the following pretty picture to help you visualize something about the pointers. And here is a code example that shows you how an operating system would pass arguments to your...

How do I change the name of my Android device?

To change the hostname (device name) you have to use the terminal (as root): For Eclair (2.1): echo MYNAME > /proc/sys/kernel/hostname For Froyo (2.2): (works also on most 2.3) setprop net.hostname MYNAME Then restart your wi-fi. To see the change, type...

How does reverse SSH tunneling work?

I love explaining this kind of thing through visualization. 🙂 Think of your SSH connections as tubes. Big tubes. Normally, you'll reach through these tubes to run a shell on a remote computer. The shell runs in a virtual terminal (tty). But you know this part...

Difference between database vs user vs schema

In Oracle, users and schemas are essentially the same thing. You can consider that a user is the account you use to connect to a database, and a schema is the set of objects (tables, views, etc.) that belong to that account. See this post on Stack Overflow:...

What’s the output of this code written in java?

//if you're using Eclipse, press ctrl-shift-f to "beautify" your code and make it easier to read int arr[] = new int[3]; //create a new array containing 3 elements for (int i = 0; i < 3; i++) { arr[i] = i;//assign each successive value of i to an entry in...

How safe are password managers like LastPass?

We should distinguish between offline password managers (like Password Safe) and online password managers (like LastPass). Offline password managers carry relatively little risk. It is true that the saved passwords are a single point of failure. But then, your...

Can anyone tell me why this program go to infinite times?

while (i <= 2) { while (i > 0) { a = a + b; i--; <- out the inner while loop when i = 0 } printf("%d", a); i++; <- at here, the i==0 each time, so infinity loop } Because your nested loop always restores the value of i to 0, And 0 <= 2 is always...

How to conditionally do something if a command succeeded or failed

How to conditionally do something if a command succeeded or failed That's exactly what bash's if statement does: if command ; then echo "Command succeeded" else echo "Command failed" fi Adding information from comments: you don't need to use the [ ... ] syntax...

How to turn JSON array into Postgres array?

Postgres 9.4 or newer Obviously inspired by this post, Postgres 9.4 added the missing function(s): Thanks to Laurence Rowe for the patch and Andrew Dunstan for committing! json_array_elements_text(json) jsonb_array_elements_text(jsonb) To unnest the JSON array....