Bookari Manual Sync

For posts like this, I will normally try to do the TL;DR step-by-step at the top and then provide some background – but in this case, you would be ill-advised to just dive-in without exploring the official option first.

To start, Mantano is a small French company which makes eReader software – Mantano Reader Bookari – for the iOS and Android platforms. They also offer a subscription cloud service (now free for 2 devices and within the constraints of an 80MB usage quota), which allows users to sync books, reading progress, and annotations across devices – and which also allows users to read their books and access their annotations via any supported web browser.  In short, the Mantano cloud service works very much like Amazon’s Whispersync.  I’ve played with the Mantano cloud service – and in my experience, it works well on Android (I can’t speak to the iOS user experience, though recent reviews on iTunes seem to be generally positive).

So, uh, if the official cloud service is free and works so well, why would you want to manually sync your stuff?  Well, for lots of reasons, actually.

  • First, anytime you see “in the cloud”, you should mentally replace it with, “on somebody else’s computer”.  Ponder that for a moment:  You have to trust a 3rd-party to pay their electricity bill, to pay their ISP bill, to backup your stuff, to protect your stuff from hackers, to not look at your stuff, and to not distribute your stuff.  In this particular case, because your files actually wind up on an Amazon server, you would be wise to assume that Mantano employees, Amazon employees, the US government, the French government, and a large number their contract staff all have access to anything you upload to the service.  That’s a lot of people to trust with your stuff, especially if you’re reading books covering topics which will land you on a watch list somewhere…
    .
  • What happens to your stuff on the server if the company goes out of business?  Cloud service providers have gone out of business before, and I guarantee it will happen again.
    .
  • Although the transfer mechanism to Mantano’s cloud service is encrypted, the storage where uploaded content lives presumably isn’t.  Unless you encrypt your content before you upload it, anybody with access to your files will be able to read them.  The Mantano Reader doesn’t give you encryption controls – so unless you’ve rooted your device and you’re an Android wizard, encrypting your stuff before uploading isn’t an option except for DRM-encumbered books (which are already encrypted).  Your annotations and DRM-free books land “in the cloud” as unencrypted content; any of the parties listed in the first point above can – and probably will – access your stuff at any time.

OK, so especially since it’s apparently remarkably easy to be mistaken for a terrorist, that all sounds pretty bad – and obviously, you should never post DRM-stripped material to the service and you should be very careful about what you actually write in your annotations.  In fact, why would anybody ever use the Mantano cloud service??  Well, because – if you think you can trust the service’s operators – they’ve solved several technical challenges which can be hard to work-around as an end-user.

  • Mantano uses an SQLite database to store your text notes, highlights, and reading progress, and to keep track of handwritten notes.  The database file is open while Mantano Reader is running, and as such, synchronizing this data is complicated by file locking and time-stamping.  To get around these issues, the Mantano service appears to communicate a transaction log to their servers in near real-time – no mean feat on a pocket-sized device!
    .
  • Mantano’s service intelligently navigates and synchronizes directory structures which vary according to device, Android version, and presence of external storage.  This is particularly problematic in regards to tracking book file locations across devices (e.g., on my phone, A Dance with Dragons is located in /storage/sdcard0/Books and on my tablet, it’s in /storage/emulated/0/Books).
    .
  • As with many other similar vendors, Mantano does not offer reader software for Windows, Linux, or Mac OS.  However, as stated previously, they provide a web-based reader which allows access to not only your uploaded books but also to your annotations.

In taking the manual approach, some of these challenges can’t be overcome without going to extraordinary lengths (like coding your own web server middleware).  It’s important to note that if you sync the stuff yourself, unless you’re a competent programmer, you’ll get no web access to your books.

