Android device administrators setup. Removing malware in safe mode


Mikhail Varakin
teacher of the Center computer training"Specialist"
at MSTU named after. N.E. Bauman

As its market share in mobile devices increases, the Android platform is becoming increasingly attractive to enterprise application developers. At the same time, the corporate environment is characterized by the need to comply with policies that ensure the required level of security information systems. IN Android API 8 (Android 2.2) for the first time, support for corporate applications appeared using the Device Administration API, which provides the ability to administer devices on Android platform on system level. This API allows developers to create applications needed in a corporate environment where enterprise IS administrators need control over staff mobile devices. One of these applications is already available on everyone modern devices: built-in mail client uses Device Administration API when synchronizing with Microsoft Exchange and through this application, Exchange administrators can enforce password policies and remotely wipe data (factory reset) if a device is lost or stolen.

Organizational aspects of use

An application that uses the Device Administration API can be installed on a device in any way, such as through Google Play, and from other sources. Fact of availability installed application does not yet enforce the policies for which it was created - the user is required to agree to the application of administrative policies. In case of failure, the application will remain on the system and will be in an inactive state. As a rule, the user's consent to the use of policies provides him with useful features, for example, access to confidential information that would not be available in the event of a refusal. If the user does not comply with the current policies (for example, when using an insufficiently strong password), the application’s reaction is determined by what the developer considered necessary to implement; usually the user loses the ability to use corporate services. When using the administration mechanism in corporate environments, keep the following points in mind:

  • when trying to connect to a service that requires compliance with a specific set of policies, not all of which are supported mobile device(for example, due to outdated Android versions), the connection will not be established;
  • if several applications that use the Device Administration API are activated on the device, the most strict restrictions, imposed by administration policies used in these applications;
  • in addition to various restrictions regarding passwords (complexity, expiration period, number of entry attempts), maximum inactivity time before locking the screen, requirements for media encryption and prohibition of using the camera, in currently Device Administration API provides additional features: Password change requirement, immediate screen lock and factory reset (with option to clear) external storage– SD cards);
  • user concerns regarding the ability of company administrators to access personal data and correspondence, passwords of device owners in in social networks etc. are completely groundless: the Device Administration API does not provide such capabilities.

How it works

Currently, the Device Administration API contains three classes that are the basis for full-featured device administration applications:

  • DeviceAdminReceiver: base class for classes that implement administration policies; The callback methods of this class provide convenient means to describe reactions to certain events related to politicians - individual “message receivers” for different events;
  • DevicePolicyManager: class for managing policies applied on the device;
  • DeviceAdminInfo: class used to describe metadata.

The main application logic is implemented in a class that extends the DeviceAdminReceiver class, which is a descendant of the BroadcastReceiver class. It is important to remember here that the callback methods of our class are executed in the main application thread (UI thread), so performing lengthy operations in them is unacceptable due to the risk of blocking the user interface. All necessary “long-running” actions must be performed in another thread (or even in a separate service). Like a regular BroadcastReceiver, our class must be described in the application manifest:

. . .
android:name=".MyDeviceAdminReceiver"
android:permission="android.permission.BIND_DEVICE_ADMIN"
android:name="android.app.device_admin"
android:resource="@xml/device_admin_data" />


android:name="android.app.action.DEVICE_ADMIN_ENABLED"/>


. . .

As you can see in the example, our receiver will receive messages with action equal to ACTION_DEVICE_ADMIN_ENABLED. In order for only the system to send us such messages, we require BIND_DEVICE_ADMIN permissions (these permissions are not granted to applications). The meta-data element contains a reference to a resource containing the policies supported by the application. In our case, the path to the XML file is: res/xml/device_admin_data. Sample contents of the file are shown below:










The child elements in uses-policies describe the types of policies used in the application. A complete list of possible policies can be found in the constants of the DeviceAdminInfo class, including on developer.android.com: http://developer.android.com/reference/android/app/admin/DeviceAdminInfo.html.

Let's look at an example implementation of the administration component:

