This has been asked many times: how to block the installation of applications from an APK file, how to block the package installer, etc. The common answer is that it is impossible, because if you disable the package installer, the device will not boot and will remain stuck in a boot loop.
Fixing the boot loop is very simple, but it 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, 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. Maybe block the "About phone", or the clicks on "Build Number", 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?
Asked by Joe
(115 rep)
Jun 21, 2021, 10:56 AM
Last activity: Dec 19, 2024, 03:22 PM
Last activity: Dec 19, 2024, 03:22 PM