cc.db

The file at /var/local/cc.db is used by com.lab126.ccat and stores information regarding the indexed books and collections.

It contains the following tables:

  • BACKFILLING
  • Collation
  • Collections
  • CollectionsJournal
  • DBOK
  • Entries
  • Locale
  • Series
  • SharedStates
  • Versions

BACKFILLING

Unknown.

ColumnTypeDescription
x_versionBLOB (int)

Collation

Described as “current collation locale (string)”. Otherwise unknown.

ColumnTypeDescription
collationBLOB

Collections

Table where the collections (user-created “series” grouping). This is a N-to-N mapping between a collection UUID and a collection member UUID.

The same data can potentially be found from the Entries table, it is unsure which one is the source of truth.

ColumnTypeDescription
i_collection_uuidBLOB (UUID)Collection side
i_member_uuidBLOB (UUID)Member side
i_orderBLOB (int)Order of member within collection
i_member_cde_typeBLOBcdeType of the member
i_member_cde_keyBLOBcdeKey of the member
i_member_is_presentBLOBmember is present on device
i_is_sideloadedBLOBItem sideloaded/downloaded value

There is a UNIQUE (i_collection_uuid, i_member_uuid) constraint on this table.

CollectionsJournal

Unknown.

ColumnTypeDescription
i_event_timeBLOB (datetime)Event time
j_eventBLOB (json)Contains the collections event

DBOK

Unknown.

ColumnTypeDescription
x_okBLOB

The x_ok column is defined as:
PRIMARY KEY
NOT NULL
UNIQUE
CHECK (x_ok = 1)
CHECK (typeof(x_ok) = "integer")

Entries

Main table containing the whole catalog. Everything is here, including books and collections.

ColumnTypeDescription
p_uuidBLOB PRIMARY KEY NOT NULL (UUID)ID of entry
p_typeBLOB (string)App-defined type
p_locationBLOB (string)Location (URI to content)
p_lastAccessBLOB (datetime)Last access
p_modificationTimeBLOB (datetime)File modification
p_isArchivedBLOB (bool)Is archived item?
p_titles_0_nominalBLOB (string)Pieces of first title (LString)
p_titles_0_collationBLOB COLLATE icu (string)Used only for filtering and sorting
p_titles_0_pronunciationBLOB (string)Return value is always j_titles
j_titlesBLOB (array of hashmap)All titles (array of LString)
p_titleCountBLOB (int)How many titles (unsigned)
p_credits_0_name_collationBLOB COLLATE icu (string)Collation string for first credit
j_creditsBLOB (array of hashmap)All credits
j_creditCountBLOB (int)How many credits (unsigned)
j_collectionsBLOB (array of UUID)This entry is a member of these collections
p_collectionCountBLOB (int)How many collections (used for filtering)
j_membersBLOB (array of UUID)This collection has these members
p_memberCountBLOB (int)How many members (used for filtering)
p_lastAccessedPositionBLOBFor books: LPR; MP3/Audio: last timestamp played
p_publicationDateBLOB (UTC datetime)Publication date (Whether this should be interpreted as a floating date or a timepoint depends on the content, and we have no reliable way of knowing which is which—currently, use type (EBook, Blog, Magazine, etc.) to decide
p_expirationDateBLOB (UTC datetime)Expiration date. (Time when this item should be purged. Typically used for periodicals and blogs. Will be null for books, etc. which should not be purged)
p_publisherBLOB (string)Publisher
p_isDRMProtectedBLOB (bool)Has DRM?
p_isVisibleHomeBLOB (bool)Should appear in Home?
p_isLatestItemBLOB (bool)Is this the latest item in a group such as a periodical?
p_isDownloadingBLOB (bool)Is currently downloading?
p_isUpdateAvailableBLOB (bool)Is an update available, say to a KDK app?
p_virtualCollectionCountBLOB (int)Number of items in a virtual collection, such as Periodical Back Issues or Archived Items
p_languages_0BLOB (string)Primary content language
j_languagesBLOB (array of IETF BCP 47)All content languages
p_languageCountBLOB (int)How many languages (unsigned)
p_mimeTypeBLOB (string)Mime type
p_coverBLOB (string)Cover location (URI)
p_thumbnailBLOB (string)Thumbnail location (URI)
p_diskUsageBLOB (int)Bytes on disk
p_cdeGroupBLOB (string)CDE Grouping ID (to group periodicals, Retail ASIN)
p_cdeKeyBLOB (string)CDE Key/ASIN
p_cdeTypeBLOB (string)CDE Type
p_versionBLOB (string)Content version
p_guidBLOB (string)Content GUID
j_displayObjectsBLOB (array of hashmap)What to display
j_displayTagsBLOB (array of string)Tags to display (array of enum (string) values)
j_excludedTransportsBLOB (array of string)Disallowed networks for download
p_isMultimediaEnabledBLOB (bool)For Luna books
p_watermarkBLOB (string)Watermark
p_contentSizeBLOB (int)Human-perceived length
p_percentFinishedBLOB (float)What percentage of the total content length the lastAccessedPosition represents
p_isTestDataBLOB (bool)Is this test data?
p_contentIndexedStateBLOB (int)The state of indexing the content of this entry
p_metadataIndexedStateBLOB (int)The state of indexing the metadata of this entry
p_noteIndexedStateBLOB (int)The state of indexing the notes/annotations of this entry
p_credits_0_name_pronunciationBLOB (string)Authors pronunciation
p_metadataStemWordsBLOBMetadata stem words (not used currently. Introduced in J3)
p_metadataStemLanguageBLOBLanguage of the metadata (not used currently. Introduced in J3)
p_ownershipTypeBLOB (int)Ownership type
p_shareTypeBLOBSupport share feature in Discovery App
p_contentStateBLOB (int)Downloaded / sideloaded value
p_metadataUnicodeWordsBLOB (string)Searchable metadata for contents
p_homeMemberCountBLOB (int)Number of downloaded/sideloaded books inside a collection
j_collectionsSyncAttributesBLOBCollection sync attributes
p_collectionSyncCounterBLOB (int)Max whispersync counter for a collection
p_collectionDataSetNameBLOB (string)Whispersync dataset name for collection
p_originTypeBLOB (int)Content Origin Type
p_pvcIdBLOBPVC identifier
p_companionCdeKeyBLOB (string)Companion CDE ASIN. For an audio book, we may have a companion ebook and vice-versa
p_seriesStateBLOB (int)Series Identifier
p_totalContentSizeREAL (long)Total size (including sidecars) occupied by the content on the device
p_visibilityStateBLOB (int)Used to determine whether an entry should be visible or not
p_isProcessedBLOB (int)Flag to specify whether the entry should be processed or has already been processed
p_readStateBLOB (int)Indicates the read state of an entry
p_subTypeBLOB (int)Integer to specify the sub type of the entry

Locale

Unknown.

ColumnTypeDescription
localeBLOB (string)

Series

Seems to be some kind of Amazon-exclusive collection, perhaps related to the Amazon store?

ColumnTypeDescription
d_seriesIdBLOB (string)Identifier of a series
d_itemCdeKeyBLOB (string)cdeKey of the member
d_itemPositionBLOB (double)Position of a member in the series
d_itemPositionLabelBLOB (string)Display label of a member
d_itemTypeBLOB (string)Type of the member. Same as p_type in Entries table
d_seriesOrderTypeBLOB (string)Order type of series

There is a UNIQUE (d_seriesId, d_itemCdeKey) constraint on this table.

Versions

Unknown.

ColumnTypeDescription
x_tableBLOB (string) PRIMARY KEY NOT NULL UNIQUE
x_versionBLOB (int)