How to Set Up Google GPS Tracking on your Palm Pre!
A lot of carriers now offer the ability to track your kid’s cellphones to track where they are. Well,you can do that on the Palm Pre too.
Here’s how you can setup a “website” on your Palm Pre and secretly track your Palm Pre, whereever it is in “real-time”.
First, you will have to setup SSH and dynamic DNS on your phone so you can setup a simple HTML page that will show you the exact location of your Palm Pre via Google Maps.
Next, do steps 1, steps 5 through 8 on my previous post on how to install/run a Wordpress blog on your Palm Pre. These steps will install Lighttpd, which is basically needed for serving web pages on your Palm Pre. Since you don’t need MySQL database, you can skip the other steps.
Now, browse to your web root directory typing the cd command below:
cd /opt/share/www/
Next, use the following command to enable writing on your Palm Pre linux filesystem:
sudo mount -o remount,rw /
Next, let’s create a new file called track.php by typing the command below:
sudo vi track.php
We are almost done, simply copy and paste the code below by hitting “i” and Shift-Ins inside the VI editor:
Hit Esc key and “wq!” to save the file and exit.
Now, browse to your Palm Pre website on your computer browser by typing the following where my.blogdns.com is the dynamic DNS you setup earlier.
http://my.blogdns.com:9999/track.php
You should see your location pop up via GoogleMaps like this:

And anytime you need to find the location of your Palm Pre, simply browse to the above URL.
This can come in very handy anytime you lose your Palm or it gets stolen. And yes, you can secretly install this on your kid’s Palm Pre and track where they are at.
Next hack, I will show you how to “tweet” your GPS location to Twitter so you can also track your Palm Pre via Twitter.
How to SSH into Your Palm Pre!
The second day I got the Palm Pre, I was able to SSH into my own Palm Pre and also make it into a WiFi Router. Of course, this is usual business for me as I manage about 30+ web servers on a daily basis. If I see a linux machine, the first thing I want to do is SSH into it.
What is SSH?
SSH is a “Secure Shell” networking protocol that allows you to connect to a linux/unix machine via secure, encrypted channels. In simple words, just think of telnet with secured encryption.
SSH is basically the command prompt for any linux/unix system, similar to DOS in Windows.
SSH is probably the most “powerful” command prompt in the world that allows you to do many things such as install/update/remove software and many more hacks such as installing custom scripts to “tweet” your GPS location. (All this should be coming later so stay tuned.) But before we can do any of that, we need to SSH into the Palm Pre.
Video:
I have outlined step-by-step directions on how to SSH into your Palm Pre. It’s simple really, you just need to install some software and you are pretty much good to go.
On the iPhone, the steps are a little more complicated as you need to install BSD subsystem in order to SSH into the iPhone. That doesn’t really count as “real” SSH. On the other hand, Palm Pre natively is based on Linux operating system, meaning SSH is just another feature of the Palm Pre. (Take that iPhone users!)
Step by Steps to SSH into your Palm Pre
1. First, you will need to root into your Palm Pre by following Step A in my previous post on how to tether Palm Pre as a WiFi router. (until you reach “Here comes the fun part where you install the My Tether free version.”) This is basically SSHing into your phone but it’s not true SSH since you need your computer connected to your Palm Pre, it’s more like terminal connection.
2. Once you are in root@castle prompt, the fun begins and we will install Optware, a set of Linux packages that include SSH and other cool Linux goodies. By the way, this is the same package used on hacked Linksys routers, which are linux-based also.
3. At the root@castle prompt, do the following commands one by one:
cd /tmp
wget http://gitorious.org/webos-internals/bootstrap/blobs/raw/master/optware-bootstrap.sh
sh optware-bootstrap.sh
source /etc/profile.d/optware
cd /tmp
wget http://gitorious.org/webos-internals/bootstrap/blobs/raw/master/quilt-bootstrap.sh
sh quilt-bootstrap.sh
During the installation, the script will ask you for a username and password, choose these carefully and WRITE THEM DOWN so you don’t forget them. You will be using these credentials to SSH into your Palm Pre later.
Basically, you are installing optware packages onto your Palm Pre.
4. Once everything has been installed without errors, turn off the “Developer Mode” and reboot your Palm Pre.
5. Open up your browser on your Palm Pre and open up WhatIsMyIp.com, which will tell you what IP your Palm Pre is on. (This IP address will change periodically as your Palm Pre is on a cellular network but we will show you how to setup dynamic DNS so you won’t have to do this ever again.)