public class MyDeviceAdminReceiver extends DeviceAdminReceiver (

@Override
public void onDisabled(Context context, Intent intent) (
super.onDisabled(context, intent);
// Called before this application stops
// be a device administrator (will be disabled
// by user).
}

@Override
public void onEnabled(Context context, Intent intent) (

// Called when the user has allowed to use
// this application is the device administrator.
// DevicePolicyManager can be used here
// to set administration policies.
}

@Override
public void onPasswordChanged(Context context, Intent intent) (
super.onPasswordChanged(context, intent);
// Called after the user changes the password.
// Does the new password comply with the policies,
// can be found using the method
// DevicePolicyManager.isActivePasswordSufficient()
}

@Override
public void onPasswordExpiring(Context context, Intent intent) (
super.onPasswordExpiring(context, intent);
// Called several times as time approaches
// password aging: when you turn on the device, once a day
// before the password expires and at the moment the password expires.
// If the password has not been changed since expiration, the method
// called once a day
}

@Override
public void onPasswordFailed(Context context, Intent intent) (
super.onPasswordFailed(context, intent);
// Called when an incorrect password is entered.
// The number of failed password attempts can be found
// using the getCurrentFailedPasswordAttempts() method
// class DevicePolicyManager.
}
. . .
}

To manage policies in an application, you need to get a reference to the policy manager (note that context is passed to the methods shown above as a parameter):

DevicePolicyManager dpm = (DevicePolicyManager) context

In the future, this manager will be used to set policies. The onEnabled() method, which sets the required password quality, could look something like this:

