webOS Nation Forums >  Homebrew >  TouchPad Patches > Real kindle sideloading solution
Real kindle sideloading solution
  Reply
Like Tree49Likes

 
Thread Tools Display Modes
Old 09/06/2011, 01:33 AM   #1 (permalink)
Homebrew Developer
 
Posts: 365
Hey guys, who wants to help with a real kindle sideloading solution? I've done some kindle hacking in the past, and I'm pretty familiar with wispersync, so I'd like to get a real solution going so we don't have to use the download a book and replace it method...

I am pretty decent at bash/batch scripts (use them at work all the time), and I wrote one a little while ago for sideloaded books for the kindle. It will assign each book you want a legit (enough) ASIN number so that it'll sync progress across your devices. I'd like to use that script and use it as a base for what we need to do to make sideloading on the touchpad work.

I've been browsing the kindle books database in impostah and the source for the kindle app, so I think I would make a script that would use sqlite to inject the correct values into the database to read your real books. This script would be generated when you run my original script on your PC to assign ASIN numbers to your books and extract cover art.

Is there anyone who can help me with the sqlite script? I think my original script is mostly ready to go for the first part. We need to figure out which database its keeping the files in, and then we are set. Who is in?

<<staff edit>>


************UPDATE***************

Here is what the current solution is at this time.

The Kindle-Import tool found on Preware, will import books in the .palmkindle folder of your TP. It will determine meta info from the title of the file so they need to be named properly. Something like one of these:

Title - Author.mobi
Title - Author - ASIN.mobi
Title - Author - ASIN - Locations.mobi

It will also import the cover art associated with these books if they are named properly and in the right place (.palmkindle/coverCache). They have the same naming scheme, but will -medium or -small at the end (ex. Title - Author - ASIN-medium.jpg). The medium cover images need to be 120x170 px, and the small need to be 52x74 px.

I have written a batch script to do this all for you found here

So here is how you do everything:
1. Deregister and then Reregister the Kindle App.
2. Install Kindle-Import from Preware
3. Restart your TP.
4. Use my script to take care of naming and cover art by extracting the .zip file into the directory where all your .MOBI/.AZW files are stored (**EDIT It does a recursive scan now**). Then run the kindleSide.bat file. Your books will be properly named and placed in a folder called .palmkindle. The cover images in a subfolder folder called coverCache. Copy these to your TP (in their respective folders).
5. Run the Kindle-Import app to load and then import your books.
6. Enjoy them in the Kindle app

You will need all the meta data and coverart set properly in Calibre for this to work right.

**EDIT**
I've updated the script to work with .AZW files, remove :'s from the Title of books (unable to use that as a filename), and made it recursive.

That means you can stick it in your Calibre library folder and it'll scan all of the subfolders and get everything it needs.

Last edited by m0ngr31; 09/22/2011 at 08:34 PM.
m0ngr31 is offline   Reply With Quote
Liked by Nechasin, Typo Lad, z0g and 24 others like this.
Old 09/06/2011, 12:17 PM   #2 (permalink)
Member
 
Posts: 25
I can't help with the script, but I'm very interested in what you're doing! Thanks!
cmdixon is offline   Reply With Quote
Old 09/06/2011, 12:21 PM   #3 (permalink)
Member
 
Posts: 1,369
Sorry me neither help wise, but I'm sure everyone here is ready and waiting. Sorli...
sorli is offline   Reply With Quote
Old 09/07/2011, 09:30 AM   #4 (permalink)
Member
 
Posts: 57
Very good approach!
Alphajoe is offline   Reply With Quote
Old 09/07/2011, 11:38 AM   #5 (permalink)
Member
 
Posts: 28
Been looking through the sourcecode for where it loads the sample book-file (.asw-file) but no dice..

Best would be to add an import-function so books adds to a collection, sound totally
ly doable, question is if we could borrow some code from the "import from device"-function..?
ElecTriXx is offline   Reply With Quote
Old 09/07/2011, 11:39 AM   #6 (permalink)
Member
 
Posts: 26
Please make this work lol I don't like Preader ui it's so generic compared to kindle this would make the tp an ereaders dream come true
newcultking is offline   Reply With Quote
Old 09/07/2011, 01:54 PM   #7 (permalink)
Member
 
uh60james's Avatar
 
Posts: 179
I know nothing about scripts but would help some other way if possible.
uh60james is offline   Reply With Quote
Old 09/07/2011, 02:05 PM   #8 (permalink)
Homebrew Developer
 
Posts: 365
I'm planning on spending some time on it tonight. I'm hoping to find how the books are added into the database, and then we'll be in business. I'll post an update later tonight.
m0ngr31 is offline   Reply With Quote
Liked by newcultking likes this.
Thanked By: newcultking
Old 09/07/2011, 02:38 PM   #9 (permalink)
Member
 
