Consolidating Your eBook Libraries, Part II: Can It Be Done?

Posted on 09 January 2010 by


When last we saw our lonely hero, he was trying to figure out if it t’were possible to get the Barnes and Noble eReader software for the iPhone to recognize and display his Fictionwise library.  Let us now rejoin him in his quest.

(Caveat:  Neither Gear Diary nor Doug Moran encourages our readers to follow any of the following steps.  Your mileage may vary.  Void where prohibited.  Some states do not participate.  Call your dealer for details.)

So we want to, somehow, get our Fictionwise books in the right spot on the iPhone, and get the B&N ereader to recognize them.  Here’s what I’ve done:

First, you have to jailbreak your iPhone.  The only way to access the file system on the iPhone is to have it jailbroken, so that’s the first thing to do.  A lot of people find blackra1n to be a good program to use; I neither confirm nor deny.

The reason you want to jailbreak your iPhone is so that you can gain access to the iPhone file system.  There are, theoretically, two ways to do this:  over the sync cable, or via wifi.  The only program I’ve found that works over the sync cable is iPhoneBrowser, a fairly nifty little tool that allows you to surf the iPhone’s file system over the sync cable using a Windows-like interface.  Unfortunately, it doesn’t appear to work with the latest version of iTunes (9.0.2.25) and the iPhone firmware (3.1.2), so you’re temporarily out of luck with that one.  (On the other hand, maybe it just doesn’t work for me; trust me, it happens all the time.)

This leaves you with the WiFi mount option, so getting access is a two-step process:  installing a secure shell (SSH) application) on the iPhone, and then accessing it (duh) with an SSH application on your desktop.  As I use Windows–unfortunately–that’s what this example will contain.  I have read that a similar process works just fine on a Mac.

Part the first:  I use Cydia to install “jailbroken iPhone-ready” (i.e., not officially sanctioned by Apple and thus not available through iTunes) applications on my iPhone.  If you don’t have Cydia or some other application on the jailbroken iPhone, you need to install it at this point.

In Cydia, install the OpenSSH package on your iPhone (you can find it by searching fairly easily).  Once this package is installed and enabled, you will be able to set up a secure shell connection between your system and the iPhone.

On your system–laptop or desktop or whatever–open your SSH program of choice.  In my case, I use a combination of SecureCRT (so I can execute command-line level UNIX commands), as well as WinSCP.  What you use is totally up to you.

Before you continue, make sure WiFi is enabled on your iPhone.

To get into your iPhone, you must log in with the following information:

  • The IP address of the WiFi connection of your iPhone.  To find this out, on your iPhone go to Settings -> Wi-Fi, and tap the blue arrow next to whatever WiFi connection is active.  In the table displayed will be the IP address you need to use.
  • User:  root.
  • Password: alpine (yes, the passwords for all the iPhones are the same; how scary is that?)

Now, log on to your iPhone with the information above.  Bingo bango bongo, you’re into your iPhone file system.

One note:  If you are using WinSCP to access the iPhone file system, you need to keep the iPhone turned on, i.e. not in sleep mode.  I open an application like MyLite that keeps the iPhone on; how you do it is up to you.

I won’t lie to you, the iPhone file system is a little tweaked.  That’s what happens at the intersection of Mac people, Windows people, and the UNIX file system, I guess.  But I’ve gone through this pain already, so:

All application files on your iPhone live in subdirectories of the directory /private/var/mobile/Applications/.  Which subdirectory?  Well, t’would appear that the names of the subdirectories are long, generated (I’m guessing) hex numbers that all look like 780C955B-AD41-4A5B-8254-E900CE307D4C.  So in my case, the Barnes and Noble eReader application is in /private/var/mobile/Applications/780C955B-AD41-4A5B-8254-E900CE307D4C.

So in the case of this example, the set of book files–which for both the Barnes and Noble and Fictionwise eReaders are in PDB format–are in the directory /private/var/mobile/Applications/780C955B-AD41-4A5B-8254-E900CE307D4C/Library.   In the case of your iPhone, the directory between “Applications” and “Library” will be different; you’ll just have to find it.  I found it by using the UNIX “find” command, but I’m old and a UNIX dork.

