Cruz T301 w/ Aldiko - /mnt/flash/eBooks vs. /mnt/sdcard/eBooks - library.db hack

level6

Member
Nov 28, 2011
1
0
We just went out and bought 7 of these Cruz T301 tablets to pre-load them w/ e-docs on 32GB cards and give them for Christmas. I did a little research before snagging them on Black Friday, and saw that the company had actually listened to a lot of the user issues and resolved many of them. I was impressed by that and the low price point, of course.

These came with Android 2.2.2 . I was able to download and install the Aldiko reader, then ran my entire library through Calibre to get everything in ePUB format and in one flat directory. I then copied that directory to the SD Card's eBook/imports directory (had to create that) and tried to import. Aldiko found nothing. So, I fumbled around and found that Aldiko is actually placing all eBooks into the FLASH:/eBooks/ directory, instead of the SDCARD:/eBooks/ directory!?

I guess Aldiko is getting confused about what the sdcard mount point is. I'm not sure why, but they've split the internal memory into two chunks on these new versions of their tablets. There is now an internal "SD card" area which is very small (~2GB) alongside the internal memory (~2GB). A better explanation can be found, here: How does storage work on the T301 .

Anyway, I could find no setting in Aldiko which allows custom paths, so I poked around some more and found that Aldiko just uses a SQLite database file called library.db located in the /mnt/flash/Aldiko directory. This database describes the entire library, including paths to files. I was able to copy that library.db file out to my PC, load up an SQLite ODBC driver on the PC, create a User DSN pointing to that library.db (no user/password required) and run a few queries to fix the paths. The procedure is like this:

1) Mount the Cruz memory cards
2) Navigate into the /Aldiko directory on the internal flash card (likely the first drive that mounted)
3) Copy library.db over to your local drive, somewhere
4) Go download the SQLlite ODBC driver http://www.zsplat.pwp.blueyonder.co.uk/programming/sqlite-3.5.7-odbc-0.65.zip
5) Install the SQLite ODBC driver on your PC
6) Bring up your control panel, search for ODBC or find it under admin tools or whatever (depends on OS)
7) Create a new User DSN called "Aldiko Library" using the SQLite driver and the library.db file. Don't use a username or password.
8) Go get a SQL tool. SQLite makes a client shell or this one doesn't look bad: https://sites.google.com/site/sqlitetool/ . I use SQLRunner from last decade and haven't been able to find a link to give you for that. It doesn't matter what tool you use, just so it lets you run SQL queries.
9) Connect to your "Aldiko Library" database
10) Issue the following:

Code:
UPDATE books SET _data = replace(_data,'mnt/flash/eBooks','mnt/sdcard/eBooks');
UPDATE books SET _cover = replace(_cover,'mnt/flash/eBooks','mnt/sdcard/eBooks');
UPDATE books SET _thumb_cover = replace(_thumb_cover,'mnt/flash/eBooks','mnt/sdcard/eBooks');

11) Disconnect from the "Aldiko Library" database
12) Copy your changed library.db back into the FLASH:/Aldiko/ folder on the internal memory.
13) Move all of your FLASH:/eBooks/ book folders to the SDCARD:/eBooks/ folder.

Unfortunately, I still have to use FLASH:/eBooks/import to import new eBooks. And, they get placed into the FLASH:/eBooks/ directory. But, at least I can now move them all over to SDCARD:/eBooks/ once I've imported a bunch and re-edit this library.db database, freeing up precious FLASH: space.

Now, I may have taken a long route to get somewhere and totally missed the shortcut. If anyone knows how to force Aldiko to use SDCARD:/eBooks/ instead of FLASH:/eBooks/ on the Cruz, let me know. Or, maybe I missed some handy-dandy menu option in Aldiko? I checked quite a bit. There wasn't anything obvious and their online docs are sparse. Anyway, feel free to let me know if there is an easier way, please. :)

How's THAT for a first post?

Raymond.
 
Top