I hope this works on all Android phones:
Google on Thursday released an application called My Tracks that turns the T-Mobile G1 Android phone into a full-fledged GPS receiver.
The free software can record tracks showing where you’ve been, display them on a map, show elevation gains and losses, and share data with various online services.
As a geography buff, I have to confess that this one of the first applications that actually got me excited. I carry a Garmin standalone GPS device so I can geotag my photos and keep track of my trips, but My Tracks one-ups it in several ways.
For one thing, it’s a phone and therefore much more likely to be toted at all times, not just on dedicated occasions. But more important, it’s an Internet-enabled device, which means it shows my position on Google Maps–either map mode or satellite image mode, not just the feeble and expensive Garmin Maps–as long as it can find the Internet.