Menu

#42 External storage path/behavior inconsistent since Marshmallow update

v1.0_(example)
pending
nobody
None
1
2017-12-08
2016-03-22
ds
No

Since my Sony Z5 Compact updated to Marshmallow (Android 6.0) I can't figure out how to consistently get the file path to the external SD card to work in Ghost Commander (using F-Droid build of version 1.53.4). If I use the Storage Access Framework Path it will allow me to copy things to the SD card but usually won't let me open them. If I use the newer path that shows up as /storage/4707-D740 (which is what other apps seem to use now) it will let me open things and copy them to elsewhere, but doesn't want to let me create or delete things.

Also, I can't figure out any way to navigate to external storage connected through the USB port (like a flashdrive) at all since the Marshmallow update. I can't even figure out where it is since I can't seem to navigate into /storage/emulated at all and nothing shows up in /mnt.

Is this something with the F-Droid build or an issue with Marshmallow's handling of external storage?

Thanks.

Related

Bugs: #42

Discussion

1 2 > >> (Page 1 of 2)
  • ds

    ds - 2016-03-22

    Just to clarify: I seem to have write-only access through SAF and read-only access through the /storage filepath since the Marshmallow update so I have to keep navigating back and forth between the two ways to see the external SD card.

    And the external storage (through the USB port) I can't find through Ghost Commander does open in the native file browser Marshmallow has, so the phone is definitely reading it.

    Thanks again.

     

    Last edit: ds 2016-03-23
  • ds

    ds - 2016-03-27

    I tried all sorts of files and apps (pdfs with document viewer, epubs with FBReader and document viewer, mp3s with VLC, apks with the package installer, jpgs with both Ghost Commander and Album) and got the same results with everything. I also get the same result with 1.53.5b2 from your link, and with 1.53.5b1 from F-Droid. I still can't write if I navigate to the SD card through /storage and if I try to read files through SAF I get "Application Error, An unexpected error has occurred: [filetype] not found or corrupted, but these same files open just fine if I navigate from Home->Local Storage->up a folder to storage->/4707-D740 or from Home->Media Storage->up two folders to storage (I don't know why I have to go up two folder levels to the same place from Media Storage and only one from Local Storage)->/4707-D740, but neither of those paths allows write access. I don't see any other options to get to the SD card from the Home menu. As far as I can tell the folder name for the external SD card in Marshmallow (/4707-D740 in my case) is different on different devices (someone else reported seeing /1600-1E1E on their device in a different discussion) but I don't know if its naming depends on the device model or the SD card itself.

    I can see media_rw in /mnt/ but it shows up as a 0 size file (not a folder) that asks what app to use to open it and doesn't actually open if I tell it Ghost Commander whether or not there is a USB drive attached. With the USB drive attached the native file browser will open the attached USB drive so the phone can definitely see it.

    If I had to guess, I'd think maybe Ghost Commander isn't requesting the permissions it needs from Marshamallow, since Android changed the way permissions are handled, but I really don't know. If I look up the app information for Ghost Commander it shows "Storage" under Permissions, but it never asks for access which most apps do in Marshmallow.

    Thanks.

     
  • ds

    ds - 2016-05-08

    This is still a problem in 1.53.5b3 (F-Droid build). I think it's caused by the Marshmallow permission set up described here and just needs to request the SD card permission correctly:
    http://stackoverflow.com/questions/33139754/android-6-0-marshmallow-cannot-write-to-sd-card
    which also has links to other descriptions.

    Thanks again.

     
  • zc2

    zc2 - 2016-05-09

    Thank you for the link, I will investigate that.
    I've just installed a marshmallow on my phone and tried to attach an external USB drive.
    Looks like, the only RW access is through the root or SAF (writing works in my case).
    The system prohibits 3d party apps to have the media_rw permissions, and even if the GC had one, the system gives the read only access:
    stat /mnt/media_rw
    File: `/mnt/media_rw'
    Access:(750/drwxr-x---)Uid: (0/ root) Gid: (1023/media_rw)

     
  • ds

    ds - 2016-05-10

    I upgraded to version 1.53.6b1 from F-Droid today, which has the same behavior, but I suspect you'd already finished with that version when I posted the last message since F-Droid tends to have a lag on their builds. I also wanted to mention that I tried Amaze file manager (https://github.com/arpitkh96/AmazeFileManager) which seems to handle the SD card fine in Marshmallow without apparently using SAF, although it also can't locate any exteral storage attached through the USB port, so I don't know if looking at that source code would help any.

    Thanks again for your work.

     
  • zc2

    zc2 - 2016-05-23

    Tried to recompile the project with Marshmallow SDK and use the code from that stackoverflow article. Strange thing, but that checkPermission() always returns 0 (permission granted).
    That even happens when I executed requestPermission() and answered "DENY" in the dialog.

     
  • ds

    ds - 2016-06-02

    Version 1.53.6b2 (F-Droid build) is now allowing both read and write access through the SAF (but still read-only though browsing to it through /storage). Thank you.
    I still can't figure out any way to locate external storage, such as a USB drive, even though it shows up in the native browser.

     
  • zc2

    zc2 - 2016-06-05

    Can you work the USB drive through the SAF? My guess, it's impossible to see it other way if your device is not rooted. The system prevents that, letting access only to the native apps.

    I'm going to upload a new beta version v1.53.6b3 where I made some additional improvements in the SAF file handling.

     
  • ds

    ds - 2016-06-07

    Selecting SAF just takes me straight into the "external" SD card; I can't see any way to select anything else. I'm still on the F-Droid build of 1.53.6b2, but my phone just updated to Android 6.0.1.
    If it's not possible that's fine; I don't use USB memory sticks on my phone that much anyway. I appreciate you looking into it and fixing the SD card read/write problems.
    Thanks.

     
  • zc2

    zc2 - 2016-06-07

    Currently, the only way to choose another device through the SAF is tap nd hold on the SAF item in the home: menu, then choose "Forget". The app exists, that's OK.
    In the next version I will add the item, "choose" (suggest a better name ?) to that menu.
    I forgot to commit the recent sources, so F-droid wont build that new beta soon.

     
  • Pastafarianist

    Pastafarianist - 2016-06-08

    Ghost Commander v1.53.5 from Google Play user here. Do you think you will push an update to improve external storage handling to Google Play anytime soon?
    (unfortunately I cannot use the F-Droid build as I need the WebDAV plugin which is only available on Google Play)

     
  • Pastafarianist

    Pastafarianist - 2016-06-09

    Will it work with the WebDAV plugin from GPlay? Last time I tried installing the F-Droid build of Ghost Commander and the WebDAV plugin from GPlay it complained that the signatures were different and it could not proceed with installation.

     
  • zc2

    zc2 - 2016-06-09

    No, they can not be mixed together. Either everything from f-droid or everything from google play (or from here).

     
  • ds

    ds - 2016-06-23

    I'm a little surprised this is still listed as open, but since it is, I've found a new oddity. I can no longer install apk files from Ghost Commander 1.53.6 (F-Droid build) on my Sony Xperia Z5 Compact which is now on Marshmallow 6.0.1. I don't know if this has to do with the update of Ghost Commander to be Marshamallow compatible or Sony's update to 6.0.1, but it was working on 6.0 and the version of Ghost Commander I had at the time (not certain exactly when I last installed from an apk). The apk install does work from the native browser and the F-Droid client is not having any issues. My settings allow unknown sources.
    If I select an apk in Ghost Commander it runs a scan of the file. If I press and hold and choose "Open With" "Package installer" I get "Parse Error There was a problem parsing the package." This is true of all apks and they install through the native browser so there doesn't appear to be anything wrong with the files.
    Thanks again for your work on this.

     
  • zc2

    zc2 - 2016-06-24

    Do you have any other not F-droid plugins installed? If yes, their existence will not let you to install the app from F-Droid.
    May be the latest F-Droid version is corrupted, did you try that on any other device?

     
  • ds

    ds - 2016-06-24

    Maybe I didn't phrase my comment well. The problem isn't installing Ghost Commander from F-Droid, it's installing apks from Ghost Commander. I don't have any other device to try it on, which is part of why I'm not certain if the problem is Ghost Commander or Sony's Marshmallow update. Have you tried installing apks from your most recent build on a Marshmallow device, or do you not have one available? I could try a non-F-Droid build if you think that would help.

     
  • zc2

    zc2 - 2016-06-24

    Just installed an .apk on my Cyanogen 13 (Marshmallow) powered phone. But
    may be that's not a very good test, because my version never had problem with accesing the external storage either. I will try also on a Samsung G S6 later today.

     
  • zc2

    zc2 - 2016-06-26

    Still can not reproduce this error. Ghost commander does not install apk by itslef, it even does not request such a permission in its manifest. Instead it just sends an intent with an URI to the .apk to the system which should install it by its default action.
    Please try to install this application and record which URI is sent in the case you use the built-in file manager comaring to the one sent by the GC.

     

    Last edit: zc2 2016-06-26
  • ds

    ds - 2016-07-05

    I haven't had a chance to try the application you linked, but I did realize this problem is only when trying to install from the external SD card through the SAF. The installs work fine from internal memory or when I navigate to the external card through the file menu (which gives read-only access). Have you tried installing from an external SD card and the SAF?
    Thanks.

     
  • ^m'e

    ^m'e - 2017-03-19

    On LineageOS 14.1 (Sony Xperia-V / Tusbasa) with GC-1.53.10b2. No write access to external SD card (mounted as "portable storage"), only possible in root mode or via SAF. Ownership and permissions are like the following:

    -rwxrwx--x 1 root sdcard_rw 1301654 2017-02-05 20:21 DSC_0021.JPG

     
  • xTMODx

    xTMODx - 2017-05-04

    I have the same problem installing an APK file here a screenshot http://imgur.com/a/demJW after some google i found this https://issuetracker.google.com/issues/37034874 (Quote: "And elsewhere Google is advising developers to move away from file:// Uri values and to use things like FileProvider and the Storage Access Framework, both of which use content:// Uri values.

    Please allow PackageInstaller to support content:// Uri values, so that we can better secure our ability to install APK files. ")
    hope this can help somehow. I am using version 1.53.10b4 from F-Droid

     
  • zc2

    zc2 - 2017-06-05
    • status: open --> pending
     
1 2 > >> (Page 1 of 2)

Log in to post a comment.

MongoDB Logo MongoDB