Have been asked many times, how to block the installation of applications from an apk file, how to block the package installer ... The common answer is that it is impossible because even if you will disable the package installer the device will not boot and will remain stuck in a bootloop.
Fixing the bot loop is very simple but does not matter at the moment. I found a way to block an activity of the package installer so that the device could start normally: pm disable com.android.packageinstaller/.InstallInsalling
It works great and blocks application installation and the device works without any issues. I know it is still possible to bypass it and install apps through ADB but it still helped me a lot.
Now I'm looking for the name of the activity that will disable the developer options. Mybe block the "about phone", or the clicks on "Buiild Numbe" or only the "Usb debugging" options - through pm disable activity, or maybe through permissions, does anyone have an idea or can help me find the names of the activity?
The activity name of the developer options is com.android.settings/com.android.settings.SubSettings
but it's related to almost every part of the settings... is there anything more specific?
adb shell dumpsys window | grep mCurrentFocus
. – Irfan Latif Jun 21 '21 at 11:06adb shell dumpsys window | grep mCurrentFocus
I get:com.android.settings/com.android.settings.SubSettings
..... But when I'm using an app called "developer options Shortcut" and then the dumpsys window command I getcom.android.settings/com.android.settings.Settings$DevelopmentSettingsDashboardActivity
- and when I'm pm disable it just block the settings main app with all the settings.... when blocked via AppManager it dose nothing.... why its like that? – Joe Jun 21 '21 at 11:53android.permission.MANAGE_DEBUGGING
, from Settings app or form --user 0? I got this message:is not a changeable permission type
?