Disable DeviceAdmin from shell?

后端 未结 3 654
旧巷少年郎
旧巷少年郎 2020-12-29 00:12

I\'m trying to uninstall an application from shell, however this application is running as a device administrator and thus shell> adb uninstall com.example.test

3条回答
  •  囚心锁ツ
    2020-12-29 01:02

    You can not uninstall app directly if it is set as Admin .first you have to disable the admin mode then you will be able to uninstall app. to remove active admin first you run this command

    adb shell dpm remove-active-admin com.kiosk.example/com.kiosk.example.MyDeviceAdminReceiver 
    

    (com.kiosk.example) is package name replace it with your own and MyDeviceAdminReceiver is receiver name. when this command give success then you can uninstall app. or run this command to uninstall

    adb uninstall com.kiosk.example.

提交回复
热议问题