androidlocationcyanogenmodspoofing

Why can the browser see my true location?


I am developing an application that mocks the location of the user while other apps try to access it. I am using a rooted Samsung Galaxy S3 with Cyanogenmod 12. So far, the mock locations have shown to work against the Yelp. However, whenever I open the default browser app and google "near me" or "where am I," the results know my true location. Why/how does the browser know where I am and that I am not in the spoofed location?


Solution

  • The browser likely determined the location based On IP Address as opposed to GPS.

    Per this wiki page:

    An IP address serves two principal functions: host or network interface identification and location addressing.

    Determining location using GPS uses the satellite system to determine the location. How GPS works is here. However, in the case of IP Address, the location is determined using the IP Addressing system which was designed in a way to be able to determine location. The IANA (an organization which oversees allocation of IP Addresses) allocates IP Address to regional internet registries as described here. The regional internet registries then allocate different addresses to ISPs which then allocate to customers.

    To sum up, the "numbers" an IP address consists of helps determine the location of the user.