5,605,766 Members 47,882 Now Online
XDA Developers Android and Mobile Development Forum

[Q] how to make nook think sideloaded was downloaded

Tip us?
 
met67
Old
#11  
Senior Member
Thanks Meter 32
Posts: 193
Join Date: Apr 2007
Quote:
Originally Posted by persichini View Post
/data/data/com.android.providers.media/databases/internal.db

This is a database file that contains the book summary and all the other info. I guess when you download a book from B&N it updates this file.

I just haven't been able to update the file and get it to recognize.

I do know that by placing your books in '/system/media/books' folder you can use the B&N partition for your side loaded books you just have to reboot to recognize them. There is also no option to delete books once they are placed there. you would have to delete them with a file manager or over ADB
As far as I can tell, in the internal.db there are 2 different table, 'docs' for sideloaded books and 'products' for B&N books and the 'docs' table misses the short synopsis field used for the book summary.
So probably there is no way to have summary for sideloaded books...
 
ApokrifX
Old
#12  
Senior Member
Thanks Meter 45
Posts: 400
Join Date: May 2011
If we put book into /data/media/B&N Downloads/Books/ folder, itíll go into 'docs' table for sideloaded books still, right?

BTW: How do you fiddle with databases such as internal.db?
Use adb to pull/push and fiddle on PC, or use adb shell to do it on nook?
 
met67
Old
#13  
Senior Member
Thanks Meter 32
Posts: 193
Join Date: Apr 2007
Quote:
Originally Posted by ApokrifX View Post
If we put book into /data/media/B&N Downloads/Books/ folder, itíll go into 'docs' table for sideloaded books still, right?
IDK, never tried

Quote:
Originally Posted by ApokrifX View Post
BTW: How do you fiddle with databases such as internal.db?
Use adb to pull/push and fiddle on PC, or use adb shell to do it on nook?
Both, actually.
I use SQLiteStudio to browse data and definitions, and a copy of sqllite3 found on this forum to modify the DB on the device via adb shell
 
persichini
Old
#14  
Senior Member - OP
Thanks Meter 5
Posts: 103
Join Date: Dec 2010
Location: DFW
Quote:
Originally Posted by met67 View Post
As far as I can tell, in the internal.db there are 2 different table, 'docs' for sideloaded books and 'products' for B&N books and the 'docs' table misses the short synopsis field used for the book summary.
So probably there is no way to have summary for sideloaded books...
Well my thoughts were why can't we just manually insert the books in the the "products" with the data fields filled in. i tried guessing at what all those fields were. I'm assuming it wasn't the correct info or didn't match the book some how because it didn't work.

Quote:
Originally Posted by ApokrifX View Post
If we put book into /data/media/B&N Downloads/Books/ folder, itíll go into 'docs' table for sideloaded books still, right?

BTW: How do you fiddle with databases such as internal.db?
Use adb to pull/push and fiddle on PC, or use adb shell to do it on nook?
I tried to place the books into /data/media/B&N Downloads/Books/ folder but the nook ignored them. From what i can tell it checks the database file and if its not in there it doesn't see it.

if you place your books in /system/media/books/ folder it will recognize them as sideloaded books. That is the same location as your quick start.epub and the manual.epub

I have placed books there and the nook will load them after a reboot.

I adb pull/push and used a program called sqliteadmin in windows
Samsung S4 (T-Mobile)
Nook Simple Touch Glow-light

HTC Glacier (MyTouch 4G) (retired)
Viewsonic G-Tablet owner (retired)
Nook Simple Touch (retired)
 
Droidatar
Old
#15  
Member
Thanks Meter 5
Posts: 37
Join Date: Jan 2012
Default sideloaded books on Nook

Quote:
Originally Posted by persichini View Post
OK so I've found that the database looks to be here

/data/data/com.android.providers.media/databases/internal.db <----- Looks more promising

/data/data/com.android.providers.downloads/databases/downloads.db <----- deadend
I've figured out the sqlite thing....

Downloads didn't work....

Internal.db seems to have all the information.... It has a field for summary, author, what not.... So Meta info isn't used at all by the nook... its added per book base to the internal.db file.... bummer. I guess i'll add the info and see if it is recognized.

Looks like there might be alot of info needed from BN.com to make it work... ugh
I was searching and came across your post, have you considered using Calibre to sideload your books? I just changed yesterday to include the metadata (within calibre program) on the first page of the book. that way you can review the information you have set. It will also download metadata for books you do not have info on.

Don't know if this helps good luck with your Nook.
 
gadgetroid
Old
#16  
gadgetroid's Avatar
Senior Member
Thanks Meter 467
Posts: 1,261
Join Date: Feb 2012
Location: Bangalore

 
DONATE TO ME
I realize I may be bumping this thread, but I figured that it was worth it. I worked around with a few of the files and I figured out everything now. I can get my side-loaded books to show up in the My Books section. Thanks to OP to giving me the hint about the database files.

