I've tried the command adb shell settings put secure enabled_accessibility_services com.android.talkback/com.google.android.marvin.talkback.TalkBackService
to enable talkback from adb shell. It's toggling the ui button which signifies the status of talkback, but talkback is not actually getting enabled.
I am trying to enable talkback programmatically for android 6.0. Is there any other way thorough which I can enable it?
Asked
Active
Viewed 6,051 times
7

Puneeth Manyam
- 71
- 1
- 7
3 Answers
24
Commands to toggle TalkBack:
// disable
adb shell settings put secure enabled_accessibility_services com.android.talkback/com.google.android.marvin.talkback.TalkBackService
// enable
adb shell settings put secure enabled_accessibility_services com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService
Kudos to @zeh

Estevão Lucas
- 4,440
- 34
- 37
-
Any clue how to change speed of talkback with adb too? – Mark Han Jun 08 '20 at 20:03
2
For convenience, I use a shell script to toggle this setting.
output=$(adb shell settings get secure enabled_accessibility_services)
if [[ "$output" == "com.android.talkback/com.google.android.marvin.talkback.TalkBackService" ]]; then
adb shell settings put secure enabled_accessibility_services com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService
else
adb shell settings put secure enabled_accessibility_services com.android.talkback/com.google.android.marvin.talkback.TalkBackService
fi

Simon Featherstone
- 1,716
- 23
- 40
0
Are you running this alongside any other accessibility services or UI Automation (which utilizes the accessibility APIs)? Accessibility services are only allowed to run one at a time, and attempting otherwise will cause exceptions all over the place. Check LogCat and see if TalkBack is attempting to start up, but throwing exceptions when doing so.

MobA11y
- 18,425
- 3
- 49
- 76