Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre Companion

Notices

Reply
 
Thread Tools Search this Thread
Old 11-07-2016, 07:33 AM   #1
nikoski
Zealot
nikoski began at the beginning.
 
Posts: 105
Karma: 10
Join Date: Feb 2014
Device: none
MM / CM13: on sync "library is read only" always after CM update

galaxy note 8, cynogenmod 13 / android 6.0.1

CC books stored on external microSD in folder: /storage/0101-0014/myfiles/books/cc

Everything working ok, but the following issue occurs:

Each time after a nightly update of CM13, on sync CC pops up the error: library is read only

In CC/settings/formats&locations i still see the the path from above, but i cannot open any book in CC, getting the error: book file missing.

The path from above is not visible in different android file explorers any more, the folder .../books/cc" and all book files inside it is smply gone

in CC/settings/locations i can now set a new path and all my book files will be moved to it and everything will be OK again.

But i do not understand: where are the book files before moving them?

Last edited by nikoski; 11-07-2016 at 07:37 AM.
nikoski is offline   Reply With Quote
Old 11-07-2016, 11:06 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I can't say with any certainty what is happening, but I can make a guess.

CC uses the Android Storage Access Framework (SAF) to get access to the SD card, and in some cases to main memory. The SAF provides a special URL to CC to get access to folders. This URL encapsulates the SAF security. It also masks the "real" path to the folder, something that CC needs to hand books to reader apps. CC recomputes this real path by asking Android for real paths to some special files on both main memory and the SD card, then searches for the folder containing the books. It records the resulting folder path in "Formats and folders".

My guess is that the update does two things:
  • It changes the path to the special folders, invalidating the path stored in Formats and folders.
  • It removes write privilege from the special URL.
The effect would be what you see. The books appear to be missing and CC can't write the folders, but CC would be able to read the books to be able to move them. However, CC probably would complain that it can't delete the books, unless you are moving them to the same place in which case CC would be happy to simply use them as is.

You could test this hypothesis somewhat with a file manager by going to the SD card using whatever path the SD card wants, then navigating to where you think the books should be. My guess is that they will be there. I also suspect that when you "create" the new folder the path changes subtly. For example, the 0101-0014/ would change.

I don't see anything that CC can do. It certainly cannot recover from Android changing the path.
chaley is offline   Reply With Quote
Advert
Old 11-07-2016, 11:41 AM   #3
nikoski
Zealot
nikoski began at the beginning.
 
Posts: 105
Karma: 10
Join Date: Feb 2014
Device: none
Thanks a lot for your help.

This time it neither worked to set another folder and "move" the book to it nor set the same folder again. In both cases i got the error: book files could not be moved.

So after connecting i deleted them all under "calibre/device" and synced all again. I have only about 30 book son my device so that's not a big issue.

But what is pretty weird: why do the last 2 folders ".../books/CC/" of the path above simply disappear after the CM-update so that they are not visible any more in file managers?
nikoski is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Touch How transfer "Books Read" and "Hours Read" data Abrakadabra77 Kobo Reader 5 02-16-2015 03:30 AM
"read sync" column? Jellby Calibre 4 03-07-2014 02:47 PM
Kindle to Calibre "Last Page Read" sync manapause Devices 25 01-31-2013 01:44 PM
No "last page read" sync for K2 lmittell Amazon Kindle 4 09-05-2012 12:14 AM
How to remove "Fully read" books from "Last Open" list? pjeanetta PocketBook 4 12-08-2010 10:30 AM


All times are GMT -4. The time now is 06:01 AM.


MobileRead.com is a privately owned, operated and funded community.