How to remove an app with active device admin enabled on Android?

前端 未结 6 2219
天命终不由人
天命终不由人 2020-12-12 19:55

I wrote an app with device admin enabled (DevicePolicyManager) and installed. But when I want to uninstall it, it returns failed with this message

WAR

相关标签:
6条回答
  • 2020-12-12 20:35

    Enter vault password and inside vault right top corner options icon is there. Press on it. In that ->settings->vault admin rites to be unselected. Work done. U can uninstall app now.

    0 讨论(0)
  • 2020-12-12 20:39

    Go to SETTINGS->Location and Security-> Device Administrator and deselect the admin which you want to uninstall.

    Now uninstall the application. If it still says you need to deactivate the application before uninstalling, you may need to Force Stop the application before uninstalling.

    0 讨论(0)
  • 2020-12-12 20:46

    You could also create a new DevicePolicyManager and then use removeAdmin(adminReceiver) from an onClickListener of a button in your app

    //set the onClickListener here
    {
       ComponentName devAdminReceiver = new ComponentName(context, deviceAdminReceiver.class);
       DevicePolicyManager dpm = (DevicePolicyManager)context.getSystemService(Context.DEVICE_POLICY_SERVICE);
       dpm.removeActiveAdmin(devAdminReceiver);
    }
    

    And then you can uninstall

    0 讨论(0)
  • 2020-12-12 20:50

    Redmi/xiaomi user

    Go to "Settings" -> "Password & security" -> "Privacy" -> "Special app access" -> "Device admin apps" and select the account which you want to uninstall.

    Or Simply

    go to setting -> Then search for Device admin apps -> click and select the account which you want to uninstall.

    0 讨论(0)
  • 2020-12-12 20:53

    On Samsung go to "Settings" -> "Lock screen and security" -> "Other security settings" -> "Phone administrators" and deselect the admin which you want to uninstall.

    The "security" word was hidden on my display, so it was not obvious that I should click on "Lock screen".

    0 讨论(0)
  • 2020-12-12 20:57

    For Redmi users,

    Settings -> Password & security -> Privacy -> Special app access -> Device admin apps

    Click the deactivate the apps

    0 讨论(0)
提交回复
热议问题