Tag Archives: proxy

Google Local on T-Mobile

I was using Google Maps on my phone before it was cool. My little prototype Python application, Pyhole, still gets some use despite the fact that shortly after I got it working Google released their own Google Local Mobile. Why? Google’s client doesn’t work with T-Mobile. At all. Not to mention the cheap “t-zones” plan I’m on, which blocks almost all destination ports.

Well, apparently it is in fact possible to get unlimited Google Maps on T-Mobile’s $5/month “t-zones” data plan after all:

Google Local Mobile on my phone, yay

GLM doesn’t use the same protocol for talking to Google that their Javascript map browser uses. GLM is bandwidth optimized, sending tiny binary POST requests to a single URL at google, and reading back multiple PNG tiles per request. Furthermore, the URL it uses for these POST requests is configured in the midlet’s .jad file. My hack goes something like this…

  1. Use the phone’s web browser to start installing GLM. The Google server will detect the phone’s model, and point it to a particular .jad file
  2. Download a copy of the .jad, using a URL scraped from the HTTP proxy logs
  3. Replace ServerAddress: http://google.com/glm/mmap with something like ServerAddress: http://proxy.example.com:993/glm/mmap
  4. Set up a reverse proxy from that URL back to the original Google URL. I used Apache’s mod_rewrite and mod_proxy.

The .jad file also has some juicy-looking parameters for tuning the UI and the cache sizes. I’m still not sure how useful these are, but I’d love to use more of my phone’s 512MB flash to store map tiles.