How do you turn on device speakers for Android usi

2019-08-02 16:35发布

Have not seen any commands regarding turning the Android device speakers on using "adb shell", curious if there is a way?

#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

标签: android adb
1条回答
爷的心禁止访问
2楼-- · 2019-08-02 17:18

To set Speakerphone on from adb shell use:

  • in 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
  • in Android 6.0.1: adb shell service call audio 30 i32 1
  • in Android 7.0+: adb shell service call audio 29 i32 1

Replace 1 with 0 to set it off.

查看更多
登录 后发表回答