Android Manifest Permissions External Storage - android

I have the below permissions defined in the Manifest but I still see Android asking the app needs permission to write to External storage even though I don't want to access External Storage
Could it be because of Google Play services
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

Pls try This for google play service error:
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="Version code" />
Metadata used end of application.

It's almost a year since post publication but maybe this'll help someone.
If you are using play-services version < 8.3 then play-services-maps uses this permission.
If you are not using play-services-maps then probably you are using play-services-fitness which takes maps as transitive dependency.
If you are not using nor of them, then probably you have other transitive dependency which needs this permission.
TIP to check transitive dependencies

Add these permissions
<uses-permission android:name="ANDROID.PERMISSION.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="ANDROID.PERMISSION.WRITE_EXTERNAL_STORAGE"/>

This might be because of below two reason.
If you're targeting version 8.3 or later of the Google Play services SDK, you no longer need the WRITE_EXTERNAL_STORAGE
permission to use the Google Maps Android API.
If you're targeting earlier versions of the Google Play services
SDK, you must request the
android.permission.WRITE_EXTERNAL_STORAGE permission.
Check this link.
There was a bug in Google play services that causes unintended WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE, and
READ_PHONE_STATE permissions to be merged into app manifests. That
is solved in Google Play services 10.0 release. Check this.
To avoid this I recommend to include necessary individual Play service APIs and corresponding build.gradle descriptions. Check this.
Hope this will help you and future user also.

This is missing :
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Related

Trouble with Google Play console notification: We have detected that your manifest file contains the permission REQUEST_INSTALL_PACKAGES

Hello i have an app in play console and receive the next notification:
We have detected that your manifest file contains the permission REQUEST_INSTALL_PACKAGES.
Google explain the steps for legalize it, but i don't have this permission in my manifest and I don't use functions to install files either ,i don´t know the real reason for this message and i'm afraid that my app will be removed from the store if I don't take the necessary measures.
Does anyone have more information on this or know what google might actually be detecting in my app?
This are the permissions in the manifest:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission
android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" />
Edit: I receive a new mail from Google , they specify the permission belongs to HMS core, i search in the huawei developers and Huawei release some update of all their libraries fixing or eliminating the permission from the code, it seem to solve the problem , i will upload a new version to play console hoping finishing the issue
You are querying all packages with the package manager, this is no longer allowed since Android 8.0. If you don't see it in your manifest, you might want to check your merged manifest.
See more info here.
https://support.google.com/googleplay/android-developer/answer/12085295?hl=en

How to fix "Violation of Permissions policy" for an android application? [duplicate]

This question already has answers here:
Violation of the Permissions policy in google play
(3 answers)
Closed 3 years ago.
One of our application has been removed from google play store, we have removed the unwanted permissions and updated to the store. But the application has been again rejected saying "Violation of permission policy", the manifest includes dangerous permissions but we need those permissions for app's core functionality. We are facing difficulties to identify the mistake. Below are the permission required by the app.
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.READ_CALL_LOG"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
<uses-permission android:name="android.permission.READ_SMS"/>
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
What change needs to be done to overcome this problem?
The problem is the SMS permission I think like READ_SMS
Duplicate of this Violation of the Permissions policy in google play
Your problem is this permissions:
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.READ_CALL_LOG"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
<uses-permission android:name="android.permission.READ_SMS"/>
<uses-permission android:name="android.permission.SEND_SMS"/>
By new googles policy you should send special form to google to approve those permissions.
Notice that they will not allow this permissions for app that the core functionality is not related to sms and phone.
More info here
Permission Policy : https://play.google.com/about/privacy-security-deception/permissions/
Permitted Uses: https://support.google.com/googleplay/android-developer/answer/9047303#intended
Please read above the Permissions policy and the permitted uses, and take one of the following actions:
• Option 1) Remove these permissions from your app’s manifest
If your app does not require access to Call Log or SMS data, remove the specified permissions from your app’s manifest (or migrate to an alternative implementation), then publish an updated version of your app with a higher version code using the standard release process. All active APKs in the release must be free of sensitive permissions on all tracks.
• Option 2) Submit a Permissions Declaration Form to request approval from Google Play
If your app is a default handler, or you believe your app qualifies for a permitted use, publish an updated version of your app with a higher version code. You'll be required to complete a Permissions Declaration Form as a step in the release process. Select the appropriate core functionality for your app and fill out the remainder of the form's required fields. Be sure to select the core functionalities that are appropriate for the app. Google Play will reject apps where the core functionality does not match this declaration or the use is not permitted.
Also make sure your alpha, beta and internal testing channel don't have any apks with policy violation

Android studio Adds extra permissions to my app

I have an app which makes use of wifi permissions only but ever since I moved to android studio, the compiled apk of my app uses two more extra permissions, that is phone calls/phone id and SD read/write.
I have no idea how and why those permissions have been added to my app but many users complain about that.
My app uses google analytics from google play services and appcompat. I also make use of this line
deviceId = Secure.getString(ctx.getContentResolver(), Secure.ANDROID_ID);
Any ideas? I don't want those extra permissions they scare my users away
Here is the content of manifest file
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="com.android.vending.BILLING" />
Studio is adding permissions appropriate to the classes / features that you are using in your project.
Update
Here is a related question that focuses on manifest merging config

Why am I requesting "Device ID & call information" permission on Android?

Testing my Android app (made in Unity) on the live store shows that it requests "Device ID & call information". As far as I can tell, I don't request these permissions. Here are the permissions I request in my AndroidManifest.xml file. Is this a permission required for all apps? Or is it hidden under one of these other permissions?
<uses-permission android:name="com.android.vending.BILLING" />
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Thanks!
I just spent an absurd amount of time trying to resolve this so figured I would share with anyone out there going through a similar agony.
Removing the permissions from your manifest will not necessarily remove them from the final build. Unity auto-detects required permissions from all included libraries. The libraries which are most likely causing you to have this permission included are from the Facebook sdk.
If you want to keep the Facebook sdk in the build, there's a relatively straightforward solution. Remove the Facebook SDK (completely) and install a version <= 7.80. For whatever reason, the changes to the sdk in 7.9+ prompt Unity to auto-include the READ_PHONE_STATE permission which triggers the Device ID & Call Information permission warning in google play.

Is READ_GSERVICES permission still required for Google Maps?

To add Google Maps to your android application, you need to include a few permissions:
<!-- Required -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- Optional -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
However, by checking Google Maps Android API v2 documentation again, I noticed that
com.google.android.providers.gsf.permission.READ_GSERVICES
is no longer required. I tested it by removing it from AndroidManifest.xml and the map is loading fine without any problems.
So, my question is.. what is/was the purpose of READ_GSERVICES permission?
Note: Even though it is removed from Google Maps Android API v2 documentation, it can be found on
Google Maps API for Business documentation.
All permissions you need for Google Maps Android API are in the docs:
You must also request the android.permission.WRITE_EXTERNAL_STORAGE permission.
Note: If you're targeting the Android M SDK (23) and the latest version of the Google Play services SDK (8.1), you no longer need the WRITE_EXTERNAL_STORAGE.
From the next release of the Google Play services SDK, the requirement for the WRITE_EXTERNAL_STORAGE permission will be completely dropped from the Google Maps Android API.
So the answer is NO, you don't need it if you use current latest GPS, i.e. 8.1.0.
NO, This persimmons is no longer required in google MAP API V2
<permission
android:name="phonelocation.example.asuss550c.phonelocation.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
You only need to add
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Also this MetaData in your Application Tag
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />

Categories

Resources