Favorites.Dat File Format
Here is what I can determine is the file format for favorites.dat, which stores your favorite locations. The file starts with the six hex octets 02 00 1e 00 00 00. After that there are a series of variable-length records, one per location. Each location consists of:
- 4 octets for the latitude, see FixedPointLatLong for details
- 4 octets for the longitude, again see FixedPointLatLong for details
- 1 octet giving the length of the location's name in characters
- The location's name in UTF-16 little-endian format. Thus, if the length octet says 12, there are 24 octets for the location's name
- Two ending octets: 00 00
Here is an example location record:
d7 fd ba 4c # Latitude in fixed-point format, little-endian
34 bf dc f1 # Longitude in the same format
0d # The number of unicode characters, followed by "Tumbulgum Pub"
54 00 75 00 6d 00 62 00 75 00 6c 00 67 00 75 00 6d 00 20 00 50 00 75 00 62
00 00 # Ending octets
The file seems to end with a padding of several 00 octets. There seems to be
at least a run of sixteen 00 octets, and the file is padded to a multiple-of-16
length. Here are some examples of the end of the file, using a hexdump tool:
Offset Octets in Hex ASCII
00000150 00 6f 00 63 00 6b 00 79 00 20 00 43 00 72 00 65 |.o.c.k.y. .C.r.e|
00000160 00 65 00 6b 00 20 00 44 00 61 00 6d 00 20 00 52 |.e.k. .D.a.m. .R|
00000170 00 6f 00 61 00 64 00 00 00 00 00 00 00 00 00 00 |.o.a.d..........|
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000120 ae f1 14 52 00 6f 00 63 00 6b 00 79 00 20 00 43 |...R.o.c.k.y. .C|
00000130 00 72 00 65 00 65 00 6b 00 20 00 44 00 61 00 6d |.r.e.e.k. .D.a.m|
00000140 00 20 00 52 00 6f 00 61 00 64 00 00 00 00 00 00 |. .R.o.a.d......|
00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
The second dump is after I deleted a single record from the file.
Back to: Ipaq310
--
WarrenToomey - 23 Jul 2008
This topic: Ipaq310
> WebHome > FavoritesDatFormat
Topic revision: r2 - 2008-07-24 - WarrenToomey
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback