1

I have seen apps requiring permission for

  • Photos/Media/Files

    • read the contents of your USB storage
    • access USB storage filesystem
    • modify or delete the contents of your USB storage
  • Storage

    • read the contents of your USB storage
    • modify or delete the contents of your USB storage

This "grouping" somewhat puzzles me. Questions:

  1. Is the grouping meaningful for practical purposes?
  2. Where is the specification of the container-group given? (I am not a developer, but a pointer might help as a "prospective trainee").
  3. Why does this grouping seem to not match this (under Permission Groups).

Other specific Questions:

  1. What is the difference, e.g., between:

    1. Photos/Media/Files -> read the contents of your USB storage

    2. Storage -> read the contents of your USB storage ?

  2. What is the difference between:

    1. Photos/Media/Files -> read the contents of your USB storage +
      Photos/Media/Files -> modify or delete the contents of your USB storage

    2. Photos/Media/Files -> access USB storage filesystem ?

  • What Android version are you talking about? Since Android 11/12 access permissions for shared storage have been replaced by more fine granular permissions. https://developer.android.com/about/versions/11/privacy/storage – Robert Nov 12 '21 at 09:46
  • @Robert - I have Android 11. does it help in providing a specific answer to the question? – sancho.s ReinstateMonicaCellio Nov 12 '21 at 09:54
  • @Robert while you're absolutely correct, what Sancho describes is how it's presented to the user on the corresponding websites. // Sancho: that "rabbit hole", yeah… I have no idea why it's displayed twice, but your list of 5 is basically just 3 permissions: READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE – and MOUNT_UNMOUNT_FILESYSTEMS (access USB storage filesystem). – Izzy Nov 12 '21 at 19:08
  • @Izzy to me the phrases sound like SAF access (URI permission) vs filesystem access (android.permission.READ/WRITE_EXTERNAL_STORAGE). A screenshot of both UIs will make it more clear. – Irfan Latif Nov 12 '21 at 19:13
  • @IrfanLatif that would make sense for the grouping; so I need to put back the request I've edited out of my previous comment: I'd need the APK of such an app to verify. Both descriptions are identical to the letter, which is a quite bad practice (wouldn't be the first of this kind) if they shall mean different things. Why would it say "USB storage" when it means SAF? Doesn't match up. For SAF, as far as I know you don't need to request a permission (please correct me if I'm wrong). – Izzy Nov 12 '21 at 19:17
  • 2
    @Izzy for SAF the user is asked to grant the permission (a dialog is shown), but it's not a manifest permission. The developer can persist the granted URI permission or may ask the user again next time it needs to access the storage. There are some restrictions though, pretty well explained in the documentation: https://developer.android.com/training/data-storage/shared/documents-files#grant-access-directory. A USB storage device can be fully accessed using SAF though, which seems to be OP's case. But it's not clear. – Irfan Latif Nov 12 '21 at 19:26
  • @Izzy - I just entered your rabbit hole. Let me try rephrasing your comment about Question #4... "The difference is NONE, they are the same permission". Is that correct? Plus, READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE are useless without MOUNT_UNMOUNT_FILESYSTEMS, is that correct? – sancho.s ReinstateMonicaCellio Nov 13 '21 at 11:56
  • Yes to the two duplicates, no to the other question: MOUNT_UNMOUNT_FILESYSTEMS is not required to access already mounted file systems – and the "average app" should not need this permission. Since around Android 5 it's recommended anyway to use SAF (Storage Access Framework) anyway, where no Manifest-Permission is needed for but the user can decide more granular which directories an app can access. A known disadvantage of that is that it's much slower, which the user only would notice when accessing many files at once ("batch operations"). – Izzy Nov 13 '21 at 15:48

0 Answers0