[G1 Android Development] canadiancow:
Edit 4: New Thread

Since the main issue in this thread has been solved (Navigation works outside the USA), I'm going to stop updating it. For the latest updates on Brut.all's mod, please use http://xdaforums.com/showthread.php?t=630887

Edit 3: Solution

Brut.all has done it again with 4.0.0. The modified version works anywhere Google has the "Directions" feature, but it has reduced functionality (including in the USA).

The reduced functionality is as follows:

*No street name at the top

*No arrow indicating next turn direction

*Voice guidance is delayed, if at all present

Please do not waste space posting these issues. They are known.

If you are only going to be using Navigation in the USA, then get the official version from the Market. If you need Navigation outside the USA, then install the modified version.

If you don't want to do the installation manually, then uninstall Google Maps, and download and install Nav Launcher 2.1.3 from the Market (see below for a QR code). It will install the modified version of 3.3.1 for you.

If you want to do it manually, then follow these instructions:

If you have root, uninstall the current Maps app.

adb:

adb remount
adb shell find /system /data -name \*google\*maps.apk\* -o -name Maps.apk -delete
adb uninstall com.google.android.apps.maps

shell:

mount -o remount,rw /system
find /system /data -name \*google\*maps.apk\* -o -name Maps.apk -delete
pm uninstall com.google.android.apps.maps

Next, regardless of whether you have root, install the SpeechSynthesis Data. You can do this either by going into the market and searching "SpeechSynthesis Data Installer", or on some ROM's, like CM 4.2.7.1, Menu -> Settings -> Speech synthesis -> Install voice data

If you have root, download http://ul.to/1ofshq/maps4.0.0-brut4.apk (4.0.0)

If you do not have root, download http://ul.to/6w7e8n/maps4.0.0-brut4-alt.apk (4.0.0)

These files were created by Brut.all, without whom we would not have Navigation outside the USA.

Install the new file that you downloaded:

adb install -r maps4.0.0-brut4.apk

or

adb install -r maps4.0.0-brut4-alt.apk

Edit 2: Broken again

Google has made some anticipated changes to block us from using Navigation outside the USA. It looks like Brut.all is going to be looking at the original proxy idea again. For now, you might as well upgrade to 3.3.0, as it does have some cool new features (and you can always revert if necessary). Stay tuned to the thread for more details.

Edit 1: Solution (NO LONGER WORKS)

Brut.all and TAPP got it working. Here are some more in-depth instructions for those of you having issues:

If you have root, uninstall the current Maps app.

adb:

adb remount
adb shell find /system /data -name \*google\*maps.apk\* -o -name Maps.apk -delete
adb uninstall com.google.android.apps.maps

shell:

mount -o remount,rw /system
find /system /data -name \*google\*maps.apk\* -o -name Maps.apk -delete
pm uninstall com.google.android.apps.maps

Next, regardless of whether you have root, install the SpeechSynthesis Data. You can do this either by going into the market and searching "SpeechSynthesis Data Installer", or on some ROM's, like CM 4.2.5, Menu -> Settings -> Speech synthesis -> Install voice data

If you have root, download http://ul.to/uwa3gp/Maps3.2.1-patched-root.apk or http://files.legendofbong.co.uk/download.php?file=534750032-Maps3.2.1-patched-root.apk

If you do not have root, download http://ul.to/18fckr/Maps3.2.1-patched-no-root.apk or http://files.legendofbong.co.uk/download.php?file=1240234753-Maps3.2.1-patched-no-root.apk

These files were created by Brut.all and TAPP, without whom we would not have Navigation outside the USA.

Install the new file:

adb install -r maps-root-aligned-apk

or

adb install -r maps-no-root-aligned-apk

Update: I made a simple launcher app called Nav Launcher that lets you easily navigate to a contact or any other destination by typing or speaking the name or address. Search the Market for "Nav Launcher", go to market://search?q=pname:com.madcowsolutions.NavLauncher on your device, or scan this QR code:

Discuss this app at http://navlauncher.madcowsolutions.com

rac2030 made a similar application called NavStarter that you can download from http://www.2030.tk/link/navstarter

Reply to this thread if you have any issues.

Original Post

Now that we have Google Maps Navigation working on other devices, I thought the next logical step was to get it working outside the USA.

I noticed something very interesting.

I turned off cell/gps location services, then opened Maps, and plotted a route from Detroit to San Francisco. I got the Navigate option.

When I selected it, it prompted me to download the voice stuff, so I did. Then it told me to go into settings to enable GPS. When I did that, and came back, it popped up a dialog "No route found - Navigation to your destination is not available.".

HOWEVER, under this dialog is a Navigation view of my area. Which means it was able to download the necessary map data, but something is preventing it from retrieving or using a route.

Here's an example of this from the emulator, with the GPS set to be right in front of parliament in Ottawa:

It's possible that the route could be transmitted in the same format as normal directions in Maps, but that either:

a) The server is rejecting the request because it's coming from Navigation and has a Canadian endpoint, or

b) The application is discarding it because it has a Canadian endpoint.

If it's a), then we might be able to setup a proxy server (even a locally running server on the phone) to mask the signature of the request.

If it's b), then we might have to modify some of the Maps code.

But the fact that it can render the Navigation view of Ottawa, Ontario, Canada means that it is downloading the appropriate map data, so that's a great start for getting Navigation to work outside the United States. We just need to find a way to tell it that it is allowed to work.

I made some Wireshark captures of a successful route being generated, as well as one that failed because it's in Canada, but the transmitted data isn't textual for the most part, and I don't know how it's encoded.

One interesting thing to note is that in my Wireshark captures, Navigation uses "DriveAbout" in all of its requests to the server, whereas regular driving directions uses "GMM" in the same spot.

I'm going to see if I can setup a simple proxy to forward requests, replacing "DriveAbout" with "GMM" to see if that gets us any further.

Hopefully some other people can help with this so that everyone, everywhere, can enjoy Google Maps Navigation.