6

I would like to turn off all the sounds on my Android device, using ADB.

Is that possible?

syntagma
  • 23,346
  • 16
  • 78
  • 134
  • http://stackoverflow.com/a/21059714/1778421 – Alex P. Nov 05 '14 at 18:15
  • 2
    For the record, I think the close decision is wrong. Not only is ADB a programming tool (the D stands for Debugging), it is often used within a script to automatically test apps (that's how I got here). In this specific case it's very likely to be the case, as most people won't bother muting via ADB when they can just click on the device. – Roy Falk May 18 '16 at 05:51

3 Answers3

7

In a terminal run:

adb shell input keyevent 164
Nelson Almendra
  • 784
  • 1
  • 9
  • 20
3

Run "adb shell input keyevent 25" multiple times in a batch file

Don Chakkappan
  • 7,397
  • 5
  • 44
  • 59
  • 3
    I think will be better to call: adb shell input keyevent 164 – adrbtk Jan 21 '16 at 14:16
  • 4
    For reference: `25 KEYCODE_VOLUME_DOWN`, `164 KEYCODE_VOLUME_MUTE`. Source: https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_VOLUME_DOWN – domen Aug 10 '17 at 08:24
1

One solution could be to make an app that you install on the phone which can receive an intent sent via adb and then have the app do the muting.

Hein Andre Grønnestad
  • 6,885
  • 2
  • 31
  • 43