How to change music volume on Fairphone 4 LineageOS 23.2 with ADB, but without sending events of volume keys?
Oct 10, 6:46pm

You can change the media volume directly with the media shell command — no key events involved:

bash
# Raise/lower media volume (stream 3) by one step
adb shell media volume --stream 3 --raise
adb shell media volume --stream 3 --lower

# Or set an absolute value (0–15 on most devices)
adb shell media volume --stream 3 --set 10

# Show the volume panel on screen while changing it
adb shell media volume --show --stream 3 --raise

Useful variations:

  • Query current volume:
    bash
    adb shell media volume --stream 3 --get
  • Other streams: 0 = ring, 2 = alarm, 4 = voice call (values differ per stream, use --get to see the range).

Alternatively, there's also the lower-level audio service command:

bash
adb shell service call audio ...

but media volume is much easier and works on LineageOS 23.2 (Android 13) out of the box. Note it changes the currently active volume if media is playing — stream 3 is the music/media stream, which is what you want.

Oct 10, 6:46pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Vibe can make mistakes. Check answers. Learn more