• How to remove an application associated with the device administration. How to remove an app that won't uninstall on Android

    Almost every user of a device running Android OS has at least once encountered the expression of root rights to Android. At the same time, not everyone knows what they are needed for, how to get them and use them.

    Administrator rights are a kind of privilege that allows you to fully control your gadget and make any changes, including to system files. At its core, getting them onto your device is hacking it. That is why you will not find such applications and programs in the official Play Market.

    Why are such rights needed?

    In most cases, root rights on Android are set to carry out the following actions:

    • installation new firmware per device;
    • changes in processor frequency up or down;
    • changing the graphical interface;
    • deleting “native” ringtones, files and useless applications;
    • changing system files;
    • replacing animation when turning on the smartphone.

    Not all smartphone buyers will need the above tasks. However, if such changes still need to be amended standard system, then you will need to figure out how to root your device.

    How to get root rights on Android

    With each new version Android, obtaining the desired root rights is becoming increasingly difficult. Manufacturers are trying to introduce new technologies and complex systems security. But despite this, there are many programs that allow you to achieve successful results. One of the most popular utilities is Framaroot.

    To obtain root rights using this program, you must first install it on your smartphone. After this, the application will ask you to select some options.

    You need to click on one of the options and the application will report the result. If the outcome is successful, you need to reboot the device and safely use the gained access to secret internal files smartphone.

    If you fail, don't be upset. Ways for getting root a huge number of rights. For example, you can use another popular app called UniversalAndRoot . The programs are approximately the same. Each of them is quite effective, so it’s worth trying each option.

    Of course, there are a number of cases when such applications cannot cope with the task. Then you will have to obtain root rights to Android using a computer and more powerful programs.

    One of these computer programs is Super One Click. It has a fairly clear interface and great capabilities. This makes it one of the most effective and popular in its category.
    To obtain administrator rights using a computer, you need to:
    — install and run the program on your computer;
    — on your smartphone, allow installation of applications from other sources;
    — do USB debugging on the smartphone and connect it to the computer;
    - in the program that opens, press the “root” button, which is located on the left top corner;
    — wait for the process to complete;
    — reboot the smartphone.


    Photo: Super One Click

    If everything went well, an application called “Superuser” will appear on your phone. Its presence indicates the successful receipt of root rights. There is no need to do anything else. Just activate this application when needed.
    Every year more and more new programs appear in the public domain that allow you to obtain superuser rights. You can use any of them, based on personal preference. The interface of these programs is in most cases very simple and to complete the entire procedure, just pressing one button is enough.

    Photo: Super One Click

    When obtaining root rights, it is worth remembering that along with limitless possibilities, there are several significant disadvantages. Firstly, receiving them automatically voids the warranty on the smartphone. For this reason, it is not recommended to perform such operations on new devices. The second disadvantage is the risk of damaging your device. Changing system files may cause malfunction.

    Therefore receive root rights and make major changes in system files worth it only if the user is well versed in this issue and clearly understands the algorithm of his actions.

    Dear readers! If you have any questions or comments on the topic of the article, please leave them below.

    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 developers enterprise applications. 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. Android API 8 (Android 2.2) introduced support for enterprise applications for the first time with using Device Administration API, which provides the ability to administer devices on Android platform at the system level. This API enables 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 the Device Administration API when synchronizing with Microsoft Exchange and through this application, Exchange administrators can enforce password policies, as well as remotely erase data (do a factory reset) in the event of a device being 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, unavailable in case of failure. 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 version Android), the connection will not be established;
    • if several applications that use the Device Administration API are activated on the device, the most stringent restrictions imposed by the administration policies used in these applications are applied;
    • 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 present moment 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 social networks etc. are completely groundless: the Device Administration API does not provide such capabilities.

    How does this work

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

    • DeviceAdminReceiver: base class for classes that implement administration policies; callback methods of this class provide convenient means for describing reactions to certain events associated with policies - 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 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 children 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.

    Most users of Windows systems, starting from the seventh modification, know that not all files or directories can be deleted using a standard action or using the Delete button. To perform such procedures with some objects, the system may require administrator rights (if the file or directory does not belong to system components, a prompt to confirm the actions being performed is usually issued immediately). But how to delete files as an administrator if such a notification does not appear on the screen? To do this, you can use several standard methods, which will be discussed below in as much detail as possible.

    How to delete a file that requires administrator rights: general principles

    In general, the easiest way to delete non-deletable objects to which access is blocked is to perform the necessary actions when logging in as an administrator at startup or when changing users.

    Unfortunately, Windows systems create one entry for the user, giving it maximum rights. But the so-called super administrator prevents deleting or performing any other actions.

    On the other hand, the question of how to delete files as an administrator may have solutions that are slightly different from the method described above, namely:

    • changing object attributes;
    • obtaining administrator rights;
    • activation of extended privileges;
    • using the command console.

    In some cases, when it comes to files and folders of installed programs, you can use special uninstaller applications that allow you to remove anything and everything from the system, for which the main condition is to run as an administrator. After this, you can even get rid of built-in Windows components that are not removed in the usual way or are even missing from the list of installed applications.

    Changing the attributes of deleted objects

    So, how to delete files from a disk if for some reason they are not deleted? The first step is to enter the properties section (right-click menu) in regular Explorer or any other file manager and check the included additional attributes.

    It often happens that the “Read Only” option may be set, which allows you to open the file for viewing, but prohibits deleting, moving, renaming or editing. To delete, simply uncheck the corresponding attribute, after which the changes are saved and the file becomes available for deletion.

    How to get administrator rights?

    But this was the simplest and far from ideal method. In order to avoid such problems from arising, isn’t it easier to immediately set for yourself the maximum set of privileges? How to get administrator rights?

    To do this, you initially need to run the command line as an administrator (cmd in the “Run” menu), enter the combination net user Administrator /active:yes in it, and after executing the command, reboot the system. You will be able to log in as an administrator, and previously blocked files and directories can be deleted without problems.

    Disabling login control

    The question of how to delete files as an administrator has another solution that is not directly related to obtaining additional rights. And it consists in reducing the level of control of registration records.

    In order not to spend a long time searching for the desired section, you should call the search bar from the Start menu and enter the abbreviation UAC there. In the options window that appears on the left, there is a special slider that needs to be moved to the lowest position and saved changes.

    Note: Permanently disabling monitoring is not recommended because it may increase the risk of malicious executable codes entering the system or causing unwanted software to be installed.

    Setting advanced rights

    In principle, you can set for yourself an expanded set of rights to carry out absolutely all actions provided by the system. How to delete files from the disk in this case?

    First, in Explorer, in the RMB menu, the properties window is called up, on the security tab, the additional parameters button is pressed, after which the owner is replaced with the current user.

    Next, you need to go to the permissions section and check the Full Access option, and then check the boxes for adding and replacing permissions. After saving the changes, you can perform any actions with non-deletable objects.

    Using the Command Line

    If the user is not afraid of using the Shell, the question of how to delete files as an administrator can be resolved with its help. There are two options for action here.

    In the first case, you can launch Explorer with special privileges using the command runas /user:%userdomain%\administrator “explorer /separate”, after which in the file manager any actions performed will automatically be assigned to the administrator.

    For the second method, as an example, consider the question of how to delete a folder as an administrator. In this case, the entered command should look like this: RMDIR /S /Q C:\FULL_PATH (for example, for a system partition). The permission prompt and deletion confirmation for the specified directory will be disabled. The only inconvenience of this method is that the full path to the file will have to be either entered manually or copied from the address bar of the same Explorer (copying does not work in Windows 7). But in general, this is the method that allows you to get rid of files and directories that have been blocked by the super administrator without any problems.

    This can happen to anyone - when you try to delete an application, it turns out that it is impossible to delete it. Moreover, in this case we are not talking about a built-in application in the firmware, which cannot be removed without root rights, but about the most common one, which you installed on your device.

    For example, some time ago we talked about this and also showed an application called Volume Unlock, thanks to which you can turn on the device by pressing the volume up button. When running, the application receives administrator rights, so there is no easy way to remove it. But let’s show you clearly what it looks like.

    Go to settings and find the “Applications” section.

    Here we see a list of applications. Select the one you need (in our case, Volume Unlock).

    And what do we see? That's right, the "Delete" button is inactive.

    If you encounter a similar problem, no problem, it can be solved. To do this, go to Google Play and type in the search the word “uninstall” (without quotes) or uninstaller. Select an application from Rhythm Software and install it. This is an extremely small free application that does not even require additional rights.

    After installing the application, open it and see a list of all installed applications. Select the one you need by tapping on it once, and then click on the “Delete selected applications” button, which is located at the top of the screen.

    We agree with the deletion and see a window in front of us in which it is written: “It is impossible to delete the package because it is selected for device administration." Click “Administration Settings”.

    A window opens and uncheck the application.

    In a new window, disable the application’s administrative rights by clicking on the “Disable” button.

    After this, we get to the application page and see that the “Delete” button is activated.

    Click on it and the application is deleted.

    Of course, this way you can remove virus applications that cannot be removed in the usual way. To remove system applications, you must have root rights.

    Second way

    For this method, we thank the user with the nickname Android, who in the comments suggested a less complicated method for removing such applications. He talked about another method that requires enabling USB debugging. A user with the nickname Valery said that you can use this method without USB debugging, for which we thank him. And yet, we show an example with USB debugging - just in case. We advise you to immediately open the “Security” section (see the last three screenshots) and if this does not help, try enabling USB debugging.

    Go to settings. Here, find the “About phone” (or “About tablet”) section.

    After opening this section, it will appear in the settings:

    Go into it and check the box next to “USB Debugging”.

    Here you will see a check mark for an application that cannot be removed in the usual way.

    Simply uncheck the box, then click Disable.

    The application can now be uninstalled as usual.