Enable/Disable Mock Locations?

557 views
Skip to first unread message

Justin Gossman

unread,
Jun 20, 2013, 11:34:09 PM6/20/13
to tas...@googlegroups.com
Pretty much what the title asks, I'm wondering if it's possible to enable or disable mock locations with tasker. I have a Bluetooth GPS that I use for some apps, and that requires mock locations be turned on, but other apps don't allow that and I must have mock locations off and use the GPS on the phone. Trying to keep from going all through the settings every time.

Thanks

Carl Wendel

unread,
Jun 21, 2013, 6:45:44 AM6/21/13
to tas...@googlegroups.com
Bluetooth GPS (63)
Abort Existing Task
A1: Run Shell [ Command:cd /data/data/com.android.providers.settings/databases/
sqlite3 settings.db
update secure set value=1 where name='mock_location';
.q
exit Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: Continue Task After Error:On ]
A2: Wait [ MS:10 Seconds:0 Minutes:0 Hours:0 Days:0 ]
A3: Secure Settings [ Configuration:GPS Disabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings ]
A4: Send Intent [ Action:googoo.android.btgps.action.SERVICE_START Cat:None Mime Type: Data: Extra: Extra: Package: Class: Target:Broadcast Receiver ]
A5: Wait [ MS:0 Seconds:15 Minutes:0 Hours:0 Days:0 ]
A6: If [ %PACTIVE !~ *Garmin Glo* ]
A7: Run Shell [ Command:cd /data/data/com.android.providers.settings/databases/
sqlite3 settings.db
update secure set value=0 where name='mock_location';
.q
exit Timeout (Seconds):0 Use Root:On Store Output In: Store Errors In: Store Result In: Continue Task After Error:On ]
A8: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A9: Secure Settings [ Configuration:GPS Enabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings ]
A10: End If
A11: Stop [ With Error:Off Task: ]


You Need Root

James Chacon

unread,
Nov 13, 2013, 8:57:48 PM11/13/13
to tas...@googlegroups.com
With the release of Android 4.4. It seems this no longer works. Previously I was able to use this command with Android 4.2.2. Does anyone know what needs to be changed for this to work with Android 4.4 (Kitkat)?
Reply all
Reply to author
Forward
0 new messages