View Single Post
Old 09-14-2013, 05:21 PM   #1
beeblebrox
Member
beeblebrox is kind to children and small, furry animalsbeeblebrox is kind to children and small, furry animalsbeeblebrox is kind to children and small, furry animalsbeeblebrox is kind to children and small, furry animalsbeeblebrox is kind to children and small, furry animalsbeeblebrox is kind to children and small, furry animalsbeeblebrox is kind to children and small, furry animalsbeeblebrox is kind to children and small, furry animalsbeeblebrox is kind to children and small, furry animalsbeeblebrox is kind to children and small, furry animalsbeeblebrox is kind to children and small, furry animals
 
Posts: 11
Karma: 6632
Join Date: Apr 2010
Device: Kindle PW2, Onyx i62HD Firefly
Found sqlite annotations database in Kindle for Android

This afternoon I have tried to figure out where recent versions of Kindle for Addroid stores annotations for .mobi got from somewhere else than Amazon.

From this forum I learned that the bookmarks/annotations used to be saved in .mbp files. However Amazon decided to encrypt the file so .mbp became .embp.

For my Kindle for Android app I cannot find neither .mbp nor .embp.
There is no file that seems to contains annotation neither in /sdcard/kindle nor /sdcard/Android/data/com.amazon.kindle/files.

However there is a file in protected folder:

/data/data/com.amazon.kindle/databases/annotations.db

(You must gain root to access the file.) The file is a plain SQLite database. Annotation table contains the following columns:
BOOKID - the part of the string is ASIN
TYPE - 0 stands for a bookmark, 2 is an annotation
START_POS, END_POS are integers that seems to define an annotation"position" range. The screenshot of SQLite viewer showing content of the file is attached.

I don't know how to relate the position to the contents of the .mobi file.
Possibly it is similar to .mbp format, which specification I cannot find. My Perl is too rusty to analyze sources of mbp reader script (http://www.angelfire.com/ego2/idleloop/mbp_reader.html)... so I decided to ask for giving me a hand.

The aim of exercise is to retrieve annotations from ebooks called by Amazon "personal" - ones purchased in other bookstores or got from public domain cloud.

As we know there is no highlights from "personal" documents at https://kindle.amazon.com/your_highlights. I think it is okay, as this is a convenience feature that Amazon is not obliged to support for books purchased from other vendors.

What I don't quite understand why Amazon decided to encrypt annotations for non-encrypted ebooks. Finally annotations storage completely disappeared from user accessible folders in case of Kindle for Android app, which includes Kindle Fire as far I know.
Attached Thumbnails
Click image for larger version

Name:	annotation.db.png
Views:	441
Size:	22.0 KB
ID:	111039  

Last edited by beeblebrox; 09-14-2013 at 05:37 PM.
beeblebrox is offline   Reply With Quote