This is what I am getting when trying to load google Images:
08-23 12:03:41.247: W/ImageView(23831): Unable to open content: content://com.google.android.gms.games.background/images/1066b186/2
08-23 12:03:41.247: W/ImageView(23831): java.lang.SecurityException: Permission Denial: opening provider com.google.android.gms.games.provider.GamesContentProvider from ProcessRecord{413da0f8 23831:[package_name]/10161} (pid=23831, uid=10161) that is not exported from uid 10045
How do I solve this?
It looks like the "GamesContentProvider" that is used by you or some of the classes you use requires a permission that you have not added in your manifest file. Take a look at the documentation of the classes (in GooglePlayServices) you use and see if there is something about any permission you have to add to your app in order to be able to use the documented functionality.
Related
I received the following rejection reason.
Thanks for contacting the Google Play team about your app Company
App name, com.company.app. We reviewed your app
and found that it does not qualify for use of the requested
permissions.
The declared functionality Select OEM Services is determined to be
unnecessary or not aligned with the core functionality of your app.
What permission are they referring to ?
Below are the permissions I'm requesting.
com.anddoes.launcher.permission.UPDATE_COUNT,
com.google.android.c2dm.permission.RECEIVE,
com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE,
com.google.android.providers.gsf.permission.READ_GSERVICES,
com.htc.launcher.permission.READ_SETTINGS,
com.htc.launcher.permission.UPDATE_SHORTCUT,
com.majeur.launcher.permission.UPDATE_BADGE,
com.sec.android.provider.badge.permission.READ,
com.sec.android.provider.badge.permission.WRITE,
com.sonyericsson.home.permission.BROADCAST_BADGE
android.permission.ACCESS_NETWORK_STATE,
android.permission.ACCESS_WIFI_STATE,
android.permission.AUDIO_INPUT_FLAG_FAST,
android.permission.BLUETOOTH,
android.permission.BLUETOOTH_ADMIN,
android.permission.BROADCAST_STICKY,
android.permission.CAMERA,
android.permission.FLASHLIGHT,
android.permission.INTERNET,
android.permission.MODIFY_AUDIO_SETTINGS,
android.permission.READ_EXTERNAL_STORAGE,
android.permission.READ_LOGS,
android.permission.READ_PHONE_STATE,
android.permission.RECORD_AUDIO,
android.permission.USE_SIP,
android.permission.VIBRATE,
android.permission.WAKE_LOCK,
android.permission.WRITE_EXTERNAL_STORAGE,
android.permission.WRITE_SETTINGS
Most likely culprit is this one: android.permission.READ_LOGS
Reason is because of:
Allows an application to read the low-level system log files.
Not for use by third-party applications, because Log entries can contain the user's private information.
https://developer.android.com/reference/android/Manifest.permission.html#READ_LOGS
It's not allowed for third-party apps.
I am trying to read a video file which is in byte array using PCL Storage. So I have added the video file in the folder named File using android studio tool. Trying to read from there. The thing is that in my code it can find out that the file exists in the folder but whenever I am trying to read it using the following code I am getting an exception: "Access denied" but I have already enabled the permission in android manifest for reading and writing from external storage
IFolder rootFolder = FileSystem.Current.LocalStorage;
IFile files = await rootFolder.GetFileAsync("myVideo.Mp4");
var text = await files.ReadAllTextAsync();
I am getting an exception: "Access denied" but I have already enabled the permission in android manifest
Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app. You should request permissions at runtime.
System permissions are divided into two categories, normal and dangerous:
Normal permissions do not directly risk the user's privacy. If your app lists a normal permission in its manifest, the system grants the permission automatically.
Dangerous permissions can give the app access to the user's confidential data. If you list a dangerous permission, the user has to explicitly give approval to your app during the runtime of the app.
java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider ... requires android.permission.READ_EXTERNAL_STORAGE
READ_EXTERNAL_STORAGE is categorized as Dangerous permissions, so you should check this permissions manually for API level 23 and above.
Update:
Here is an example that request permissions at runtime.
I have a content provider and a test application both signed with a debug key. The client receives a content normally if permissions are not applied, but I want to apply permissions to the stuff. So the following lines are added into the content provider's manifest file:
<permission android:name="org.example.provider.READ"
android:permissionGroup="org.example.group.DATA_ACCESS"
android:label="#string/readonlyaccess"
android:protectionLevel="signature" />
<application
...
<provider android:name=".ImageContentProvider"
android:authorities="org.example.provider"
android:readPermission="org.example.provider.READ" />
In the client's manifest file the following line is added:
<uses-permission android:name="org.example.provider.READ" />
When I try to get the data from the provider, I get the error:
09-13 22:38:20.995: E/AndroidRuntime(13979): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.hello/com.example.hello.HelloActivity}: java.lang.SecurityException: Permission Denial: reading org.example.ImageContentProvider uri content://org.example.provider/file from pid=13979, uid=10040 requires org.example.provider.READ
Am I missing something, or is it related to the fact that the applications are signed by debug key? How to solve the problem? I saw a suggestion to add uses-permission to the provider as well, but this does not help either. NB. This is checked inside emulator, if this can be of any importance.
I found a related question throws SecurityException when signing with the default debug keystore, but it does not provide actual solution.
Yes, it works with debug keystores, at least the last time I tried it.
I would have the <permission> element in both apps. If you installed the <uses-permission> one first, and then installed the <permission> one, you would run into problems. The permission needs to be defined before the <uses-permission> is encountered, and the simplest way to do that is to put the <permission> in both.
While developing a Launcher (Homescreen) application for Android, I've come into a security exception I don't understand.
When calling the
[bindAppWidgetId()][1] method from
within my Launcher Activity, I get
this security exception :
08-19 11:30:11.689: ERROR/AndroidRuntime(6032): java.lang.SecurityException: bindGagetId appWidgetId=99 provider=ComponentInfo{com.android.music/com.android.music.MediaAppWidgetProvider}: User 10034 does not have android.permission.BIND_APPWIDGET.
I first thought I had forgotten the BIND_APPWIDGET permission in my manifest, but it is definitely there.
The android api documentation states this :
"You need the APPWIDGET_LIST
permission. This method is to be used
by the AppWidget picker."
I tried to add the permission android.permission.APPWIDGET_LIST, but it doesn't solve the issue.
Also, I've looked at the manifest of the Settings application from the android sources that contains the AppWidgetPickActivity code : there's a special line that asks to share user id :
"android:sharedUserId="android.uid.system"
Could it be related to my problem ?
If anyone has an idea that would be great !
Cheers,
Laurent
I've found an answer!
BindAppWidgetId() is deliberately not available to applications! (security problems).
"The android.permission.BIND_APPWIDGET
permission is a system permission. You
can only get that permission if your
package is installed as a system
package (installed in /system/app in
stead of /data/app) or sign you app
with a certificate that's the same as
your android image. So basicly this
means you can only use this permission
if you are also the creator of the
android image on your platform/phone."
Here are the links to this information :
http://groups.google.com/group/android-developers/browse_thread/thread/231245ba6d1e690f/047b9d3f776d7e54?lnk=gst&q=bindAppWidgetId#047b9d3f776d7e54
http://groups.google.com/group/android-developers/browse_thread/thread/f24e0f484a79d529/ef84188e8533a125?lnk=gst&q=bindAppWidgetId#ef84188e8533a125
A quick Google search reveals that android.permission.APPWIDGET_LIST is a usable permission, even though it's not listed in the API docs.
I am trying to enable global search for messaging application (i.e., messages can be searched from home screen search box). I have followed all the steps given in
http://developer.android.com/reference/android/app/SearchManager.html
I am getting the following exception
04-16 12:49:26.917: ERROR/DatabaseUtils(102): java.lang.SecurityException: Permission Denial: reading com.android.providers.telephony.MmsSmsProvider uri content://mms-sms/search_suggest_query/m?limit=58 from pid=106, uid=10000 requires android.permission.READ_SMS
I have set permission in MmsSmsProvider.java file for read, write sms and global search, but still I get this error.
Can anyone help.
Regards,
Sunil.
You need to have
<uses-permission android:name="android.permission.READ_SMS"></uses-permission>
in you AndroidManifest.xml