Android Mock Location Not Working: Causes & Fixes
If Mockery Spoofer reports Mock provider: Not configured, or your simulated location freezes when the phone locks, work through these proven fixes for common Android OEM behavior.
Issue 1: Mock Provider Resets After Device Reboot
Common on Samsung / XiaomiOn several custom Android skins (Samsung One UI, Xiaomi HyperOS/MIUI, and Huawei EMUI), the operating system automatically unsets the designated mock location application every time the phone powers off or restarts for security.
- Open Android Settings > Developer options.
- Scroll to Select mock location app.
- Tap Mockery to re-authorize the test provider.
- Verify in Mockery Spoofer that the status returns to Mockery ✓.
Issue 2: Simulation Stops When Screen Turns Off
OEM Background KillerMockery runs a native Kotlin Foreground Service with a persistent notification. However, OEM battery-saving software (such as Samsung Device Care or Xiaomi Battery Saver) may aggressively suspend background network sockets or kill foreground services when the screen locks.
- Long-press the Mockery app icon on your home screen and tap App info (ⓘ).
- Tap Battery (or Battery usage).
- Change the setting from Optimized to Unrestricted.
- On Samsung: Go to Settings > Battery > Background usage limits and ensure Mockery is listed under Never sleeping apps.
Issue 3: Target App Ignores Mock Location
Android 12+ PermissionStarting in Android 12, users can grant either Precise or Approximate location to applications. If your target app under test (e.g. Google Maps or your company's app) was only granted Approximate location, Android obscures the location to a 2km bounding area, ignoring precise mock coordinates.
- Open Android Settings > Apps and select the target app under test.
- Tap Permissions > Location.
- Ensure Use precise location is toggled ON.
Issue 4: Developer Options Disabled by Enterprise Policy
If your Android device is managed by an employer or enrolled in a Mobile Device Management (MDM) profile (e.g. Microsoft Intune, VMware Workspace ONE), the administrator may have remotely disabled Developer Options.
Resolved the Issue?
Open the Mockery Spoofer Monitor and verify active location injection.