- check whether
ALLOW MOCK LOCATION in Developer options is open
- check whether there is any app that declare
android.permissions.ACCESS_MOCK_LOCATION in Manifest.xml
Even so, you can't handle every situation. For example, if you put https://play.google.com/store/apps/details?id=com.lexa.fakegps into /system/priv-app, you will find it can mock location without ACCESS_MOCK_LOCATION, and how it mock location is like this, so you can hardly detect the change of ALLOW MOCK LOCATION.
So further you can try these below:
- design an algorithm based on GPS location, detect whether user moves too fast or anomaly.
- use IP or base station to help you detect whether use has mocked the location or not, because IP or base station can hardly to change.