How to grant an Android app *All files access* *Allow access to manage all files* with `adb`?
Jan 16, 10:07pm

To grant an Android app "All files access" (MANAGE_EXTERNAL_STORAGE) via ADB, use the following command:

bash
adb shell appops set --uid PACKAGE_NAME MANAGE_EXTERNAL_STORAGE allow

Replace PACKAGE_NAME with the actual package name of your app (e.g., com.example.myapp). This command directly grants the permission without user interaction, but note that the app must declare the MANAGE_EXTERNAL_STORAGE permission in its manifest for this to work.

If you want to prompt the user to grant the permission manually (for example, to open the settings page where they can enable it), you can use this intent:

bash
adb shell am start -a android.settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION -d package:PACKAGE_NAME

This will open the system settings page for that app, where the user can toggle "Allow access to manage all files".

Manage all files on a storage device | App data and files | Android Developers

developer.android.com

Manage all files on a storage device | App data and files | Android Developers

r/tasker on Reddit: How to prompt for "Allow access to manage all files"?

reddit.com

r/tasker on Reddit: How to prompt for "Allow access to manage all files"?

Feb 12, 2024

List of ADB settable permissions - Android Enthusiasts Stack Exchange

android.stackexchange.com

List of ADB settable permissions - Android Enthusiasts Stack Exchange

Jan 16, 10:07pm

This Chat is read-only. Login to resume chatting.