Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to programmatically disable apps without root?

I've just found an app that allows to disable Samsung apps without root, and in the background:

https://play.google.com/store/apps/details?id=com.hecorat.packagedisabler

And also this free one:

https://play.google.com/store/apps/details?id=com.ospolice.packagedisabler

  1. How could this be? It doesn't even show a system-type alertDialog to ask the user if it's ok to disable the app. Did they find a flaw that allows doing so?

  2. Is it only for Some Samsung apps? What about other apps and other companies? Is is possible there too?

  3. Could the same mechanism be used for other operations? Like enabling apps?

I currently don't have a Samsung device, so I can't even check this app.

like image 684
android developer Avatar asked Nov 09 '22 16:11

android developer


1 Answers

You can hide or unhide the apps provided you make your app as device owner with the api setApplicationHidden of DevicePolicyManager

like image 197
Pinks Avatar answered Nov 14 '22 22:11

Pinks