2

I'm trying to start voice access but the phone I'm using doesn't have the accessibility menu is there a direct adb command to get it started?

Amateur
  • 33
  • 1
  • 5

2 Answers2

3

To start the accessibility service you can use:

adb shell settings put secure enabled_accessibility_services com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService

And to stop:

adb shell am force-stop com.google.android.marvin.talkback
Try this
  • 511
  • 3
  • 8
  • com.google.android.marvin.talk is the package name? – Amateur Jul 27 '20 at 02:56
  • Yes. It's the package name of talkback app used to enable and disable accessibility. If you're using emulator you will need to download it (https://stackoverflow.com/questions/37098548/testing-accessibility-on-emulated-device-marshmallow). Hope this will clear your doubt. – Try this Jul 27 '20 at 05:08
  • so if the i changed the package name to 'com.android.cts.apps.accessibility.voiceaccess' then it would be 'shell settings put secure enabled_accessibility_services com.android.cts.apps.accessibility.voiceaccess/com.android.cts.apps.accessibility.voiceaccess.TalkBackService' ? – Amateur Jul 28 '20 at 15:53
  • Given you have TalkBackService in your package "com.android.cts.apps.accessibility.voiceaccess". – Try this Jul 29 '20 at 05:52
1

NEW_SERVICE can be enabled by

adb shell settings put secure enabled_accessibility_services NEW_SERVICE

However, this can also disable all OTHER_ENABLED_SERVICES. So It's better to use

adb shell settings put secure enabled_accessibility_services OTHER_ENABLED_SERVICES:NEW_SERVICE

Here we use : to join services. The content of OTHER_ENABLED_SERVICES can be known using

adb shell settings get secure enabled_accessibility_services 

The content of NEW_SERVICE can be extracted from the result too, if you turn on the service maually.

NEW_SERVICES can be disabled using

adb shell settings put secure enabled_accessibility_services OTHER_ENABLED_SERVICES
bilabila
  • 973
  • 1
  • 12
  • 18