Posts: 26
On this site seems to b making progress
Hacking .palmkindle
newcultking is offline   Reply With Quote
Old 09/07/2011, 04:25 PM   #10 (permalink)
Homebrew Developer
 
Posts: 365
They've put a ton of work into that, but that is exactly the type of solution I'm trying to avoid.

Last edited by m0ngr31; 09/07/2011 at 04:34 PM.
m0ngr31 is offline   Reply With Quote
Old 09/07/2011, 04:41 PM   #11 (permalink)
Member
 
Posts: 213
Would Kovid know anything?
Calibre and TouchPad - MobileRead Forums
allowingtoo is offline   Reply With Quote
Old 09/08/2011, 02:16 AM   #12 (permalink)
Member
 
Posts: 32
I know nothing about how kindle works, but I am good with php/bash/sql if that counts. Is it as simple as adding a row somewhere in the kindle database with the correct asin id? Does the actual _id matter, or is it always random?

I saw the kindle database where it stored the asin ids and path to the .azw file. I haven't tried adding my own rows with different ids/paths and seeing if it picks up on it. That seems like it'd be pretty easy if it does though
johntash is offline   Reply With Quote
Old 09/08/2011, 08:40 AM   #13 (permalink)
Member
 
Posts: 2
Yep, it is as easy as adding a row to the com.palm.kindle.books:1 table. Standard .mobi files seem to work fine. The only problem I have is calculating the total number of "locations" in the .mobi/.azw file. At the moment I overestimate, skip through the book in the kindle app to find the final one then modify the db record manually.

I'm trying to get up to speed on the enyo/javascript stuff so I can add a menu option to import local files. Will hopefully have something running next week.
rdok is offline   Reply With Quote
Old 09/08/2011, 09:46 AM   #14 (permalink)
Homebrew Developer
 
Posts: 365
I can help with the JavaScript stuff, but I'm not any good with databases. Want to hook up over IM sometime and we can get a patch or something that'll add an option to the kindle app?
m0ngr31 is offline   Reply With Quote
Old 09/09/2011, 01:01 AM   #15 (permalink)
Member
 
Posts: 1
I might be able to help with this if you need it. Just one question... where are the kindle SQLite databases in the filesystem? I've been looking around a bit with no luck. Saw it in Impostah, but need to locate the actual path so I can fire up sqlite3 and play with it a bit.
jmill is offline   Reply With Quote
Old 09/09/2011, 11:58 AM   #16 (permalink)
Homebrew Developer
 
Posts: 365
jmill, they are not a simple SQLite database AFAIK. You have to use the use the com.palm.db service API to access it. The database itself should be in /var/db.

I'm started playing with node.js to make this a reality. I should have something soon. Hopefully as soon as Sunday. I'm going to dedicate a good part of my day tomorrow to figure this all out. Stay tuned...
m0ngr31 is offline   Reply With Quote
Old 09/09/2011, 12:31 PM   #17 (permalink)
Member
 
Posts: 1
Quote:
Originally Posted by m0ngr31 View Post
Hey guys, who wants to help with a real kindle sideloading solution? I've done some kindle hacking in the past, and I'm pretty familiar with wispersync, so I'd like to get a real solution going so we don't have to use the download a book and replace it method...

I am pretty decent at bash/batch scripts (use them at work all the time), and I wrote one a little while ago for sideloaded books for the kindle. It will assign each book you want a legit (enough) ASIN number so that it'll sync progress across your devices. I'd like to use that script and use it as a base for what we need to do to make sideloading on the touchpad work.

I've been browsing the kindle books database in impostah and the source for the kindle app, so I think I would make a script that would use sqlite to inject the correct values into the database to read your real books. This script would be generated when you run my original script on your PC to assign ASIN numbers to your books and extract cover art.

Is there anyone who can help me with the sqlite script? I think my original script is mostly ready to go for the first part. We need to figure out which database its keeping the files in, and then we are set. Who is in?

If you want to see the original script, you can find it here: Joe Ipson: Genius, Hacker, Twilight fan | None of the above
man I love you guys. It's nice to be a part of a community that gets in and does what needs done as opposed to *****ing about it and doing nothing.
gar4236 is offline   Reply With Quote
Old 09/10/2011, 01:31 PM   #18 (permalink)
Member
 
Posts: 2
Quote:
Originally Posted by m0ngr31 View Post
I can help with the JavaScript stuff, but I'm not any good with databases. Want to hook up over IM sometime and we can get a patch or something that'll add an option to the kindle app?
Yep, cool. I'm away for a couple of days but maybe after that?
rdok is offline   Reply With Quote
Old 09/10/2011, 02:34 PM   #19 (permalink)
Homebrew Developer
 
Posts: 365
sure thing . I've been slaving away for the past few hours at it. Hopefully you can help me get it finished!
m0ngr31 is offline   Reply With Quote
Old 09/11/2011, 12:46 PM   #20 (permalink)
Member
 
Posts: 28
How's it going? I can help with javascript to if needed..
ElecTriXx is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0