Skip to content

Instantly share code, notes, and snippets.

@dbdness
Created October 15, 2023 15:42
Show Gist options
  • Save dbdness/487ab44fd43e9e99fd78b6c128326e9e to your computer and use it in GitHub Desktop.
Save dbdness/487ab44fd43e9e99fd78b6c128326e9e to your computer and use it in GitHub Desktop.
Mute Android apps
# 1. Run 'adb devices' when connected to a phone with USB debugging enabled.
# 2. Run 'adb shell' to start the interactive shell
# 3. List the full package names for the apps/games to be muted
cmd package list packages | grep -i -E ‘frozen|pies|color’
# 4. Mute apps with appops commands (replace package names):
# Example 1 - Mute
cmd appops set com.easybrain.art.puzzle TAKE_AUDIO_FOCUS ignore
cmd appops set com.easybrain.art.puzzle PLAY_AUDIO deny
# Example 2 - Mute
cmd appops set com.Trailmix.LoveAndPiesMerge TAKE_AUDIO_FOCUS ignore
cmd appops set com.Trailmix.LoveAndPiesMerge PLAY_AUDIO deny
# App can be unmuted using the same command but with the 'allow' argument:
# Example 1 - Unmute
cmd appops set com.easybrain.art.puzzle TAKE_AUDIO_FOCUS allow
cmd appops set com.easybrain.art.puzzle PLAY_AUDIO allow
# Example 2 - Unmute
cmd appops set com.Trailmix.LoveAndPiesMerge TAKE_AUDIO_FOCUS allow
cmd appops set com.Trailmix.LoveAndPiesMerge PLAY_AUDIO allow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment