Skip to main content

I'm receiving an issue with a previous release on Google Play

android.permission.REQUEST_INSTALL_PACKAGES

I'm seeing the following message in Google Play

Request install packages permission
error - Not started - Your app isn't compliant
A permission that allows your app to install packages. If your app doesn't need access to this permission, you must remove it from your app.

To check the offending release go to App bundle explorer, and view each of the active releases.

In my situation, I'm seeing three active releases.  Select the arrow of the corresponding release.  Now check the permissions 

Release Permissions
5.aab (1.0.4) android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION, android.permission.ACCESS_NETWORK_STATE, android.permission.CAMERA, android.permission.INTERNET, android.permission.MODIFY_AUDIO_SETTINGS, android.permission.READ_EXTERNAL_STORAGE, android.permission.RECORD_AUDIO, android.permission.WAKE_LOCK, android.permission.WRITE_EXTERNAL_STORAGE, com.google.android.c2dm.permission.RECEIVE
6.aab (2) android.permission.INTERNET, android.permission.READ_EXTERNAL_STORAGE, android.permission.WRITE_EXTERNAL_STORAGE
8.aab (1.05) android.permission.ACCESS_NETWORK_STATE, android.permission.INTERNET, android.permission.READ_EXTERNAL_STORAGE, android.permission.REQUEST_INSTALL_PACKAGES, android.permission.VIBRATE, android.permission.WRITE_EXTERNAL_STORAGE

As noted in the above table, the only reference to android.permission.REQUEST_INSTALL_PACKAGES, is release 8.aab (1.05).  This release was used for testing and not public application across the Google Play Store.

I need to change that Active status to Inactive so the error can be removed.  As this error is blocking any uploads and releases inside the Play Store.

 

Change to manifest

Location: ./android/app/src/main/AndroidManifest.xml

In the current Android release I needed to update the manifest file (AndroidManifest.xml) with the following

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.{package-name}.app">
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

        <activity
          android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
            android:name="com.{package-name}.app.MainActivity"
            android:label="@string/title_activity_main"
            android:theme="@style/AppTheme.NoActionBarLaunch"
            android:launchMode="singleTask"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths"></meta-data>
        </provider>
    </application>
    <!-- Permissions -->
    <uses-permission android:name="android.permission.INTERNET" />
</manifest>

Forcing to be android.permission.REQUEST_INSTALL_PACKAGES removed by adding the following lines

xmlns:tools="http://schemas.android.com/tools"

... and ...

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

Full copy of the AndroidManifest.xml with the changes applied

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.{package-name}.app"
    xmlns:tools="http://schemas.android.com/tools">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

        <activity
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
            android:name="com.safsappfrdc.app.MainActivity"
            android:label="@string/title_activity_main"
            android:theme="@style/AppTheme.NoActionBarLaunch"
            android:launchMode="singleTask"
            android:exported="true">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

        </activity>

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths"></meta-data>
        </provider>
    </application>

    <!-- Permissions -->

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission 
        android:name="android.permission.REQUEST_INSTALL_PACKAGES" 
        tools:node="remove" />
</manifest>

 

 

Related articles

Andrew Fletcher31 Oct 2023
Android icon not changing
If the Android app icon is not changing from the default icon (in my situation this was the Capacitor icon), here are some steps to troubleshoot and resolve the issue:&nbsp;Check the Icon FilesEnsure that you have provided the correct icon files in the appropriate directory. In a Capacitor project,...
Andrew Fletcher24 Oct 2023
How to generate a new private key (.pepk)
How to generate a new private key and submit it to Google Play for signing your Android app, you can follow these steps:Generate a New Keystore (Private Key)You can generate a new keystore file (which includes the private key) using the keytool utility that comes with the Java Development Kit (JDK)....