I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods

Click Here!
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / Other I-Appliances / 3Com Audrey
Anyone worked out format of AddressDB.gdbm under hotsync?

New MessageAnyone worked out format of AddressDB.gdbm under hotsync? (modified 0 times) bungee
Profile
I'm going to make ACID look up phone numbers in the palm addressbooks
(both audrey and the palm pilot I sync) but to do this I need to work
out the format of AddressDB.gdbm

I've already been able to open it as a gdbm file, the keys all appear
to be just numbers and the data is where the real info is. however it
is encoded and I need to work out what it is. Before I spend time
doing this I thought I'd post to see if someone has already done it.

so far i have found.

first 4 bytes are either 0000 or 1000

there is only one entry with 0000 and this contains all your category
names and custom field names. I have not yet worked out the format of
this entry

normal entries start with
4 bytes 1000
2 bytes (unknown)
2 bytes (both zero)
19 bytes unknown
\0 terminated strings (starting with lastname, firstname, phone)

my guess is that somewhere in the 19 or 2 bytes is an indicator of
what fields are following after the 19 bytes. I can work it out, but
if someone already has, please share!

it's a bummer, cos I thought they would be stored in .pdb format which
I already know how to read since I have this perl script
http://fdd.com/software/palm/

as an example of the data here is a line with all alphanumerica
characters printed and zeros replaced with + and non zero non
alphanumerics replaced with -

-+++-R++---+d++a+-+-2-++--+Lazy Ass+Lodge+530 541 0230+609 Emerald Bay Rd+South Lake Tahoe+CA+96150 6504+

and here is the same line with all nonalphanumeric's replaced with (num)

(1)(0)(0)(0)(-25)R(0)(0)(26)(-125)(-3)(0)d(0)(0)a(0)(4)(0)(4)2(16)(0)(0)(15)(11)(0)Lazy Ass(0)Lodge(0)530 541 0230(0)609 Emerald Bay Rd(0)South Lake Tahoe(0)CA(0)96150 6504(0)

Alex

04-26-2002 08:42:34

New MessageRE:Anyone worked out format of AddressDB.gdbm under hotsync? (modified 0 times) Sketchy
Profile
No clue on the specifics, but I'd look for patterns as dwords as well as just bytes. That 1 0 0 0 at the start could be the number 1 saved as a dword -- perhaps a boolean field? That second set of four bytes could also be a dword where the stored number never gets above 65535 (hence the upper two bytes are always zero) -- perhaps an index or offset?
-- Jim
ACID and other Audrey apps
04-26-2002 09:41:38

New MessageRE:Anyone worked out format of AddressDB.gdbm under hotsync? (modified 0 times) bungee
Profile
I emailed the folks that wrote the date/address/email apps and asked them if they would share a spec or a little bit of source code. otherwise I'll set my mind to cracking the binary data, I'm sure many of them are just 8 bits of booleans (or more) that I need to work out what they are.
http://www.bloodyeck.com/projects/audrey/
04-26-2002 10:11:27

New MessageRE:Anyone worked out format of AddressDB.gdbm under hotsync? (modified 0 times) bungee
Profile
Well, I worked out enough to get the data I need!

I'll keep the document on my website, but here it is, just so it's somewhere
http://www.bloodyeck.com/projects/audrey/AddressDB.format.txt

I'm going to make ACID look up phone numbers in the palm addressbooks
(both audrey and the palm pilot I sync) but to do this I need to work
out the format of AddressDB.gdbm

I've already been able to open it as a gdbm file, the keys all appear
to be just numbers and the data is where the real info is. however it
is encoded and I needed to work out how to get the data out. Below are
my findings.

first byte is either 0 or 1

There is only one entry starting with 0 and this contains all your category
names and custom field names. See below for the format of this entry

If you imagine the following bytes as being numbered from a thu z then
it's easy to follow this....

normal entries start with the first byte being 1 followed by:
a-e 5 bytes record number - first thee bytes (a-c) all zero on my DB,
appears to be uniq
f-h 3 bytes also looks like a record number but is not uniq, first two
bytes (f-g) all zero on my DB
i 1 byte that is usually 0,80 or 83
j 1 byte that is either 0 or fd
k-l 2 bytes that look like an entry number (but not uniq)
m 1 bytes that is always zero
n 1 byte that is only 1 for my address entry..???
o 1 byte of some random use...
p 1 byte that is usually 0 or 10
q 1 byte indicating the category this entry is in (you know
work/personal/etc..) this indexes into the array created
from the entry starting with 0 (see below)
r 1 byte possibly what the refresh status is? it's either 0 or e7
s 1 byte 1st 4 bits are the default 'number' to display in the summary listing
2nd 4 bits (least significant) what type is the 5th phone entry
See notes below on 4 bit numbers.
t 1 byte 1st 4 bits what type is the 4th phone number
2nd 3 bits what type is the 3rd phone number
u 1 byte 1st 4 bits what type is the 2nd phone number
2nd 3 bits what type is the 1st phone number
v 1 byte that is always zero
w 1 byte 3 bits (least significant) indicating the if the custom3
custom4 and note values are present at the end of the entry
x 1 byte 8 bits indicating presence of data headers 8 to 15
y 1 byte 8 bits indicating presence of data headers 0 to 15
header 0 is represented by the least significant bit
z 1 byte usually 0 but not always (use unknown)

then for each of the 21 bits that are 1 in the w,x and y bytes there
will be a null terminated string representing that value. Starting
with Header 0 (lastname) all the way down to note (header 18).

format of the category names
after the initial 0 identifying it as a category entry there are...

