Thrown when a security manager check fails.
Questions tagged [android-securityexception]
168 questions
2
votes
0 answers
SecurityException: Permission Denial: isUidActive from pid=XXXX, uid=XXXX requires android.permission.PACKAGE_USAGE_STATS
I'm getting this (for me) unknown crash in my crashlytics log trying to call enableReaderMode() in NfcAdapter class:
Caused by java.lang.SecurityException: Permission Denial: isUidActive from pid=XXXX, uid=XXXX requires…

Agustín Alcázar
- 61
- 4
2
votes
0 answers
No matching key found for the ciphertext in the stream
I am getting an exception while decrypting the encrypted file.
Exception happening in the decryptFile() method. Line where exception happening is
while (fileInputStream.read(buffer).also { read = it } != -1) {
Full code below
fun…

KIRAN K J
- 632
- 5
- 28
- 57
2
votes
1 answer
How to fix SecurityException: Permission Denial: opening provider that is not exported from uid
I want to open another application with an import window and send a file to it for processing.
final Intent sendIntent = new Intent(Intent.ACTION_MAIN);
sendIntent.setComponent(new ComponentName("com.example.editor",…

quass1234
- 51
- 4
2
votes
2 answers
SecurityException Huawei phone
Our app is getting a SecurityEception on a Huawei device (Huawei P30 Pro, Android 10). We have no idea what might be causing this, and Googling for it gave no results.
The complete stacktrace:
java.lang.SecurityException:
at…

Jorn Rigter
- 745
- 1
- 6
- 25
2
votes
0 answers
Your app(s) are vulnerable to Intent Redirection from Play Store
App was developed in React Native
Play Stopre Issue-
found that your app uses software that contains security vulnerabilities for users. Apps with these vulnerabilities can expose user information or damage a user’s device, and may be considered to…

kaustav
- 21
- 1
2
votes
2 answers
Permission Denial: opening provider that is not exported from UID 1000
I have built a signed application (system application) with a shared user id android.uid.system. It contains a FileProvider, which I need for a package install intent.
When I try to install the application with the package install intent the…

Robbin
- 21
- 1
- 4
2
votes
1 answer
PdfRenderer always throwing 'password required' SecurityException after rendering a password-protected file
I have the following Android code:
private void test() throws IOException {
File f1 = new File("/sdcard/password-protected-pdf.pdf");
File f2 = new File("/sdcard/normal-pdf.pdf");
this.renderPDF(f1);
this.renderPDF(f2);
}
private…

Iakovos
- 1,842
- 4
- 25
- 30
2
votes
0 answers
Granting a non changeable permission to a third party app with root access
On my rooted android device, how can I grant "Signature level" (INTERNAL_SYSTEM_WINDOW) permission to a third party app.
What I have tried already is
rooted my device using magisk
in adb shell, used pm grant com.example.app…

dravit
- 553
- 6
- 16
2
votes
2 answers
My app keeps crashing in android 9 version throwing java.lang.SecurityException
I recently developed an android app that streams radio online using a URL. It has been working well in other android versions that is 6,7and 8 the ones i tested in emulators.
But last week i published the app to play store, and my reports show that…

Denny
- 991
- 12
- 20
2
votes
1 answer
Security Exception requesting PARTIAL_WAKE_LOCK
I wrote a library which starts a STICKY Service when the main application calls a specific method.
This Service acquires a PowerManager.PARTIAL_WAKE_LOCK during the execution of the onStartCommand() method:
PowerManager powerManager =…

Mattia Campana
- 509
- 2
- 6
- 15
2
votes
0 answers
SecurityException when trying to query list of videos
My code is trying to get a list of videos on user's device using the query but I am getting security exception on devices like Samsung Galaxy S7, S8 which are very popular devices and can't be ignored.
I do have READ_EXTERNAL_STORAGE and…

Piyush-Ask Any Difference
- 4,294
- 5
- 46
- 92
2
votes
1 answer
java.lang.SecurityException with No Details
I searched around for this but couldn't find a solution to my case. I just updated my app to target Android API 25. Thus I had to update permission handling. My app requires the following permissions:

zerox1212
- 166
- 1
- 7
2
votes
1 answer
Local notification caused SecurityException
I have made a method that sends a local notification when a progress finishes loading, when I build the App it's all clear without any errors/warnings I received this after releasing with Google console crash report
Here is the notification…

Thorvald
- 3,424
- 6
- 40
- 66
2
votes
0 answers
java.lang.SecurityException: Permission Denial: on fetching bitmap from uri inside service
I am getting-
java.lang.SecurityException: Permission Denial: opening provider
com.android.providers.media.MediaDocumentsProvider from
ProcessRecord{..} requires android.permission.MANAGE_DOCUMENTS or
android.permission.MANAGE_DOCUMENTS
at
…

Android Developer
- 9,157
- 18
- 82
- 139
2
votes
1 answer
java.lang.SecurityException:Unable to find app for caller android.app.ApplicationThreadProxy when registering receiver android.content.IIntentReceiver
This error occurs when users have the first login after installing my app. But in the next launch (when the user already logged in) the app works fine.
In my app I am using a BroadcastReceiver which is used for checking internet connectivity.
So to…

Tahmid Rahman
- 748
- 1
- 8
- 20