Questions tagged [device-admin]

The Device Administration API for Android 2.2 and later allows applications to enforce security policies by requiring a password or encryption, and to lock or wipe the device programmatically.

Android 2.2 introduces support for enterprise applications by offering the Android Device Administration API. Administrators can enforce password policies — including alphanumeric passwords or numeric PINs — across devices. Administrators can also remotely wipe (that is, restore factory defaults on) lost or stolen handsets.

226 questions
4
votes
1 answer

Android ask password on disabling app from device admin?

is there any way to ask password on deactivating a device admin from android device or else to hide or to protect app from un-checking in device administrator.
user1957069
4
votes
2 answers

Unlock device, display a text, then lock again

For the need of my application, I need to display a message on the screen even if the lockscreen is enabled, then wait 3 seconds, than I have to lock again the phone as I don't want it to make unwanted phone calls in your pockets. First part is…
Waza_Be
  • 39,407
  • 49
  • 186
  • 260
4
votes
2 answers

Android: Device Admin: Start Device Admin From Service

I am unable to get the Activity which allows the user to grant permission for an app to be a device admin to work. My code is as follows... ComponentName comp = new ComponentName(this, CustomReceiver.class); Intent i = new…
Heshan Perera
  • 4,592
  • 8
  • 44
  • 57
3
votes
1 answer

Can't set device owner on Samsung device with Android 11

I'm trying to set my app as a device owner on the Samsung A51 with Android 11. It's a fresh device with no accounts added: adb shell dpm set-device-owner /.receiver.AdminReceiver java.lang.RuntimeException: Can't set package…
artem
  • 16,382
  • 34
  • 113
  • 189
3
votes
1 answer

How to kill another app if your app has Device Admin/ Device Owner permission ( not rooted )

How can I kill ( or prevent the launch ) another app from my application if mine has Device Admin/ Device Owner permission ( not rooted ) ?
3
votes
1 answer

programmatically enable android device administration

I want to write tests for an application that uses the android device administration API . My problem is that the user needs to manually grant one-time approval for the application to have admin rights, otherwise a SecurityException is thrown at…
rony l
  • 5,798
  • 5
  • 35
  • 56
3
votes
1 answer

Location updates are not working in Device Admin / Managed Work Profile Mode

When location updates are requested with LocationManager as well as FusedLocationProviderClient, I'm unable to receive location updates in my app. So I have tried below code to allow the location updates in my app, but it is not working. manager =…
Amrut Bidri
  • 6,276
  • 6
  • 38
  • 80
3
votes
0 answers

How does Lookout Mobile implement Android wipe functionality without the Admin API?

How does Lookout Mobile wipe an Android device without using the Administrative API? There is no administrator activation required when installing lookout, so it cannot be using the API, correct?
John Oleynik
  • 594
  • 4
  • 19
3
votes
2 answers

Android DeviceAdminReceiver: onNetworkLogsAvailable intent never received

UPDATE I'm noticing that I actually am receiving the NETWORK_LOGS_AVAILABLE intent! The problem is, it's taking a very long time (over an hour?) to receive it. Is there any known way to increase the frequency of receiving these events? Original…
Hypino
  • 1,240
  • 14
  • 28
3
votes
2 answers

Device Owner on rooted Galaxy S8

I have been trying to elevate an internal Demo App to Device Owner on my rooted S8 and keep having problems. Ways I have tried: 1) NFC provisioning (as explained here ) When using NFC with Android Bean to set the Device Owner the S8 shows a "Cannot…
user3840288
  • 151
  • 2
  • 8
3
votes
3 answers

Temporarily disabling fingerprint

In FingerPrintSensor enabled devices when we restart a device it temporarily disables fingerprint and force user to unlock device using pin/password/pattern. I want to achieve this functionality so i am using DevicePolicyManger to lock user…
Skyyy
  • 1,539
  • 2
  • 23
  • 60
3
votes
2 answers

Device Administration not working

I have created a kiosk app, and I am trying to set my device as administrator. Whenever I check if I am active admin it return back false private void provisionOwner() { DevicePolicyManager manager = (DevicePolicyManager)…
portfoliobuilder
  • 7,556
  • 14
  • 76
  • 136
3
votes
1 answer

How does android do Password Validation?

I have added a password policy with the following requirements for an android device. Minimum Password Length - 4 Maximum failed password attempts - 3 Then I created a password with four characters. Expected behaviour in this scenario is that…
madawa
  • 496
  • 6
  • 24
3
votes
1 answer

How to restrict/disable print service(s) in Android?

I am trying to achieve a use case where on installing an app, all print services barring one would get disabled on the Android device. To achieve this, I looked into Android's Device Administration API capabilities but that doesn't fulfill the use…
3
votes
0 answers

Android Device Admin not recognizing wrong fingerprint

My app is acting as device admin and recognizing wrong pin,password,pattern. And in such cases it taking picture and uploading to server. But when i tried with wrong fingerprint, its not recognizing wrong fingerprint. Can anyone help ?
User 308
  • 45
  • 6