How to mock location without enabling setting

Piaer picture Piaer · Jul 19, 2016 · Viewed 16.9k times · Source

I am looking for a way to be able to mock location without needing to use ACCESS_MOCK_LOCATION. I know that I need to have root, move app to the system. But when "allow mock location" setting is disabled, the app just crashes even when it's in system partition.

I'd be glad for tips for Lilipop and Marshmallow (as far as I learned, they work differently...)

Answer

Lucero picture Lucero · Aug 29, 2016

I think you want to mock location but prevent other apps (like Pokemon GO) detect "Allow mock location" is on. This is different between Marshmallow and before. - Before Marshmallow: please read here Use mock location without setting it in settings

  • Marshmallow: there is no "Allow mock location" option, you have to "Select mock location app". Other app cannot detect that you are mocking location. I have tested and can fake GPS to play Pokemon GO :)