Adb命令修改多媒体音量
1、查看audio的全部信息(各音频流音量,焦点,策略等)
dumpsys audio
2、设置音量并且显示音量UI
//stream 3表示多媒体,10表示音量值
media volume --show --stream 3 --set 10
3、音量调大调小
media volume --stream 3 --adj raise media volume --stream 0 --adj lower media volume --show --stream 3 --adj raise media volume --show --stream 0 --adj lower
4、获取当前音量
media volume --stream 3 --get
5、控制播放暂停
media dispatch play media dispatch pause
详细用法:
usage: media [subcommand] [options] media dispatch KEY media list-sessions media monitor <tag> media volume [options] media dispatch: dispatch a media key to the system. KEY may be: play, pause, play-pause, mute, headsethook, stop, next, previous, rewind, record, fast-forward. media list-sessions: print a list of the current sessions. media monitor: monitor updates to the specified session. Use the tag from list-sessions. media volume: the options are as follows: --stream STREAM selects the stream to control, see AudioManager.STREAM_* controls AudioManager.STREAM_MUSIC if no stream is specified --set INDEX sets the volume index value --adj DIRECTION adjusts the volume, use raise|same|lower for the direction --get outputs the current volume --show shows the UI during the volume change examples: adb shell media volume --show --stream 3 --set 11 adb shell media volume --stream 0 --adj lower adb shell media volume --stream 3 --get
标签:多媒体,stream,--,media,volume,音量,Adb,adj From: https://www.cnblogs.com/fieldtianye/p/17974458