Matthew Kennard

30 Mar 2021

In the Android emulator not that long ago you could give it a longitude and latitude for testing location based apps. They’ve now made location control more user friendly by providing a map on which you can tap to set your location. My guess is that most developers find this anything other than helpful as we want to provide a precise location.

You can do this using the Android console. I always forget the exact steps required so this is a reminder for my future self for the next time I need to do this:

➜  ~ cat ~/.emulator_console_auth_token
➜  ~ telnet localhost 5554
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Android Console: Authentication required
Android Console: type 'auth ' to authenticate
Android Console: you can find your  in
auth rWLLmxgfZpw0sb4D
Android Console: type 'help' for a list of commands
geo fix -2.568001 51.809137

(geo fix requires latitude and then longitude, rather than the more usual way around)