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
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
.