The Fictionwise books have logical (as in, they make sense) names, like Shogun.pdb and Anathem.pdb, and so forth.   The Barnes and Noble books have logical (as in, computerish) names like 2970000051112.pdb or 9781411432512.pdb.  How these names are generated, I really have no idea.

So now we’re in the iPhone file system, we know where the Fictionwise books are, and we know where the B&N books are.  If the Gods of Geekdom are kind, then perhaps all we need to do is copy the Fictionwise book files over to the B&N library directory, right?

Wrong.  And that’s where your intrepid explorer is stuck.

If you look closely, you’ll see that the directory that contains your B&N ereader application files (in my case, that ugly /private/var/mobile/Applications/780C955B-AD41-4A5B-8254-E900CE307D4C/ thingee) also contains a file called ereader.db.  This is a data file, likely a database file (again:  duh!), and my guess is that it contains the list of books the B&N ereader application “sees”.  And unless I can figure out a way to update that baby, I’m stuck.

Now, I’m still poking around on my PC to see if it’s storing an equivalent database file, and I’m frantically googling to determine if anyone else has had any success with this.  But until then, fellow explorers, we’re stuck.

One final note:  if you copy book files over into the B&N Library directory, and those files aren’t “seen” by the application, they are summarily deleted from that directory the next time you launch the B&N ereader app.  Bummer.

This post was written by:

- who has written 894 posts on Gear Diary.

Doug is a nerd from way back, falling for a Commodore PET at the age of 15, and never looking back. Riding the nerd wave, he got a Computer Science degree and entered the tech industry at a young age, deciding after a year and a half of front-line phone technical support that he should try something, *anything* else. He settled on technical writing, and has been cranking out documentation for companies like Unisys, SGI, Cisco, Juniper, and many others ever since. The fact that he commutes between his family in Austin and his day job in California is something that he is simply trying to live with. (Isabelle the Corgi helps.)

Contact the author


  • http://www.geardiary.com Carly Z

    One comment: download mobileterminal and change your iphone password. like, now.

    go into mobileterminal and type passwd (the answer is alpine), then enter a new password, confirm it, you’re good.

    then do it again as root: type login root, then type passwd, alpine, change it, the whole shebang.

    That way your iPhone is safe from hackers. :)

  • Pingback: Allistair Lee

  • Pingback: Mon

  • Pingback: Queena

  • JDTagish

    Not to be nit-picky, but it’s Cydia, not Cyndia as well, for anyone who may be looking for the program.

    • http://www.geardiary.com Judie Lipsett

      Thanks Deni – I corrected. :-) )

  • The Yaz

    Maybe you could go at the problem from a different direction. I have a lot of .lit books from my PocketPC days. If/when I make the switch to an iPhone or other product, there is no readers that will read them.

    I’ve been looking at conversion programs to change my collection to either pdf or epub files. Maybe that would work better for you as well :)

    Steve

  • http://www.geardiary.com Douglas Moran

    Deni: Sorry about that; I thought I had gotten that one correct. D’oh!

    Yaz: B&N and Fictionwise use the same format, i.e. PDB. The problem is twofold: a) getting the Fictionwise books into the B&N library, and b) Getting the B&N reader to recognize them. Fixed a; couldn’t figure out b.

    Or to look at it another way: if you copy all your Fictionwise books to the B&N library on your PC, you can tell the B&N PC reader to open them. There’s no equivalent functionality (that I can find) on the iPhone version of the reader. Hence my frustration. Good thought, though!

  • http://www.geardiary.com Douglas Moran

    Well, I guess it depends on what you mean by “work better,” Yaz. I really like the B&N reader because I can highlight words and terms, and then google them or look them up on wikipedia. If they were PDFs, I don’t think you could do that. (I also think PDF is an abominable format, but that’s a whole different discussion!)