GPX route on Android: how to load a track and save a route to a file

GPX is the most common format for exchanging routes: sports trackers, navigators, bike computers and route planners save it. In Mock Location you can load a GPX file, and the spoofed point will travel exactly along its line; a route built in the app can, the other way round, be saved to GPX and opened in another program. Loading and saving GPX is part of “Movement simulation”, a Premium feature.

  1. Prepare the file

    Any .gpx file will do: a track from a sports app or a navigator, a route from an online planner, a file from a bug report. Put it in the phone's storage or in a cloud storage that shows up in the system file picker.

  2. Open “Movement simulation” and tap “Load GPX”

    The “Movement simulation” button is in the left column on the map. In the editor, tap “Load GPX” and pick the file in the system window. The app reads the track (trkpt points); if there is no track — the route (rtept); if there is none either — individual points (wpt). The altitude above sea level from the file is kept and goes into the coordinates.

  3. Check the result

    The route is labeled “Route from file” and drawn exactly along the line of the file, without rebuilding it along roads — so loading does not need the internet. Individual points of the file (wpt) become route points, and there can be up to 100 of them: if the file has more, the start and finish stay in place, intermediate points are thinned out evenly, and the app shows “A route can have at most 100 points”. If the file cannot be parsed, you will see “Couldn’t read a route from the file”.

  4. Choose the mode and speed, then start

    The travel mode sets how the point speeds up and brakes, and “Speed” sets how fast it travels the track. “Loop” closes the track with a straight segment from the finish to the start, and “There and back” travels it in both directions. Tap “Start moving”.

  5. Save the route to GPX

    Any built route — from points on the map or from a file — is saved with the “Save GPX” button: choose a folder and a file name in the system window. The file gets the route line with altitude and your points as wpt. After saving you will see “Route saved to file”. The button is available once the route is built.

What GPX is

GPX (GPS Exchange Format) is a text XML file with coordinates. It can hold three kinds of data: a track (trk) — a recorded path of many points, a route (rte) — a plan of key points, and individual waypoints (wpt) — delivery addresses, for example. The format is open, so almost all maps, trackers and navigators understand it, including on Android.

If you edit points after loading

A route from a file travels along its own line as long as you do not change the points. Add, remove or move a point, and the route is rebuilt along the roads of the chosen mode, like a regular one. That already needs the internet. If you want to keep the file's line exactly, do not touch the points, and put the whole route into “My routes”: it will open from there with the same line.

Where to get a GPX of your route

Most sports trackers and navigators can export a recorded workout or trip to GPX — the item is usually called “Export” or “Share” in the workout card. Online route planners let you draw a path with the mouse and download it as a file. And if it is easier to build the route right in Mock Location, you can save it to GPX with the “Save GPX” button and pass it to a colleague or to another phone.

Mock Location — fake GPS location on Android without root

Free, outside Google Play. You can verify the file's checksum before installing.

Download APK