Emulate GPS hiking.
Have you ever needed to fool an application that tracks your location (e.g. AllTrails) into believing that you were walking around some area? Then this application is for you.
This application exposes a number of utilities for generating a series of GPS
coordinates, then playing back those coordinates by manipulating an Android
emulator instance via adb.
First, you'll need to generate a KML file with a series of points that trace out the path that you want to follow. The application assumes that all points of interest in the KML file are in the order that they should be followed when creating a route.
I used QGIS Desktop to create the routes along with OpenStreetMap.
Once your KML file is exported, you can use lerpkml to linearly interpolate
the GPS coordinates.
uv run faketrails lerpkml hike.kmlThis will output a hikefile in the current directory that has the interpolated
GPS coordinates (latitude, longitude, and altitude).
Before playing back these GPS coordinates, you should make sure that adb is in
your PATH,
#!/usr/bin/env bash
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-toolsThen you can play back the hikefile,
uv run faketrails play hikefile