Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not write android external SD card while downloading books from the cloud storage #5784

Closed
kingo132 opened this issue Jan 23, 2020 · 5 comments
Labels
Android can't fix an issue that, by definition, cannot be fixed

Comments

@kingo132
Copy link

kingo132 commented Jan 23, 2020

  • KOReader version: V2019.12
  • Device: Hisense A5

Issue

Can not write android external SD card while downloading books from the cloud storage

Steps to reproduce

  1. Try to download a book from cloud storage
  2. Select any external sd card as the destination
  3. It will fail with the message: Could not save to /storage/xxx/xxx.epub
  4. If you choose the internal sd card as the destination, then all is ok without problem
@pazos
Copy link
Member

pazos commented Jan 23, 2020

Like #4872. Same unfixable underlying issue: there's no filesystem write permission outside the primary storage. It is mentioned at the bottom of https://www.mobileread.com/forums/showpost.php?p=3935915&postcount=1

Note that primary storage can be a sdcard if the user selected that as the main storage on android settings.

A workaround would be disable operations that require write permissions if the path is outside the sandbox. We already have android.isPathInsideSandbox(path) and a generic wrapper isValidPath(path) that can be used in these cases. It is actually used in android to disable import on dirs outside the sandbox

@pazos pazos added Android can't fix an issue that, by definition, cannot be fixed labels Jan 23, 2020
@pazos pazos closed this as completed Feb 3, 2020
@pazos pazos reopened this Sep 7, 2020
@clach04
Copy link
Contributor

clach04 commented Sep 7, 2020

@kingo132 are you still seeing a message when this fails? Or does koreader exit without an error message?

@pazos
Copy link
Member

pazos commented Sep 7, 2020

@clach04: I'm afraid this is device/vendor dependant. The only reason for a crash here is an unhandled exception that crashes the entire java machine. Please get us a log to see what happens.

@clach04
Copy link
Contributor

clach04 commented Sep 7, 2020

Thanks @pazos I got access to a machine where I could issue ADB :)

I attached an extract to #6636 (I can attach more if needed).

@pazos
Copy link
Member

pazos commented Sep 9, 2020

Thank you @clach04, the crash should be fixed with #6640. The underlying issue cannot be fixed. I'm closing this one.

Feel free to open other issues if you find other crashes related to RO filesystems (with logs, please :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android can't fix an issue that, by definition, cannot be fixed
Projects
None yet
Development

No branches or pull requests

3 participants