Still interested in going down this path?  Aight, here’s what you need to make it work:

  • A working sync server, preferably one that you own and control.  I personally use OwnCloud, which is Open Source and completely free if you host it yourself (which I do).
    .
  • A working sync client on your device(s).  Personally, I use FolderSync for Android.
    .
  • Two or more devices with matching directory structures.  I happen to have 3: A Galaxy Note 5, a Shield K1, and a Galaxy Note Pro 12.2.  All three happen to be running Android 5.x (Lollipop).  This is probably the single most important point in this list, where matching directory structures means matching path names, matching directory contents, and matching letter case in all directory and file names.  Yes, case matters.  If you have non-matching directory structures, you may stop reading now, because this manual sync won’t work.  Bear in mind as well that this matching can become problematic depending where you store your content and how you open it.
    .
  • Some kind of process control for your devices.  I personally use Advanced Task Killer Pro.  These kinds of tools should generally not be used on modern Android devices, and to be clear, the only reason I’m listing this here is for specific control of the Mantano Reader process, and only on my Note devices.  Depending on your device and OS, you may not need this at all; on my Shield, when I exit the Mantano app, it truly exits – but on my Note devices, it doesn’t.  YMMV

So finally, here’s the How-To:

  1. Stage your books on your devices down the same paths; e.g.,  /storage/emulated/0/Books
    .
  2. Configure your book sync on your devices and verify that the directory structures all align across the board: on your server and your devices.  Additionally, be mindful that you’re likely to at least occasionally open content from other than your stage directory (e.g., your download directory).  Make sure those alternate paths also match on all devices and that your folder sync gets those alternate paths as well.
    .
  3. Install Mantano on one (1) device.
    .
  4. Import, organize your books, and customize all of your settings in Mantano on that one device.
    .
  5. Quit Mantano and use your task killer to make sure Mantano is truly no longer running (if it’s still running, kill it).  This is important for ensuring that the Mantano database is closed.
    .
  6. Configure a one-way sync from this device to your server for the appropriate Mantano directory; reference https://mantano.desk.com/customer/portal/articles/973502-in-which-folder-are-stored-the-files-and-data-
    .
    On my devices, Mantano keeps its files at /storage/emulated/0/Mantano
    .
  7. Configure a one-way sync from this device to your server for any and all of your epub/pdf directories (I would strongly suggest you include your downloads directory, which is probably something similar to /storage/emulated/0/Download .)
    .
  8. Execute the syncs and validate them at the server.
    .
  9. Install Mantano on the other device(s) but do not launch the application.
    .
  10. Validate on your secondary device(s) that the Mantano directory was successfully created and that it matches the structure on your primary device.  If it doesn’t, you’re sunk unless you’re rooted (in which case, you don’t this guide anyway).  On the other hand, if the directory structure matches the one used by Mantano on your first device, you’re good to go.
    .
  11. As above, make sure Mantano is not running.
    .
  12. Configure one-way syncs from the server to this device, execute the syncs, and validate that structures match those on the first device and on the server.  Troubleshoot as necessary and then either give up or continue with Step 13 below.
    .
  13. Repeat the above for any additional devices.
    .
  14. Now go back and change your syncs on all devices to be 2-way and be sure to enable deletes.
    .
    If you have the ability to prefer local or remote files in the event of a sync conflict, I would suggest that on one of the devices – a somewhat arbitrarily designated master (it should be your primary reading device) – you prefer the local file and that on the other devices you prefer the remote (server) file.

And that should do it; your sync should be in place and working.

A couple tips:

  • As indicated above, one of your devices should be treated as the master – and that master should probably be your primary reading device.
    .
  • Never have Mantano open (or running in the background) on two devices at the same time.  Doing so will almost certainly jack things up on some or all of your devices, possibly resulting in the loss of all metadata (reading progress, bookmarks, and annotations).
    .
  • As stated above, Mantano is using SQLite as the backend database for all metadata – and that database is user-accessible (on your devices, it’s in the directory you found in Step 6 above).  With basic SQL, even a novice can extract that metadata; for more info and tools, see the SQLite home page.

Happy sync’ing!

Loading Facebook Comments ...