So I tried spoofing the products db to see what what would happen by copying an entry from the docs db (where I had a book already) to the products db, like so (IOW, without having downloaded a sample book from B&N):
INSERT INTO products (_data, ean, _size, product_type, mime_type, _display_name, title, authors, mainAuthorFirstName, mainAuthorLastName, publisher, thumb_image, cover_image, product_code, format_code, purchase status, date_published, date_added, date_modified, locker_delivery_id, locker_status, luid) SELECT _data, _data, _size, product_type, mime_type, _display_name, title, authors, mainAuthorFirstName, mainAuthorLastName, "Barnes & Noble", thumb_image, cover_image, "ER", "EP", "1", "0", date_added, date_modified, "39248209", "ACTIVE", "L39248209" FROM docs where docs.title="The Old Man and the Sea" LIMIT 1;
I then deleted the relevant entry in the sideloaded db (e.g. docs), went into the Library and clicked the update key. this didn't seem to be effective. I then changed the ean entry to a real isbn number instead of just using the filename twice...still nothing. I then rebooted the device. I tihnk this actually caused the library to do a rescan. I now found that I had two copies of 'The Old Man and the Sea' listed (which of course were actually in the same physical location). The first one listed managed to begin to act like a bought book! E.g. when I went to 'more...' to read metadata, it showed the 'Service Unavailable' error. The sharing button was ungreyed! I then tried to share something to Facebook...but got an error message:
A Problem Occurred: Can't complete operation
Still, I count that as progress. In the above example, the epub file didn't have a publisher field, and of course the _ean field in the docs database is not populated, so I had to manually drop that in. The ean field cannot be null, and cannot just be some random string of characters. I confirmed this by going back and modifying the db - progress stopped right there, and the Share button became greyed out again.
So I'm not sure if a) the other fields in the products db, which I still have not populated, are relevant to making this functionality work or b) this is as far as we can go and b&n holds all the keys.
One other note: The locker_delivery_id and luid numbers, which are identical except for the leading L, I made up; these cannot be null.
EDIT: one last thing - whenever I open either the 'first' or 'second' copies of 'The Old Man and the Sea' off of a cold boot, I simply get a black screen, and have to go back to the Library and click the book again. I'm not sure if that has to do with anything I'm doing or if it's because of the guevor's kernel (which I just installed)