Script to remove an application as "Device admin app"

Solved
T
Troy
TouchStar

Does such a script exist? When this specific app is installed it requests device admin permission in order to be able to lock the screen.

If I want to uninstall this app or clear its data then at the moment I have to go to Settings/Security/Device admin apps and untick this app.

What I would like if possible is a solution script/intent or other way of removing the admin permissions from this app in order to uninstall or clear data as I would with any other app that wasnt a device admin.

Thanks

5 years ago
Android
ANSWERS
RC
Raymond Chan Diamond Contributor
5 years ago (edited 5 years ago)

As far as I know, what you want is not possible. There is no script command to achieve what you need.

Solution
ST
Shawn T
5 years ago

Hi Troy,

If this is a Zebra device you can use the DeviceAdmin Manager CSP to turn off/on an app as Device Administrator. This xml can be pushed via package / file-sync with a post install script. https://techdocs.zebra.com/stagenow/4-3/csp/devadmin/. 

If non-Zebra, I do not know of any other way to accomplish this. 

Shawn