Created
March 8, 2022 23:35
-
-
Save bhyde/1e4b90fb1fb9f8bc14371a28ce86a815 to your computer and use it in GitHub Desktop.
Script to grant the Voice Desktop application access to the microphone.
This file contains hidden or 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
#!/bin/bash | |
set -e -u -o pipefail | |
# Grant this Voice Desktop access to the user's microphone. | |
app='com.jerrkawz.voiceDesktop' | |
svc='kTCCServiceMicrophone' | |
# Modifying user's Transparency, Consent, and Control settings, e.g. TCC | |
access_db="$HOME/Library/Application Support/com.apple.TCC/TCC.db" | |
# By adding this row. The schema for this row changes often) | |
# so this shell cmd interesting: sqlite3 "$access_db" "select * from access where service == 'kTCCServiceMicrophone';" | |
TIMESTAMP=$(date +%s) | |
row="VALUES('$svc','$app',0,2,0,1,NULL,NULL,NULL,'UNUSED',NULL,NULL,'$TIMESTAMP')" | |
# using sql lite | |
sqlite3 "$access_db" "insert or replace into access $row ;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment