Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

requires:android.permission.WRITE_SECURE_SETTINGS while running adb shell commands

I am trying to edit the settings for back gesture scaling on my Oneplus 9 running Android 12 on OxygenOS. The stock settings don’t let me set limits for the back gesture on the left side of the screen, so I wanted to set it manually.

adb shell settings put secure back_gesture_inset_scale_left -1

This command successfully limited the gesture like I wanted on this same device in Android 10 and 11, but running it now gives me this error.

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

Not sure how to address this, I have enabled USB Debugging, Disabled Permissions Monitoring, and still nothing. The device is recognized by adb.

like image 397
Sergio Rossi Avatar asked Jul 19 '26 17:07

Sergio Rossi


2 Answers

open the "Developer options -> Disable permission monitoring" toggle.

enter image description here

like image 181
Bright Avatar answered Jul 21 '26 22:07

Bright


I am using Xiaomi Redmi Note 11 and I needed to open "USB debugging (Security settings)" option. Here...

like image 44
NJT145 Avatar answered Jul 21 '26 20:07

NJT145



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!