39 lines
796 B
Markdown
39 lines
796 B
Markdown
|
# 通过 ADB Shell 调节音量
|
|||
|
|
|||
|
## 方法一
|
|||
|
|
|||
|
可以通过模拟音量建的方法进行调节:
|
|||
|
|
|||
|
```bash
|
|||
|
adb shell input keyevent
|
|||
|
```
|
|||
|
|
|||
|
## 方法二
|
|||
|
|
|||
|
```bash
|
|||
|
adb shell media volume --stream <n> --adj <lower|same|raise>
|
|||
|
```
|
|||
|
|
|||
|
一般而言,stream 有如下配置
|
|||
|
|
|||
|
* stream0=STREAM_VOICE_CALL
|
|||
|
* stream1=STREAM_SYSTEM
|
|||
|
* stream2=STREAM_RING
|
|||
|
* stream4=STREAM_ALARM
|
|||
|
* stream5=STREAM_NOTIFICATION
|
|||
|
* stream6=STREAM_BLUETOOTH_SCO
|
|||
|
* stream7=STREAM_SYSTEM_ENFORCED
|
|||
|
* stream8=STREAM_DTMF
|
|||
|
* stream9=STREAM_TTS
|
|||
|
* stream10=STREAM_ACCESSIBILITY
|
|||
|
* stream11=STREAM_VR_TTS
|
|||
|
* stream12=STREAM_NAVI_TTS
|
|||
|
* stream13=STREAM_TUNER
|
|||
|
* stream14=STREAM_ICALL
|
|||
|
* stream15=STREAM_CARPLAY_ALT
|
|||
|
* stream16=STREAM_MOIVE
|
|||
|
* stream17=STREAM_USB_MUSIC
|
|||
|
* stream18=STREAM_QQ_MUSIC
|
|||
|
* stream19=STREAM_BT_MUSIC
|
|||
|
* stream20=STREAM_XMLY_MUSIC
|