Piaer
Piaer

Reputation: 11

How to mock location without enabling setting

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...)

Upvotes: 1

Views: 35646

Answers (2)

Nirmal prajapat
Nirmal prajapat

Reputation: 1

You Can't set mock location without disabling the "ACCESS MOCK LOCATION" option in developer option, because this mode is used to test or debug the applications even google don't recommend to use mock location in app which is going to be release.

Upvotes: 0

Lucero
Lucero

Reputation: 16

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 :)

Upvotes: 0

Related Questions