A Flutter-based Android app for mocking/spoofing GPS locations on your device. Select any location on the map β or simulate an entire trip between two places β and your device will report that position to all other apps. πΊοΈ
100% free stack: maps by OpenStreetMap, search by Photon, routing by OSRM β no API keys, no accounts, no credit card required for anything. Clone, build, run. π
π Built for testing "My Globe" β GPS Mock is the official testing companion for My Globe, a maps & navigation project (think Google Maps, built from scratch). Simulating positions, movement, speed and bearing with GPS Mock makes it possible to develop and test My Globe's navigation features from a desk β no driving required. It works just as well for testing any other location-based app.
- π§ Three-tab layout: a persistent Map, a Library (saved locations above, mock history below), and Settings β all from a bottom navigation bar
- πΊοΈ Interactive Map: Pick your mock location by panning/zooming the map β opens where you left off, or calibrated to your real position when mocking is off
- π¨ Switchable map styles: Auto (follows the app theme), Streets, Minimal, Dark and Satellite β all free and keyless vector/raster basemaps
- π§ Compass: rotate the map with two fingers; a compass button appears while rotated β tap it to snap back to north
- ποΈ 3D buildings: extrude the basemap's buildings and tilt the camera with one tap
- π Saved locations on the map: favorites show as dots you can tap to select
- π Draggable pin: drag the pin itself, tap anywhere to send it there, or long-press β and when the map is panned away from it, an edge marker points back with the distance
- π₯ Offline maps: download a city, district, state or country (or a saved location's surroundings, or a route you simulated) and its tiles stay on the device. Downloads are listed as a country β state β district β city tree and can be deleted at any level
- π Smart Location Search: A Material 3 search bar that expands in place β fast, typo-tolerant place search (powered by Photon/OpenStreetMap β no API key needed), plus paste-in coordinates (
12.9716, 77.5946) and recent searches - β Favorites: Save frequently used locations; selecting one jumps the map straight to it. Delete with undo
- π History: Every mock session is logged β fixed spots and routes (from β to, distance, planned vs. actual duration, when started/arrived/ended) β including sessions started from tiles and widgets
- β‘ Real-time Mocking: Start/stop GPS mocking with a single tap; survives closing the app (foreground service with a Stop action in the notification)
- π¨ Honest failure reporting: if Android rejects the mock (e.g. GPS Mock isn't selected as the mock location app), a heads-up notification appears immediately β the app never pretends to mock when it isn't
Simulate actually travelling a route β perfect for testing turn-by-turn navigation in My Globe:
- Tap Directions in the bottom panel (or switch it to Route)
- Pick a start and destination β tap a waypoint to place it by tapping the map, or tap it again to search (the search also offers "choose on the map" and the current pin) β e.g. Chennai β Salem β and add stops in between if you like. The start is a green pin, stops are numbered blue pins, the destination is a red pin, and each can be dragged on the map
- GPS Mock fetches the real driving route (free OSRM routing, no key needed) and shows it on the map with distance and a realistic duration
- Choose how long the trip should take β either a duration in minutes, or an "arrive by" time/date (GPS Mock works out the pace)
- START ROUTE: your device's GPS now moves along the actual roads with correct speed and bearing, arriving exactly on schedule
- On arrival GPS Mock hands the destination over to a fixed-spot mock, so the device simply stays parked there until you stop it
The simulation runs natively in the foreground service, so it keeps driving even if you close the app. Reopen anytime to see live progress, remaining time, and a camera-follow mode.
Add up to 4 tiles (one per saved favorite) to your notification shade. Toggle a tile to instantly mock that location without opening the app β turning one on automatically turns the others off.
- Favorite toggle widget: bind a widget to any saved location and toggle mocking right from your home screen
- Route status widget: shows the running mock route's remaining time, progress bar, and a periodically refreshed map snapshot of the simulated position
GPS Mock checks its own GitHub releases once per launch and offers whatever is newer:
- Update / Later prompt on open, with "Don't remind me again today" to keep it quiet until tomorrow
- Downloads the release APK with live progress and hands it to the Android installer (you still confirm the install; the app asks for the "install unknown apps" permission the first time)
- Releases with no APK attached fall back to opening the release page
- Settings β Updates has a manual check and a link to the release notes
Note on tags: version comparison is numeric when a release is tagged like
v2.3.0. This repo currently tags by date (v2026-07-29-19), which can't be compared against the app'sversionName, so the updater instead offers a release whenever the newest tag differs from the last one this install saw β seeded silently on first run so it never nags about a build you may already have. Switching to semver tags turns on the exact comparison.
- Material Design 3 throughout, with a light / dark / follow-system theme switch in the overflow menu (the map follows it too)
- Collapsible control deck β a peek bar shows what will be mocked with a single start/stop button; expand it only when you need the full controls
- Long-press the map to drop the pin exactly where you want it
- Warning banner + guided setup when the app isn't selected as the mock location app (and no nagging when it already is)
- Setup & permissions checklist (overflow menu): mock location app, location, notifications, and battery-optimization exemption β with one-tap fixes
- Share the selected location as an OpenStreetMap link
- Tooltips, 48dp touch targets and screen-reader labels/announcements throughout
- Settings β Developer links to the source, the author's GitHub and the issue tracker, and shows the installed version
Before using GPS Mock, you need to:
-
π§ Enable Developer Options on your Android device:
- Go to Settings > About Phone
- Tap Build Number 7 times to enable Developer Options
-
π± Set GPS Mock as the Mock Location App:
- Go to Settings > Developer Options
- Find Select mock location app
- Select GPS Mock
The app detects this automatically and only shows the setup guide when it's actually needed.
Download the latest APK from the Releases page.
- Flutter SDK (3.5.0 or higher)
- Android Studio or VS Code with Flutter extension
- Android SDK
No API keys of any kind β the map, search, and routing all use free OpenStreetMap-based services.
-
Clone the repository:
git clone https://github.com/Sriharan-S/gps-mock.git cd gps-mock -
Get dependencies:
flutter pub get
-
Run the app:
flutter run
-
Build release APK:
flutter build apk --release
GPS Mock has three tabs on the bottom navigation bar: Map, Saved, and History.
- π± Launch the app and grant location permissions when prompted
- π Enable mock location via the setup banner (only shown if not configured yet) β or run through the full Setup & permissions checklist from the overflow menu
- π Select a location by panning/zooming the map or using the search bar
βΆοΈ Tap START MOCKING to begin mocking your GPS location- βΉοΈ Tap STOP MOCKING (in the app or the notification) to return to your real GPS location
If Android ever refuses the mock (e.g. GPS Mock got deselected as the mock location app), you'll get an immediate notification telling you what's wrong and a button to fix it β the app never pretends to be mocking when it isn't.
- Tap the Directions button, or switch the bottom panel to Route
- Choose start and destination (search, favorites, or the current map pin) β add stops in between if needed
- Review the route, then set the trip length: either a duration in minutes, or an "arrive by" time/date
βΆοΈ START ROUTE β watch the mock position drive the route; other apps (like My Globe) see a moving GPS fix with real speed/bearing- On arrival the position holds at the destination until you stop; the camera-follow button keeps the map centered on the moving marker
- Navigate to your desired location
- Tap the β€οΈ heart icon in the control panel
- Enter a name for the location
- Tap Save
Open the Saved tab to see all your favorites (shown as a mini map + name), jump to one, or delete it (with undo). Saved locations also appear directly on the map β as small dots when zoomed out, and as named pins once you zoom in.
The History tab logs every mock session β fixed locations and simulated routes, including ones started from a quick-settings tile or a widget. Each entry shows where (or from β to), when it started, the planned vs. actual duration, and when it arrived/ended. Tap an entry to jump back to that location on the map.
- Save at least one favorite
- Open the notification shade β tap the βοΈ edit button β drag the GPS Mock favorite 1β4 tiles into your quick settings
- Tiles map to your first four favorites (in list order) and show their names
- Tap to mock / tap again to stop β no need to open the app
Long-press your home screen β Widgets β GPS Mock:
- Favorite toggle β pick which saved location it controls when placing it
- Mock route status β shows live progress whenever a route simulation is running
GPS Mock is open source software released under the MIT License. You are free to use, modify, and distribute this software. β¨
We welcome contributions from the community! Here's how you can help:
- π Report Bugs: Found a bug? Open an issue with details about the problem
- π Suggest Features: Have an idea? Open an issue to discuss it
- π§ Submit Pull Requests: Fix bugs or add features by submitting a PR
- Fork the repository
- Create a new branch for your feature or fix:
git checkout -b feature/your-feature-name
- Make your changes and commit them:
git commit -m "Add your descriptive commit message" - Push to your fork:
git push origin feature/your-feature-name
- Open a Pull Request against the
mainbranch
- Follow the existing code style and conventions
- Write clear commit messages
- Test your changes before submitting
- Update documentation if needed
This project is open source and available under the MIT License.
- Built with Flutter and flutter_map
- Map tiles Β© OpenStreetMap contributors
- Place search by Photon (OpenStreetMap)
- Routing by OSRM (OpenStreetMap)
- Geocoding by geocoding package
IMPORTANT: Please read before using this app
This application is intended for educational and testing purposes only β first and foremost as the location-simulation test bench for the My Globe maps & navigation project. GPS mocking/spoofing can be used for:
- Testing location-based apps during development (like My Globe's navigation features)
- Privacy protection in controlled scenarios
- Educational demonstrations
- Using GPS mocking to deceive or defraud others is illegal in many jurisdictions
- Many apps and services have terms of service that prohibit location spoofing
- Violating these terms may result in account suspension or legal consequences
- Some uses (e.g., gaming, ride-sharing fraud, location-based dating deception) may be unethical and/or illegal
Use this app responsibly and in accordance with all applicable laws and terms of service.