It's a lot easier to test accessibility on the fly using ADB. This gist attempts to make the days of navigating through the Android device settings UI to change Accessibility settings obsolete.
These ADB commands will hopefully encourage Android developers to test and use their apps with common Accessiblility settings enabled.
Credit to James Nitsch for inspiring this, and for figuring out the put
commands to enable these settings.
adb shell settings put system font_scale 0.85
(small)
adb shell settings put system font_scale 1.0
(default)
adb shell settings put system font_scale 1.15
(large)
adb shell settings put system font_scale 1.30
(largest)
adb shell settings put system font_scale 2.0
(sizes like this can only be achieved with custom adb setting, not from ui)
disable talkback
adb shell settings put secure enabled_accessibility_services com.android.talkback/com.google.android.marvin.talkback.TalkBackService
enable talkback
adb shell settings put secure enabled_accessibility_services com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService
Properties:
accessibility_display_daltonizer_enabled=1
accessibility_display_daltonizer=11
accessibility_display_daltonizer=12
accessibility_display_daltonizer=13
Examples:
adb shell settings put secure accessibility_display_daltonizer_enabled 1
adb shell settings put secure accessibility_display_daltonizer 0
adb shell settings put secure accessibility_display_daltonizer 11
adb shell settings put secure accessibility_display_daltonizer 12
adb shell settings put secure accessibility_display_daltonizer 13
0 == Monochromatic
11 is for Deuteranomaly (red-green)
12 is for Protanomaly (red-green)
13 is for Tritanomaly (blue-yellow)
Property: accessibility_display_inversion_enabled=1
ADB Command: adb shell settings put secure accessibility_display_inversion_enabled 1
Property: high_text_contrast_enabled=1
ADB Command: adb shell settings put secure high_text_contrast_enabled 1
Set: adb shell settings put secure accessibility_display_magnification_scale 5.0
Enable: adb shell settings put secure accessibility_display_magnification_enabled 1
Disable: adb shell settings put secure accessibility_display_magnification_enabled 0
adb shell settings list system
adb shell settings list global
adb shell settings list secure
Also, adb shell getprop
is a great way to expose a lot of other properties you can change with the adb shell setprop
functionality
adb shell settings put system show_touches 1
adb shell settings put system pointer_location 1
https://developer.android.com/reference/android/provider/Settings
Are you sure enabling Accessbility is possible nowadays?
I've tried it, and it caused only issues. Tested on both Pixel 4 and emulator with Android R.
Also reported here about this:
https://issuetracker.google.com/issues/186875374