Skip to content

Android ADB Shell Media Session


Connect to AudioService

adb shell cmd media_session volume

Set Media Volume

adb shell media volume --show --stream 3 --set 'N'

Set Fine Volume (Samsung Devices)

adb shell cmd media_session volume --show --setfine 150

Control Stream and Set Volume Index

adb shell cmd media_session volume --show --stream 3 --set 11 
adb shell cmd media_session volume --get
adb shell cmd media_session volume --stream 3 --get
adb shell cmd media_session volume --getfine

Increase Media Volume

adb shell cmd media_session volume --show --adj raise

Decrease Media Volume

adb shell cmd media_session volume --show --adj lower
adb shell cmd media_session volume --get
adb shell cmd media_session list-sessions

Monitor Updates to Session

adb shell cmd media_session monitor spotify-media-session

Press Play Key

adb shell cmd media_session dispatch play

Dispatch Pause

adb shell cmd media_session dispatch pause

Dispatch Play-Pause

adb shell cmd media_session dispatch play-pause

Dispatch Mute

adb shell cmd media_session dispatch mute

Dispatch Headsethook

adb shell cmd media_session dispatch headsethook

Dispatch Stop

adb shell cmd media_session dispatch stop

Dispatch Next

adb shell cmd media_session dispatch next

Dispatch Previous

adb shell cmd media_session dispatch previous

Dispatch Rewind

adb shell cmd media_session dispatch rewind

Dispatch Record

adb shell cmd media_session dispatch record 

Dispatch Fast-Forward

adb shell cmd media_session dispatch fast-forward