Is there an ADB command to switch Allow Mock Locations?

I looked through several topics, but could not find an answer. I don't need to specify lat / long, but turn on the allowed layouts switch.

+5
source share
1 answer

In Marshmallow (and above), after you installed the application, simply run:

adb shell appops set com.example.my.package android:mock_location allow 

hope this helps!

Some internal elements: the android: mock_location line is resolved by the AppOpsManager into the actual int and executed.

+3
source

Source: https://habr.com/ru/post/1246172/


All Articles