1

I would like to be able to use ADB to fully manage the process of a phonecall (primarily as I have cracked my screen and cannot see anything).

I know I can initiated a phonecall through:

adb shell am start -a android.intent.action.CALL -d tel:1234567890

Similarly I know I can use key events to end a call:

adb shell input keyevent KEYCODE_ENDCALL

However I have run into issues when the voicemail asks "press 1 to listen to your message, 2 for settings, etc".

I was hoping that the following command would work:

adb shell input keyevent KEYCODE_1

or at least the following:

adb shell sendevent /dev/input/event0 1 2 1
adb shell sendevent /dev/input/event0 1 2 0

However the voicemail does not recognise the selection and just repeats the message. I have no way to validate visually as I have no access to the screen.

Any suggestions?

Thanks for your help.

References:

  1. Making a call through adb How to make a call via pc by ADB command on android?
  2. Input event and events' list ADB Shell Input Events
  3. Send event https://groups.google.com/forum/?fromgroups=#!topic/android-beginners/il2PqSKRFNI
Community
  • 1
  • 1
user2096704
  • 11
  • 1
  • 2

1 Answers1

0

During the call you need to switch to the "Dialpad" tab in order to be able to send the DTMF codes

Alex P.
  • 30,437
  • 17
  • 118
  • 169
  • That makes perfect sense :) Since I have read your reply I have been looking into how to switch to the Dialpad (within CM10 rom), however I have not had much luck so far. Do you happen to know the command that would be required? I assume that once I have switched to Dialpad one of the two approaches identified in the original post will then work. – user2096704 Feb 21 '13 at 21:13
  • I am stuck in a similar issue, so did you find any resolution for it? – Tulika Apr 15 '15 at 07:48