5

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.

android developer
  • 114,585
  • 152
  • 739
  • 1,270
  • I guess it has to do with the fact the app has device admin permissions, no sure tho. – Pedro Lobito Apr 21 '16 at 09:22
  • the app you have mentioned uses the samsung fort Knox sdk to disable app it is samsung specific. – Piyush Apr 21 '16 at 09:24
  • @piyush Are you sure? If so, can you please show how? "Pinks" wrote it's possible by using admin rights. – android developer Apr 21 '16 at 09:43
  • no you cannot do this only by device admin. – Piyush Apr 21 '16 at 09:54
  • @piyush I see. Can you please show how it is done using what Samsung provides? – android developer Apr 21 '16 at 10:03
  • hi its the whole sdk provided by samsung known as knox it provide various functionality including this one you can have a look here https://seap.samsung.com/html-docs/android-standard/Default.htm this is basically for mdm purpose. – Piyush Apr 21 '16 at 10:25
  • @piyush Can you please show minimal code for this? I wonder how easy to use it is. Maybe I will add it to my tiny app-manager app, as a replacement to some of the root-only features : https://play.google.com/store/apps/details?id=com.lb.app_manager . What other operations on apps can be done there? – android developer Apr 21 '16 at 11:26

2 Answers2

1

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

Pinks
  • 958
  • 7
  • 10
  • Interesting. Can you please show how? Does it disable the app, or only hide it? And, is this how this app works? Once you get this special admin rights, what can you do with it? Can you disable any app? Enable? Uninstall? Does it work only on Samsung devices, or any device? – android developer Apr 21 '16 at 09:42
  • this is for device owner not for possible to use this if your application is only device admin. – Piyush Apr 21 '16 at 09:55
  • This will just hide the app not disable or uninstall this. Yes piyush is right. This is an api of device owner. You need to make your app run as device owner – Pinks Apr 21 '16 at 10:16
0

Your app needs to be the device owner of the device. In order to become a device owner, you either need to do an NFC configuration or adb command shell. You can find a very well written blog by Florent here.

However, there is a new method of getting your application to become a device owner starting with Android Marshmallow. With a lot of limitations though. You have to be an EMM provider and your client has to have a google business or edu licensing for this to work.

There is no application on the google play store that allows your app to become device admin. As a device owner you have a lot of things you can control on the device and hence, I believe Google may not want to provide this kind of control without proper safeguards.

With regards to Samsung Devices, they provide their knox sdk as mentioned with other answers here which gives you access to certain APIs that are not allowed via stock Android.

kash
  • 830
  • 2
  • 7
  • 19
  • So the only way for a normal third party to perform those actions is via root or Samsung's Knox? Can you please show how to use Knox for this? – android developer Apr 23 '16 at 10:55
  • @androiddeveloper visit https://seap.samsung.com/ - you should do more research on their website. The documentation is pretty clear on how to do it all. – kash Apr 26 '16 at 07:06
  • ok, I created a post about it here: https://seap.samsung.com/forum-topic/question-how-get-started-knox-sdk-perform-operations-apps – android developer Apr 26 '16 at 12:33
  • 1
    I'm the author of an app that uses this KNOX functionality without being setup as the device owner. For us it works very well and is easily deployed through the play store. – dkwiebe Aug 23 '16 at 18:31
  • How strange, it seems the purview of 'device owner' is limited to Google Business and educational institutions. Kind of makes you wonder... what did the Real device owner purchase? Syntax Error = Logic Error. – Hypersoft Systems Oct 08 '19 at 14:02
  • @Hypersoft Systems , not sure what your comment is about. DO via an app is meant for managed device scenarios; If you sign in to a Google account during device setup, your account is considered the DO. There's nothing to wonder about. If you want, you can use adb to set an app of your making as DO on your device, too, provided you remove any accounts first (they can be readded afterwards). – Keilaron Oct 28 '19 at 18:04
  • @Keilaron, device-owner and device-administrator are two different concepts. I am referring to device-owner as the device-admin, being implemented in a very questionable manner which raises significant security concerns. [further] just because "i" want the app installed, doesn't mean that i always want it to be able to run, and uninstalling+re-installing an app of significant size is an extreme user burden. – Hypersoft Systems Oct 29 '19 at 15:02
  • I'm thoroughly aware of the difference. I wasn't sure, however, if your comment was in relation to the Q&A anymore or DA/DO in general. Samsung's been doing this sort of thing for a while, it's clear they have other ideas.. – Keilaron Oct 29 '19 at 15:19