1

I'm trying to remove a permission that I don't need that is blocking my submission to the App Store: REQUEST_INSTALL_PACKAGES

I use Expo 46 and I put

"android": {
      "blockedPermissions": ["android.permission.REQUEST_INSTALL_PACKAGES"],

in my app.json file.

When I run an expo prebuild I'm able to see the permission removed in the generated AndroidManifest. However, when I run an eas build (locally or not) if I decompile with bundletool the aab generated, the AndroidManifest does not show this line removing the permission.

What could be wrong?

Simon
  • 6,025
  • 7
  • 46
  • 98

2 Answers2

0

Instead, you can simply add "expo": { "android": { "package": "com.my.app", "permissions": ["REQUEST_INSTALL_PACKAGES"] } } to your app.json file to remove the REQUEST_INSTALL_PACKAGES permission from your app.

Shivanshu Verma
  • 609
  • 5
  • 19
0

It looks like there is an issue with how Expo is handling the blockedPermissions configuration in your app.json file. It appears that Expo is not applying this configuration when building the app with the eas build command.

Solution One

One possible solution is to use the expo build:android command instead of the eas build command. This command will build your app using Expo's build service, which may handle the blockedPermissions configuration correctly. You can then use the generated .aab file to submit your app to the App Store.

Solution Two

Another solution is to manually remove the REQUEST_INSTALL_PACKAGES permission from the AndroidManifest.xml file before building the app. You can do this by editing the file and removing the following line:

<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

Once you have removed this line, you can run the eas build command to build your app, and the generated .aab file should not include the REQUEST_INSTALL_PACKAGES permission.

TriThomas
  • 383
  • 2
  • 16
  • If I prebuild the app with expo-prebuild I get an error (https://stackoverflow.com/questions/74560557/expo-eas-android-build-fails-if-i-run-a-prebuild-before) thus cannot use this solution. expo build:android would work but "expo build:android will be discontinued on January 4, 2023" – Simon Dec 04 '22 at 17:55
  • I'm going to attempt to answer that question, and then hopefully you can use this solution. – TriThomas Dec 04 '22 at 18:28