I have been updating an app and pulling the version target forward, and we are running into an issue with GPS Mocking.
The mock locations works perfectly when debugging with android studio, but when I leave debugging and just run normally it doesn't work at all.
Background:
This is pulling GPS information over serial and mocking the device's location. This all works right up until the mocking, then the location wont be set unless I am actively debugging.
If I am missing something please let me know, it seems like some security restriction I'm not aware of holding us down.
EDIT: I still can't find anything around this, and it seems specifically when I'm stepping through the code it works, but otherwise just running doesn't work
Have you checked [ro.allow.mock.location]
with getprop | grep mock
over adb shell?
Set it to 1 (setprop ro.allow.mock.location 1
) it should work on release mode as well. It's initially 0. If that doesn't work please give me a feedback so i can change my answer.
It seems as if Mock Locations REQUIRES debug mode. When creating a "release" build debug mode still had to be declared.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With