In this guide, we will show you the steps to add/remove a device admin app on your Android device. There can be quite a few reasons wherein you would want to carry out the said task. For instance, you are a network administrator of a corporation and want to make sure that the devices that your employees are using are controlled by you, as per the guidelines set by the company.
Apart from that, you can also monitor and manage settings on the device, and have corporate access to apps and their data associated with your device as well as its location access. All this will help you to make sure that the employees are using the device in sync with the company’s policies. Moreover, a device owner can manage and carry out a slew of other important tasks on the devices, including but not limited to:
- Your organization can see the data associated with your work account, such as email and calendar.
- Likewise, it can also have a look at all the apps installed on your device.
- The amount of time and data spent on each app can also be viewed by your organization.
- Lastly, the most recent bug report can also be looked at by your company.
- Admin can also lock the device and reset the password
- Admin can delete all the device data as well.
So with such a plethora of useful functionalities, there’s no doubt why the organizations are looking forward to having a certain level of control over their employees’ devices. So if you are a network admin and are interested in getting this job done, then this guide will show you how to do so in quick and easy steps. Follow along.
How to Add/Remove a Device Admin App
Before starting with the below process, you might have to remove your Google account from your device [we are using the word “might” and not “must” because some users were able to carry out this task even without removing their account, but for the majority of others, myself included, the removal of the account was a must. So go to Settings > Google and remove your account before proceeding with the below steps.
- To begin with, go to Settings > About Phone > Tap on Build Number 7 times.
- This will enable Developer Options. Access it from Settings > System menu.
- Then enable USB Debugging and connect your device to PC via USB cable.
- After that, download and extract the Android SDK Platform Tools on your PC.
- Now open Command Prompt inside that folder and type the below command
adb shell dpm set-device-owner com.aistra.hail/.receiver.DeviceAdminReceiver
- Make sure to replace app package name accordingly in the above command.
- In our case, we are making the Hail app as admin having the package name com.aistra.hail.
- As soon as you execute the command, you should get the success message, signifying that the owner has been changed successfully.
How to Verify the Addition of Device Admin App
Apart from the result in the CMD window, you can also verify if the device owner has been changed successfully or not via two additional methods:
METHOD 1: Via Notification Section
Expand the notification panel and have a look at the bottom section- it will state that <This device belongs to “app-name”>.
METHOD 2: From Settings Menu
- Head over to Settings > Security and Privacy.
- Go to More Security and Privacy > Device Admin Apps.
- Your admin app should be listed there and enabled.
How to Disable/Remove Device Admin App on Android
Once you are done using the device admin app and wish to disable or remove it altogether from your device, then here’s how you can do so:
- Head over to Settings > Security and Privacy.
- Then go to More Security and Privacy > Device Admin Apps.
- Now disable the toggle next to your app.
- Or tap on your app’s name and tap Deactivate this Device Admin app.
Fix Deactivate this Device Admin App Greyed Out
In some cases, the option to deactivate the device admin app might be greyed out and hence you wouldn’t be able to remove it from your device. In such cases, you can take the help of the following ADB Commands [make sure to replace the app-package-name accordingly]:
adb shell dpm remove-active-admin app-package-name/.yourAdminReceiver adb uninstall app-package-name
If the aforementioned commands didn’t work out, then try out the below one:
adb shell dpm remove-active-admin app-package-name/MyDeviceAdminReceiver
In some cases, both these commands might throw out an error along the following lines:
Exception occurred while executing 'remove-active-admin': java.lang.SecurityException: Attempt to remove non-test admin
If you are also facing the same issue, then your only course of action is to do a format data/factory reset [from Settings > System > Reset]. However, do note that it will wipe off all the data from your device, so take a backup beforehand.
Cannot Set an App as Device Owner on Android [Fixed]
If you are unable to set up an app as the device owner on your Android device, then here are a few troubleshooting steps that you can try out.
FIX 1
First off, verify that you have removed your Google account from your device. If you haven’t done so yet, then carry out the said task from Settings > Google.
FIX 2
Next up, you can tweak the command a little bit and instead of the set-device-owner parameter, try using the set-profile-owner, along with a few additional information, such as –user current –name, app name, and DPMReceiver [make sure to replace the app-name and app-package-name accordingly]. So the command syntax will be:
adb shell dpm set-profile-owner --user current --name app-name app-package-name/.receiver.DPMReceiver
In our case, since we are using the Hail app with the app package name com.aistra.hail, the command will transform to:
adb shell dpm set-profile-owner --user current --name Hail com.aistra.hail/.receiver.DPMReceiver
FIX 3
If none of the aforementioned tweaks work out, then your last course of action is to do a format data [which will remove all your data as well as your logged-in account and its associated data from your device]. You may do so from Settings > System Reset. Once done, retry changing the device owner app and this time, you won’t face any issues.
That’s it. These were the steps to change the device owner on your Android device. Likewise, we have also listed the steps to fix numerous issues that you might come across while setting up this app. With that said, if you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution as soon as possible.