Issue: Need to use Media Store API or No Access to Files
You have requested access to All Files Access permission but it appears that your app's core feature requires access to only Media Files or does not need access to any Files. In case your app needs access to Media Files, with the MediaStore API, apps can contribute and access media that's available on an external storage volume without the need for the access all files permission.
Please update your app so that the feature uses Media Store APIs and remove All Files Access (MANAGE_EXTERNAL_STORAGE) permission.
Policy: All Files Access Permission
Files and directory attributes on a user's device are regarded as personal and sensitive user data subject to the Personal and Sensitive Information policy and the following requirements:
Apps should only request access to device storage which is critical for the app to function, and may not request access to device storage on behalf of any third-party for any purpose that is unrelated to critical user-facing app functionality.
Android devices running Android "R" (Android 11) or later, will require the MANAGE_EXTERNAL_STORAGE permission in order to manage access in shared storage. All apps that target R or later and request broad access to shared storage ("All files access") must successfully pass an appropriate access review prior to publishing. Apps allowed to use this permission must clearly prompt users to enable "All files access" for their app under "Special app access" settings. For more information on the R requirements, please see this help article.
Read more about Use of All Files Access Permission
See Android storage use cases and best practices and how to access media files from shared storage
Address this issue in the Play Console.
My app helps users to manage whatsapp stickers link to app and it supports SDK30 in first release but after that release now when I am trying to update new version of app playstore sent me app status rejected, I tried multiple times, I've mentioned the cause for the permission in app description and even in app while asking for the permission, but neither my app is updating nor my app's short and long description are updating.
I have filled the Sensitive permission form too, whenever I try to release new version google send me
Publishing Status App Status: Rejected
Your app has been rejected and wasn't published due to a policy
violation. If you submitted an update, the previous version of your
app is still available on Google Play.
Issue: Access to device storage not required
The feature you identified does not require unrestricted access to
device storage. There are other privacy friendly options for accessing
files in shared storage, such as using the system file picker, or,
depending on the use case, you can follow the recommendations for
receiving data from other apps listed here.
Please update your app so that the feature uses a privacy friendly
alternative and remove All Files Access (MANAGE_EXTERNAL_STORAGE)
permission.
Policy: All Files Access Permission
Files and directory attributes on a user's device are regarded as
personal and sensitive user data subject to the Personal and Sensitive
Information policy and the following requirements:
Apps should only request access to device storage which is critical
for the app to function, and may not request access to device storage
on behalf of any third-party for any purpose that is unrelated to
critical user-facing app functionality. Android devices running
Android "R" (Android 11) or later, will require the
MANAGE_EXTERNAL_STORAGE permission in order to manage access in shared
storage. All apps that target R or later and request broad access to
shared storage ("All files access") must successfully pass an
appropriate access review prior to publishing. Apps allowed to use
this permission must clearly prompt users to enable "All files access"
for their app under "Special app access" settings. For more
information on the R requirements, please see this help article.
Read more about Use of All Files Access Permission See Android storage
use cases and best practices and how to open files using storage
access framework Address this issue in the Play Console. Issue: Not
a core feature
The feature you identified that is dependent on this permission does
not appear to be critical to the core functionality of your app.
Core functionality is defined as the main purpose of the app. Without
this core functionality, the app is "broken" or rendered unusable. The
core functionality, as well as any core features that comprise this
core functionality, must all be prominently documented and promoted in
the app's description.
Please update your app so that the feature does not use this
permission or ensure that the core functionality is prominently
documented and promoted in the app's description and resubmit your app
on Play Developer console.
Policy: All Files Access Permission
Files and directory attributes on a user's device are regarded as
personal and sensitive user data subject to the Personal and Sensitive
Information policy and the following requirements:
Apps should only request access to device storage which is critical
for the app to function, and may not request access to device storage
on behalf of any third-party for any purpose that is unrelated to
critical user-facing app functionality. Android devices running
Android "R" (Android 11) or later, will require the
MANAGE_EXTERNAL_STORAGE permission in order to manage access in shared
storage. All apps that target R or later and request broad access to
shared storage ("All files access") must successfully pass an
appropriate access review prior to publishing. Apps allowed to use
this permission must clearly prompt users to enable "All files access"
for their app under "Special app access" settings. For more
information on the R requirements, please see this help article.
Read more about Use of All Files Access Permission See Android storage
use cases and best practices Address this issue in the Play Console.
Issue: Need to use Media Store API
You have requested access to All Files Access permission but it
appears that your app's core feature requires access to only Media
Files. With the MediaStore API, apps can contribute and access media
that's available on an external storage volume without the need for
the access all files permission.
Please update your app so that the feature uses Media Store APIs and
remove All Files Access (MANAGE_EXTERNAL_STORAGE) permission.
Policy: All Files Access Permission
Files and directory attributes on a user's device are regarded as
personal and sensitive user data subject to the Personal and Sensitive
Information policy and the following requirements:
Apps should only request access to device storage which is critical
for the app to function, and may not request access to device storage
on behalf of any third-party for any purpose that is unrelated to
critical user-facing app functionality. Android devices running
Android "R" (Android 11) or later, will require the
MANAGE_EXTERNAL_STORAGE permission in order to manage access in shared
storage. All apps that target R or later and request broad access to
shared storage ("All files access") must successfully pass an
appropriate access review prior to publishing. Apps allowed to use
this permission must clearly prompt users to enable "All files access"
for their app under "Special app access" settings. For more
information on the R requirements, please see this help article.
Read more about Use of All Files Access Permission See Android storage
use cases and best practices and how to access media files from shared
storage Address this issue in the Play Console.
Using MANAGE_EXTERNAL_STORAGE is not a good idea, unless your app is a file manager, antivirus, or cleaner app. However, in your case, you only need access to a specific folder, i.e. /sdcard/emulated/0/WhatsApp. We still have a workaround to grant full access from this folder via Storage Access Framework folder picker.
You can force the user to select WhatsApp folder via Intent.ACTION_OPEN_DOCUMENT_TREE, and then save the permission status with ContentResolver#takePersistableUriPermission(). But writing your own code to handle this may requires a lot of effort.
I suggest you to use SimpleStorage. Because it is simpler:
class MainActivity : AppCompatActivity() {
private val storageHelper = SimpleStorageHelper(this)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
storageHelper.onStorageAccessGranted = { _, root ->
Toast.makeText(
this,
"Folder ${root.getAbsolutePath(this)} is accessible now.",
Toast.LENGTH_SHORT
).show()
}
btnRequestStorageAccess.setOnClickListener {
// Force the user to select directory /sdcard/emulated/0/WhatsApp
// The access will be granted once the user selected this folder,
// and then you can explore this directory.
storageHelper.requestStorageAccess(
requestCode = REQUEST_CODE_STORAGE_ACCESS,
initialPath = FileFullPath(this, StorageId.PRIMARY, "WhatsApp"),
expectedStorageType = StorageType.EXTERNAL,
expectedBasePath = "WhatsApp"
)
}
}
override fun onSaveInstanceState(outState: Bundle) {
storageHelper.onSaveInstanceState(outState)
super.onSaveInstanceState(outState)
}
override fun onRestoreInstanceState(savedInstanceState: Bundle) {
super.onRestoreInstanceState(savedInstanceState)
storageHelper.onRestoreInstanceState(savedInstanceState)
}
}
This answer may not meet your expectations, but you can try this alternative.
App Should meet all the policies to get approved by the Google Play console
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
the all files access permission when your app cannot effectively make use of the more privacy friendly best practices, such as using the Storage Access Framework or the Media Store API.
Replace
Environment.getExternalStoragePublicDirectory()
with
Context.getExternalFilesDir("filename");
After lots of struggle and research I decided to reduced target SDK version to 29 and post the update for my app and I was able to post updates and surprisingly it updated for sdk 30 too, If you're facing the same issue, just change target sdk to 29 and keep compile sdk to 30, try it, It worked for me maybe it will work for you too. Maybe it's a loophole in google's system but it worked for me.
I had the same error for a month but finally, Google Play Store accepted my uploads.
Briefly, what I did was to create new builds for each track, and -interestingly- it worked!
(Before my countless update trials, our latest version on Production was 2.23.5 (build 1), our active tracks were Internal Testing Track and Production, and I was trying to upload my updates to Internal Testing Track.)
Below are the steps that I've applied:
Created a new build 2.24.1 (build 1) with all necessary changes. (e.g. upgrading targetSdkVersion to 30, removing MANAGE_EXTERNAL_STORAGE permission, etc.)
Activated our inactive tracks (Open, Closed Alpha, and Beta Testing Tracks), uploaded the same build 2.24.1 (build 1) to these tracks, and then paused those tracks. (I've paused them as I won't use them actively, you may not want to pause it)
Created another build 2.24.1 (build 2) which was completely the same as build 1. I've just updated its build number.
Uploaded 2.24.1 (build 2) to the Internal Testing Track.
Created another build 2.24.1 (build 3) which was completely the same as build 3. I've just updated its build number.
Uploaded 2.24.1 (build 3) to the Production Track.
Went to "Publishing Overview" page, activated Managed Publishing in order to manually publish my uploads to Production and other tracks as they got accepted.
Sent these uploads to review at once and voila, Google accepts your uploads!
Currently play store is only accepting app which has compile sdk version and target sdk version greater than or equal to 30.
so by reducing target sdk version to 29 will not work because you can not upload that app on play store.
Now accord to play store polices Google Play restricts the use of high risk or sensitive permissions, including a special app access called All files access. This is only applicable to apps that target Android 11 (API level 30) and declare the MANAGE_EXTERNAL_STORAGE permission, which is added in Android 11. Also, this policy does not impact the usage of the READ_EXTERNAL_STORAGE permission.
long story short your app must meet all the policies to get approved.
You should only access the all files access permission when your app cannot effectively make use of the more privacy friendly best practices, such as using the Storage Access Framework or the Media Store API.
remove external storage permission from manifest file.
Try to apply this where you need access of files :
replace
Environment.getExternalStoragePublicDirectory()
with
Context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS)
because accord to google policies app can read and write to app specific files and folders.
do not forget to add
android:requestLegacyExternalStorage="true"
in manifest application tag for target sdk version above 29.
also use content provider to access files from app specific folder.
if you dont know how to do so you can refer to this.
Yesterday same issue faced by me:
Target sdk (29) downgrading didn't work for me.
I just commented out "MANAGE_EXTERNAL_STORAGE" permission into my manifest, updated version code, made new release build and finally uploaded into play console without any issue.
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
I want to check if an app has been installed on a device before by writing a file into internal storage. Later on when user even re-installs the app, I can check the existence of the file(I'll write the file to some system folder that user won't bother with) to see if user has installed the app before.
I just want to know if this is do-able, or is Android against doing things like this? Do I need any permission from user to do this?
I do not want to user any hardware-specific identifier such as IMEI or Android ID. I also don't want to use Instance ID as it will get reset upon re-installation of the app.
You don't need permission to read/write files to the Internal storage of the app. However, once the user uninstall the app, any file stored in the Internal storage of the app is also deleted.
To do what you're trying to do, you would have to write a file to the external storage - which you need permission for.
Have a read through this:
https://developer.android.com/training/data-storage/files
If I download an Android application, is it possible for one application to download the data of another application?
If an application asks permission for:
"Allow ABC to access photo, media, and files on your device"
Does giving permission mean it can now download all my personal photos?
Which files is it getting access too, my Gmail app's content i.e potentially all my emails?
is it possible for one application to download the data of another application?
That depends entirely on what "the data of another application" means:
All apps that request permission can access external storage, so if one app writes something to external storage, other apps can read it.
Apps cannot read the content of another app's internal storage or removable storage, except on rooted devices.
Apps can access anything published by another app via some API (e.g., a ContentProvider), subject to whatever security controls the app put on that API.
If an application asks permission for: "Allow ABC to access photo, media, and files on your device" Does giving permission mean it can now download all my personal photos?
If those "personal photos" are on external storage, then yes.
my Gmail app's content i.e potentially all my emails?
Not unless Gmail has a security flaw, or the app is using some API published by the Gmail app. In the latter case, usually some specific permission is required.
as per Google documentation,
By default, files saved to the internal storage are private to your
application and other applications cannot access them (nor can the
user). When the user uninstalls your application, these files are
removed.
Source: http://developer.android.com/guide/topics/data/data-storage.html
By default implies that it is only temporary and can be modified. So is there any way to modify this permission to allow your app to read internal storage files from other Apps ?
I am willing to access /data/data/com.Whatsapp to access my encryption key to study how Whatsapp actually generates the key and i need to done this using my App, not a rooted phone or anything.
So is there any way to modify this permission to allow your app to read internal storage files from other Apps ?
No. In the quoted passage above, please see the "nor can the user" part. You, as a user, do not have rights to access those files, let alone change permissions on them. The exception is a user who roots their device.