I needed to be able to set location with Tasker. Here’s how I did.
Requirements:
– Root
– Tasker
– Fake GPS
- In Tasker create a task – name it “Set location”
- Add action > Location > Location mode
- Set “Mode” to “Device Only”
- Add action > App > Kill App > Fake GPS
- Tick “Use Root”
- Add action > App > Launch App > Fake GPS
- Add action > Task > Wait
- Set to 5 seconds
- Add action > Code > Run Shell
- Tick “Use Root”
- In “Command” insert the following:
am startservice -a com.blogspot.newapphorizons.fakegps.START -e latitude 47.39769 -e longitude -117.65021
If you need to update the Fake GPS location, use the following command:
am startservice -a com.blogspot.newapphorizons.fakegps.UPDATE -e latitude 55.689773966271304 -e longitude 12.551620809282463
To stop Fake GPS, use this:
am startservice -a com.blogspot.newapphorizons.fakegps.STOP