As you can see, my IP address of the Palm Pre as I write this blog post is 173.128.153.76.
6. Open an SSH connection in your SSH client using the IP address and port 222. (Normally SSH port is 22 but the Optware SSH uses port 222)
7. You should be able to now see myusername@castle. (my username is max so I see max@castle as shown below)

8. You have just learned to SSH into your Palm Pre!
9. Now the real fun begins. Who cares if you can SSH into your Palm Pre if you have to check the IP address of your phone every time you want to SSH into it?
10. There’s many ways to set up dynamic DNS on your Palm Pre so you can SSH into your phone using legible names like “mycoolphone.dynamicdns.com” but I will show you the easiest method which involves ez-ipupdate, a linux program that will update your Palm Pre’s IP address to free dynamic DNS service websites everytime your phone decides to change IP addresses.
Step by Steps to Setup Dynamic DNS for your Palm Pre
1. First, you will need to sign up with a dynamic DNS service that the ez-ipupdate supports but I highly recommend DynDns.com as it’s completely free and easy to use.
2. Second, setup a free dynamic DNS such as “mycoolpalmpre.dyndns.com” or using any of the free domains they provide. WRITE THIS DOMAIN DOWN, WE WILL NEED IT FOR LATER.
3. Type the following command and press Enter in your castle prompt to remount the filesystem as writable so you can update it:
mount -o remount,rw /
4.Type the following lines to install ez-ipupdate:
/opt/bin/ipkg-opt install ez-ipupdate
5. Now we will need to make a new configuration file so type the following line and enter on your castle prompt:
sudo vi /opt/etc/ipupdate.conf
6. Type “i” and copy and paste the following: (Remember most SSH, paste is Shift+Ins not Ctrl+v)
(Change myusername and mypassword to your DynDNS.com username and password and change mycoolpalmpre.dyndns.com to your DynDNS.com domain name you chose.)
service-type=dyndns user=myusername:mypassword interface=ppp0 host=mycoolpalmpre.dyndns.com cache-file=/opt/var/run/ez-ipupdate.cache foreground retrys=5
7. Then type “:wq” and press Enter.
8. Next type the following into you command line:
mkdir -p /opt/var/run /opt/bin/ez-ipupdate -c /opt/etc/ipupdate.conf
9. The last line will test to make sure your configuration is working. Try pinging your free dynamic DNS domain. (such as mycoolpalmpre.dyndns.com)
If you get the correct IP address for your Palm Pre (matching with the same one from WhatIsMyPalmPre.com), then you are ready to set up this dynamic DNS so it updates whenever your phone changes IP addresses.
10. Next, we will create a new file under /etc/ppp/ip-up.d, any files listed under there will get executed automatically when the phone changes IP addresses. Type the following to edit a new file called 09update-ddns:
sudo vi /etc/ppp/ip-up.d/09update-ddns
11. Then copy and paste the following:
#!/bin/sh /opt/bin/ez-ipupdate -c /opt/etc/ipupdate.conf -q > /dev/null 2>&1 || /bin/true
12. Then type “:wq” and press Enter.
13. Now type the following line to set the file executable:
chmod 755 /etc/ppp/ip-up.d/09update-ddns
14. Remount the filesystem as readonly:
mount -o remount,ro /
15. Now you are done, you should be able to SSH into your Palm Pre via your dynamic DNS such as mycoolpalmpre.dyndns.com. Next time we will show you how to install a script that will let you know exactly where your phone is via its on-board GPS. Just in case your Palm Pre gets lost, we can SSH into it and find out the exact location of the thief.
Final Words
The step-by-step instructions listed may look hard to understand but they are very easy to do if you follow line-by-line. And once you have done the steps, you won’t have to ever do them again.
SSH is one of the first things you need to learn if you want to be good at Linux.
I have tested the script everywhere in San Francisco and in Texas and I can SSH into my Palm Pre from anywhere in the world via my dynamic DNS domain name. (which I can’t tell you since some hackers might try to DoS my phone.) It’s like my Palm Pre is a web server, it now officially has a “domain name” and lives in the World Wide Web!!!
Credits and Resources
As always, I didn’t find out how to do all this myself, I used great resources like WebOS-Internals.Org and simply wrote up an easier step-by-step instructions for all you who need more detailed instructions.
Here’s additional resources you can use:
- WebOS-Internals.Org – You can refer to this site for more information on how to install optware and details of it. There’s also other ways to set up dynamic DNS here.
Extra Linux commands for Fun in SSH
One of the most used linux command is top. Try entering “top” into SSH command prompt and you will see exactly what processes are running on your Palm Pre. You will even know which processes take up the most processing power while you use the phone.
