Short answer
Open the merged manifest in Android Studio to see which library adds QUERY_ALL_PACKAGES. If your app only needs to open or check a few known apps, list them in a <queries> element and remove the permission with tools:node="remove". Keep it only if the app is a device search, antivirus, file manager or browser style app, and then fill in the Permissions Declaration Form.
Rather not fix it yourself? App Fix Ticket starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.
Why Play flags it, and the fix
01
A library added the permission
“The Merged Manifest view shows the results of the merged manifest on the left and information about each merged manifest file on the right” Android Developers, Manage manifest files
Plugins that open other apps, share to them or check if they are installed sometimes ship the permission in their own manifest, and it merges into yours. Open AndroidManifest.xml, click the Merged Manifest tab, and find which file the permission came from. Updating that library may drop it.
02
Your app doesn’t have a core need for it
“Permitted uses include device search, antivirus apps, file managers, and browsers.” Google Play Help, Use of the broad package visibility permission
Play allows the permission only when searching all installed apps is the main purpose of the app. Opening a maps app, a payment app or a web link is not that purpose, so the fix is to stop requesting it. A browser app itself is a permitted use.
03
Replace it with a <queries> entry
“In the rare cases where the <queries> element doesn't provide adequate package visibility, you can use the QUERY_ALL_PACKAGES permission.” Android Developers, Package visibility filtering on Android
Name the apps or intents your app needs to see in a <queries> element, then remove the broad permission so a library can’t add it back.
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" tools:node="remove" /> <queries> <package android:name="com.whatsapp" /> <intent> <action android:name="android.intent.action.VIEW" /> <data android:scheme="https" /> </intent> </queries> </manifest>04
Your app really needs it
“Apps that fail to meet the policy requirements or do not submit the Permissions Declaration Form may be removed from Google Play.” Google Play Help, Use of the broad package visibility permission
If listing every installed app is the core feature, keep the permission, describe that feature prominently in the store listing, and fill in the Permissions Declaration Form in Play Console with how the app uses it.
Checked against the vendor’s docs on : Google Play Help: Use of the broad package (App) visibility (QUERY_ALL_PACKAGES) permission; Android Developers: Package visibility filtering on Android; Android Developers: Manage manifest files.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
Related: Google Play photo and video permissions · Google Play foreground service declaration · Google Play Data safety form rejected · Google Play USE_EXACT_ALARM rejection