Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Some apps like Foursquare require the user to "check in" at physical places, in order to gain money benefits.

Given that emulated GPS are available for customized versions of Android, it sounds easy to trick such apps.

Given the monetary incentives, I am sure many people have tried, so how do apps prevent GPS cheating?

share|improve this question
I've never seen anyone 'gaining money' by checking in on foursquare. Can you elaborate this? – mri Aug 12 '14 at 6:02
You can get sometimes get a discount or other benefit after checking in many times (roughly), which is a kind of money benefit. – Nicolas Raoul Aug 12 '14 at 6:04
And there are competitions that are location based. And location based alibis could be of value to criminals... – Rory Alsop Aug 12 '14 at 11:51
@RoryAlsop, In terms of legal alibis, most law enforcement departments have a digital forensic unit that can generally uncover the true location of a suspect. Moreover, with a warrant, LE can bypass the phone and just look at cell tower usage. Bottom line, unless you are good (real good), I wouldnt try any of this in court. – Matthew Peters Aug 12 '14 at 12:51
up vote 10 down vote accepted

There are many ways to track a users location on a mobile device (I will go into how that works later).

None of the tracking methods are particularly easy to spoof. It can be done but it is simply outside of the realm of the average user as it generally requires either a modified device (physically or programmatically) or external gear.

Moreover, it is far easier for developers to simply tie multiple forms of tracking with simple logic (IE you can only 'check in' x number of times within timeframe y) than it is for a hacker to spoof an app like foursquare and get that 5% discount on dinner. Once again, it can be done, but [my theory is] so far it is not economical to hackers.

As promised, here are a few of the big technologies leveraged in geographic tracking:

  • GPS Reporting. This is probably most familiar to you. It is the most 'expensive' report because it requires relatively large amounts of power to read several GPS satellites. A pure GPS system is rarely used on mobile devices today. GPS devices can be spoofed programmatically (by changing the software's call to the GPS driver's position) even without modifying a device at all (as seen here).
  • GSM Reporting. This is perhaps the most common way your location is tracked through the day while you are moving around. The concept is simple. Your phone, with normal messages to the cell towers nearby, triangulates your position at a given time. This method is extremely hard to spoof without external hardware or seriously altering your phone's functionality (IE if you spoof a cell tower then yes you are 'not tracked' geographically, but you also cannot make phone calls). Additionally, cell traffic is encrypted. You could potentially spoof the access point where the apps software talks to the phone's cell tower data driver, but that is also difficult to say the least.
  • LAN Reporting. This is a pretty cool concept because it provides high levels of accuracy indoors (something that has traditionally been an issue). This requires much setup but at a minimum would allow apps to talk to registered wifi hotspots to confirm your location based on which wifi you are connected to. This is theoretically possible to spoof but it would largely depend on the levels of encryption for the legitimate connection's signature.
  • WAN Reporting. This is nothing more than simple IP address reporting. This is perhaps the easiest to spoof, but I put it in here for completeness as it is very common to mobile friendly sites.
  • Others (Bluetooth, RFID, Inertial nav, experimental, etc) There are quite a few other methods out there. One of my favorites is Inertial Navigation where there are no external transmissions (thus potentially very difficult to spoof) as it uses internal sensors and map to ascertain your position. This is seen in missile guidance systems as well as some apps. Life360 for instance uses a variation of this as it uses very little power (all the sensors are already active).

Other things to remember:

  • Developers can leverage any number of these technologies, thus making an app even harder to spoof.
  • Most location data is stored on a mobile device (and sometimes in many places) until explicitly deleted. Thus a developer can (potentially) access previous location data points. So if you say you were at cafe mama's 20 times todays and the app simply talks to siri to find out your last geo-data point was 100 miles away, the app will wonder...
  • Law Enforcement would have a far greater ability to determine your real location so just because you may have spoofed an app doesnt mean you should bet your life on it (some comments elsewhere suggested that you could use this spoofing nefariously, so I thought I'd toss this in here).
share|improve this answer
Great answer thanks. – Nikos Nov 5 '15 at 20:07

For Ingress, Google's global wargame, a range of anti-spoofing measures are used. Google are keeping quiet about the full range, but two that have been demonstrated are:

  • Speed limitation: 40mph maximum allowed in game
  • Corroborating measures: cross referencing wifi SSID's received with their location database
share|improve this answer

The short answer is that (as far as I'm aware) it isn't possible to perfectly stop location emulation on open platforms (e.g. Android). Other more restrictive platforms (e.g. non-jailbroken iOS/Windows Phone) don't tend to suffer as much from these problems as they don't allow users the same level of freedom in terms of the types of applications they can install.

What software vendors can do is try to reduce the impact and detect people mis-using this feature. As an example, one way of doing this might be to analyze the users positions and if they move too quickly, assume that they are using some form of GPS spoofing/emulation.

share|improve this answer
Interesting! Making moves physically credible could be an easy feature to add to a GPS spoofer. But then OpenStreetMap data could be used to check whether people walk on top of buildings etc. – Nicolas Raoul Aug 12 '14 at 11:19
From what I've seen from gaming, it's generally used to avoid really egregious cheating (so for example moving from New York to San Francisco in 5 minutes), not by any means a perfect control and you'd need to watch for false positives but worth doing all the same.... – Rоry McCune Aug 12 '14 at 11:41
in android, we easier to detect mock location is enable or not. if it open mock location, we could predict that they trying to cheat – Sruit A.Suk Feb 18 at 8:36

From my knowledge the way you spoof the locations is to :

1) Use developer mode with mock locations. There are ways of detecting that you are using developer mode so the developer can decide that the GPS is not to be trusted in this case. So they will use other ways of finding your location like wifi networks.

2) You can fake your position when your phone is rooted, without enabling the mock locations mode. Again, in some cases there are ways of detecting that the phone is rooted and again the developer can decide not to trust the GPS position.

Bear in mind that this is just a simple explanation. If you want to see how some people identify mock locations read this:

Edit: It was brought to my attention that rooted devices might not be always so easy to detect or might not be detectable at all. So the second version might work when the root is undetectable.

share|improve this answer
"there are ways of detecting that the phone is rooted" I am pretty sure there are easy-to-install impossible-to-detect custom ROMs around. – Nicolas Raoul Aug 12 '14 at 11:12
@NicolasRaoul That's a fair point. I do not know to what extent rooted devices can be detected so I will edit my post. I know there is a range of security products that can be embedded into apps to detect such things. But again, I don't know exactly to what extent they work. If you have any statistics on this please do share as I'm quite interested in the topic now :D – Florin Coada Aug 13 '14 at 9:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.