Road-constrained GPS
Pick a point or a route on OpenFreeMap. A* routing keeps the vehicle on roads, and the native service publishes a mock fix every 500–10000 ms.
mock location & virtual camera
Relocation is a developer test rig: a single Flutter shell over a native Kotlin mock-location service, plus a virtual camera that feeds your own app. Free maps, no API key, and nothing hidden behind a service you rent.
Every part of the stack is inspectable: an open map style, a documented native service, and errors that come back as error codes.
Pick a point or a route on OpenFreeMap. A* routing keeps the vehicle on roads, and the native service publishes a mock fix every 500–10000 ms.
A bundled Camera1 module feeds a virtual stream to the app under test. It is scoped through LSPosed only where you choose to enable it.
Map, Virtual Camera, Cam and Settings. The Flutter UI never talks to Android directly — everything crosses a MethodChannel.
OpenFreeMap styles — liberty, positon, dark — ship without a key, an account or usage limits.
PERMISSION_DENIED, MOCK_APP_NOT_SELECTED and LOCATION_UNAVAILABLE are real codes, not toast text.
The core mock-location flow needs no root at all. Root lives inside a guest, only for the camera hook.
The test rig itself, plus the three components used to build the verified guest environment described below.
A single Flutter shell over a native Kotlin mock-location service. The UI
never talks to Android directly — everything crosses a
MethodChannel that returns typed errors.
The default screen. The camera centres on the real device fix, the vehicle marker sits on it, and a running session publishes a mock fix every 500–10000 ms (1 s by default).
-90..90 / -180..180 validationSelect an image or video, switch the source on, then capture a simulated photo. The internal simulator needs no root and no LSPatch.
Pictures/RelocationThe original mock-location and GPS-stamp camera path. Capture from the device camera with position and time overlaid, for delivery checks in the field.
Everything that governs a running session, plus a reusable setup guide you can follow without leaving the app.
On a normal, non-rooted phone the core app needs no root at all.
Settings → About phone → tap Build number seven times, then System → Developer options ON.
Developer options → Select mock location app → Relocation. The app shows a NOT SELECTED badge and an Open Developer Settings button until this is done.
Location, camera, storage on Android 8–9, and notifications on Android 13+. Each step is verified by Android and re-checked by the app.
Battery settings → All apps → Relocation → Don’t optimise, so the foreground service is not killed while the app is in the background.
Virtual Master gives you a disposable Android 9 guest where you can install a rooted runtime without touching the host phone.
The physical phone is the host; the Virtual Master VM is the guest. The rules that matter:
Install Virtual Master on the host phone and open it once so it can provision its runtime.
Create an Android 9 / API 28 arm64 guest. The verified configuration is Virtual Master 3.2.85 on an arm64 guest running ROM 1059.
Use the VM import flow (Import → folder) to install the Relocation APK inside the guest, then complete onboarding inside the guest.
Import the official Magisk release through Virtual Master’s own import UI. The VM exposes its own bundled Magisk runtime and adds a Magisk Enabled toggle in VM Settings.
In the guest: Magisk → Settings → Zygisk ON. Then use the VM’s outer Restart VM — Restart, Reset, Repair, Restore and Delete VM are different operations.
Install the LSPosed module from storage, enable Zygisk, then scope it to the camera target app only.
A manager icon being installed is not proof that the root runtime is active. Confirm Zygisk: Yes on the guest Magisk Home screen and check the runtime version in use.
Virtual Master
| Virtual Master | 3.2.85 |
|---|---|
| Guest OS | Android 9 / API 28, arm64, ROM 1059 |
| Guest Magisk runtime | 25200 (6066b5cf) |
| Working arrangement | physical phone → Virtual Master guest → Relocation + compatible framework + authorised Camera1 target |
Installed and enabled is not the same as scoped — and a scoped module is not the same as a verified capture.
Guest Magisk → Modules → Install from storage and pick the LSPosed archive. Follow the official LSPosed setup for the correct flavor.
Zygisk must be on and the runtime must actually restart for the module to load.
Open the LSPosed manager and select only the app under test. System Framework, Android System, System UI, Magisk and unrelated apps are not required for camera replacement.
For each target: preview appears, the JPEG callback arrives, and the file lands in the Gallery. These are three separate checks.
Magisk provides the Zygisk runtime that LSPosed needs. In the tested setup the root runtime lives inside a Virtual Master guest, so the host phone is never unlocked, flashed or rooted.
Official Magisk installation guide Android bootloader documentation
Answers reflect the current implementation. Menu labels and compatibility change with Android and OEM versions.
No. Mock location and the internal virtual camera work on a normal non-rooted phone. Root is only involved when you want the embedded Camera1 module to reach other camera apps, which is the LSPosed / Magisk path described above.
Copy build/app/outputs/flutter-apk/app-debug.apk to the target phone and open it with a file manager, allowing “Install unknown apps” for that installer only. Choose Update over an existing installation — do not uninstall or clear storage. The signing certificate must match: a debug key generated on another computer is not automatically the same key. If you see INSTALL_FAILED_UPDATE_INCOMPATIBLE or “App not installed”, check the package and signing key first; uninstalling is not the first solution.
No. Android requires you to explicitly select Relocation as the mock location app in Developer Options. ACCESS_MOCK_LOCATION is declared only so the app appears in that list; it is never granted automatically. Root, hidden-API and anti-spoofing tricks are deliberately not used.
The simulation does not restart by itself. There is no reboot receiver. The app is a foreground service that keeps publishing while the app is backgrounded, and it re-syncs to the real fix when you reset the location in Settings.
Because that path needs the framework, the scope and a verified target. “Module available” or “module ready” never means “active in every app”. Check three things separately for each target: the preview appears, the JPEG callback arrives, and the file is saved. On a standard non-rooted phone the current build cannot hand selected media to another ordinary camera app.
No. A guest Relocation only affects processes inside the guest. The target camera app has to be installed in the same guest, and the guest framework only applies to that guest. Guest Gallery output is not automatically copied to the host Gallery.
Relocation requires Android 8.0 / API 26 or newer. The experimental Camera2 backend is documented for Android 9 only and is default-off. The verified Virtual Master configuration is an Android 9 / API 28 arm64 guest. Compatibility with other ROMs, OEMs and Android versions has to be re-tested on each device.
Yes. The map uses OpenFreeMap styles with no API key, no usage limits and no account. Road data comes from OpenStreetMap via Overpass for the road graph and A* routing.
Only on devices you own or control, and only for testing your own software. Relocation is a test rig: it publishes a mock fix that Android visibly flags, and it is not intended to deceive third parties, evade location-based policy, or gain access to services you are not authorised to test.
In the repository under docs/: the complete setup and troubleshooting guide, the native camera API notes, the Camera2 compatibility and limits, the virtual camera module reference, and the executed verification results. Every device-specific limitation is recorded there rather than smoothed over.
Relocation is a developer test rig. It publishes a mock location that Android flags in the system UI, and it never bypasses the platform’s own permission model. Use it on hardware you own or are authorised to test.
One APK, four tabs, and a map that costs nothing. Set it up in about five minutes.