Android Execution Layer

Mockery GPS Spoofer: Persistent Native Android Mocking

The Android-side engine responsible for consuming coordinates from external providers and injecting them into the Android system via the standard LocationManager mock-location API. Designed from day one to operate continuously when the UI is closed, the screen is locked, or another app is in the foreground.

Decoupled Kotlin Service & Flutter UI

Why ordinary Flutter or React Native GPS spoofers fail in the real world.

Most mobile location spoofers bundle their simulation loop directly into a cross-platform UI thread. When Android locks the screen or reclaims memory from background activities, the Dart or JavaScript engine is paused—instantly freezing location updates.

Native Kotlin Layer (Always Active) Daemon

Foreground Service Core

  • Holds persistent Android Foreground Service with notification
  • Manages WebSocket client & reconnection state machines
  • Executes the pull-based polling scheduler
  • Injects coordinates via setTestProviderLocation
  • Applies current local system clock timestamps
  • Runs uninterrupted through lock screen and app switching
Flutter Presentation Layer (Ephemeral) UI Thread

Configuration & Monitor

  • Manage provider profiles and server endpoints
  • Real-time diagnostic Monitor telemetry
  • Android mock provider status indicator & shortcuts
  • May be closed at any time without disrupting spoofing
When Flutter terminates, Kotlin continues mocking without interruption.

Supported Android Mock Location — No Root, No Hacks

Mockery is an engineering and testing tool. It strictly utilizes Android’s officially supported mock-location APIs. It requires Developer Options to be enabled and Mockery selected as the mock location app.

✓ What Mockery Implements

Standard LocationManager.GPS_PROVIDER test provider injection. 100% clean, stable, non-invasive, and supported on stock Android 8.0 through Android 15.

✗ What Mockery Explicitly Avoids

No Magisk, no LSPosed, no kernel patches, and no mock-detection bypasses. We do not attempt to conceal the fact that coordinates are simulated.

Read our in-depth educational guide: How Android Mock Locations Work & How to Configure Developer Options →

Technical Engine Features

Engineered to eliminate the flaws of conventional GPS spoofers.

Network Architecture

Pull-Based Polling Model

Instead of receiving an uncontrolled stream of server updates, the Spoofer pulls coordinates on a user-defined schedule (e.g. every 1.0 second or every 2.0 seconds). The user controls bandwidth and battery consumption directly.

Fault Tolerance

In-Memory Last Location Retention

If an underground tunnel breaks your connection or the browser controller refreshes, the Spoofer never resets to (0,0) or default coordinates. It holds the last verified coordinate authoritative until connection restores.

Temporal Integrity

Local Clock Timestamp Injection

Remote network latency must never contaminate the Android location provider. The Spoofer applies Android's current SystemClock.elapsedRealtimeNanos() at the instant of injection.

Battery Preservation

Destination Polling Decay

Upon reaching the route's destination, the Spoofer waits 2 minutes, then steps polling down to 10 seconds. Local 1Hz Android injection continues unaffected, protecting your data plan and battery if forgotten.

Android System UX

Actionable Foreground Notification Shade

Control the spoofer without ever switching apps. The notification gives instant semantic status and lets you pause, resume, or terminate simulation directly from the lock screen or shade.

Active (Moving)
45 km/h · Polling every 1.0s · 30.328519, 35.442286
Pause Stop
Holding Destination (Power-Save)
Decayed polling (10s) · Local mock continuous · Zero data waste
Stop
Paused (Standby)
Mock injection ceased · Android using real GPS · Zero network consumption
Resume Stop
Connection Lost
Retaining last coordinate · Auto-reconnecting with backoff...
Monitor

The Diagnostic Monitor

Answer the 3 vital questions: Is it working? What location is it using? Where is it failing?

Instead of meaningless CPU graphs and raw stack traces, Mockery provides a clean, purposeful diagnostic console in Flutter:

STATE: MOCKING ACTIVE PROVIDER: MOCKERY CONTROLLER
Latitude 30.328519° N
Longitude 35.442286° E
Speed 60.0 km/h
Bearing 142.6°
Polling Interval 1.0 s
Round-Trip Latency 28 ms
Successful Polls 1,482
Consecutive Failures 0
Android Test Provider: Active (LocationManager.GPS_PROVIDER) Last Freshness: 0.4s ago
Get Location Now Diagnostic action that forces one immediate location pull from the server to verify provider health without altering the polling timer.
Test Connection Step-by-step handshake verification that validates WebSocket transport, TLS certificate, auth credentials, and JSON response schema.

Multi-Profile Support & Secure Storage

The Spoofer allows configuring multiple profiles for different simulation sources (e.g. Production Web Controller, Localhost Dev Server, or Car ESP32). Switching between them takes one tap.

🔒 WSS Security Enforcement Credentials (passwords) are strictly stored using Android's EncryptedSharedPreferences backed by the hardware Android Keystore. When authentication credentials are configured, the Spoofer refuses to connect over unencrypted ws://, protecting your credentials over public Wi-Fi networks.

Ready to Pair with Mockery Controller?

Generate straight-line waypoints, adjust vehicle speeds, and control this Android Spoofer directly from your browser.