@Override
public void onEnabled(Context context, Intent intent) (
super.onEnabled(context, intent);
DevicePolicyManager dpm = (DevicePolicyManager) context
.getSystemService(Context.DEVICE_POLICY_SERVICE);
ComponentName cn = new ComponentName(context, getClass())

dpm.setPasswordQuality(cn, DevicePolicyManager.
PASSWORD_QUALITY_NUMERIC);

Settings for other password parameters are made using the corresponding DevicePolicyManager methods:

dpm.setPasswordMinimumLength(cn, 32);
dpm.setPasswordHistoryLength(cn, 10);
dpm.setPasswordExpirationTimeout(cn, 864000000L);

In addition to setting policies, DevicePolicyManager allows you to perform other operations (of course, not in the onEnabled() method):

  • instant screen lock:
    dpm.lockNow();
  • Factory reset with SD card clear:
    dpm.wipeData(DevicePolicyManager.WIPE_EXTERNAL_STORAGE);
  • camera lock:
    dpm.setCameraDisabled(cn, true);

Additional Information

A deployed working sample application can be found in the Android SDK package (<путь-к-SDK>/samples/android-<версия-API/ApiDemos/).

The website developer.android.com has articles on this topic in the Training sections: http://developer.android.com/training/enterprise/device-management-policy.html and API Guides: http://developer.android.com /guide/topics/admin/device-admin.html.

Descriptions of the classes of the android.app.admin package on the same site: http://developer.android.com/guide/topics/admin/device-admin.html.

You can learn how to develop mobile applications for Android at.

I'm trying to remove the program from device administrators and it doesn't work. That is, I click on the name of the program, select Disable and the phone immediately turns off. After a minute or two it turns on, but the program remains the same as the administrator. This harmful program is a virus, that's why I want to disable it. Because otherwise it will not be deleted.

  1. Install the KIS program from the Google Playmarket https://play.google.com/store/apps/details?id=com.kms.free or Malwarebytes Anti-malware https://play.google.com/store/apps/details? id=org.malwarebytes.antimalware
  2. Launch and perform a full scan of your phone. This will take a long time, but be sure to wait for it to finish! When the scan is complete, remove the malware found.
  3. Now try again to remove the malware from the device administrators. Open Phone Settings, then Security, then Device Administrators. Uncheck the box next to the malware. Confirm your actions. If a window appears with the message “To roll back updates, a full factory reset is required. All information on your device will be deleted..”, then feel free to click on OK. This message is only meant to scare you.
  4. If step 3 was successful, then open the Applications section in your phone Settings and remove the malicious program.

Hello! I have a similar problem, only after I unchecked the checkbox, the phone began to ask for a PIN code on the main window. Doctor Web remained in the administrators and it looks like that application (called “Installation”, with the Avito icon). The phone works itself, calls, messages come, but I can’t go anywhere. When I restart the phone, sometimes a notification appears that an error has occurred in the Installation application. With or without the SIM, the phone still asks for a PIN code. I put the Android in safe mode, still the same...

Tell me what to do? (Android explay ALTO, firmware v1.00)

www.spyware-ru.com

How to delete an application on Android

Working with modern smartphones is usually quite simple. This is especially true for applications, namely installation using Google Play and removal through program settings. The situation is different when it comes to preinstalled ones that the smartphone or tablet manufacturer has safely installed. Most often, such software cannot be removed. What to do then?

There can be two reasons for this problem:

How to remove the device administrator program on Android

A device administrator is a software that has an extended list of powers and rights, unlike other ordinary applications. To the point that such a program can, if necessary, lock the phone and set passwords. But there is nothing to be afraid of, and you can deactivate it in the special menu “settings - security - device administrators”.

How to remove built-in system applications

Very often you can see how a smartphone manufacturer tries to “take care” of its users and install as many unnecessary and useless programs as possible. And besides, they tend to run in the background and drain the battery faster.

To solve the problem, you need to find the hated program in the settings, press the “Disable” button, clear the data and cache. After this, it will no longer appear in the menu, will not consume RAM and affect the operating time of the smartphone. It will not be possible to completely remove it using standard means - you need root rights. However, be careful when manipulating any system applications, this may affect the entire operation of the smartphone.

geekk.ru

How to get rid of uninstallable applications

Installing and uninstalling applications in the Android operating system is a very simple process, a few taps on the screen and you're done. However, there are applications that refuse to be removed. This situation occurs because some applications are installed as a device administrator, while others are already installed (pre-installed) by the device manufacturer and the user does not have rights to remove them.

To completely remove pre-installed applications, you will need root rights. If you don't want to root your device, you can try disabling pre-installed programs so that they don't start with Android and take up space in RAM. So, how to remove uninstallable applications.

Uninstalling admin apps on Android

Device administrator applications require more rights for their full functionality. This should not be confused with applications that require root rights, it’s just that administrator programs need more rights within the existing user rights. For example, to install protection or remotely block a smartphone, track it via GPS, etc.

If the application you installed is not uninstalled, then go to the settings of your Android device, go to the “Security” section and then to “Device Administrators”, in which uncheck the program being deleted that it is an administrator.

After this, the application will be uninstalled without any problems.

Removing or disabling pre-installed applications

There are manufacturers who abuse the installation of their programs that cannot be removed. You can delete them, as mentioned above, only by obtaining root rights on the device. But what to do if there is no desire to do this or the smartphone/tablet is under warranty and its root serves as the basis for removing the warranty? In this case, you can try stopping pre-installed applications. To do this, do the following:

Disabled pre-installed applications should disappear from the menu and will no longer run along with Android, and also take up RAM, which will be a big plus in budget smartphones, where it is always in short supply.

However, with system applications this procedure must be performed carefully, because You may encounter unstable operation of your device.

infodroid.ru

How to get rid of uninstallable applications?

The process of purchasing various apps from the Google Play Store is incredibly simple. To do this, you need to find the desired program or game, read the description and reviews of other users, after which you can safely click on the “Install” button. Uninstalling apps is no more difficult: it only takes a few clicks. However, from time to time the system refuses to remove certain programs, not to mention applications pre-installed by the manufacturer. How to get rid of this problem? Let's find out.

In general, there are two reasons for not deleting an application. In the case of the first, the annoying program can act as a device administrator. The second option is much more common, and each of us has probably encountered it. We are talking about applications that are part of the smartphone system. In other words, programs preinstalled by the company’s engineers, for which there is simply no delete key.

Our foreign colleagues from phonearena shared possible solutions to both of the problems described above. Let's look at each of them separately.

Administrator application

Don’t rush to close this article: there is nothing scary in this phrase. The fact is that some applications require more extensive permissions. For example, setting a password on a smartphone, blocking it, tracking geolocation and much, much more.

In this case, to remove them, just uncheck the special section of the menu. In my good old HTC One S, which I returned to use after the experience with the iPhone, to do this, go to settings - security - device administrators. One problem is solved, but what about the other?

System application

Not all smartphone manufacturers love their users. The proof of this statement is the huge number of absolutely useless pre-installed applications that you have no desire to use. In a Taiwanese smartphone, again, similar ones include the EA Games icon, Friend Stream, Rescue, Teeter and other dubious programs.

Agree, it’s not so much their presence that’s annoying as the inability to get rid of them, right? However, it turns out that there was a way out of this situation.

To do this, you need to go to the application manager, select the hated program and find the “Disable” button. Following this, you can also clear the application cache.

The result will not be long in coming: the marked applications will disappear from the menu and will no longer remind you of themselves. However, it is not always possible to completely get rid of them: most likely, some programs will take up several megabytes in the memory card bins, but do not forget about the main advantage. A disabled application will not launch when the device is turned on, thereby saving RAM and, accordingly, device charge. Not bad, right?

Be that as it may, we should not forget that many system applications affect the operation of the smartphone as a whole, and therefore you should experiment with disabling them with extreme caution.

Apps in the Android operating system are a very simple process, a few taps on the screen and you're done. However, there are applications that refuse to be removed. This situation occurs because some applications are installed as a device administrator, while others are already installed (pre-installed) by the device manufacturer and the user does not have rights to remove them.

To completely remove pre-installed applications, you will need root rights. If you don't want to root your device, you can try disabling pre-installed programs so that they don't start with Android and take up space in RAM. So, how to remove uninstallable applications.

Device administrator applications require more rights for their full functionality. This should not be confused with applications that require , it’s just that administrator programs need more permissions within the framework of existing user rights. For example, to install protection or remotely block a smartphone, track it via GPS, etc.

If the application you installed is not uninstalled, then go to the settings of your Android device, go to the “ Safety" and further in " Device Administrators", in which uncheck the program being deleted that it is an administrator.

After this, the application will be uninstalled without any problems.

Removing or disabling pre-installed applications

There are manufacturers who abuse the installation of their programs that cannot be removed. You can delete them, as mentioned above, only by obtaining root rights on the device. But what to do if there is no desire to do this or the smartphone/tablet is under warranty and its root serves as the basis for removing the warranty? In this case, you can try stopping pre-installed applications. To do this, do the following:

Disabled pre-installed applications should disappear from the menu and will no longer run along with Android, and also take up RAM, which will be a big plus in budget smartphones, where it is always in short supply.

Incredibly simple. To do this, you need to find the desired program or game, read the description and reviews of other users, after which you can safely click on the “Install” button. Uninstalling apps is no more difficult: it only takes a few clicks. However, from time to time the system refuses to remove certain programs, not to mention applications pre-installed by the manufacturer. How to get rid of this problem? Let's find out.

In general, there are two reasons for not deleting an application. In the case of the first, the annoying program can act as a device administrator. The second option is much more common, and each of us has probably encountered it. We are talking about applications that are part of the smartphone system. In other words, programs preinstalled by the company’s engineers, for which there is simply no delete key.

Our foreign colleagues from phonearena. Let's look at each of them separately.

Administrator application

Don’t rush to close this article: there is nothing scary in this phrase. The fact is that some applications require more extensive permissions. For example, setting a password on a smartphone, blocking it, tracking geolocation and much, much more.

In this case, to remove them, just uncheck the special section of the menu. In my good old HTC One S, which I returned to use after using the iPhone, to do this you should go to settings - security - device administrators. One problem is solved, but what about the other?

System application

Not all smartphone manufacturers love their users. The proof of this statement is the huge number of absolutely useless pre-installed applications that you have no desire to use. In a Taiwanese smartphone, again, similar ones include the EA Games icon, Friend Stream, Rescue, Teeter and other dubious programs.

Agree, it’s not so much their presence that’s annoying as the inability to get rid of them, right? However, it turns out that there was a way out of this situation.

To do this, you need to go to the application manager, select the hated program and find the “Disable” button. Following this, you can also clear the application cache.

The result will not be long in coming: the marked applications will disappear from the menu and will no longer remind you of themselves. However, it is not always possible to completely get rid of them: most likely, some programs will take up several megabytes in the memory card bins, but do not forget about the main advantage. A disabled application will not launch when the device is turned on, thereby saving RAM and, accordingly, device charge. Not bad, right?

Be that as it may, we should not forget that many system applications affect the operation of the smartphone as a whole, and therefore you should experiment with disabling them with extreme caution.

Are there many such unnecessary programs on your smartphone? Share your answers in the comments.







2024 gtavrl.ru.