2

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
Kara
  • 6,115
  • 16
  • 50
  • 57
Grayson Henry
  • 834
  • 3
  • 11
  • 22

1 Answers1

0

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.

Alex P.
  • 30,437
  • 17
  • 118
  • 169
  • Thanks for the response! I am rooted and when I enter in the command, the output I get: Result: Parcel(00000000 '....') It does not seem to be working? Should the button get "selected" when that command is entered? – Grayson Henry Sep 19 '14 at 01:56
  • UI does not get updated. What's your android version? – Alex P. Sep 19 '14 at 04:30