Скачиваний:
142
Добавлен:
15.03.2015
Размер:
10.83 Mб
Скачать

Chapter 6 — Hacking the Firmware 139

FIGURE 6-19: Exiting the application

Using MeMap can be a little tricky, and because all firmware versions are different, there are no hard and fast rules as to what you can and can’t do. Be careful and take your time. Mistakes can happen, but you should be able to either rectify them or reload old firmware that will restore your GPS to the condition that it was in before you attempted the changes. Because MeMap only works on text within the firmware, the danger of a mistake causing major problems other than just odd text on the screen is small.

Here are a few tips for you to get good results from using MeMap:

The most common edit that you will probably make is replacing an entire line of text in the firmware. To do this, your search must start with the first character found in the firmware. This is normally straightforward, but some lines begin with the copyright symbol ©. In this case, you need to search for that. To do so, use an application that comes with Windows called Character Map. Select Start Run, type in charmap, and then click OK. Find the © character, select it, and copy it. Then switch to MeMap, select the search text, and then paste the © in by holding down the Ctrl key while pressing the V key.

Uppercase characters are generally easier to read than lowercase characters.

To center a line of text, add spaces in front of the text.

Try to use the same number of lines of text that were originally used in your existing firmware, as this reduces the potential for problems.

Manual Firmware Editing

You don’t actually need a special application to help you alter the firmware to customize the text that is displayed on the GPS. All you need for this is a hex editor. A hex editor is a program that enables you to open and edit a file represented in hexadecimal format.

I will be using a hex editor called UltraEdit available from www.ultraedit.com. UltraEdit is a shareware application (a very good one in fact), but if you want something free instead, you could try XVI32, available from www.chmaas.handshake.de.

Hexadecimal is a counting system that counts from zero to 16 instead of zero to 10, as in the base 10 decimal system that we’re familiar and comfortable with. Counting to 16 is useful in computer applications because it enables you to represent any byte (we’ll get to that in a moment) with only two characters.

140 Part II — Software Hacks

This process isn’t as straightforward as using MeMap, but it does take you closer to the code of the firmware and enables you to do more than you can with MeMap.

Before we go further, let’s have a quick tutorial on the basic data structures in computers and look at how hex and bytes fit in.

A byte is composed of eight bits. A bit is the most basic unit of data in a computer. Bits can be either on (1) or off (0). These are the basic units of the number system known as binary. For example, if you have eight bits that are all on, you could represent the number 11111111. This same number would be FF in hexadecimal because hexadecimal uses characters to count past 9: A, B, C, D, E, and F.

Putting this all together, the binary notation for the largest number a byte can represent would be 11111111, which is equal to 256 in decimal and equivalent to FF in hexadecimal.

Fortunately, you don’t really need to know that much about bits, bytes, or hexadecimal to modify the GPS firmware.

If you want to experiment with binary, decimal, and hexadecimal numbers, fire up Windows Calculator, which enables you to work with all three formats.

The text strings that appear on the screen of your Garmin eTrex or eMap are stored in the firmware as text, which means that it is relatively easy for you to search for, find, and replace these strings of text using a hex editor, as shown in the following steps:

1.Open the firmware file in your selected hex editor. This is usually done by selecting File Open and searching for the appropriate file (see Figure 6-20).

Garmin eMap and eTrex firmware files have a .RGN file extension so they are quite easy to find.

FIGURE 6-20: Search for the appropriate file.

Chapter 6 — Hacking the Firmware 141

2.The version 3.60 firmware for the Garmin eTrex Vista is called 016901000360.RGN. After the file is loaded into the hex editor, you need to carry out a search for the text string “WARNING” (see Figure 6-21).

FIGURE 6-21: Searching for the word “WARNING”

3.Now select Search Find (see Figure 6-22), which brings up the Find dialog box (see Figure 6-23).

FIGURE 6-22: Select Find from the Search menu.

4.In the Find What text box, enter the text that you want to search for, as shown in Figure 6-24.

142 Part II — Software Hacks

FIGURE 6-23: The Find dialog box

FIGURE 6-24: Entering the text to search

5. Make sure that the Find ASCII check box is checked as shown in Figure 6-25.

FIGURE 6-25: Make sure that the search parameters are correct.

6.Click the button labeled Find Next.

7.If you don’t initially find what you are looking for, you can click the Find Next button in the dialog box (see Figure 6-26).