Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Granting accessibility service permission for debug purposes

my app uses accessibility permission and every time i run it i need to grant the permission manually , it is tedious, is there an option to grant my app this permission, by some command ,just for debug purposes? Thank you.

like image 868
The Y.c Avatar asked Oct 17 '25 15:10

The Y.c


1 Answers

There is, although I'm not sure if you need to do it as the root user. Try this command.

adb shell settings put secure enabled_accessibility_services %accessibility:packagename/packagename.YourAccessibilityServiceName

Keep in mind that if you have applicationIdSuffix for your debug build this command becomes

adb shell settings put secure enabled_accessibility_services %accessibility:packagename.applicationIdSuffix/packagename.YourAccessibilityServiceName

You can read more about the other secure settings you can modify using shell commands here.

like image 130
Venkata Narayana Avatar answered Oct 20 '25 06:10

Venkata Narayana