Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity adds "read external storage" even though it's not in the manifest

Discussion in 'Android' started by swifter14, Feb 6, 2020.

  1. swifter14

    swifter14

    Joined:
    Mar 2, 2017
    Posts:
    165
    When I upload my app to the google store, I can see that additional permissions were added to the app :

    *Photos/Media/Files- -read the contents of your USB storage -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
    1. android.permission.WRITE_EXTERNAL_STORAGE
    2. android.permission.READ_EXTERNAL_STORAGE
    I do need to save texture images on the phone gallery so I agree with the "write permission"
    But I don't need to READ. I don't see that I ask for READ_EXTERNAL_STORAGE in any manifest so where does this request comes from?
    I even added-
    <uses-permission tools:node="remove" android:name="android.permission.READ_EXTERNAL_STORAGE" />
    (a command to remove this permission if added) and in the final manifest I don't see READ_EXTERNAL_STORAGE but it still shows in the store. When my users play the game it asks them if they agree to allow my app to get access to their albums :\
     
    Last edited: Feb 7, 2020
  2. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    Unity does not add this permission. As you have said yourself the permission is not added in the final manifest for you. This is done by Android OS. See https://developer.android.com/reference/android/Manifest.permission#READ_EXTERNAL_STORAGE which states "Any app that declares the WRITE_EXTERNAL_STORAGE permission is implicitly granted this permission."
     
  3. neufoctobre

    neufoctobre

    Joined:
    Jun 20, 2015
    Posts:
    94
    I have the same issue.
    Although the android docs mentionned "Any app that declares the WRITE_EXTERNAL_STORAGE permission is implicitly granted this permission.", I recently updated 2 apps with exactly the same libraries.

    According dashboard console the result is :
    First app :
    . android.permission.WRITE_EXTERNAL_STORAGE only
    Second app :
    . android.permission.WRITE_EXTERNAL_STORAGE
    . android.permission.READ_EXTERNAL_STORAGE.