kiwix / kiwix-xulrunner

[ARCHIVED] Legacy Kiwix desktop solution for Windows/macOS/Linux
https://download.kiwix.org/release/kiwix-xulrunner/
GNU General Public License v3.0
112 stars 28 forks source link

Duplicate External devices on Fairphone2 #389

Closed kelson42 closed 7 years ago

kelson42 commented 7 years ago

I have an exact duplicates "External" (in addition to the "Internal") in the content manager device list: Mount points of the external sd card are (given by "diskinfo" app):

I should get only one entry

mhutti1 commented 7 years ago

Could you tell me if there is a file called .storageLocationMarker in the root of the sd card?

kelson42 commented 7 years ago

@mhutti1 I can not see such a file.

mhutti1 commented 7 years ago

@kelson42 thats likely why there are duplicates then. Is the root directory of the SD card writable? (also the dot might cause it to be hidden in some file browsers)

kelson42 commented 7 years ago

@mhutti1 I have other hidden files I can see. I have a similar bug on Bitbar with the "Samsung Galaxy J5 SM-J500FN" (maybe that helps)

kelson42 commented 7 years ago

@mhutti1 Seems to be a pretty common problem, same behaviour on a "Samsung Galaxy Note 3 SC-01F"

mhutti1 commented 7 years ago

@kelson42 Have done some debugging and research. The news is not good. This issue also means users can't download the sd card if it has this issue (the problem @julianharty mentioned). Root cause is https://metactrl.com/docs/sdcard-on-lollipop/. This is only a problem in lollipop... (Google changed how the sd card is accessed in 4.x 5.x and 6.x) 4.x and 6.x work fine but 5.x requires a completely different (and confusing for users) way of getting the appropriate permission... Hopefully won't be too difficult to implement but its just infuriating that we need 3 different ways of asking to write to the SD card...

kelson42 commented 7 years ago

@mhutti1 OK, at least we understand now the problem :) Feel sorry that we have to go ahead with this boring work... but sounds kind of mandatory! If this can help you : in 2-3 years you might get a change to remove that code ;)

mhutti1 commented 7 years ago

@kelson42 So many hours of research and banging head against wall later it turns out getting full write access to SD card in lollipop can only be done with URIs. This isn't what we want. Fortunately however one of the 2 "external" sd locations is writable and can be accessed normally. So the issue is that android is telling us that a directory is writable but then not letting us write to it... I will have to implement an ugly exception catcher as a "real" way to find out if writable.

mhutti1 commented 7 years ago

@kelson42 this appears to be fixed on the j5 now.

kelson42 commented 7 years ago

@mhutti1 OK, will test on the other devices

kelson42 commented 7 years ago

Fixed :)