简体   繁体   English

如何使用adb shell打开Android的设备扬声器

[英]How do you turn on device speakers for Android using adb shell

Have not seen any commands regarding turning the Android device speakers on using "adb shell", curious if there is a way? 还没有看到任何有关使用“ adb shell”打开Android设备扬声器的命令,是否有办法?

#call phone
adb shell am start -a android.intent.action.CALL -d tel:X-XXX-XXXX

# ******* put speaker on here *******

sleep X

#end call
adb shell input keyevent KEYCODE_ENDCALL

To set Speakerphone on from adb shell use: 要从adb shell 设置扬声器,请使用:

  • in Android 4.4.4: adb shell service call audio 35 i32 1 在Android 4.4.4中: adb shell service call audio 35 i32 1
  • in Android 5.1.0: adb shell service call audio 36 i32 1 在Android 5.1.0中: adb shell service call audio 36 i32 1
  • in Android 6.0.1: adb shell service call audio 30 i32 1 在Android 6.0.1中: adb shell service call audio 30 i32 1
  • in Android 7.0+: adb shell service call audio 29 i32 1 在Android 7.0+中: adb shell service call audio 29 i32 1

Replace 1 with 0 to set it off. 1替换为0以将其关闭。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM