0

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?

10
  • 1
    Open the app/activity and run adb shell dumpsys window | grep mCurrentFocus. Commented Jun 21, 2021 at 11:06
  • Answered here: android.stackexchange.com/a/175410/218526 Commented Jun 21, 2021 at 11:08
  • Install App Manager app from F-Droid, find Settings app in the apps list shown in it, click on it then Activity, then search for the term "develop". You will get very close to what you need.
    – Firelord
    Commented Jun 21, 2021 at 11:12
  • @Fireloard I have already tried AppManager, there are only 2 activities related to Developer options, and even after I blocked both nothing happened. I'm now trying irfan's advice
    – Joe
    Commented Jun 21, 2021 at 11:23
  • 1
    Activity - which can be disabled or enabled - is the whole screen of an app, not a part of it, like you are looking for just USB Debugging switch. Also note that any app can disable or enable any of its components (which include Activities) at any time. So what you disabled may not remain disabled forever. Commented Jun 21, 2021 at 12:39

0

You must log in to answer this question.

Browse other questions tagged .