How to remove permissions from Expo managed workflow?

Viewed 1355

Today i built my app for Android and after that i upload it to google play. Everything worked great since i got so many permissions that i dont really need. Image

They are 13

android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION, android.permission.ACCESS_NETWORK_STATE, android.permission.INTERNET, android.permission.MODIFY_AUDIO_SETTINGS, android.permission.READ_EXTERNAL_STORAGE, android.permission.READ_PHONE_STATE, android.permission.SYSTEM_ALERT_WINDOW, android.permission.VIBRATE, android.permission.WAKE_LOCK, android.permission.WRITE_EXTERNAL_STORAGE, com.google.android.c2dm.permission.RECEIVE, com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE

I need only for write and read storage for async storage lib So i read some information about how to remove it. And i tried follwoing steps First i add in app.js following line

"android": {

      "permissions": [

        "WRITE_EXTERNAL_STORAGE",

        "READ_EXTERNAL_STORAGE",

        "READ_INTERNAL_STORAGE"

      ],

Not worked then delete expo-location from package-lock.json and node_modules folder and ran npm install - again not worked. I used eas build with SDK version 41.0.0 and npm version 7.15.1

Thanks for your time !

2 Answers

Strangely but I found the solution. Just ran

npm uninstall react-native-maps

.Maybe this lib cause that problem

Official documentation says:

To use ONLY the following minimum necessary permissions and none of the extras supported by Expo in a default managed app, set permissions to []. The minimum necessary permissions do not require a Privacy Policy when uploading to Google Play Store and are: • receive data from Internet • view network connections • full network access • change your audio settings • prevent device from sleeping To use ALL permissions supported by Expo by default, do not specify the permissions key. To use the minimum necessary permissions ALONG with certain additional permissions, specify those extras in permissions, e.g. [ "CAMERA", "ACCESS_FINE_LOCATION" ].

Thats why you have extra permissions, you can read about it here

Related