ADB Command to set volume?

前端 未结 4 626
暗喜
暗喜 2020-12-19 23:06

Is there any Adb command to set the volume to a particular value? I know that we can do

adb shell input keyevent 

for volume up and down b

4条回答
  •  不知归路
    2020-12-19 23:21

    On a rooted phone you can call setMasterVolume() with service call audio i32 . The codes are version specific. Let's say you want to set volume to 50% on a KitKat device. The command will be:

    service call audio 9 i32 50
    

提交回复
热议问题