View Single Post
Old 04-27-2011, 02:14 AM   #5
ken_jennings
eDGe User
ken_jennings has learned how to buy an e-book online
 
ken_jennings's Avatar
 
Posts: 51
Karma: 88
Join Date: Mar 2011
Location: FL, USA
Device: Entourage eDGe
/fridge/.edge/.esi-data/.databases>

If you have sqlite3 available check out the Library database contents:
Code:
/fridge/.edge/.esi-data/.databases> sqlite3 library.db
SQLite version 3.6.23
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .database
seq  name             file
---  ---------------  ----------------------------------------------------------
0    main             /home/kenjen/Desktop/edge_backup/fridge/.edge/.esi-data/.d
One database, but lots of interesting tables:
Code:
sqlite> .tables
android_metadata  esibookmarks      esihighlights     esinotes
esiannotations    esicontent        esiimages         esirecent
esiattachments    esicontenttag     esimeta           esitags
Start at the top with android_metadata, it is simple -- one column, and has only one record. It appears to identify this system's "locale" as english in the US:
Code:
sqlite> .schema android_metadata
CREATE TABLE android_metadata (locale TEXT);

sqlite> select count(*) from android_metadata ;
1

sqlite> select * from android_metadata ;
en_US
esibookmarks is a more complicated table, but I have no data in it:
Code:
sqlite> .schema esibookmarks
CREATE TABLE "esibookmarks" (
"_id"         INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"type"        INTEGER,
"contentId"   INTEGER,
"sectionId"   INTEGER,
"location"    TEXT,
"page"        INTEGER,
"title"       TEXT,
"previewText" TEXT,
"guid"        TEXT,
"version"     TEXT,
"created"     INTEGER,
"modified"    INTEGER,
"backup"      INTEGER,
"dirty"       INTEGER );

sqlite> select count(*) from esibookmarks ;
0

sqlite> select * from esibookmarks ;
Just about everything here has the _id column in it. That is the primary key on most tables and the value used to connect records in different tables together.

Let's see what has records and what doesn't. It seems I'm not big on making bookmarks or attachments:
Code:
sqlite> select count(*) from esibookmarks ;
0
sqlite> select count(*) from esihighlights ;
49
sqlite> select count(*) from esinotes ;
3
sqlite> select count(*) from esiannotations ;
114
sqlite> select count(*) from esicontent ;
104
sqlite> select count(*) from esiimages ;
13
sqlite> select count(*) from esirecent ;
10
sqlite> select count(*) from esiattachments ;
0
sqlite> select count(*) from esicontenttag ;
82
sqlite> select count(*) from esimeta ;
1
sqlite> select count(*) from esitags ;
25
PROBABLY IMPORTANT: The esimeta table appears to identify the specific edge device. This table has only one record in it that contains the system's serial number. This may be the only value that prevents a backup on one system from being restored on a different edge. Chances are, updating the value of the "devices" column here to match a different, target eDGe device, then updating the backup .esi/.zip file with the new library.db file would allow the backup file to be restored on a different edge. Pseudi-semi-educated guess at work.
Code:
sqlite> .schema esimeta
CREATE TABLE "esimeta" (
"_id"         INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"libraryName" TEXT,
"device"      TEXT);

sqlite> select * from esimeta ;
1|My Library|F303082002AF
No, that is not my system's actual serial number.


esiimages is an interesting table. It stores an image directly in the record in "blob" format. It would be interesting to know how these records are created and what needs to be stored here:
Code:
sqlite> .schema esiimages
CREATE TABLE "esiimages" (
"_id"   INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"image" BLOB);

sqlite> select * from esiimages ;
1|�PNG
^Z

2|
3|
4|
5|�PNG
^Z
. . .  etc, more of the same

TO BE CONTINUED
ken_jennings is offline   Reply With Quote