My method requires you to download a sample of the book you want to side load from the Nook Store ( remember, a sample; not the book. Samples are free.) The database files contain the metadata info. Copy the filename of the sample you have downloaded( this will be in \sdcard\Nook\Content). Copy over the ePub you want to side load and rename the file with the name of the sample downloaded. Going into the Nook app, you can now see that the sample in the Library has been replaced with the full version of the book.

Head over to Android Market and buy the SQLite Editor. Once that's done, open up the app and click on B&N Nook( or something to that effect, since I don't remember it exactly). Head into products, and scroll sideways until you come across "isSample". ( Please look into the column or row for your book.) For your sample book, the value will be set to 1. For the purchased books, it'll be zero. Just long click on that cell and edit the value and set it to 0. Click back, exit out of the app and launch the Nook app.

You can now see that the "Sample" logo from the sample book is gone. Voila! Sample books have all the privileges of the full book purchased from the B&N Store. The B&N Store has an abysmal selection of books, so I prefer buying my books from elsewhere and then using them on B&N app. That's the best app I've found for Android so far.

I haven't got the syncing to work yet. I just got onto my tablet, and I don't feel like going through the whole process again. I'll try it out tomorrow and let you know. Side note: I also got "Internal errors" upon launching the app. I believe this is because of me updating the database files and B&N not having a copy of the update. But the app obeys the local copy present, so I' m not too worried about that at the moment.

Can the OP look into this on the Nook tablet? I can confirm this works on the normal Android tablets, but I'm not so sure of the Nook tablet. Maybe it can be run from the CM ROMs?
The Following 2 Users Say Thank You to gadgetroid For This Useful Post: [ Click to Expand ]
 
LastSilmaril
Old
(Last edited by LastSilmaril; 7th October 2012 at 06:47 PM.)
#17  
Senior Member
Thanks Meter 48
Posts: 175
Join Date: Nov 2011
Location: Kings County, NY
gadgetdroid's workaround does, indeed give you sharing capabilities.
But this happened when I tried to share to facebook:
Quote:
#NAME# shared a quote from #TITLE# on a NOOK
by #AUTHOR#
clicking 'more' in order to have metadata and summary come up yields 'service unavailable'.
Also, the sample books on my Nook get saved to /sdcard/B&N Downloads/Books/ (symlinked /data/media to /sdcard, so pretend it's /data/media for the rest of you who didn't make that change)
Still I count this as progress. I'm not sure if simply adding a line to the products db on scan is the answer because the products db has so many more columns than the docs db but I'ma try it and see what happens.
Phones: VZW Moto X Dev Edition | VZW GS III, CleanROM 7 (ret) | VZW dInc, CM7 (ret)
Tablets: Nook Simple Touch, manual root (stolen!) | Nook Simple Touch with Glowlight, GlowNooted (sold) | HP TouchPad 32GB, WebOS/CM11
 
LastSilmaril
Old
(Last edited by LastSilmaril; 7th October 2012 at 09:15 PM.)
#18  
Senior Member
Thanks Meter 48
Posts: 175
Join Date: Nov 2011
Location: Kings County, NY
Default spoofing tryouts...

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):

Quote:
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:
Quote:
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)
Phones: VZW Moto X Dev Edition | VZW GS III, CleanROM 7 (ret) | VZW dInc, CM7 (ret)
Tablets: Nook Simple Touch, manual root (stolen!) | Nook Simple Touch with Glowlight, GlowNooted (sold) | HP TouchPad 32GB, WebOS/CM11
 
LastSilmaril
Old
#19  
Senior Member
Thanks Meter 48
Posts: 175
Join Date: Nov 2011
Location: Kings County, NY
copying the locker_delivery_id and luid from a book that has been dled from B&N as a sample, instead of just making one up, also doesn't seem to work...
Phones: VZW Moto X Dev Edition | VZW GS III, CleanROM 7 (ret) | VZW dInc, CM7 (ret)
Tablets: Nook Simple Touch, manual root (stolen!) | Nook Simple Touch with Glowlight, GlowNooted (sold) | HP TouchPad 32GB, WebOS/CM11
 
gadgetroid
Old
#20  
gadgetroid's Avatar
Senior Member
Thanks Meter 467
Posts: 1,261
Join Date: Feb 2012
Location: Bangalore

 
DONATE TO ME
Quote:
Originally Posted by LastSilmaril View Post
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):



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:




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)
I repeat, unless B&N don't have a copy of your purchase, you will face errors of not finding metadata. I just installed Linux on my laptop, so I'll go through a few things and post the results soon. Have you updated the Nook app to the latest version? In the latest one, you don't have to restart the app any more or restart the device or kill it's process to see the new books added through the file manager.

One more thing. Have you manually tried filling up the metadata on the book you copied in Products db? Don't set the syncing to take place. Mark it as 0. I want to get metadata working first.

Sent from my XT530 using Tapatalk 2

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes