Join Today
+ Reply to Thread
Page 1 of 7 12345 ... LastLast
Results 1 to 10 of 70
Like Tree2Likes

Thread: Playing with native.db

  1. #1
    Join Date
    Jul 2005
    Location
    Argentina
    Posts
    41

    Default Playing with native.db

    Dear all! Congratulation to everyone, the forum's contents are great!

    I'm am trying to sync my E680 to my gentoo linux box. I don't want to use OTA, and I couldn't get any app to work with USB, so I am trying to do it by the hard way...

    The E680 appz store the data in
    /ezxlocal/sysDatabase/native.db

    which is a Berkeley DB file (Btree, version 9, native byte-order). To play with it, we need the db-utils package (simple 'db' in gentoo).

    One particulary interesting program in that package is db_dump. Here is a small script which extracts the contacts (name, tels, etc) from the database. Phone are displayed in reverse order, I will fix that these days. The goals is the get some format understood by thunderbird/evolution, to get at least a one-way synchronization tool. Since both (native.db, and thunderbird db) are stored in modified time order, It would be posible also to get a two-way synchronization tool.

    Hope it helps someone!

    matías
    ---------------
    #!/bin/sh
    db4.2_dump -p native.db | awk '
    { if ($1=="DATA=END")
    f=0;
    if (f==1)
    print $0 ;
    if (f==2)
    if ($1="HEADER=END")
    f=1;
    if ($1=="database=contact_table")
    f=2 ; } ' > kk

    for i in 's/\\\00//g' 's/\\\02//g' 's/\\.\{2\}/ /g'
    do
    echo $i
    cat kk | sed "$i" > kk.tmp
    mv kk.tmp kk
    done

    cat kk | sort -f -d
    kundancool likes this.

  2. #2
    Join Date
    Feb 2005
    Location
    Singapore
    Posts
    3,206

    Default Re: Playing with native.db

    cool! another great guy!
    My favorite Motorola development site!


  3. #3
    Join Date
    May 2005
    Location
    Germany, Hannover
    Posts
    289

    Default Re: Playing with native.db

    Quote Originally Posted by admin
    cool! another great guy!
    think so too

    perhaps there is a way to do the same with sms?

  4. #4
    Join Date
    Jun 2005
    Location
    Houston, USA
    Posts
    349

    Default Re: Playing with native.db

    Quote Originally Posted by matiu
    Hope it helps someone!
    Shure - this is great news! Many many thanks and welcome aboard! Another Gentooer.
    % New UNIX password:
    > penis
    BAD PASSWORD: it's WAY too short
    % New UNIX password:

  5. #5
    Join Date
    Feb 2005
    Location
    Singapore
    Posts
    3,206

    Default Re: Playing with native.db

    wads a gentooer?

    couldn't find the meaning on google. lol
    My favorite Motorola development site!


  6. #6
    Join Date
    May 2005
    Location
    Germany, Hannover
    Posts
    289

    Default Re: Playing with native.db

    i am a gentooer too

    cytux shorted it a little bit

    gentooer = gentoo user

  7. #7

    Default Re: Playing with native.db

    Quote Originally Posted by matiu
    Hope it helps someone!
    Yes, this is great.
    Thank you!

  8. #8
    Join Date
    Jul 2005
    Location
    Argentina
    Posts
    41

    Default Re: Playing with native.db

    Quote Originally Posted by pascal
    perhaps there is a way to do the same with sms?
    Yes! It is possible. The question is: What to do with the data? I am using thunderbird. Will work next days in a C program to read from native.db and get usefull information in a .csv format (contacts, sms, mails, calentar info, todo items),
    which can be later importable (manually) from thunderbird/evolution/kmail.

    The cool thing to do, however, would be a two-way synchro tool, but in this case we should limite us to only one mail/calentar app. What you think? Which is the mail/calendar app that you use most in your Linux?

    Here is a script to get the sms, the messages are a little mess up, but it is a beginning

    matías

    ----------------- get_sms.sh

    #!/bin/sh

    # get data in kk file
    db4.2_dump -p native.db | awk '
    /DATA=END/ { f=0; }
    /HEADER=END/ { if (f==2) f=1; }
    /database=ems_table_in_flash/ { f=1 }
    /.*/ { if (f==1) print $0 ; } ' > kk

    # filters some chars
    for i in 's/\\\00//g' 's/\\\02//g' 's/\\.\{2\}/ /g'
    do
    echo $i
    cat kk | sed "$i" > kk.tmp
    mv kk.tmp kk
    done

    # print and filter first 14 chars
    cat kk | awk '{ print substr($0,14)}'
    rm -f kk
    #-----------------------------------

  9. #9
    Join Date
    May 2005
    Location
    Germany, Hannover
    Posts
    289

    Default Re: Playing with native.db

    Quote Originally Posted by matiu
    Yes! It is possible. The question is: What to do with the data?
    I want to backup my sms - have a lot of them - before i flash to e680i, and then insert them back on e680i

    i am using at home kmail and at work evoulution (cause ximians exchange plugin), never tried thunderbird

  10. #10

    Default Re: Playing with native.db

    @matiu
    nice to here from one using linux wanting to use the phone for what it is ment to be: not for gaming but for PDA functions

    syncing is one of my long time hunting for the e680(i).
    I want to see syncing of
    - calendar
    - phonebook
    - notes

    The backup of SMS/MMS could be also a nice feature.

    I prefer the KitchenSync way because i use kde with Kontact.

    May be i can help getting this on the road


 
+ Reply to Thread
Page 1 of 7 12345 ... LastLast

Similar Threads

  1. Problem playing videos
    By activexpert in forum E6 General Chat
    Replies: 3
    Last Post: 02-14-2008, 05:57 AM
  2. i need help playing videos on rokr e6
    By pinoy8181 in forum E6 General Chat
    Replies: 4
    Last Post: 08-14-2007, 03:44 AM
  3. Bicycle Playing Card
    By Larry in forum -The Lounge-
    Replies: 0
    Last Post: 03-20-2007, 07:18 AM
  4. Help required for playing videos
    By s.kris79 in forum A1200 General Chat
    Replies: 3
    Last Post: 01-18-2007, 12:15 PM
  5. playing videos HELP
    By itzkinz in forum E680i General Chat
    Replies: 1
    Last Post: 02-12-2006, 10:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1