我可以使用 adb 和 powershell 来查询和调整应用程序和设置吗?

问题描述 投票:0回答:1

设置运行 Android 13 的三星 S20,手动跳过大多数选项,并在可能的情况下大规模禁用大多数功能。

通过手机用户界面,似乎每个应用程序都必须单独配置。 有没有办法使用 adb 和 powershell 之类的东西来查询所有应用程序,列出所有启用了通知的应用程序,甚至禁用所有应用程序?

同样的问题适用于基于应用程序的其他设置,例如:位置、在屏幕上绘图、管理权限等。

powershell adb
1个回答
0
投票

您可以通过设置提供程序命令查看、列出、删除和更改设置

 $ settings help
Settings provider (settings) commands:
  help
      Print this help text.
  get [--user <USER_ID> | current] NAMESPACE KEY
      Retrieve the current value of KEY.
  put [--user <USER_ID> | current] NAMESPACE KEY VALUE [TAG] [default]
      Change the contents of KEY to VALUE.
      TAG to associate with the setting.
      {default} to set as the default, case-insensitive only for global/secure namespace
  delete [--user <USER_ID> | current] NAMESPACE KEY
      Delete the entry for KEY.
  reset [--user <USER_ID> | current] NAMESPACE {PACKAGE_NAME | RESET_MODE}
      Reset the global/secure table for a package with mode.
      RESET_MODE is one of {untrusted_defaults, untrusted_clear, trusted_defaults}, case-insensitive
  list [--user <USER_ID> | current] NAMESPACE
      Print all defined keys.
      NAMESPACE is one of {system, secure, global}, case-insensitive

列出您可以使用的特定命名空间中的可用设置

$ settings list system

例如。

© www.soinside.com 2019 - 2024. All rights reserved.