EAS build adds permissions that are not required by my app

When I build my app with EAS, it adds “android.permission.RECORD_AUDIO” as a required permission, but when I build exactly the same app, with the same code and configuration, with “expo build”, it doesn’t add it.

The problem I have now is, if I submit the app built with EAS, the Play Store is refusing it.

Have you experienced something similar? What have you done to fix it, without ejecting the app?

build process for eas build and expo build are completely different and the results are different too. the RECORD_AUDIO permission is added in config plugins like expo-av (config plugins are not run on expo build, which is a simplified and limited build system).

you can see in the above source code that you can set the config plugin options in your app.json to not request microphone permissions. we’re working on updating all api docs to include config plugin reference sections. here’s an example of what these docs look like.

i suspect the play store is rejecting the app because it needs a privacy policy. you can add a privacy policy to get around that, or remove the permission with the config plugin

Unfortunately it looks like this is not currently possible with expo-image-picker:

I don’t know if I understood the code correctly, but it seems that the “expo-camera” plugin is adding the permission automatically. I tried to include config parameters to prevent it from adding it, but it seems it can’t be done.

Any idea on how we could remove it?

I think you should be able to workaround this with patch-package until the expo-camera config plugin is modified to allow you to specify whether or not you want to add the RECORD_AUDIO permission.

See here for an example:

It seems to me like a good idea to create an issue to get the config plugin improved too.

1 Like