android developer
android developer

Reputation: 116402

Is it possible to revoke admin permission using adb command?

As the title says... Only thing I've found is to reach its settings screen, but nothing that actually revokes admin.

Some apps get admin rights by asking the user to do so, such as this one:

https://play.google.com/store/apps/details?id=com.universallauncher.universallauncher&hl=en

Before uninstalling an app like that, on some Android versions, you have to first revoke its admin permission. This is possible via UI, by going through the various settings screen, but I want to know if there is an easier way, in case I have a PC connected or have a rooted device, using adb command.

Upvotes: 1

Views: 2655

Answers (2)

Andrew
Andrew

Reputation: 1

First

adb shell pm disable-user --user0 com.app.app

Second

adb shell pm uninstall --user0 com.app.app

Note #1: --user0 for private (main) profile user, for work profile --user10, --user11, --user12, etc

Note #2: this code maybe use in *.bat-file

;)

Upvotes: 0

HyunJin
HyunJin

Reputation: 336

Maybe you could use:

adb shell pm [grant|revoke] com.my.app android.permission.BIND_DEVICE_ADMIN

Let me know if it helped you!

I got some info about admin permissions in the Android Developers site, hope it helps you.

Upvotes: 2

Related Questions