【问题标题】:requires:android.permission.WRITE_SECURE_SETTINGS while running adb shell commands运行 adb shell 命令时需要:android.permission.WRITE_SECURE_SETTINGS
【发布时间】:2022-07-12 16:37:13
【问题描述】:

我正在尝试在 OxygenOS 上运行 Android 12Oneplus 9 上编辑后退手势缩放设置。库存设置不允许我为屏幕左侧的后退手势设置限制,所以我想手动设置。

adb shell settings put secure back_gesture_inset_scale_left -1

这个命令成功地限制了我想要在 Android 10 和 11 中的同一台设备上的手势,但现在运行它会给我这个错误。

Exception occurred while executing 'put':
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS

不知道如何解决这个问题,我启用了 USB 调试,禁用权限监控,但仍然没有。该设备已被 adb 识别。

【问题讨论】:

    标签: android shell adb android-service


    【解决方案1】:

    打开“开发者选项 -> 禁用权限监控”开关。

    enter image description here

    【讨论】:

      猜你喜欢
      • 2021-11-06
      • 2012-05-03
      • 1970-01-01
      • 1970-01-01
      • 2012-03-12
      • 2012-01-06
      • 1970-01-01
      • 2021-02-26
      • 2020-10-06
      相关资源
      最近更新 更多