Android fake GPS location


With all the Pokemon GO buzz and even mainstream media covering ways to fake the GPS on Android we thought we’d have a ‘go’ at it - so basically we’ve tried out all the options (from emulators to an actual device) and found the best one, so you don’t have to go through all the trouble!

This guide will take you through the options for faking GPS location on an Android device and how to use it to e.g. play the extremely popular Pokemon GO.

Before we continue we want to acknowledge full disclosure that this is against Niantic’s terms of use of the game so use at your own risk. We, Appdictive, do not endorse nor support this in any way. Any loss of data, ban, or other recourse taken by Niantic as a consequence of this process is solely the responsibility of the player.

Emulator options

BlueStacks emulator

The most widely used option is BlueStacks (popularized by YouTuber Travis D) - however the BlueStacks emulator is very unreliable, it takes up a lot of CPU and is cumbersome at best to use for emulating. So we won’t even bother going into detail with that, but should you wish to to go against our advice you can find the BlueStacks guide here.

NOX emulator

The other popular choice for PC emulation is the NOX emulator - see the setup guide here. It is a much, much better experience than the BlueStacks emulator. It is fairly easy to setup, and lets you walk around in the game using WASD, or setting a GPS coordinate using the emulators built in GPS feature.

There is however a few downfalls to this approach; most notably if you wish to keep your pc from overheating in the summer weather, you might want to use an Android device instead (on my laptop it continuously uses around 25% CPU even when the emulator is minimized - i.e. constant fan noise).
Another catch could be that you have less control with this approach, and have to install an emulator on your PC instead of keeping the game (and your Google Account login!) on your phone. At the moment the NOX emulator seems to be free to use, but it is impossible to say if this changes in the future or perhaps they also implement more ads and such as is the case for the BlueStacks emulator.

NOX emulator

Android device setup

After having tried several emulators, our conclusion is that a real device gives a much nicer overall experience - and in many ways it is also preferable for development/testing to run on an actual device.

So how to do it?

Unlike the two emulators, we have yet to find a great guide for setting up an Android device for it, so here we’ll give you the steps and brief and link to the best guides for getting through the process!

You must have a rooted Android device for this to work. In order to truly simulate the device location being moved around, first we’ll setup a module to prevent apps from knowing the location is fake. Next we’ll install an app to allow us to fake the location from our PC with the phone connected via USB. This has the advantage of not having to exit whatever app you are using, in order to change the location - everything can be controlled and repeated from your PC!

Step 0

First, make sure you have enabled “Unknown Sources” option. You find it here: Settings –> Security –> Unknown sources.

While you are in the settings also enter About and tap the Build number until you have developer options enabled.

Step 1

With a rooted Android device install the Xposed framework. HowToGeek wrote a great guide on how to install that accordingly to your Android version.

Step 2

Next install the Xposed module called “Mock Mock Location”. Simply access the Download section of the Xposed framework app and search for the name, select Mock Mock Location, swipe to the versions tab and download the newest. Install it like a normal Android app, then go to the Module section of the Xposed framework and enable the Mock Mock Location module - then restart the phone to activate it.

Next step options

From here on there are basically two options; either you control the GPS location directly on your phone or you control it from the PC.

Controlling it on the phone can be done as in the BlueStacks approach with a GPS spoofing app that you then have to go back and forth between to change your location - a bit cumbersome.

In the case of Pokemon GO, as we already have the Xposed Framework installed, one option is to install on-screen controls for navigating in the game - e.g. the module called “Pokemon GO controls” - find it under Download and install the same way as with the other module.

On screen controls

However, if you are serious about testing and repeating behaviour, you won’t want to have to manually perform the location change on the phone screen each time - so the following steps will explain how to control it from your PC.

Step 3

Install Mock Geo Fix from Google Play. This app enables us to send geo fix commands from the PC to move around the GPS location.

Step 4

In Developer options enable the USB debugging and set the app for fake location to Mock Geo Fix.

Step 5

Connect the device with USB to your PC.

Launch the Mock Geo Fix app and click start - this should show you the IP of your device.

Now you can open up a command prompt (cmd) and ‘telnet’ to the device ip and port (5554 by default), e.g.:

telnet 192.168.2.15 5554

After having connected through telnet you can send a geo location with the command: geo fix lon lat Keep in mind that if you find coordinates with Google Maps, it will show you them in the format of ‘lat lon’ so you need to reverse the two when sending as a geo fix to your device.

Telnet geo fix

Bonus step - automation

If you wish to do more than just set a fixed GPS location point I suggest checking out the GitHub page of MockGeoFix. The developer behind the app has made some very useful python scripts that can be found in the ‘helper scripts’ folder if you download the project. The GitHub page explains how to use these, but it does of course require you to have Python installed to run them.

One script lets you input a gpx file to send the GPS coordinates of a route at a certain speed (good for e.g. hatching eggs at a speed of less then 10 km/hr), which is good for simulating real walking.

And another lets you control the GPS location by clicking on a map you can open locally in your browser - pretty neat!



By: Jesper Lysgaard Rasmussen