d4rken-org / sdmaid

SD Maid is an Android app that helps you manage files and apps.
https://play.google.com/store/apps/details?id=eu.thedarken.sdm
1.5k stars 743 forks source link

Enable/Disable apps using DeviceOwner functionality on unrooted devices #718

Closed d4rken closed 1 year ago

d4rken commented 7 years ago

On unrooted devices granting SD Maid device owner functionality via ADB could be used as replacement for root when enabling/disabling apps.

https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setApplicationHidden(android.content.ComponentName,%20java.lang.String,%20boolean)

Might be a bit excessive just for this functionality?

Also we would have to differentiate between disabled apps and "hidden" apps, or would we?

http://android.stackexchange.com/questions/128949/pm-hide-vs-pm-disable-the-identity-crisis

The end result for the user would be the same, but for accuracy sake I don't like merging both...

d4rken commented 6 years ago

https://www.reddit.com/r/androiddev/comments/6tuavo/ive_received_a_mail_from_google_about_bind_device/

Fury22 commented 6 years ago

With ADB, rooting may no longer be a necessity (or even a possibility for some phones) if functionality can be achieved. ADB commands are only sent by the user and as device admin features are not even requested by SD Maid, it should pass any Google automation scan.

ShahabJafri commented 6 years ago

Please consider doing this. Going through my apps, I realised that I root my phone only for SD Maid (16 GB internal memory gets cluttered fast) and the rest of root apps I can do without. Now as Files Go provides an alternative for the uncluttering part, it is nowhere near in features and control to SD Maid. Please see if certain permissions can be added via ADB to have SDM access to run Corpse Finder, System Cleaner and most importantly AppCleaner. We can have modes such as Non Rooted, ADB and Fully Rooted with appropriate functionality available as per the permissions (a la Greenify).

AxiK101 commented 6 years ago

Adb support!!✌️ I vote yes

SuperSandro2000 commented 6 years ago

(or even a possibility for some phones)

Don't know any phone that can't be rooted. Could you give an example?

As far as I know Files Go only uses the Android clean cache feature and does not touch any other files. (Maybe Samsungs cleaner touches more?)

I don't think it is a question if he wants to do it or not but it's it worth his time doing it? Most power users are rooted because most stuff needs root and always needing a PC to run adb off is not too practically either. I mean sure it would be unique feature but if only 5 people use it then it can be more work to invest the time somewhere else. Just wait and if it is suitable in a sensible amount of time I am sure he will eventually do it.

ShahabJafri commented 6 years ago

Don't know any phone that can't be rooted. Could you give an example?

A lot of phones lose warranty if rooted or require unlocking the bootloader to root or install a custom OS which also causes the user to lose warranty. And in some cases this is a destructive process (For instance in Samsung phones, you install a custom recovery and a NAND flag will be permanently be changed Knox 0x1and you can not ever get it back). Rooting a phone is not very desirable in some cases (like your parents' phones) which may expose the phone to vulnerabilities or lose some features (like banking applications, Google or Samsung Pay) etc.

With the adb approach, some elevated commands are run once granting the relevant permissions and then even a non tech savvy user can continue to use the app with added features. The same approach is used by Greenify, bxActions, MoreLocale etc.

Regarding Files Go, I don't think listing out its features is pertinent to the thread. Please install the app yourself and check what's available. FYI, it does a lot more than just removing cache.

SuperSandro2000 commented 6 years ago

I had installed Files Go when it came out and didn't over something to keep it.

SD maid with root is for tech savvy users otherwise without a custom recovery to recover from you can break you device permanently if you delete the wrong stuff.

At least in Europe you don't lose your hardware warranty if you root your device.

Koleman-dev commented 3 years ago

(или даже возможность для некоторых телефонов)

Не знаю ни одного телефона, который нельзя рутировать. Не могли бы вы привести пример?

Насколько мне известно, Files Go использует только функцию чистого кеша Android и не затрагивает другие файлы. (Может, очиститель самсунгов больше трогает?)

Я не думаю, что это вопрос, хочет он это или нет, но стоит ли потратить на это время? Большинство опытных пользователей имеют root-права, потому что большинству вещей нужен root-доступ, и необходимость всегда иметь ПК для запуска adb не слишком практична. Я уверен, что это будет уникальная функция, но если ею воспользуются всего 5 человек, будет больше работы, чтобы инвестировать время в другое место. Просто подождите, и если это уместно, то я уверен, что в конечном итоге он это сделает.

there are leased phones without the ability to unlock the bootloader .. have you come across?