Users that have the APK with version code xx may need to accept the android.permission.WRITE_EXTERNAL_STORAGE permission, which may result in them not upgrading to this version of the app.

I have migrated to the new EAS build system.

When publishing a package on the Google Play store, I get this warning:

Users that have the APK with version code xx may need to accept the android.permission.WRITE_EXTERNAL_STORAGE permission, which may result in them not upgrading to this version of the app.

I added WRITE_EXTERNAL_STORAGE in an array to expo.android.blockedPermissions but it still happens.

are you using sdk 45? blockedPermissions is only supported in sdk 45+

can you share your app config?

Thank you:

{
  "expo": {
    "name": "101 Soundboards",
    "slug": "sb-soundboards-all",
    "privacy": "public",
    "platforms": [
      "ios",
      "android",
      "web"
    ],
    "version": "102.0.0",
    "orientation": "default",
    "icon": "./assets/icon-android-512.png",
    "splash": {
      "image": "./assets/splash-dark-mode.png",
      "resizeMode": "contain",
      "backgroundColor": "#212529"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "sb.soundboards.all",
      "buildNumber": "102.0.0",
      "backgroundColor": "#212529",
      "icon": "./assets/icon-ios-1024.png",
      "isTabletOnly": false
    },
    "android": {
      "package": "sb.soundboards.all",
      "versionCode": 102,
      "permissions": [],
      "blockedPermissions": [
        "WRITE_EXTERNAL_STORAGE"
      ],
      "config": {},
      "intentFilters": [
        {
          "action": "VIEW",
          "data": [
            {
              "scheme": "https",
              "host": "*.101soundboards.com",
              "pathPrefix": "/boards/"
            }
          ],
          "category": [
            "BROWSABLE",
            "DEFAULT"
          ]
        }
      ]
    },
    "androidNavigationBar": {
      "backgroundColor": "#212529"
    },
    "scheme": "sb101",
    "hooks": {
      "postPublish": [
        {
          "file": "sentry-expo/upload-sourcemaps",
          "config": {
            "organization": "mediadroid",
            "project": "soundbites-app",
            "authToken": "xxx"
          }
        }
      ]
    }
  }
}

make the following change:

      "blockedPermissions": [
        "android.permission.WRITE_EXTERNAL_STORAGE"
      ],

Thanks @notbrent

I made the change and re-built, but I get the same warning in Google Play developer console.

hi there! i’m not quite sure what’s happening there, perhaps it is a stale warning in the google play console?

if you set the buildType to apk on your build profile, you can inspect the permissions yourself. here’s an example, where i inspect the apk without the blockedPermissions config:

╰─$ aapt2 d permissions app-debug.apk
package: com.brents.netcheese
uses-permission: name='android.permission.SYSTEM_ALERT_WINDOW'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-permission: name='android.permission.VIBRATE'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE'

now i added it and rebuilt:

╰─$ aapt2 d permissions app-debug.apk
package: com.brents.netcheese
uses-permission: name='android.permission.SYSTEM_ALERT_WINDOW'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-permission: name='android.permission.VIBRATE'
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE'
1 Like

I went ahead and changed from AAB bundle to APK, with a new version code and release in the Google Play console, and the same is happening:

‘Users that have the APK with version code 99 may need to accept the android.permission.WRITE_EXTERNAL_STORAGE permission, which may result in them not upgrading to this version of the app.’

sorry my suggestion with the apk point was for you to manually inspect locally using aapt2 that your permissions are indeed what you expect. you should definitely use an app bundle on the play store

Hi @netcheese

You didn’t answer this question:

But in addition to checking the above, it would be best to check the permissions in the actual APK using aapt2 as Brent suggests.

Yes, SDK 45. Will have to get authorization to get Android Studio.

package: sb.soundboards.all
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-permission: name='android.permission.RECEIVE_BOOT_COMPLETED'
uses-permission: name='android.permission.SYSTEM_ALERT_WINDOW'
uses-permission: name='android.permission.VIBRATE'
uses-permission: name='android.permission.WAKE_LOCK'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE'
uses-permission: name='android.permission.FOREGROUND_SERVICE'

i looked at your most recent android build and you don’t have the blockedPermissions array set correctly. it is set to:

    "blockedPermissions": [
      ".WRITE_EXTERNAL_STORAGE"
    ],

it should be

    "blockedPermissions": [
      "android.permission.WRITE_EXTERNAL_STORAGE"
    ],

Yes, testing various different ones as

  "blockedPermissions": [
      "android.permission.WRITE_EXTERNAL_STORAGE"
    ],

Didn’t work

hey there! I see what the problem is now - it looks like the default expo-cli version on EAS Build needs to be updated. we’ll take care of that on monday. for now, you can add "expoCli": "5.4.4" to your build profile to ensure you’re using the latest release, and that will resolve your issue.

sorry for the hassle, that was our mistake

Thank you, glad you tracked the issue down, happy to test next week.

have a great weekend!

1 Like

Hi,
I rebuilt the APK and the problem still persists.

link to build page?

i downloaded the apk, ran aap2 on it to dump permission and confirmed that it does not include WRITE_EXTERNAL_STORAGE… so this could be an issue with play store, or you’re not submitting the correct build possibly. you should switch back to building an aab for submitting to the store, rather than apk.

╰─$ aapt2 d permissions app.apk
package: sb.soundboards.all
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-permission: name='android.permission.RECEIVE_BOOT_COMPLETED'
uses-permission: name='android.permission.SYSTEM_ALERT_WINDOW'
uses-permission: name='android.permission.VIBRATE'
uses-permission: name='android.permission.WAKE_LOCK'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE'
uses-permission: name='android.permission.FOREGROUND_SERVICE'