4

I've been trying to get mock locations on my OnePlus One working for quite some time now, but I have unfortunately been unable to determine the cause of this. Essentially my issue is that when setting a mock location, they do work, but for some reason my location appears to "teleport" between where I set my mock location and my current location. I've been using Google Maps to test my current location. Following the guidance of this answer, I set my location mode to "Device only", but it appears to still be happening. Furthermore, I turned off WiFi completely, to no avail.

The app I am using to spoof my location is here. I've tried other apps to the same effect. My phone is running the latest CyanogenMod 13 snapshot (20160419).

If anyone would happen to know how to solve this, it would be much appreciated :)

Community
  • 1
  • 1
mattrick
  • 3,580
  • 6
  • 27
  • 43
  • 1
    Having the same issue with an LG G4 on android 6.0 -set the fake gps app on developer settings, it partially works.. But teleportation between the real and fake locations – user2813274 Jul 12 '16 at 01:21

3 Answers3

2

The steps given below worked for my Nexus 6: (I have assumed that your device is rooted. If not you need to root it first)

  1. Install Xposed framework. You can use the tutorial here.
  2. After Xposed is installed go to its Download section and install the module Mock Mock Locations. Then go to the Modules section in the Xposed app and activate the downloaded plugin(needs restart).
  3. In developer options select the mock location app you are using in Debugging->Select mock location app
  4. Download the app Disable Service. In the app select the System tab search for the service named Fused Location and disable it. Also search for the service group Google Play Services. Inside it there will be another Fused Location service. You need to disable it too.

If it is still not working try disabling Google Location History as given here. Also set your GPS accuracy to Device Only.

Moharnab Saikia
  • 487
  • 6
  • 10
  • 1
    That fixed it! Thank you very much! – mattrick Aug 18 '16 at 00:40
  • When I disable **Fused Location** service, all apps based on location crash. Any idea? – wdetac Aug 25 '16 at 05:31
  • 1
    I just wanted to share that I got this working! Thank you! For my purposes, I didn't need to hide Mock Locations, so I did not install xposed. However, I did need the phone to be not-rooted. I was able to root with magisk + phh supersu, install DisableService, disable Fused Location, then unroot and uninstall Magisk, and Fused Location is still disabled. Hope this helps someone else. – emulcahy Jan 24 '17 at 20:42
0

Install Fake GPS Location app in your Android device and set your desired location inside the app. Your device will behave as if it is at the location you have set. Don't forget to select Select mock location app in Developer options in your device Settings.

Jas
  • 3,207
  • 2
  • 15
  • 45
0

In case someone has issues with mock location software to get working:

override fun onLocationResult(locationResult: LocationResult) {
var LastLocation: Location = currentLocation
    if (LastLocation.longitude > X.XXX && LastLocation.longitude < X.XXX && LastLocation.latitude > X.XXX && LastLocation.latitude < X.XXX) {
        LastLocation.latitude += Y.YYY; LastLocation.longitude += Y.YYY
    }

X.XXX is a placeholder. Set a bounding box for your ow current location to shift your location to the new destination by changing Y.YYY

With something like this, you could shift your location and simulate hardcoded from your home/office location your desired location.