9 bytes: unknown usage
15 sets of 16 bytes containing the category names (zero padded at the end);
24 bytes: unknown usage
21 sets of 16 bytes containing the address book header names (zero padded)
4 bytes: unknown usage

the address book header names are in this order
Header 0: Last name bit 1 of byte y
Header 1: First name bit 2 of byte y
Header 2: Company
Header 3: Work bit 4
Header 4: Home bit 5
Header 5: Fax bit 6 (but not always fax, see 4 bit numbers note)
Header 6: Other
Header 7: E-mail bit 8
Header 8: Address bit 1 of byte x
Header 9: City bit 2
Header 10: State
Header 11: Zip Code
Header 12: Country
Header 13: Title
Header 14: Custom 1
Header 15: Custom 2 bit 8 of byte x
Header 16: Custom 3 bit 1 of byte w
Header 17: Custom 4 bit 2
Header 18: Note bit 3
Header 19: Main
Header 20: Pager
Header 21: Mobile

If you have modified Custom 1 to be "Birthday" then that will be
displayed for header 14 and so forth.

4 bit numbers note:

note that for each phone number or email that you can enter, you can
choose what type each category is, that means that the first catgeory
wont always have the work number in it. For each of the 5 entries, the
type of the data in that entry is determined by a 4 bit number (in 4
bits you can represent a number between 1 and 15) here are the values
for each of those numbers

0=work
1=home
2=fax
3=other
4=email
5=main
6=pager
7=mobile

Reverse Engineered by Alex Knowes (alex AT bloodyeck,com) April 26th 2002
If you work out any of the missing codes/bytes, please drop me an email


http://www.bloodyeck.com/projects/audrey/
04-29-2002 07:03:54

New MessageRE:Anyone worked out format of AddressDB.gdbm under hotsync? (modified 0 times) dilligaf
Profile
I believe that I saw a perl module on sourceforge for gdbm files a while back.

The module, it's description, or it's author may be able to help you if it is actually the same file type.

dill

04-30-2002 21:55:15

New MessageRE:Anyone worked out format of AddressDB.gdbm under hotsync? (modified 0 times) bungee
Profile
QNX comes with a libgdbm, so reading the GDBM file is not the problem, but GDBM is basically jsut a bunch of key/value pairs, the thing I'm trying to decode is the actual value, which appears to be the code that I have described above.

it's annoying cos I already found code to decode the .pdb format which is how hotsynched DB's are stored using windows and linux hotsync, it's just that Audrey uses a different format :(

I have enough now to do what I want (Caller ID lookup in the addressDB), I'll keep everyone posted here when I have some working prototypes to show off.


http://www.bloodyeck.com/projects/audrey/
05-01-2002 14:40:40

New MessageRE:Anyone worked out format of AddressDB.gdbm under hotsync? (modified 0 times) booya
Profile
Bungee,
That will be an awesome improvement. Can't wait to see it.
Get help, chat, and be merry..
Join #audrey on Efnet
05-01-2002 16:28:03

New MessageRE:Anyone worked out format of AddressDB.gdbm under hotsync? (modified 0 times) AllenS22
Profile
Two things:
1. How's the project going? Just checking.
2. I'm wondering if it would be possible to have the email option only fire when the name is in the Friend's list? I think that would make it more handy for those of us who have it send the info to our cell phones and/or pagers. It would keep notices of telemarketers and anonymous callers from bothering us. Just an idea...

Allen

05-08-2002 22:24:57

New MessageRE:Anyone worked out format of AddressDB.gdbm under hotsync? (modified 0 times) Sketchy
Profile
Alex (bungee) figured out the format, wrote the lookup function, and he's waiting for me to integrate it into ACID. Since I was in the codebase already, I decided to add a bunch of other suggestions to ACID that have been piling up, so it will be a few days depending on my free time. I'm guessing Sunday or so. I hope you all can be as patient as Alex has been :)

Allen, thanks for the suggestion on the email notification. Should be easy -- I'll add it to the list.


-- Jim
ACID and other Audrey apps
05-09-2002 09:04:22

New MessageRE:Anyone worked out format of AddressDB.gdbm under hotsync? (modified 0 times) bungee
Profile
I wanted to do a few clever things with the categories etc. however looking up the category names is kind of inefficient, you have to go through the entire DB looking for the entry that is the categories and header names, I decided against doing that since every lookup would require traversing the entire DB. it could be done though, other ideas I had were

Add a GUI entry so people can enter their area code (this could be
useful for dialing) now when 7 digit callerID numbers come in we can
match them and also we can match 10 digit callerID numbers to 7 digit
entries in the palm DB. This will also help with the dialing option?

Ability to add fields in the custom[1-4] entries for callerID - could
be callerID identity (this string is displayed rather than making one
ip), could be the name of a wav file to play.

ability to specify a wav file for each category of address (like
business/personal/family/friends)

ability to specify a wav file for the type of number (work/home/fax/mobile)


http://www.bloodyeck.com/projects/audrey/
05-09-2002 12:11:25

New MessageRE:Anyone worked out format of AddressDB.gdbm under hotsync? (modified 0 times) AllenS22
Profile
Here's a modification of my previous suggestion (emailing if only in friends list). If you can get it to check the addressbook database, maybe it can check one of the custom fields or the note of the matching entry for a key word (something unique like e~mail with a tilde) before sending an email notification.

Another idea that I had (I'm probably stretching it a bit here) is to be able to turn off the email notification by calling from a certain number. For example, if I use my cell phone to call home, it would recognize the number and turn off the email notification (after firing a confirmation email that it's been disabled). Calling again would turn it back on. That may be asking a bit much, but I know I'd use it at least every once in a while (sometimes I just don't care if anyone has called).

Keep up the good work!

Allen

05-21-2002 12:16:50

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3