Created
July 31, 2020 21:14
-
-
Save benbaxter/ee54194124296bcd447e47046f7a54c8 to your computer and use it in GitHub Desktop.
Talkback enable/disable script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2020 Google LLC. | |
# SPDX-License-Identifier: Apache-2.0 | |
function talkback() { | |
if [[ -z $1 ]]; then | |
echo "Usage: $0 [on/off]" | |
exit | |
fi | |
if [[ $1 == 'on' ]]; then | |
service='com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService:com.google.android.marvin.talkback/com.android.talkback.TalkBackService'\ | |
int_enable='1' | |
else | |
service='' | |
int_enable='0' | |
fi | |
adb shell settings --user current put secure enabled_accessibility_services \""$service"\" | |
adb shell settings --user current put secure accessibility_enabled $int_enable | |
adb shell settings --user current put secure touch_exploration_enabled $int_enable | |
adb shell settings --user current put secure accessibility_script_injection $int_enable | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment